Compare commits
2 Commits
c76d764b80
...
1293bb9c34
Author | SHA1 | Date |
---|---|---|
Ani Sinha | 1293bb9c34 | |
Ani Sinha | c7e8c56c1b |
|
@ -113,7 +113,7 @@ EFI_STATUS chid_match(const void *hwid_buffer, size_t hwid_length, const Device
|
|||
|
||||
if (devices[n_devices].descriptor == DEVICE_DESCRIPTOR_EOL)
|
||||
break;
|
||||
if (devices[n_devices].descriptor != DEVICE_DESCRIPTOR_DEVICETREE)
|
||||
if (devices[n_devices].descriptor >= DEVICE_DESCRIPTOR_MAX)
|
||||
return EFI_UNSUPPORTED;
|
||||
n_devices++;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ enum {
|
|||
* - CoCo Bring-Your-Own-Firmware
|
||||
* - ACPI DSDT Overrides
|
||||
* - … */
|
||||
_DEVICE_TYPE_MAX,
|
||||
};
|
||||
|
||||
#define DEVICE_SIZE_FROM_DESCRIPTOR(u) ((uint32_t) (u) & UINT32_C(0x0FFFFFFF))
|
||||
|
@ -23,6 +24,7 @@ enum {
|
|||
#define DEVICE_MAKE_DESCRIPTOR(type, size) (((uint32_t) (size) | ((uint32_t) type << 28)))
|
||||
|
||||
#define DEVICE_DESCRIPTOR_DEVICETREE DEVICE_MAKE_DESCRIPTOR(DEVICE_TYPE_DEVICETREE, sizeof(Device))
|
||||
#define DEVICE_DESCRIPTOR_MAX DEVICE_MAKE_DESCRIPTOR(_DEVICE_TYPE_MAX, sizeof(Device))
|
||||
#define DEVICE_DESCRIPTOR_EOL UINT32_C(0)
|
||||
|
||||
typedef struct Device {
|
||||
|
|
Loading…
Reference in New Issue