Skip to contentSkip to conversation

x86/tboot: make resume error messages visible

PATCH New Jan Beulich 1 participant 1 message Sep 16, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/tboot: make resume error messages visible

With tboot_s3_resume() running before console_resume(), the error messages so far printed by it are mostly guaranteed to go into nirwana. Latch MACs into a static variable instead, and issue the messages right before calling panic().

xen/arch/x86/acpi/power.c +1 -1
@@ -193,7 +193,7 @@ static int enter_state(u32 state)
     printk(XENLOG_INFO "Finishing wakeup from ACPI S%d state.\n", state);
 
     if ( (state == ACPI_STATE_S3) && error )
-        panic("Memory integrity was lost on resume (%d)\n", error);
+        tboot_s3_error(error);
 
  done:
     spin_debug_enable();
xen/arch/x86/tboot.c +29 -14

64 lines not on this page · raw message

xen/include/asm-x86/tboot.h +1 -0
@@ -119,6 +119,7 @@ int tboot_in_measured_env(void);
 int tboot_protect_mem_regions(void);
 int tboot_parse_dmar_table(acpi_table_handler dmar_handler);
 int tboot_s3_resume(void);
+void tboot_s3_error(int error);
 
 #endif /* __TBOOT_H__ */
 

With tboot_s3_resume() running before console_resume(), the error messages so far printed by it are mostly guaranteed to go into nirwana. Latch MACs into a static variable instead, and issue the messages right before calling panic().

xen/arch/x86/acpi/power.c +1 -1
@@ -193,7 +193,7 @@ static int enter_state(u32 state)
     printk(XENLOG_INFO "Finishing wakeup from ACPI S%d state.\n", state);
 
     if ( (state == ACPI_STATE_S3) && error )
-        panic("Memory integrity was lost on resume (%d)\n", error);
+        tboot_s3_error(error);
 
  done:
     spin_debug_enable();
xen/arch/x86/tboot.c +29 -14

64 lines not on this page · raw message

xen/include/asm-x86/tboot.h +1 -0
@@ -119,6 +119,7 @@ int tboot_in_measured_env(void);
 int tboot_protect_mem_regions(void);
 int tboot_parse_dmar_table(acpi_table_handler dmar_handler);
 int tboot_s3_resume(void);
+void tboot_s3_error(int error);
 
 #endif /* __TBOOT_H__ */
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel