UPSTREAM: mainboard: Support ROM_SIZE > 16 MiB

Support ROM_SIZE greater than 16 MiB. Work around SMBIOS rom size
limitation of 16 MiB by specifying 16 MiB as the ROM size.

TEST=Build and run on neoncity

BUG=None
BRANCH=None
TEST=None

Change-Id: I3f464599cd8a1b6482db8b9deab03126c8b92128
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15108
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/351377
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
Lee Leahy 2016-06-08 12:47:07 -07:00 committed by chrome-bot
commit 489906536d
2 changed files with 27 additions and 1 deletions

View file

@ -292,7 +292,13 @@ static int smbios_write_type0(unsigned long *current, int handle)
#endif
#endif /* CONFIG_CHROMEOS */
t->bios_rom_size = (CONFIG_ROM_SIZE / 65535) - 1;
/* As a work around to prevent a compiler error, temporarily specify
* 16 MiB flash sizes when ROM size >= 16 MiB. An update is necessary
* once the SMBIOS specification addresses ROM sizes > 16 MiB.
*/
uint32_t rom_size = CONFIG_ROM_SIZE;
rom_size = MIN(CONFIG_ROM_SIZE, 16 * MiB);
t->bios_rom_size = (rom_size / 65535) - 1;
t->system_bios_major_release = 4;
t->bios_characteristics =