Various update
This commit is contained in:
parent
c6a93ef5d4
commit
a73a026ef8
4 changed files with 23 additions and 1 deletions
2
efi_rs.h
2
efi_rs.h
|
@ -46,6 +46,8 @@
|
|||
|
||||
#define EFI_CAPSULE_REPORT_GUID {0x39b68c46,0xf7fb,0x441b, {0xb6,0xec,0x16,0xb0,0xf6,0x98,0x21,0xf3}}
|
||||
|
||||
#define EFI_GLOBAL_VARIABLE {0x8be4df61,0x93ca,0x11d2, {0xaa,0x0d,0x00,0xe0,0x98,0x03,0x2b,0x8c}}
|
||||
|
||||
typedef struct _EFI_RUNTIME_SERVICES EFI_RUNTIME_SERVICES;
|
||||
|
||||
typedef enum {
|
||||
|
|
4
efilib.h
4
efilib.h
|
@ -5,6 +5,10 @@
|
|||
|
||||
#define EFI_ERROR(status) (((EFI_INTN)(status)) < 0)
|
||||
|
||||
#define EFI_PAGE_MASK 0xFFF
|
||||
#define EFI_PAGE_SHIFT 12
|
||||
#define EFI_SIZE_TO_PAGES(size) (((size) >> EFI_PAGE_SHIFT) + (((size) & EFI_PAGE_MASK) ? 1 : 0))
|
||||
|
||||
static inline const char *efi_status_to_str(EFI_STATUS s)
|
||||
{
|
||||
switch (s) {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define EFI_DEVICE_PATH_PROTOCOL_GUID {0x09576e91,0x6d3f,0x11d2,{0x8e,0x39,0x00,0xa0,0xc9,0x69,0x72,0x3b}}
|
||||
|
||||
typedef struct _EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL;
|
||||
typedef struct _EFI_MEMMAP_DEVICE_PATH EFI_MEMMAP_DEVICE_PATH;
|
||||
|
||||
typedef struct _EFI_DEVICE_PATH_PROTOCOL {
|
||||
EFI_UINT8 Type;
|
||||
|
@ -15,6 +16,14 @@ typedef struct _EFI_DEVICE_PATH_PROTOCOL {
|
|||
EFI_UINT8 Length[2];
|
||||
} EFI_DEVICE_PATH_PROTOCOL;
|
||||
|
||||
struct _EFI_MEMMAP_DEVICE_PATH
|
||||
{
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_UINT32 MemoryType;
|
||||
EFI_PHYSICAL_ADDRESS StartingAddress;
|
||||
EFI_PHYSICAL_ADDRESS EndingAddress;
|
||||
};
|
||||
|
||||
////
|
||||
// EFI Device Path Utilities Protocol
|
||||
///
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
#ifndef EFI_PROTOCOLS_PCI_BUS_H
|
||||
#define EFI_PROTOCOLS_PCI_BUS_H
|
||||
|
||||
#define EFI_PCI_ADDRESS(bus, dev, func, reg) \
|
||||
(EFI_UINT64)( \
|
||||
(((EFI_UINTN)bus) << 24) | \
|
||||
(((EFI_UINTN)dev) << 16) | \
|
||||
(((EFI_UINTN)func) << 8) | \
|
||||
(((EFI_UINTN)(reg)) < 256 ? ((EFI_UINTN)(reg)) : (EFI_UINT64)((reg) << 32)))
|
||||
|
||||
////
|
||||
// PCI Root Bridge I/O Protocol
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue