|
@@ -0,0 +1,138 @@
|
|
1
|
+#ifndef ERRNO_H
|
|
2
|
+#define ERRNO_H
|
|
3
|
+
|
|
4
|
+/*
|
|
5
|
+ * We define error codes that are a superset of those mentioned in the
|
|
6
|
+ * PXE specification. Various error string tables may be compiled in
|
|
7
|
+ * if required; if not compiled in, strerror(errno) will produce the
|
|
8
|
+ * text "error 0x<errno>".
|
|
9
|
+ *
|
|
10
|
+ */
|
|
11
|
+
|
|
12
|
+/* PXE error codes are determined by the PXE specification */
|
|
13
|
+
|
|
14
|
+/* Generic errors */
|
|
15
|
+#define PXENV_STATUS_SUCCESS 0x00
|
|
16
|
+#define PXENV_STATUS_FAILURE 0x01
|
|
17
|
+#define PXENV_STATUS_BAD_FUNC 0x02
|
|
18
|
+#define PXENV_STATUS_UNSUPPORTED 0x03
|
|
19
|
+#define PXENV_STATUS_KEEP_UNDI 0x04
|
|
20
|
+#define PXENV_STATUS_KEEP_ALL 0x05
|
|
21
|
+#define PXENV_STATUS_OUT_OF_RESOURCES 0x06
|
|
22
|
+
|
|
23
|
+/* ARP errors (0x10 to 0x1f) */
|
|
24
|
+#define PXENV_STATUS_ARP_TIMEOUT 0x11
|
|
25
|
+
|
|
26
|
+/* Base-Code state errors */
|
|
27
|
+#define PXENV_STATUS_UDP_CLOSED 0x18
|
|
28
|
+#define PXENV_STATUS_UDP_OPEN 0x19
|
|
29
|
+#define PXENV_STATUS_TFTP_CLOSED 0x1a
|
|
30
|
+#define PXENV_STATUS_TFTP_OPEN 0x1b
|
|
31
|
+
|
|
32
|
+/* BIOS/system errors (0x20 to 0x2f) */
|
|
33
|
+#define PXENV_STATUS_MCOPY_PROBLEM 0x20
|
|
34
|
+#define PXENV_STATUS_BIS_INTEGRITY_FAILURE 0x21
|
|
35
|
+#define PXENV_STATUS_BIS_VALIDATE_FAILURE 0x22
|
|
36
|
+#define PXENV_STATUS_BIS_INIT_FAILURE 0x23
|
|
37
|
+#define PXENV_STATUS_BIS_SHUTDOWN_FAILURE 0x24
|
|
38
|
+#define PXENV_STATUS_BIS_GBOA_FAILURE 0x25
|
|
39
|
+#define PXENV_STATUS_BIS_FREE_FAILURE 0x26
|
|
40
|
+#define PXENV_STATUS_BIS_GSI_FAILURE 0x27
|
|
41
|
+#define PXENV_STATUS_BIS_BAD_CKSUM 0x28
|
|
42
|
+
|
|
43
|
+/* TFTP/MTFTP errors (0x30 to 0x3f) */
|
|
44
|
+#define PXENV_STATUS_TFTP_CANNOT_ARP_ADDRESS 0x30
|
|
45
|
+#define PXENV_STATUS_TFTP_OPEN_TIMEOUT 0x32
|
|
46
|
+#define PXENV_STATUS_TFTP_UNKNOWN_OPCODE 0x33
|
|
47
|
+#define PXENV_STATUS_TFTP_READ_TIMEOUT 0x35
|
|
48
|
+#define PXENV_STATUS_TFTP_ERROR_OPCODE 0x36
|
|
49
|
+#define PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION 0x38
|
|
50
|
+#define PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION 0x39
|
|
51
|
+#define PXENV_STATUS_TFTP_TOO_MANY_PACKAGES 0x3a
|
|
52
|
+#define PXENV_STATUS_TFTP_FILE_NOT_FOUND 0x3b
|
|
53
|
+#define PXENV_STATUS_TFTP_ACCESS_VIOLATION 0x3c
|
|
54
|
+#define PXENV_STATUS_TFTP_NO_MCAST_ADDRESS 0x3d
|
|
55
|
+#define PXENV_STATUS_TFTP_NO_FILESIZE 0x3e
|
|
56
|
+#define PXENV_STATUS_TFTP_INVALID_PACKET_SIZE 0x3f
|
|
57
|
+
|
|
58
|
+/* Reserved errors 0x40 to 0x4f) */
|
|
59
|
+
|
|
60
|
+/* DHCP/BOOTP errors (0x50 to 0x5f) */
|
|
61
|
+#define PXENV_STATUS_DHCP_TIMEOUT 0x51
|
|
62
|
+#define PXENV_STATUS_DHCP_NO_IP_ADDRESS 0x52
|
|
63
|
+#define PXENV_STATUS_DHCP_NO_BOOTFILE_NAME 0x53
|
|
64
|
+#define PXENV_STATUS_DHCP_BAD_IP_ADDRESS 0x54
|
|
65
|
+
|
|
66
|
+/* Driver errors (0x60 to 0x6f) */
|
|
67
|
+#define PXENV_STATUS_UNDI_INVALID_FUNCTION 0x60
|
|
68
|
+#define PXENV_STATUS_UNDI_MEDIATEST_FAILED 0x61
|
|
69
|
+#define PXENV_STATUS_UNDI_CANNOT_INIT_NIC_FOR_MCAST 0x62
|
|
70
|
+#define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC 0x63
|
|
71
|
+#define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_PHY 0x64
|
|
72
|
+#define PXENV_STATUS_UNDI_CANNOT_READ_CONFIG_DATA 0x65
|
|
73
|
+#define PXENV_STATUS_UNDI_CANNOT_READ_INIT_DATA 0x66
|
|
74
|
+#define PXENV_STATUS_UNDI_BAD_MAC_ADDRESS 0x67
|
|
75
|
+#define PXENV_STATUS_UNDI_BAD_EEPROM_CHECKSUM 0x68
|
|
76
|
+#define PXENV_STATUS_UNDI_ERROR_SETTING_ISR 0x69
|
|
77
|
+#define PXENV_STATUS_UNDI_INVALID_STATE 0x6a
|
|
78
|
+#define PXENV_STATUS_UNDI_TRANSMIT_ERROR 0x6b
|
|
79
|
+#define PXENV_STATUS_UNDI_INVALID_PARAMETER 0x6c
|
|
80
|
+
|
|
81
|
+/* ROM and NBP bootstrap errors (0x70 to 0x7f) */
|
|
82
|
+#define PXENV_STATUS_BSTRAP_PROMPT_MENU 0x74
|
|
83
|
+#define PXENV_STATUS_BSTRAP_MCAST_ADDR 0x76
|
|
84
|
+#define PXENV_STATUS_BSTRAP_MISSING_LIST 0x77
|
|
85
|
+#define PXENV_STATUS_BSTRAP_NO_RESPONSE 0x78
|
|
86
|
+#define PXENV_STATUS_BSTRAP_FILE_TOO_BIG 0x79
|
|
87
|
+
|
|
88
|
+/* Environment NBP errors (0x80 to 0x8f) */
|
|
89
|
+
|
|
90
|
+/* Reserved errors (0x90 to 0x9f) */
|
|
91
|
+
|
|
92
|
+/* Miscellaneous errors (0xa0 to 0xaf) */
|
|
93
|
+#define PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE 0xa0
|
|
94
|
+#define PXENV_STATUS_BINL_NO_PXE_SERVER 0xa1
|
|
95
|
+#define PXENV_STATUS_NOT_AVAILABLE_IN_PMODE 0xa2
|
|
96
|
+#define PXENV_STATUS_NOT_AVAILABLE_IN_RMODE 0xa3
|
|
97
|
+
|
|
98
|
+/* BUSD errors (0xb0 to 0xbf) */
|
|
99
|
+#define PXENV_STATUS_BUSD_DEVICE_NOT_SUPPORTED 0xb0
|
|
100
|
+
|
|
101
|
+/* Loader errors (0xc0 to 0xcf) */
|
|
102
|
+#define PXENV_STATUS_LOADER_NO_FREE_BASE_MEMORY 0xc0
|
|
103
|
+#define PXENV_STATUS_LOADER_NO_BC_ROMID 0xc1
|
|
104
|
+#define PXENV_STATUS_LOADER_BAD_BC_ROMID 0xc2
|
|
105
|
+#define PXENV_STATUS_LOADER_BAD_BC_RUNTIME_IMAGE 0xc3
|
|
106
|
+#define PXENV_STATUS_LOADER_NO_UNDI_ROMID 0xc4
|
|
107
|
+#define PXENV_STATUS_LOADER_BAD_UNDI_ROMID 0xc5
|
|
108
|
+#define PXENV_STATUS_LOADER_BAD_UNDI_DRIVER_IMAGE 0xc6
|
|
109
|
+#define PXENV_STATUS_LOADER_NO_PXE_STRUCT 0xc8
|
|
110
|
+#define PXENV_STATUS_LOADER_NO_PXENV_STRUCT 0xc9
|
|
111
|
+#define PXENV_STATUS_LOADER_UNDI_START 0xca
|
|
112
|
+#define PXENV_STATUS_LOADER_BC_START 0xcb
|
|
113
|
+
|
|
114
|
+/*
|
|
115
|
+ * The range 0xd0 to 0xff is defined as "Vendor errors" by the PXE
|
|
116
|
+ * spec. We place all our Etherboot-specific errors in this range.
|
|
117
|
+ * We also define some generic errors as aliases to the PXE errors.
|
|
118
|
+ *
|
|
119
|
+ */
|
|
120
|
+
|
|
121
|
+#define ENOMEM PXENV_STATUS_OUT_OF_RESOURCES
|
|
122
|
+
|
|
123
|
+/* Data structures and declarations */
|
|
124
|
+
|
|
125
|
+#include "tables.h"
|
|
126
|
+
|
|
127
|
+extern int errno;
|
|
128
|
+
|
|
129
|
+extern const char * strerror ( int errno );
|
|
130
|
+
|
|
131
|
+struct errortab {
|
|
132
|
+ int errno;
|
|
133
|
+ const char *text;
|
|
134
|
+};
|
|
135
|
+
|
|
136
|
+#define __errortab __table(errortab,01)
|
|
137
|
+
|
|
138
|
+#endif /* ERRNO_H */
|