iPXE
Defines | Functions
efi.h File Reference

EFI platform error codes. More...

#include <ipxe/efi/efi.h>
#include <ipxe/efi/Uefi/UefiBaseType.h>

Go to the source code of this file.

Defines

#define EFI_ERR_SHIFT   ( 8 * ( sizeof ( EFI_STATUS ) - 1 ) )
 Bit shift for EFI error/warning bit.
#define PLATFORM_TO_ERRNO(platform)
 Convert platform error code to platform component of iPXE error code.
#define ERRNO_TO_PLATFORM(errno)
 Convert iPXE error code to platform error code.
#define PLATFORM_ENOERR   EFI_SUCCESS
#define PLATFORM_E2BIG   EFI_BUFFER_TOO_SMALL
#define PLATFORM_EACCES   EFI_ACCESS_DENIED
#define PLATFORM_EADDRINUSE   EFI_ALREADY_STARTED
#define PLATFORM_EADDRNOTAVAIL   EFI_NOT_READY
#define PLATFORM_EAFNOSUPPORT   EFI_UNSUPPORTED
#define PLATFORM_EAGAIN   EFI_NOT_READY
#define PLATFORM_EALREADY   EFI_ALREADY_STARTED
#define PLATFORM_EBADF   EFI_INVALID_PARAMETER
#define PLATFORM_EBADMSG   EFI_PROTOCOL_ERROR
#define PLATFORM_EBUSY   EFI_NO_RESPONSE
#define PLATFORM_ECANCELED   EFI_ABORTED
#define PLATFORM_ECHILD   EFI_NOT_FOUND
#define PLATFORM_ECONNABORTED   EFI_ABORTED
#define PLATFORM_ECONNREFUSED   EFI_NO_RESPONSE
#define PLATFORM_ECONNRESET   EFI_ABORTED
#define PLATFORM_EDEADLK   EFI_NOT_READY
#define PLATFORM_EDESTADDRREQ   EFI_PROTOCOL_ERROR
#define PLATFORM_EDOM   EFI_INVALID_PARAMETER
#define PLATFORM_EDQUOT   EFI_VOLUME_FULL
#define PLATFORM_EEXIST   EFI_WRITE_PROTECTED
#define PLATFORM_EFAULT   EFI_INVALID_PARAMETER
#define PLATFORM_EFBIG   EFI_END_OF_MEDIA
#define PLATFORM_EHOSTUNREACH   EFI_NO_RESPONSE
#define PLATFORM_EIDRM   EFI_INVALID_PARAMETER
#define PLATFORM_EILSEQ   EFI_INVALID_PARAMETER
#define PLATFORM_EINPROGRESS   EFI_ALREADY_STARTED
#define PLATFORM_EINTR   EFI_NOT_READY
#define PLATFORM_EINVAL   EFI_INVALID_PARAMETER
#define PLATFORM_EIO   EFI_PROTOCOL_ERROR
#define PLATFORM_EISCONN   EFI_ALREADY_STARTED
#define PLATFORM_EISDIR   EFI_PROTOCOL_ERROR
#define PLATFORM_ELOOP   EFI_VOLUME_CORRUPTED
#define PLATFORM_EMFILE   EFI_OUT_OF_RESOURCES
#define PLATFORM_EMLINK   EFI_OUT_OF_RESOURCES
#define PLATFORM_EMSGSIZE   EFI_BAD_BUFFER_SIZE
#define PLATFORM_EMULTIHOP   EFI_INVALID_PARAMETER
#define PLATFORM_ENAMETOOLONG   EFI_INVALID_PARAMETER
#define PLATFORM_ENETDOWN   EFI_NO_RESPONSE
#define PLATFORM_ENETRESET   EFI_ABORTED
#define PLATFORM_ENETUNREACH   EFI_NO_RESPONSE
#define PLATFORM_ENFILE   EFI_OUT_OF_RESOURCES
#define PLATFORM_ENOBUFS   EFI_OUT_OF_RESOURCES
#define PLATFORM_ENODATA   EFI_NO_RESPONSE
#define PLATFORM_ENODEV   EFI_DEVICE_ERROR
#define PLATFORM_ENOENT   EFI_NOT_FOUND
#define PLATFORM_ENOEXEC   EFI_LOAD_ERROR
#define PLATFORM_ENOLCK   EFI_OUT_OF_RESOURCES
#define PLATFORM_ENOLINK   EFI_OUT_OF_RESOURCES
#define PLATFORM_ENOMEM   EFI_OUT_OF_RESOURCES
#define PLATFORM_ENOMSG   EFI_PROTOCOL_ERROR
#define PLATFORM_ENOPROTOOPT   EFI_UNSUPPORTED
#define PLATFORM_ENOSPC   EFI_VOLUME_FULL
#define PLATFORM_ENOSR   EFI_OUT_OF_RESOURCES
#define PLATFORM_ENOSTR   EFI_PROTOCOL_ERROR
#define PLATFORM_ENOSYS   EFI_UNSUPPORTED
#define PLATFORM_ENOTCONN   EFI_NOT_STARTED
#define PLATFORM_ENOTDIR   EFI_VOLUME_CORRUPTED
#define PLATFORM_ENOTEMPTY   EFI_VOLUME_CORRUPTED
#define PLATFORM_ENOTSOCK   EFI_INVALID_PARAMETER
#define PLATFORM_ENOTSUP   EFI_UNSUPPORTED
#define PLATFORM_ENOTTY   EFI_UNSUPPORTED
#define PLATFORM_ENXIO   EFI_NOT_FOUND
#define PLATFORM_EOPNOTSUPP   EFI_UNSUPPORTED
#define PLATFORM_EOVERFLOW   EFI_BUFFER_TOO_SMALL
#define PLATFORM_EPERM   EFI_ACCESS_DENIED
#define PLATFORM_EPIPE   EFI_ABORTED
#define PLATFORM_EPROTO   EFI_PROTOCOL_ERROR
#define PLATFORM_EPROTONOSUPPORT   EFI_UNSUPPORTED
#define PLATFORM_EPROTOTYPE   EFI_INVALID_PARAMETER
#define PLATFORM_ERANGE   EFI_BUFFER_TOO_SMALL
#define PLATFORM_EROFS   EFI_WRITE_PROTECTED
#define PLATFORM_ESPIPE   EFI_END_OF_FILE
#define PLATFORM_ESRCH   EFI_NOT_STARTED
#define PLATFORM_ESTALE   EFI_PROTOCOL_ERROR
#define PLATFORM_ETIME   EFI_TIMEOUT
#define PLATFORM_ETIMEDOUT   EFI_TIMEOUT
#define PLATFORM_ETXTBSY   EFI_MEDIA_CHANGED
#define PLATFORM_EWOULDBLOCK   EFI_NOT_READY
#define PLATFORM_EXDEV   EFI_VOLUME_CORRUPTED

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)

