Skip to content

Commit 6cd58ed

Browse files
committed
uefi-raw: Add PciRootBridgeIoProtocolAttributes
1 parent 12509ec commit 6cd58ed

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

uefi-raw/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Added
44
- Added `SimpleTextInputExProtocol`.
5+
- Added `PciRootBridgeIoProtocolAttributes`
56

67
## Changed
78
- Corrected the type of the `driver_image` parameter in

uefi-raw/src/protocol/pci/root_bridge.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use crate::table::boot::{AllocateType, MemoryType};
44
use crate::{Handle, PhysicalAddress, Status, newtype_enum};
5+
use bitflags::bitflags;
56
use core::ffi::c_void;
67
use uguid::{Guid, guid};
78

@@ -37,6 +38,28 @@ newtype_enum! {
3738
}
3839
}
3940

41+
bitflags! {
42+
/// Corresponds to the `EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL` attribute bitflags.
43+
#[repr(transparent)]
44+
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
45+
pub struct PciRootBridgeIoProtocolAttribute: u64 {
46+
const EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO = 0x0001;
47+
const EFI_PCI_ATTRIBUTE_ISA_IO = 0x0002;
48+
const EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO = 0x0004;
49+
const EFI_PCI_ATTRIBUTE_VGA_MEMORY = 0x0008;
50+
const EFI_PCI_ATTRIBUTE_VGA_IO = 0x0010;
51+
const EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO = 0x0020;
52+
const EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO = 0x0040;
53+
const EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE = 0x0080;
54+
const EFI_PCI_ATTRIBUTE_MEMORY_CACHED = 0x0800;
55+
const EFI_PCI_ATTRIBUTE_MEMORY_DISABLE = 0x1000;
56+
const EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE = 0x8000;
57+
const EFI_PCI_ATTRIBUTE_ISA_IO_16 = 0x10000;
58+
const EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16 = 0x20000;
59+
const EFI_PCI_ATTRIBUTE_VGA_IO_16 = 0x40000;
60+
}
61+
}
62+
4063
#[derive(Debug)]
4164
#[repr(C)]
4265
pub struct PciRootBridgeIoAccess {

0 commit comments

Comments
 (0)