From: Keir Fraser Date: Fri, 27 Jun 2008 13:43:29 +0000 (+0100) Subject: hvm rombios: Move function calls out of 'post' function section X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14192^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=da43e50cb31ba2a7f89d51d74f9547082378d9b0;p=xen.git hvm rombios: Move function calls out of 'post' function section Through recent additions to the rombios the code section of the post function has filled up considerably. When I enable the BX_TCGBIOS compile time option the BIOS crashes since the post section code (starts at $e05b) spills over into the nmi entry point (starts at $e2c3). as86 doesn't cause an error when building. Signed-off-by: Stefan Berger --- diff --git a/tools/firmware/rombios/rombios.c b/tools/firmware/rombios/rombios.c index 79a328f4a7..3b9b45d55e 100644 --- a/tools/firmware/rombios/rombios.c +++ b/tools/firmware/rombios/rombios.c @@ -9783,6 +9783,27 @@ smbios_init: #endif +#if BX_TCGBIOS +; The section between the POST entry and the NMI entry is filling up +; and causes crashes if this code was directly there +tcpa_post_part1: + call _tcpa_acpi_init + + push dword #0 + call _tcpa_initialize_tpm + add sp, #4 + + call _tcpa_do_measure_POSTs + call _tcpa_wake_event /* specs: 3.2.3.7 */ + ret + +tcpa_post_part2: + call _tcpa_calling_int19h /* specs: 8.2.3 step 1 */ + call _tcpa_add_event_separators /* specs: 8.2.3 step 2 */ + /* we do not call int 19h handler but keep following eventlog */ + call _tcpa_returned_int19h /* specs: 8.2.3 step 3/7 */ + ret +#endif ;; for 'C' strings and other data, insert them here with @@ -10003,14 +10024,7 @@ post_default_ints: mov 0x0410, ax #if BX_TCGBIOS - call _tcpa_acpi_init - - push dword #0 - call _tcpa_initialize_tpm - add sp, #4 - - call _tcpa_do_measure_POSTs - call _tcpa_wake_event /* specs: 3.2.3.7 */ + call tcpa_post_part1 #endif ;; Parallel setup @@ -10138,10 +10152,7 @@ post_default_ints: call _interactive_bootkey #if BX_TCGBIOS - call _tcpa_calling_int19h /* specs: 8.2.3 step 1 */ - call _tcpa_add_event_separators /* specs: 8.2.3 step 2 */ - /* we do not call int 19h handler but keep following eventlog */ - call _tcpa_returned_int19h /* specs: 8.2.3 step 3/7 */ + call tcpa_post_part2 #endif ;; Start the boot sequence. See the comments in int19_relocated