summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-06-23 21:47:39 -0400
committerTom Rini <trini@konsulko.com>2018-06-23 21:47:39 -0400
commit90efca253973944d7169932820e0bc6419b8cd7b (patch)
treea7a80923c54aca218d30980a8ed8f607acf489a0 /include
parent77b5ba5d2b94c5b028991c82782493f64bd4f392 (diff)
parentdd099ec44b5d0a5d2dff537fc5b3b3441a49eec6 (diff)
Merge git://git.denx.de/u-boot-x86
Diffstat (limited to 'include')
-rw-r--r--include/configs/efi-x86_payload.h2
-rw-r--r--include/efi.h24
2 files changed, 12 insertions, 14 deletions
diff --git a/include/configs/efi-x86_payload.h b/include/configs/efi-x86_payload.h
index 9c62fd24b8..1cf5c037e8 100644
--- a/include/configs/efi-x86_payload.h
+++ b/include/configs/efi-x86_payload.h
@@ -14,7 +14,7 @@
#define CONFIG_SYS_MONITOR_LEN (1 << 20)
-#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd\0" \
+#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd,usbkbd\0" \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0"
diff --git a/include/efi.h b/include/efi.h
index 2448dde3fe..0fe15e65c0 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -19,12 +19,19 @@
#include <linux/string.h>
#include <linux/types.h>
-#if CONFIG_EFI_STUB_64BIT || (!defined(CONFIG_EFI_STUB) && defined(__x86_64__))
-/* EFI uses the Microsoft ABI which is not the default for GCC */
+/*
+ * EFI on x86_64 uses the Microsoft ABI which is not the default for GCC.
+ *
+ * There are two scenarios for EFI on x86_64: building a 64-bit EFI stub
+ * codes (CONFIG_EFI_STUB_64BIT) and building a 64-bit U-Boot (CONFIG_X86_64).
+ * Either needs to be properly built with the '-m64' compiler flag, and hence
+ * it is enough to only check the compiler provided define __x86_64__ here.
+ */
+#ifdef __x86_64__
#define EFIAPI __attribute__((ms_abi))
#else
#define EFIAPI asmlinkage
-#endif
+#endif /* __x86_64__ */
struct efi_device_path;
@@ -32,16 +39,7 @@ typedef struct {
u8 b[16];
} efi_guid_t;
-#define EFI_BITS_PER_LONG BITS_PER_LONG
-
-/*
- * With 64-bit EFI stub, EFI_BITS_PER_LONG has to be 64. EFI_STUB is set
- * in lib/efi/Makefile, when building the stub.
- */
-#if defined(CONFIG_EFI_STUB_64BIT) && defined(EFI_STUB)
-#undef EFI_BITS_PER_LONG
-#define EFI_BITS_PER_LONG 64
-#endif
+#define EFI_BITS_PER_LONG (sizeof(long) * 8)
/* Bit mask for EFI status code with error */
#define EFI_ERROR_MASK (1UL << (EFI_BITS_PER_LONG - 1))