@@ -72,14 +72,121 @@ pub enum DeviceType: u8 => {
7272 END = 0x7F ,
7373} }
7474
75- newtype_enum ! {
7675/// Sub-type identifier for a DevicePath
77- pub enum DeviceSubType : u8 => {
78- /// End This Instance of a Device Path and start a new Device Path
79- END_INSTANCE = 0x01 ,
80- /// End Entire Device Path
81- END_ENTIRE = 0xFF ,
82- } }
76+ #[ derive( Clone , Copy , Debug , Eq , PartialEq ) ]
77+ pub struct DeviceSubType ( pub u8 ) ;
78+
79+ impl DeviceSubType {
80+ /// PCI Device Path.
81+ pub const HARDWARE_PCI : DeviceSubType = DeviceSubType ( 0x01 ) ;
82+ /// PCCARD Device Path.
83+ pub const HARDWARE_PCCARD : DeviceSubType = DeviceSubType ( 0x02 ) ;
84+ /// Memory-mapped Device Path.
85+ pub const HARDWARE_MEMORY_MAPPED : DeviceSubType = DeviceSubType ( 0x03 ) ;
86+ /// Vendor-Defined Device Path.
87+ pub const HARDWARE_VENDOR : DeviceSubType = DeviceSubType ( 0x04 ) ;
88+ /// Controller Device Path.
89+ pub const HARDWARE_CONTROLLER : DeviceSubType = DeviceSubType ( 0x05 ) ;
90+ /// BMC Device Path.
91+ pub const HARDWARE_BMC : DeviceSubType = DeviceSubType ( 0x06 ) ;
92+
93+ /// ACPI Device Path.
94+ pub const ACPI : DeviceSubType = DeviceSubType ( 0x01 ) ;
95+ /// Expanded ACPI Device Path.
96+ pub const ACPI_EXPANDED : DeviceSubType = DeviceSubType ( 0x02 ) ;
97+ /// ACPI _ADR Device Path.
98+ pub const ACPI_ADR : DeviceSubType = DeviceSubType ( 0x03 ) ;
99+ /// NVDIMM Device Path.
100+ pub const ACPI_NVDIMM : DeviceSubType = DeviceSubType ( 0x04 ) ;
101+
102+ /// ATAPI Device Path.
103+ pub const MESSAGING_ATAPI : DeviceSubType = DeviceSubType ( 0x01 ) ;
104+ /// SCSI Device Path.
105+ pub const MESSAGING_SCSI : DeviceSubType = DeviceSubType ( 0x02 ) ;
106+ /// Fibre Channel Device Path.
107+ pub const MESSAGING_FIBRE_CHANNEL : DeviceSubType = DeviceSubType ( 0x03 ) ;
108+ /// 1394 Device Path.
109+ pub const MESSAGING_1394 : DeviceSubType = DeviceSubType ( 0x04 ) ;
110+ /// USB Device Path.
111+ pub const MESSAGING_USB : DeviceSubType = DeviceSubType ( 0x05 ) ;
112+ /// I2O Device Path.
113+ pub const MESSAGING_I2O : DeviceSubType = DeviceSubType ( 0x06 ) ;
114+ /// Infiniband Device Path.
115+ pub const MESSAGING_INFINIBAND : DeviceSubType = DeviceSubType ( 0x09 ) ;
116+ /// Vendor-Defined Device Path.
117+ pub const MESSAGING_VENDOR : DeviceSubType = DeviceSubType ( 0x0a ) ;
118+ /// MAC Address Device Path.
119+ pub const MESSAGING_MAC_ADDRESS : DeviceSubType = DeviceSubType ( 0x0b ) ;
120+ /// IPV4 Device Path.
121+ pub const MESSAGING_IPV4 : DeviceSubType = DeviceSubType ( 0x0c ) ;
122+ /// IPV6 Device Path.
123+ pub const MESSAGING_IPV6 : DeviceSubType = DeviceSubType ( 0x0d ) ;
124+ /// UART Device Path.
125+ pub const MESSAGING_UART : DeviceSubType = DeviceSubType ( 0x0e ) ;
126+ /// USB Class Device Path.
127+ pub const MESSAGING_USB_CLASS : DeviceSubType = DeviceSubType ( 0x0f ) ;
128+ /// USB WWID Device Path.
129+ pub const MESSAGING_USB_WWID : DeviceSubType = DeviceSubType ( 0x10 ) ;
130+ /// Device Logical Unit.
131+ pub const MESSAGING_DEVICE_LOGICAL_UNIT : DeviceSubType = DeviceSubType ( 0x11 ) ;
132+ /// SATA Device Path.
133+ pub const MESSAGING_SATA : DeviceSubType = DeviceSubType ( 0x12 ) ;
134+ /// iSCSI Device Path node (base information).
135+ pub const MESSAGING_ISCSI : DeviceSubType = DeviceSubType ( 0x13 ) ;
136+ /// VLAN Device Path node.
137+ pub const MESSAGING_VLAN : DeviceSubType = DeviceSubType ( 0x14 ) ;
138+ /// Fibre Channel Ex Device Path.
139+ pub const MESSAGING_FIBRE_CHANNEL_EX : DeviceSubType = DeviceSubType ( 0x15 ) ;
140+ /// Serial Attached SCSI (SAS) Ex Device Path.
141+ pub const MESSAGING_SCSI_SAS_EX : DeviceSubType = DeviceSubType ( 0x16 ) ;
142+ /// NVM Express Namespace Device Path.
143+ pub const MESSAGING_NVME_NAMESPACE : DeviceSubType = DeviceSubType ( 0x17 ) ;
144+ /// Uniform Resource Identifiers (URI) Device Path.
145+ pub const MESSAGING_URI : DeviceSubType = DeviceSubType ( 0x18 ) ;
146+ /// UFS Device Path.
147+ pub const MESSAGING_UFS : DeviceSubType = DeviceSubType ( 0x19 ) ;
148+ /// SD (Secure Digital) Device Path.
149+ pub const MESSAGING_SD : DeviceSubType = DeviceSubType ( 0x1a ) ;
150+ /// Bluetooth Device Path.
151+ pub const MESSAGING_BLUETOOTH : DeviceSubType = DeviceSubType ( 0x1b ) ;
152+ /// Wi-Fi Device Path.
153+ pub const MESSAGING_WIFI : DeviceSubType = DeviceSubType ( 0x1c ) ;
154+ /// eMMC (Embedded Multi-Media Card) Device Path.
155+ pub const MESSAGING_EMMC : DeviceSubType = DeviceSubType ( 0x1d ) ;
156+ /// BluetoothLE Device Path.
157+ pub const MESSAGING_BLUETOOTH_LE : DeviceSubType = DeviceSubType ( 0x1e ) ;
158+ /// DNS Device Path.
159+ pub const MESSAGING_DNS : DeviceSubType = DeviceSubType ( 0x1f ) ;
160+ /// NVDIMM Namespace Device Path.
161+ pub const MESSAGING_NVDIMM_NAMESPACE : DeviceSubType = DeviceSubType ( 0x20 ) ;
162+
163+ /// Hard Drive Media Device Path.
164+ pub const MEDIA_HARD_DRIVE : DeviceSubType = DeviceSubType ( 0x01 ) ;
165+ /// CD-ROM Media Device Path.
166+ pub const MEDIA_CD_ROM : DeviceSubType = DeviceSubType ( 0x02 ) ;
167+ /// Vendor-Defined Media Device Path.
168+ pub const MEDIA_VENDOR : DeviceSubType = DeviceSubType ( 0x03 ) ;
169+ /// File Path Media Device Path.
170+ pub const MEDIA_FILE_PATH : DeviceSubType = DeviceSubType ( 0x04 ) ;
171+ /// Media Protocol Device Path.
172+ pub const MEDIA_PROTOCOL : DeviceSubType = DeviceSubType ( 0x05 ) ;
173+ /// PIWG Firmware File.
174+ pub const MEDIA_PIWG_FIRMWARE_FILE : DeviceSubType = DeviceSubType ( 0x06 ) ;
175+ /// PIWG Firmware Volume.
176+ pub const MEDIA_PIWG_FIRMWARE_VOLUME : DeviceSubType = DeviceSubType ( 0x07 ) ;
177+ /// Relative Offset Range.
178+ pub const MEDIA_RELATIVE_OFFSET_RANGE : DeviceSubType = DeviceSubType ( 0x08 ) ;
179+ /// RAM Disk Device Path.
180+ pub const MEDIA_RAM_DISK : DeviceSubType = DeviceSubType ( 0x09 ) ;
181+
182+ /// BIOS Boot Specification Device Path.
183+ pub const BIOS_BOOT_SPECIFICATION : DeviceSubType = DeviceSubType ( 0x01 ) ;
184+
185+ /// End this instance of a Device Path and start a new one.
186+ pub const END_INSTANCE : DeviceSubType = DeviceSubType ( 0x01 ) ;
187+ /// End entire Device Path.
188+ pub const END_ENTIRE : DeviceSubType = DeviceSubType ( 0xff ) ;
189+ }
83190
84191/// ACPI Device Path
85192#[ repr( C , packed) ]
0 commit comments