mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-28 15:33:42 +02:00
Fix broken flash chip base address logic
Elan SC520 requries us to deal with flash chip base addresses at locations other than top of 4GB. The logic for that was incorrectly triggered also when a board had more than one flash chip. This patch will honor flashbase only when probing for the first flash chip on the board, and look at top of 4GB for later chips. Corresponding to flashrom svn r415 and coreboot v2 svn r3932. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Myles Watson <mylesgw@gmail.com>
This commit is contained in:
parent
09c1333702
commit
816139e06d
@ -121,7 +121,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force)
|
||||
size = getpagesize();
|
||||
}
|
||||
|
||||
base = flashbase ? flashbase : (0xffffffff - size + 1);
|
||||
base = flashbase && flashchips == first_flash ? flashbase : (0xffffffff - size + 1);
|
||||
flash->virtual_memory = bios = physmap("flash chip", base, size);
|
||||
|
||||
if (force)
|
||||
|
Loading…
x
Reference in New Issue
Block a user