Detailed Description

EFI platform error codes.

We derive our platform error codes from the possible values for EFI_STATUS defined in the UEFI specification.

EFI_STATUS codes are 32/64-bit values consisting of a top bit which is set for errors and clear for warnings, and a mildly undefined code of low bits indicating the precise error/warning code. Errors and warnings have completely separate namespaces.

We assume that no EFI_STATUS code will ever be defined which uses more than bits 0-6 of the low bits. We then choose to encode our platform-specific error by mapping bit 31/63 of the EFI_STATUS to bit 7 of the platform-specific error code, and preserving bits 0-6 as-is.

Definition in file efi.h.


Define Documentation

#define EFI_ERR_SHIFT   ( 8 * ( sizeof ( EFI_STATUS ) - 1 ) )

Bit shift for EFI error/warning bit.

Definition at line 30 of file efi.h.

#define PLATFORM_TO_ERRNO (   platform)
Value:
( ( (platform) |                                                \
            ( ( ( EFI_STATUS ) (platform) ) >> EFI_ERR_SHIFT ) ) & 0xff )

Convert platform error code to platform component of iPXE error code.

Parameters:
platformPlatform error code
Return values:
errnoPlatform component of iPXE error code

Definition at line 38 of file efi.h.

#define ERRNO_TO_PLATFORM (   errno)
Value:
( ( ( ( EFI_STATUS ) (errno) & 0x80 ) << EFI_ERR_SHIFT ) |      \
          ( (errno) & 0x7f ) )

