x86: set smbios rom size based on CONFIG_ROM_SIZE
Instead of relying on the CBFS header's romsize field use the CONFIG_ROM_SIZE Kconfig variable. That value is what is used to create the rom file as it is. Therefore, just remove the dependency. Change-Id: If855d7378df20080061e27e4988e96aee233d1e0 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9130 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
This commit is contained in:
parent
22564088c7
commit
9eebbd4151
|
@ -28,7 +28,6 @@
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <cpu/x86/name.h>
|
#include <cpu/x86/name.h>
|
||||||
#include <cbfs_core.h>
|
|
||||||
#include <arch/byteorder.h>
|
#include <arch/byteorder.h>
|
||||||
#include <elog.h>
|
#include <elog.h>
|
||||||
#include <memory_info.h>
|
#include <memory_info.h>
|
||||||
|
@ -258,14 +257,7 @@ static int smbios_write_type0(unsigned long *current, int handle)
|
||||||
vboot_data->vbt10 = (u32)t->eos + (version_offset - 1);
|
vboot_data->vbt10 = (u32)t->eos + (version_offset - 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{
|
t->bios_rom_size = (CONFIG_ROM_SIZE / 65535) - 1;
|
||||||
const struct cbfs_header *header;
|
|
||||||
u32 romsize = CONFIG_ROM_SIZE;
|
|
||||||
header = cbfs_get_header(CBFS_DEFAULT_MEDIA);
|
|
||||||
if (header != CBFS_HEADER_INVALID_ADDRESS)
|
|
||||||
romsize = ntohl(header->romsize);
|
|
||||||
t->bios_rom_size = (romsize / 65535) - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
t->system_bios_major_release = 4;
|
t->system_bios_major_release = 4;
|
||||||
t->bios_characteristics =
|
t->bios_characteristics =
|
||||||
|
|
Loading…
Reference in New Issue