All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [HVM] [BIOS] Move function calls out of 'post' function section
@ 2008-06-21 13:44 Stefan Berger
  0 siblings, 0 replies; only message in thread
From: Stefan Berger @ 2008-06-21 13:44 UTC (permalink / raw)
  To: Xen-devel; +Cc: keir.fraser

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

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.

With this option is enabled there are now 12 bytes free ($e2b7 -
$e2c2) ... 

38253 E2B6           CD                     18    int #0x18
38254 E2C3                                      .org 0xe2c3 ; NMI
Handler Entry
38255                       0000E2C3            nmi:

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>


[-- Attachment #2: rombios_move_calls_from_post_section.diff --]
[-- Type: text/x-patch, Size: 1697 bytes --]

diff -r dedfadeadf86 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c	Fri Jun 20 18:42:45 2008 +0100
+++ b/tools/firmware/rombios/rombios.c	Sat Jun 21 09:13:41 2008 -0400
@@ -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 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-21 13:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-21 13:44 [PATCH] [HVM] [BIOS] Move function calls out of 'post' function section Stefan Berger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.