]> git.sur5r.net Git - u-boot/blobdiff - lib/efi_loader/efi_boottime.c
regulator: pfuze100: add SPDX License
[u-boot] / lib / efi_loader / efi_boottime.c
index ac26375072f0d941ad83633a552dad99d2f60e56..51080cbeed2f35d03fb1deb983a0d0a26021a92b 100644 (file)
@@ -37,8 +37,9 @@ static bool efi_is_direct_boot = true;
  * In most cases we want to pass an FDT to the payload, so reserve one slot of
  * config table space for it. The pointer gets populated by do_bootefi_exec().
  */
-static struct efi_configuration_table EFI_RUNTIME_DATA efi_conf_table[2];
+static struct efi_configuration_table __efi_runtime_data efi_conf_table[2];
 
+#ifdef CONFIG_ARM
 /*
  * The "gd" pointer lives in a register on ARM and AArch64 that we declare
  * fixed when compiling U-Boot. However, the payload does not know about that
@@ -46,16 +47,20 @@ static struct efi_configuration_table EFI_RUNTIME_DATA efi_conf_table[2];
  * EFI callback entry/exit.
  */
 static volatile void *efi_gd, *app_gd;
+#endif
 
 /* Called from do_bootefi_exec() */
 void efi_save_gd(void)
 {
+#ifdef CONFIG_ARM
        efi_gd = gd;
+#endif
 }
 
 /* Called on every callback entry */
 void efi_restore_gd(void)
 {
+#ifdef CONFIG_ARM
        /* Only restore if we're already in EFI context */
        if (!efi_gd)
                return;
@@ -63,12 +68,16 @@ void efi_restore_gd(void)
        if (gd != efi_gd)
                app_gd = gd;
        gd = efi_gd;
+#endif
 }
 
 /* Called on every callback exit */
 efi_status_t efi_exit_func(efi_status_t ret)
 {
+#ifdef CONFIG_ARM
        gd = app_gd;
+#endif
+
        return ret;
 }
 
@@ -529,6 +538,8 @@ static efi_status_t EFIAPI efi_exit_boot_services(void *image_handle,
 {
        EFI_ENTRY("%p, %ld", image_handle, map_key);
 
+       board_quiesce_devices();
+
        /* Fix up caches for EFI payloads if necessary */
        efi_exit_caches();
 
@@ -781,10 +792,10 @@ static const struct efi_boot_services efi_boot_services = {
 };
 
 
-static uint16_t EFI_RUNTIME_DATA firmware_vendor[] =
+static uint16_t __efi_runtime_data firmware_vendor[] =
        { 'D','a','s',' ','U','-','b','o','o','t',0 };
 
-struct efi_system_table EFI_RUNTIME_DATA systab = {
+struct efi_system_table __efi_runtime_data systab = {
        .hdr = {
                .signature = EFI_SYSTEM_TABLE_SIGNATURE,
                .revision = 0x20005, /* 2.5 */