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 {...@@ -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
...@@ -193,7 +193,8 @@ pub const MemoryDescriptor = extern struct {...@@ -193,7 +193,8 @@ pub const MemoryDescriptor = extern struct {
193 wt: bool,193 wt: bool,
194 wb: bool,194 wb: bool,
195 uce: bool,195 uce: bool,
196 _pad1: u7,196 _pad1: u3,
197 _pad2: u4,
197 wp: bool,198 wp: bool,
198 rp: bool,199 rp: bool,
199 xp: bool,200 xp: bool,
...@@ -202,7 +203,9 @@ pub const MemoryDescriptor = extern struct {...@@ -202,7 +203,9 @@ pub const MemoryDescriptor = extern struct {
202 ro: bool,203 ro: bool,
203 sp: bool,204 sp: bool,
204 cpu_crypto: bool,205 cpu_crypto: bool,
205 _pad2: u43,206 _pad3: u4,
207 _pad4: u32,
208 _pad5: u7,
206 memory_runtime: bool,209 memory_runtime: bool,
207 },210 },
208};211};
...@@ -220,7 +223,9 @@ pub const OpenProtocolAttributes = packed struct {...@@ -220,7 +223,9 @@ pub const OpenProtocolAttributes = packed struct {
220 by_child_controller: bool = false,223 by_child_controller: bool = false,
221 by_driver: bool = false,224 by_driver: bool = false,
222 exclusive: bool = false,225 exclusive: bool = false,
223 _pad: u26 = undefined,226 _pad1: u2 = undefined,
227 _pad2: u8 = undefined,
228 _pad3: u16 = undefined,
224};229};
225230
226pub const ProtocolInformationEntry = extern struct {231pub const ProtocolInformationEntry = extern struct {