authorgravatar for truemedian@gmail.comNameless <truemedian@gmail.com> 2021-06-27 13:34:44-05:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2021-06-30 09:28:08+03:00
log908b431abeb1df5d3c3ad34d9299e720c3e06a9d
tree84405a9b34716ebb5a30d8feb751ff7251756768
parentb8329351b18ebaf24ad66819e05d91888c7dc886

std/os/uefi: fix packed struct bitfields


4 files changed, 23 insertions(+), 8 deletions(-)

lib/std/os/uefi/protocols/absolute_pointer_protocol.zig+6-2
......@@ -45,7 +45,9 @@ pub const AbsolutePointerMode = extern struct {
4545 attributes: packed struct {
4646 supports_alt_active: bool,
4747 supports_pressure_as_z: bool,
48 _pad1: u30,
48 _pad1: u6,
49 _pad2: u8,
50 _pad3: u16,
4951 },
5052};
5153
......@@ -56,6 +58,8 @@ pub const AbsolutePointerState = extern struct {
5658 active_buttons: packed struct {
5759 touch_active: bool,
5860 alt_active: bool,
59 _pad1: u30,
61 _pad1: u6,
62 _pad2: u8,
63 _pad3: u16,
6064 },
6165};
lib/std/os/uefi/protocols/edid_override_protocol.zig+3-1
......@@ -31,5 +31,7 @@ pub const EdidOverrideProtocol = extern struct {
3131pub const EdidOverrideProtocolAttributes = packed struct {
3232 dont_override: bool,
3333 enable_hot_plug: bool,
34 _pad1: u30,
34 _pad1: u6,
35 _pad2: u8,
36 _pad3: u16,
3537};
lib/std/os/uefi/protocols/simple_network_protocol.zig+6-2
......@@ -131,7 +131,9 @@ pub const SimpleNetworkReceiveFilter = packed struct {
131131 receive_broadcast: bool,
132132 receive_promiscuous: bool,
133133 receive_promiscuous_multicast: bool,
134 _pad: u27 = undefined,
134 _pad1: u3 = undefined,
135 _pad2: u8 = undefined,
136 _pad3: u16 = undefined,
135137};
136138
137139pub const SimpleNetworkState = enum(u32) {
......@@ -174,5 +176,7 @@ pub const SimpleNetworkInterruptStatus = packed struct {
174176 transmit_interrupt: bool,
175177 command_interrupt: bool,
176178 software_interrupt: bool,
177 _pad: u28,
179 _pad1: u4,
180 _pad2: u8,
181 _pad3: u16,
178182};
lib/std/os/uefi/tables/boot_services.zig+8-3
......@@ -193,7 +193,8 @@ pub const MemoryDescriptor = extern struct {
193193 wt: bool,
194194 wb: bool,
195195 uce: bool,
196 _pad1: u7,
196 _pad1: u3,
197 _pad2: u4,
197198 wp: bool,
198199 rp: bool,
199200 xp: bool,
......@@ -202,7 +203,9 @@ pub const MemoryDescriptor = extern struct {
202203 ro: bool,
203204 sp: bool,
204205 cpu_crypto: bool,
205 _pad2: u43,
206 _pad3: u4,
207 _pad4: u32,
208 _pad5: u7,
206209 memory_runtime: bool,
207210 },
208211};
......@@ -220,7 +223,9 @@ pub const OpenProtocolAttributes = packed struct {
220223 by_child_controller: bool = false,
221224 by_driver: bool = false,
222225 exclusive: bool = false,
223 _pad: u26 = undefined,
226 _pad1: u2 = undefined,
227 _pad2: u8 = undefined,
228 _pad3: u16 = undefined,
224229};
225230
226231pub const ProtocolInformationEntry = extern struct {