# HG changeset patch # User gbtju85@xxxxxxxxx # Replace bios_relocate hook with bios_load hook in hvmloader. Sign-off-by: Bei Guan diff -r 42edf1481c57 tools/firmware/hvmloader/rombios.c --- a/tools/firmware/hvmloader/rombios.c Fri Jul 22 08:55:19 2011 +0100 +++ b/tools/firmware/hvmloader/rombios.c Sun Jul 24 02:22:42 2011 +0800 @@ -81,11 +81,15 @@ memset(info, 0, sizeof(*info)); } -static void rombios_relocate(void) +static void rombios_load(const struct bios_config *config) { uint32_t bioshigh; struct rombios_info *info; + printf("Loading %s ...\n", config->name); + memcpy((void *)config->bios_address, config->image, + config->image_size); + bioshigh = rombios_highbios_setup(); info = (struct rombios_info *)BIOS_INFO_PHYSICAL_ADDRESS; @@ -163,6 +167,7 @@ .image_size = sizeof(rombios), .bios_address = ROMBIOS_PHYSICAL_ADDRESS, + .load = rombios_load, .load_roms = 1, @@ -172,8 +177,6 @@ .bios_info_setup = rombios_setup_bios_info, .bios_info_finish = NULL, - .bios_relocate = rombios_relocate, - .vm86_setup = rombios_init_vm86_tss, .e820_setup = rombios_setup_e820,