diff --git a/src/mem/intel_flash.c b/src/mem/intel_flash.c index b96becc2d..cd064ddee 100644 --- a/src/mem/intel_flash.c +++ b/src/mem/intel_flash.c @@ -330,7 +330,7 @@ intel_flash_add_mappings(flash_t *dev) flash_read, flash_readw, flash_readl, flash_write, flash_writew, flash_writel, dev->array + fbase, MEM_MAPPING_EXTERNAL|MEM_MAPPING_ROM|MEM_MAPPING_ROMCS, (void *) dev); - mem_mapping_add(&(dev->mapping_h[i + (max >> 1)]), (base | 0xfff00000), 0x10000, + mem_mapping_add(&(dev->mapping_h[i + max]), (base | 0xfff00000), 0x10000, flash_read, flash_readw, flash_readl, flash_write, flash_writew, flash_writel, dev->array + fbase, MEM_MAPPING_EXTERNAL|MEM_MAPPING_ROM|MEM_MAPPING_ROMCS, (void *) dev);