|
@@ -59,6 +59,8 @@ struct efi_protocol {
|
59
|
59
|
EFI_GUID guid;
|
60
|
60
|
/** Variable containing pointer to protocol structure */
|
61
|
61
|
void **protocol;
|
|
62
|
+ /** Protocol is required */
|
|
63
|
+ int required;
|
62
|
64
|
};
|
63
|
65
|
|
64
|
66
|
/** EFI protocol table */
|
|
@@ -78,6 +80,21 @@ struct efi_protocol {
|
78
|
80
|
.protocol = ( ( void ** ) ( void * ) \
|
79
|
81
|
( ( (_ptr) == ( ( _protocol ** ) (_ptr) ) ) ? \
|
80
|
82
|
(_ptr) : (_ptr) ) ), \
|
|
83
|
+ .required = 1, \
|
|
84
|
+ }
|
|
85
|
+
|
|
86
|
+/** Declare an EFI protocol to be requested by iPXE
|
|
87
|
+ *
|
|
88
|
+ * @v _protocol EFI protocol name
|
|
89
|
+ * @v _ptr Pointer to protocol instance
|
|
90
|
+ */
|
|
91
|
+#define EFI_REQUEST_PROTOCOL( _protocol, _ptr ) \
|
|
92
|
+ struct efi_protocol __ ## _protocol __efi_protocol = { \
|
|
93
|
+ .guid = _protocol ## _GUID, \
|
|
94
|
+ .protocol = ( ( void ** ) ( void * ) \
|
|
95
|
+ ( ( (_ptr) == ( ( _protocol ** ) (_ptr) ) ) ? \
|
|
96
|
+ (_ptr) : (_ptr) ) ), \
|
|
97
|
+ .required = 0, \
|
81
|
98
|
}
|
82
|
99
|
|
83
|
100
|
/** An EFI configuration table used by iPXE */
|