[U-Boot] [PATCH v2 3/3] efi_loader: define all known status codes

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Jul 3 20:41:26 UTC 2017


efi.h held only a few EFI status codes.

The patch adds the missing definitions for later usage.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
v2
	This patch was split of version 1 of
	efi_loader: provide meaningful status code
---
 include/efi.h | 47 ++++++++++++++++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 13 deletions(-)

diff --git a/include/efi.h b/include/efi.h
index 3d587807e8..242da3c3be 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -39,19 +39,40 @@ struct efi_device_path;
 #define EFI_BITS_PER_LONG	64
 #endif
 
-#define EFI_SUCCESS		0
-#define EFI_LOAD_ERROR		(1 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_INVALID_PARAMETER	(2 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_UNSUPPORTED		(3 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_BAD_BUFFER_SIZE	(4 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_BUFFER_TOO_SMALL	(5 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_NOT_READY		(6 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_DEVICE_ERROR	(7 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_WRITE_PROTECTED	(8 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_OUT_OF_RESOURCES	(9 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_NOT_FOUND		(14 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_ACCESS_DENIED	(15 | (1UL << (EFI_BITS_PER_LONG - 1)))
-#define EFI_SECURITY_VIOLATION	(26 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_SUCCESS			0
+#define EFI_LOAD_ERROR			(1 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_INVALID_PARAMETER		(2 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_UNSUPPORTED			(3 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_BAD_BUFFER_SIZE		(4 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_BUFFER_TOO_SMALL		(5 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_NOT_READY			(6 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_DEVICE_ERROR		(7 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_WRITE_PROTECTED		(8 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_OUT_OF_RESOURCES		(9 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_VOLUME_CORRUPTED		(10 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_VOLUME_FULL			(11 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_NO_MEDIA			(12 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_MEDIA_CHANGED		(13 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_NOT_FOUND			(14 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_ACCESS_DENIED		(15 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_NO_RESPONSE			(16 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_NO_MAPPING			(17 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_TIMEOUT			(18 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_NOT_STARTED			(19 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_ALREADY_STARTED		(20 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_ABORTED			(21 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_ICMP_ERROR			(22 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_TFTP_ERROR			(23 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_PROTOCOL_ERROR		(24 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_INCOMPATIBLE_VERSION	(25 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_SECURITY_VIOLATION		(26 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_CRC_ERROR			(27 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_END_OF_MEDIA		(28 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_END_OF_FILE			(31 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_INVALID_LANGUAGE		(32 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_COMPROMISED_DATA		(33 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_IP_ADDRESS_CONFLICT		(34 | (1UL << (EFI_BITS_PER_LONG - 1)))
+#define EFI_HTTP_ERROR			(35 | (1UL << (EFI_BITS_PER_LONG - 1)))
 
 typedef unsigned long efi_status_t;
 typedef u64 efi_physical_addr_t;
-- 
2.11.0



More information about the U-Boot mailing list