Skip to content

Commit

Permalink
fix!: explicitly mark _KGDTENTRY64 and _KIDTENTRY64as opaque type…
Browse files Browse the repository at this point in the history
…s in bindgen

BREAKING CHANGE: defintions for `_KGDTENTRY64` and `_KIDTENTRY64` have been removed
  • Loading branch information
wmmc88 committed Jan 24, 2025
1 parent eb47e2f commit b8ca1b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 58 deletions.
2 changes: 2 additions & 0 deletions crates/wdk-build/src/bindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ impl BuilderExt for Builder {
.blocklist_item("ExAllocatePoolWithQuotaTag") // Deprecated
.blocklist_item("ExAllocatePoolWithTagPriority") // Deprecated
.blocklist_item("ExAllocatePool") // Deprecated
.opaque_type("_KGDTENTRY64") // No definition in WDK
.opaque_type("_KIDTENTRY64") // No definition in WDK
// FIXME: bitfield generated with non-1byte alignment in _MCG_CAP
.blocklist_item(".*MCG_CAP(?:__bindgen.*)?")
.blocklist_item(".*WHEA_XPF_MCA_SECTION")
Expand Down
58 changes: 0 additions & 58 deletions crates/wdk-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,64 +719,6 @@ impl Config {
DriverConfig::Wdm | DriverConfig::Kmdf(_)
)
{
// TODO: Why is there no definition for this struct? Maybe blocklist this struct
// in bindgen.
acc.push_str(
r"
typedef union _KGDTENTRY64
{
struct
{
unsigned short LimitLow;
unsigned short BaseLow;
union
{
struct
{
unsigned char BaseMiddle;
unsigned char Flags1;
unsigned char Flags2;
unsigned char BaseHigh;
} Bytes;
struct
{
unsigned long BaseMiddle : 8;
unsigned long Type : 5;
unsigned long Dpl : 2;
unsigned long Present : 1;
unsigned long LimitHigh : 4;
unsigned long System : 1;
unsigned long LongMode : 1;
unsigned long DefaultBig : 1;
unsigned long Granularity : 1;
unsigned long BaseHigh : 8;
} Bits;
};
unsigned long BaseUpper;
unsigned long MustBeZero;
};
unsigned __int64 Alignment;
} KGDTENTRY64, *PKGDTENTRY64;
typedef union _KIDTENTRY64
{
struct
{
unsigned short OffsetLow;
unsigned short Selector;
unsigned short IstIndex : 3;
unsigned short Reserved0 : 5;
unsigned short Type : 5;
unsigned short Dpl : 2;
unsigned short Present : 1;
unsigned short OffsetMiddle;
unsigned long OffsetHigh;
unsigned long Reserved1;
};
unsigned __int64 Alignment;
} KIDTENTRY64, *PKIDTENTRY64;
",
);
}
acc
})
Expand Down

0 comments on commit b8ca1b1

Please sign in to comment.