[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] hvmloader: make SMBIOS initialisation more general.
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1306943105 -3600 # Node ID 07af563619b59d91975aecaf92bf204ab3dfdd58 # Parent b4bb41dd122ef86147cc14421957f016066e7f46 hvmloader: make SMBIOS initialisation more general. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r b4bb41dd122e -r 07af563619b5 tools/firmware/hvmloader/config.h --- a/tools/firmware/hvmloader/config.h Wed Jun 01 16:44:31 2011 +0100 +++ b/tools/firmware/hvmloader/config.h Wed Jun 01 16:45:05 2011 +0100 @@ -16,9 +16,6 @@ /* Physical address to load at */ unsigned int bios_address; - /* SMBIOS */ - unsigned int smbios_start, smbios_end; - /* ROMS */ int load_roms; unsigned int optionrom_start, optionrom_end; @@ -31,6 +28,7 @@ void (*acpi_build_tables)(void); void (*create_mp_tables)(void); + void (*create_smbios_tables)(void); }; extern struct bios_config rombios_config; diff -r b4bb41dd122e -r 07af563619b5 tools/firmware/hvmloader/hvmloader.c --- a/tools/firmware/hvmloader/hvmloader.c Wed Jun 01 16:44:31 2011 +0100 +++ b/tools/firmware/hvmloader/hvmloader.c Wed Jun 01 16:45:05 2011 +0100 @@ -383,7 +383,7 @@ { uint32_t highbios = 0; const struct bios_config *bios; - int option_rom_sz = 0, vgabios_sz = 0, etherboot_sz = 0, smbios_sz = 0; + int option_rom_sz = 0, vgabios_sz = 0, etherboot_sz = 0; uint32_t etherboot_phys_addr = 0, option_rom_phys_addr = 0; /* Initialise hypercall stubs with RET, rendering them no-ops. */ @@ -407,11 +407,9 @@ perform_tests(); - if (bios->smbios_start) { + if (bios->create_smbios_tables) { printf("Writing SMBIOS tables ...\n"); - smbios_sz = hvm_write_smbios_tables(SCRATCH_PHYSICAL_ADDRESS, - bios->smbios_start, - bios->smbios_end); + bios->create_smbios_tables(); } printf("Loading %s ...\n", bios->name); @@ -495,10 +493,6 @@ printf(" %05x-%05x: PCI Option ROMs\n", option_rom_phys_addr, option_rom_phys_addr + option_rom_sz - 1); - if ( smbios_sz ) - printf(" %05x-%05x: SMBIOS tables\n", - bios->smbios_start, - bios->smbios_start + smbios_sz - 1); printf(" %05x-%05x: Main BIOS\n", bios->bios_address, bios->bios_address + bios->image_size - 1); diff -r b4bb41dd122e -r 07af563619b5 tools/firmware/hvmloader/rombios.c --- a/tools/firmware/hvmloader/rombios.c Wed Jun 01 16:44:31 2011 +0100 +++ b/tools/firmware/hvmloader/rombios.c Wed Jun 01 16:45:05 2011 +0100 @@ -136,6 +136,13 @@ reset_bios_checksum(); } +static void rombios_create_smbios_tables(void) +{ + hvm_write_smbios_tables(SCRATCH_PHYSICAL_ADDRESS, + SMBIOS_PHYSICAL_ADDRESS, + SMBIOS_PHYSICAL_END); +} + //BUILD_BUG_ON(sizeof(rombios) > (0x00100000U - ROMBIOS_PHYSICAL_ADDRESS)); struct bios_config rombios_config = { @@ -146,9 +153,6 @@ .bios_address = ROMBIOS_PHYSICAL_ADDRESS, - .smbios_start = SMBIOS_PHYSICAL_ADDRESS, - .smbios_end = SMBIOS_PHYSICAL_END, - .load_roms = 1, .optionrom_start = OPTIONROM_PHYSICAL_ADDRESS, @@ -162,6 +166,7 @@ .acpi_build_tables = rombios_acpi_build_tables, .create_mp_tables = rombios_create_mp_tables, + .create_smbios_tables = rombios_create_smbios_tables, }; /* diff -r b4bb41dd122e -r 07af563619b5 tools/firmware/hvmloader/seabios.c --- a/tools/firmware/hvmloader/seabios.c Wed Jun 01 16:44:31 2011 +0100 +++ b/tools/firmware/hvmloader/seabios.c Wed Jun 01 16:45:05 2011 +0100 @@ -38,9 +38,6 @@ .bios_address = SEABIOS_PHYSICAL_ADDRESS, - .smbios_start = 0, - .smbios_end = 0, - .load_roms = 0, .optionrom_start = 0, @@ -53,6 +50,7 @@ .acpi_build_tables = NULL, .create_mp_tables = NULL, + .create_smbios_tables = NULL, }; /* _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |