summaryrefslogtreecommitdiffstats
path: root/include/efi.h
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2014-12-08 14:42:29 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-12-09 09:59:09 +0100
commite4f3215be242c86080e0355b36a3d236b26db8fc (patch)
treeaa01437f1fed142d5aa3414dc9dc7e14733309e9 /include/efi.h
parentda94ff1e37315900037dee2171f43c342616206d (diff)
downloadbarebox-e4f3215be242c86080e0355b36a3d236b26db8fc.tar.gz
barebox-e4f3215be242c86080e0355b36a3d236b26db8fc.tar.xz
efi: add proper reset hook
This allows to actually reset the system from barebox instead of dropping back into the EFI firmware. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/efi.h')
-rw-r--r--include/efi.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/efi.h b/include/efi.h
index de51e1a3c9..49b8bd44bc 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -255,9 +255,11 @@ extern efi_boot_services_t *BS;
/*
* Types and defines for EFI ResetSystem
*/
-#define EFI_RESET_COLD 0
-#define EFI_RESET_WARM 1
-#define EFI_RESET_SHUTDOWN 2
+typedef enum {
+ EFI_RESET_COLD = 0,
+ EFI_RESET_WARM = 1,
+ EFI_RESET_SHUTDOWN = 2
+} efi_reset_type_t;
/*
* EFI Runtime Services table
@@ -279,7 +281,8 @@ typedef struct {
s16 *variable_name, efi_guid_t *vendor);
void *set_variable;
void *get_next_high_mono_count;
- void *reset_system;
+ void (EFIAPI *reset_system)(efi_reset_type_t reset_type, efi_status_t reset_status,
+ unsigned long data_size, void *reset_data);
void *update_capsule;
void *query_capsule_caps;
void *query_variable_info;