Convert iPXE error code to platform error code.

Parameters:
errnoiPXE error code
Return values:
platformPlatform error code

Definition at line 48 of file efi.h.

Definition at line 53 of file efi.h.

Definition at line 54 of file efi.h.

Definition at line 55 of file efi.h.

Definition at line 56 of file efi.h.

Definition at line 57 of file efi.h.

Definition at line 58 of file efi.h.

Definition at line 59 of file efi.h.

Definition at line 60 of file efi.h.

Definition at line 61 of file efi.h.

Definition at line 62 of file efi.h.

Definition at line 63 of file efi.h.

Definition at line 64 of file efi.h.

Definition at line 65 of file efi.h.

Definition at line 66 of file efi.h.

Definition at line 67 of file efi.h.

Definition at line 68 of file efi.h.

Definition at line 69 of file efi.h.

Definition at line 70 of file efi.h.

Definition at line 71 of file efi.h.

Definition at line 72 of file efi.h.

Definition at line 73 of file efi.h.

Definition at line 74 of file efi.h.

Definition at line 75 of file efi.h.

Definition at line 76 of file efi.h.

Definition at line 77 of file efi.h.

Definition at line 78 of file efi.h.

Definition at line 79 of file efi.h.

Definition at line 80 of file efi.h.

Definition at line 81 of file efi.h.

Definition at line 82 of file efi.h.

Definition at line 83 of file efi.h.

Definition at line 84 of file efi.h.

Definition at line 85 of file efi.h.

Definition at line 86 of file efi.h.

Definition at line 87 of file efi.h.

Definition at line 88 of file efi.h.

Definition at line 89 of file efi.h.

Definition at line 90 of file efi.h.

Definition at line 91 of file efi.h.

Definition at line 92 of file efi.h.

Definition at line 93 of file efi.h.

Definition at line 94 of file efi.h.

Definition at line 95 of file efi.h.

Definition at line 96 of file efi.h.

Definition at line 97 of file efi.h.

Definition at line 98 of file efi.h.

Definition at line 99 of file efi.h.

Definition at line 100 of file efi.h.

Definition at line 101 of file efi.h.

Definition at line 102 of file efi.h.

Definition at line 103 of file efi.h.

Definition at line 104 of file efi.h.

Definition at line 105 of file efi.h.

Definition at line 106 of file efi.h.

Definition at line 107 of file efi.h.

Definition at line 108 of file efi.h.

Definition at line 109 of file efi.h.

Definition at line 110 of file efi.h.

Definition at line 111 of file efi.h.

Definition at line 112 of file efi.h.

Definition at line 113 of file efi.h.

Definition at line 114 of file efi.h.

Definition at line 115 of file efi.h.

Definition at line 116 of file efi.h.

Definition at line 117 of file efi.h.

Definition at line 118 of file efi.h.

Definition at line 119 of file efi.h.

Definition at line 120 of file efi.h.

Definition at line 121 of file efi.h.

Definition at line 122 of file efi.h.

Definition at line 123 of file efi.h.

Definition at line 124 of file efi.h.

Definition at line 125 of file efi.h.

Definition at line 126 of file efi.h.

Definition at line 127 of file efi.h.

Definition at line 128 of file efi.h.

Definition at line 129 of file efi.h.

Definition at line 130 of file efi.h.

Definition at line 131 of file efi.h.

Definition at line 132 of file efi.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )