authorgravatar for truemedian@gmail.comNameless <truemedian@gmail.com> 2021-06-27 13:34:44-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-07-03 15:28:57-07:00
logde028d513082a64b4188a958d738d15f247f14ab
tree5f63da7c21488641ffe9d4847b8b8c2322cac441
parent390a4ded986237381fffbe46719445b6cd9733f3

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 {...@@ -45,7 +45,9 @@ pub const AbsolutePointerMode = extern struct {
45 attributes: packed struct {45 attributes: packed struct {
46 supports_alt_active: bool,46 supports_alt_active: bool,
47 supports_pressure_as_z: bool,47 supports_pressure_as_z: bool,
48 _pad1: u30,48 _pad1: u6,
49 _pad2: u8,
50 _pad3: u16,
49 },51 },
50};52};
5153
...@@ -56,6 +58,8 @@ pub const AbsolutePointerState = extern struct {...@@ -56,6 +58,8 @@ pub const AbsolutePointerState = extern struct {
56 active_buttons: packed struct {58 active_buttons: packed struct {
57 touch_active: bool,59 touch_active: bool,
58 alt_active: bool,60 alt_active: bool,
59 _pad1: u30,61 _pad1: u6,
62 _pad2: u8,
63 _pad3: u16,
60 },64 },
61};65};
lib/std/os/uefi/protocols/edid_override_protocol.zig+3-1
...@@ -31,5 +31,7 @@ pub const EdidOverrideProtocol = extern struct {...@@ -31,5 +31,7 @@ pub const EdidOverrideProtocol = extern struct {
31pub const EdidOverrideProtocolAttributes = packed struct {31pub const EdidOverrideProtocolAttributes = packed struct {
32 dont_override: bool,32 dont_override: bool,
33 enable_hot_plug: bool,33 enable_hot_plug: bool,
34 _pad1: u30,34 _pad1: u6,
35 _pad2: u8,
36 _pad3: u16,
35};37};
lib/std/os/uefi/protocols/simple_network_protocol.zig+6-2
...@@ -131,7 +131,9 @@ pub const SimpleNetworkReceiveFilter = packed struct {...@@ -131,7 +131,9 @@ pub const SimpleNetworkReceiveFilter = packed struct {
131 receive_broadcast: bool,131 receive_broadcast: bool,
132 receive_promiscuous: bool,132 receive_promiscuous: bool,
133 receive_promiscuous_multicast: bool,133 receive_promiscuous_multicast: bool,
134 _pad: u27 = undefined,134 _pad1: u3 = undefined,
135 _pad2: u8 = undefined,
136 _pad3: u16 = undefined,
135};137};
136138
137pub const SimpleNetworkState = enum(u32) {139pub const SimpleNetworkState = enum(u32) {
...@@ -174,5 +176,7 @@ pub const SimpleNetworkInterruptStatus = packed struct {...@@ -174,5 +176,7 @@ pub const SimpleNetworkInterruptStatus = packed struct {
174 transmit_interrupt: bool,176 transmit_interrupt: bool,
175 command_interrupt: bool,177 command_interrupt: bool,
176 software_interrupt: bool,178 software_interrupt: bool,
177 _pad: u28,179 _pad1: u4,
180 _pad2: u8,
181 _pad3: u16,
178};182};
lib/std/os/uefi/tables/boot_services.zig+8-3
...@@ -192,7 +192,8 @@ pub const MemoryDescriptor = extern struct {...@@ -192,7 +192,8 @@ pub const MemoryDescriptor = extern struct {
192 wt: bool,192 wt: bool,
193 wb: bool,193 wb: bool,
194 uce: bool,194 uce: bool,
195 _pad1: u7,195 _pad1: u3,
196 _pad2: u4,
196 wp: bool,197 wp: bool,
197 rp: bool,198 rp: bool,
198 xp: bool,199 xp: bool,
...@@ -201,7 +202,9 @@ pub const MemoryDescriptor = extern struct {...@@ -201,7 +202,9 @@ pub const MemoryDescriptor = extern struct {
201 ro: bool,202 ro: bool,
202 sp: bool,203 sp: bool,
203 cpu_crypto: bool,204 cpu_crypto: bool,
204 _pad2: u43,205 _pad3: u4,
206 _pad4: u32,
207 _pad5: u7,
205 memory_runtime: bool,208 memory_runtime: bool,
206 },209 },
207};210};
...@@ -219,7 +222,9 @@ pub const OpenProtocolAttributes = packed struct {...@@ -219,7 +222,9 @@ pub const OpenProtocolAttributes = packed struct {
219 by_child_controller: bool = false,222 by_child_controller: bool = false,
220 by_driver: bool = false,223 by_driver: bool = false,
221 exclusive: bool = false,224 exclusive: bool = false,
222 _pad: u26 = undefined,225 _pad1: u2 = undefined,
226 _pad2: u8 = undefined,
227 _pad3: u16 = undefined,
223};228};
224229
225pub const ProtocolInformationEntry = extern struct {230pub const ProtocolInformationEntry = extern struct {