efi_loader: define all known status codes

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@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
xypron.glpk@gmx.de 2017-07-04 23:15:22 +02:00 committed by Alexander Graf
parent b06d8ac39e
commit 3c8ffb6875

View File

@ -39,19 +39,43 @@ 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)))
/* Bit mask for EFI status code with error */
#define EFI_ERROR_MASK (1UL << (EFI_BITS_PER_LONG - 1))
/* Status codes returned by EFI protocols */
#define EFI_SUCCESS 0
#define EFI_LOAD_ERROR (EFI_ERROR_MASK | 1)
#define EFI_INVALID_PARAMETER (EFI_ERROR_MASK | 2)
#define EFI_UNSUPPORTED (EFI_ERROR_MASK | 3)
#define EFI_BAD_BUFFER_SIZE (EFI_ERROR_MASK | 4)
#define EFI_BUFFER_TOO_SMALL (EFI_ERROR_MASK | 5)
#define EFI_NOT_READY (EFI_ERROR_MASK | 6)
#define EFI_DEVICE_ERROR (EFI_ERROR_MASK | 7)
#define EFI_WRITE_PROTECTED (EFI_ERROR_MASK | 8)
#define EFI_OUT_OF_RESOURCES (EFI_ERROR_MASK | 9)
#define EFI_VOLUME_CORRUPTED (EFI_ERROR_MASK | 10)
#define EFI_VOLUME_FULL (EFI_ERROR_MASK | 11)
#define EFI_NO_MEDIA (EFI_ERROR_MASK | 12)
#define EFI_MEDIA_CHANGED (EFI_ERROR_MASK | 13)
#define EFI_NOT_FOUND (EFI_ERROR_MASK | 14)
#define EFI_ACCESS_DENIED (EFI_ERROR_MASK | 15)
#define EFI_NO_RESPONSE (EFI_ERROR_MASK | 16)
#define EFI_NO_MAPPING (EFI_ERROR_MASK | 17)
#define EFI_TIMEOUT (EFI_ERROR_MASK | 18)
#define EFI_NOT_STARTED (EFI_ERROR_MASK | 19)
#define EFI_ALREADY_STARTED (EFI_ERROR_MASK | 20)
#define EFI_ABORTED (EFI_ERROR_MASK | 21)
#define EFI_ICMP_ERROR (EFI_ERROR_MASK | 22)
#define EFI_TFTP_ERROR (EFI_ERROR_MASK | 23)
#define EFI_PROTOCOL_ERROR (EFI_ERROR_MASK | 24)
#define EFI_INCOMPATIBLE_VERSION (EFI_ERROR_MASK | 25)
#define EFI_SECURITY_VIOLATION (EFI_ERROR_MASK | 26)
#define EFI_CRC_ERROR (EFI_ERROR_MASK | 27)
#define EFI_END_OF_MEDIA (EFI_ERROR_MASK | 28)
#define EFI_END_OF_FILE (EFI_ERROR_MASK | 31)
#define EFI_INVALID_LANGUAGE (EFI_ERROR_MASK | 32)
#define EFI_COMPROMISED_DATA (EFI_ERROR_MASK | 33)
#define EFI_IP_ADDRESS_CONFLICT (EFI_ERROR_MASK | 34)
#define EFI_HTTP_ERROR (EFI_ERROR_MASK | 35)
typedef unsigned long efi_status_t;
typedef u64 efi_physical_addr_t;