summaryrefslogtreecommitdiffstats
path: root/src/interface/efi
diff options
context:
space:
mode:
authorMichael Brown2016-06-20 17:08:17 +0200
committerMichael Brown2016-06-20 17:08:17 +0200
commit694c18addc0dfdf51369f6d598dd0c8ca4bf2861 (patch)
tree188368a7f646cf1a81cce76519ebc5afb638b343 /src/interface/efi
parent[smsc75xx] Allow up to 100ms for reset to complete (diff)
downloadipxe-694c18addc0dfdf51369f6d598dd0c8ca4bf2861.tar.gz
ipxe-694c18addc0dfdf51369f6d598dd0c8ca4bf2861.tar.xz
ipxe-694c18addc0dfdf51369f6d598dd0c8ca4bf2861.zip
[efi] Report failures to stop the EFI timer tick event
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi')
-rw-r--r--src/interface/efi/efi_timer.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/interface/efi/efi_timer.c b/src/interface/efi/efi_timer.c
index a574e204..da064120 100644
--- a/src/interface/efi/efi_timer.c
+++ b/src/interface/efi/efi_timer.c
@@ -126,13 +126,27 @@ static void efi_tick_startup ( void ) {
*/
static void efi_tick_shutdown ( int booting __unused ) {
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
+ EFI_STATUS efirc;
+ int rc;
/* Stop timer tick */
- bs->SetTimer ( efi_tick_event, TimerCancel, 0 );
+ if ( ( efirc = bs->SetTimer ( efi_tick_event, TimerCancel, 0 ) ) != 0 ){
+ rc = -EEFI ( efirc );
+ DBGC ( colour, "EFI could not stop timer tick: %s\n",
+ strerror ( rc ) );
+ /* Self-destruct initiated */
+ return;
+ }
DBGC ( colour, "EFI timer stopped\n" );
/* Destroy timer tick event */
- bs->CloseEvent ( efi_tick_event );
+ if ( ( efirc = bs->CloseEvent ( efi_tick_event ) ) != 0 ) {
+ rc = -EEFI ( efirc );
+ DBGC ( colour, "EFI could not destroy timer tick: %s\n",
+ strerror ( rc ) );
+ /* Probably non-fatal */
+ return;
+ }
}
/** Timer tick startup function */