X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Farch%2Fx86%2Fboot%2Ftables.c;h=b7dc4fe8cc9861da390ecbcd5b1b1b22b9c1539c;hb=cb91e1525eb0b81f9bc2e24e3404d6a9efc1cce3;hp=d816e767500f1fb6cbbde5813f36153f3a7df816;hpb=8677a23d5b053d550f70246de9c7dc8fd4e2fbf9;p=coreboot.git diff --git a/src/arch/x86/boot/tables.c b/src/arch/x86/boot/tables.c index d816e7675..b7dc4fe8c 100644 --- a/src/arch/x86/boot/tables.c +++ b/src/arch/x86/boot/tables.c @@ -31,6 +31,7 @@ #include #include #include +#include uint64_t high_tables_base = 0; uint64_t high_tables_size; @@ -120,7 +121,7 @@ struct lb_memory *write_tables(void) #endif /* CONFIG_GENERATE_MP_TABLE */ #if CONFIG_GENERATE_ACPI_TABLES == 1 -#define MAX_ACPI_SIZE (47 * 1024) +#define MAX_ACPI_SIZE (45 * 1024) post_code(0x9c); /* Write ACPI tables to F segment and high tables area */ @@ -178,9 +179,30 @@ struct lb_memory *write_tables(void) } #endif +#define MAX_SMBIOS_SIZE 2048 +#if CONFIG_GENERATE_SMBIOS_TABLES + high_table_pointer = (unsigned long)cbmem_add(CBMEM_ID_SMBIOS, MAX_SMBIOS_SIZE); + if (high_table_pointer) { + unsigned long new_high_table_pointer; + new_high_table_pointer = smbios_write_tables(high_table_pointer); + rom_table_end = ALIGN(rom_table_end, 16); + memcpy((void *)rom_table_end, (void *)high_table_pointer, sizeof(struct smbios_entry)); + rom_table_end += sizeof(struct smbios_entry); + + if (new_high_table_pointer > ( high_table_pointer + MAX_SMBIOS_SIZE)) { + printk(BIOS_ERR, "ERROR: Increase SMBIOS size\n"); + } + printk(BIOS_DEBUG, "SMBIOS tables: %ld bytes.\n", + new_high_table_pointer - high_table_pointer); + } else { + unsigned long new_rom_table_end = smbios_write_tables(rom_table_end); + printk(BIOS_DEBUG, "SMBIOS size %ld bytes\n", new_rom_table_end - rom_table_end); + rom_table_end = ALIGN(new_rom_table_end, 16); + } +#endif -#define MAX_COREBOOT_TABLE_SIZE (8 * 1024) +#define MAX_COREBOOT_TABLE_SIZE (32 * 1024) post_code(0x9d); high_table_pointer = (unsigned long)cbmem_add(CBMEM_ID_CBTABLE, MAX_COREBOOT_TABLE_SIZE);