Skip to main content

handoff/
handoff_rs.rs

1// Copyright 2026 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// This file is automatically generated by //zircon/kernel/phys:_kernel_bindgen_crate.handoff-rs.bindgen.
6
7#![expect(non_camel_case_types)]
8#![expect(non_upper_case_globals)]
9#![no_std]
10
11use stdbind::Optional as stdbind_optional;
12
13unsafe extern "C" {
14    fn cpp_phys_handoff_get() -> *const PhysHandoff;
15}
16
17impl PhysHandoff {
18    pub fn get() -> &'static Self {
19        // Safety: This pointer is set before the kernel proper boots.
20        unsafe { cpp_phys_handoff_get().as_ref_unchecked() }
21    }
22}
23
24#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash)]
25#[repr(C)]
26pub struct __BindgenOpaqueArray<T>(pub T);
27impl<T: Copy + Default, const N: usize> Default for __BindgenOpaqueArray<[T; N]> {
28    fn default() -> Self {
29        Self([<T as Default>::default(); N])
30    }
31}
32#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash)]
33#[repr(C, align(8))]
34pub struct __BindgenOpaqueArray8<T>(pub T);
35impl<T: Copy + Default, const N: usize> Default for __BindgenOpaqueArray8<[T; N]> {
36    fn default() -> Self {
37        Self([<T as Default>::default(); N])
38    }
39}
40#[repr(C)]
41#[derive(Debug, Copy, Clone)]
42pub struct arch_EarlyTicks {
43    pub tsc: u64,
44}
45#[allow(clippy::unnecessary_operation, clippy::identity_op)]
46const _: () = {
47    ["Size of arch_EarlyTicks"][::core::mem::size_of::<arch_EarlyTicks>() - 8usize];
48    ["Alignment of arch_EarlyTicks"][::core::mem::align_of::<arch_EarlyTicks>() - 8usize];
49    ["Offset of field: arch_EarlyTicks::tsc"]
50        [::core::mem::offset_of!(arch_EarlyTicks, tsc) - 0usize];
51};
52pub type std_array___trivially_relocatable = u8;
53pub type std_array___self = u8;
54pub type std_array_value_type = u8;
55pub type std_array_reference = u8;
56pub type std_array_const_reference = u8;
57pub type std_array_pointer = u8;
58pub type std_array_const_pointer = u8;
59pub type std_array_iterator = u8;
60pub type std_array_const_iterator = u8;
61pub type std_array_size_type = __BindgenOpaqueArray8<[u8; 8usize]>;
62pub type std_array_difference_type = __BindgenOpaqueArray8<[u8; 8usize]>;
63pub type std_array_reverse_iterator = u8;
64pub type std_array_const_reverse_iterator = u8;
65#[repr(C)]
66#[derive(Debug, Copy, Clone)]
67pub struct std_optional {
68    pub _address: u8,
69}
70pub type std_optional___base = u8;
71pub type std_optional_value_type = u8;
72pub type std_optional___trivially_relocatable = u8;
73#[repr(C)]
74#[derive(Debug, Copy, Clone)]
75pub struct std_optional__CheckOptionalArgsConstructor {
76    pub _address: u8,
77}
78pub type std_optional__CheckOptionalArgsCtor = u8;
79#[repr(C)]
80#[derive(Debug, Copy, Clone)]
81pub struct std_optional__CheckOptionalLikeConstructor {
82    pub _address: u8,
83}
84pub type std_optional__CheckOptionalLikeConstructor___check_constructible_from_opt = u8;
85pub type std_optional__CheckOptionalLikeConstructor___check_assignable_from_opt = u8;
86pub type std_optional__CheckOptionalLikeCtor = u8;
87pub type std_optional__CheckOptionalLikeAssign = u8;
88unsafe extern "C" {
89    #[link_name = "\u{1}__n_words"]
90    pub static std_bitset___n_words: ::core::ffi::c_uint;
91}
92pub type std_bitset___base = u8;
93pub type std_bitset_reference = u8;
94pub type std_bitset___const_reference = u8;
95#[repr(u8)]
96#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
97pub enum std_byte {
98    __bindgen_cannot_repr_c_on_empty_enum = 0,
99}
100#[repr(C)]
101#[repr(align(1))]
102#[derive(Debug, Copy, Clone)]
103pub struct crypto_EntropyPool {
104    pub _bindgen_opaque_blob: [u8; 32usize],
105}
106#[allow(clippy::unnecessary_operation, clippy::identity_op)]
107const _: () = {
108    ["Size of crypto_EntropyPool"][::core::mem::size_of::<crypto_EntropyPool>() - 32usize];
109    ["Alignment of crypto_EntropyPool"][::core::mem::align_of::<crypto_EntropyPool>() - 1usize];
110};
111pub const crypto_EntropyPool_kMaxEntropySize: u64 = 1073741824;
112pub const crypto_EntropyPool_kShredValue: u8 = 230;
113pub const crypto_EntropyPool_kContentSize: usize = 32;
114#[repr(u64)]
115#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
116pub enum memalloc_Type {
117    FreeRam = 1,
118    Peripheral = 2,
119    Reserved = 3,
120    PoolBookkeeping = 4294967296,
121    PhysKernel = 4294967297,
122    PhysElf = 4294967298,
123    PhysLog = 4294967299,
124    Kernel = 4294967300,
125    KernelStorage = 4294967301,
126    DataZbi = 4294967302,
127    TemporaryPhysHandoff = 4294967303,
128    PermanentPhysHandoff = 4294967304,
129    Vdso = 4294967305,
130    Userboot = 4294967306,
131    BootMachineStack = 4294967307,
132    BootShadowCallStack = 4294967308,
133    BootUnsafeStack = 4294967309,
134    FixedAddressStagingKernel = 4294967310,
135    FixedAddressStagingDataZbi = 4294967311,
136    LegacyBootData = 4294967312,
137    TemporaryIdentityPageTables = 4294967313,
138    KernelPageTables = 4294967314,
139    PhysDebugdata = 4294967315,
140    DevicetreeBlob = 4294967316,
141    PhysScratch = 4294967317,
142    PoolTestPayload = 4294967318,
143    ZbiTestPayload = 4294967319,
144    TestRamReserve = 4294967320,
145    Nvram = 4294967321,
146    ReservedLow = 4294967322,
147    TruncatedRam = 4294967323,
148    MaxAllocated = 4294967324,
149}
150#[repr(C)]
151#[derive(Debug, Copy, Clone)]
152pub struct memalloc_Range {
153    pub addr: u64,
154    pub size: u64,
155    pub type_: memalloc_Type,
156}
157#[allow(clippy::unnecessary_operation, clippy::identity_op)]
158const _: () = {
159    ["Size of memalloc_Range"][::core::mem::size_of::<memalloc_Range>() - 24usize];
160    ["Alignment of memalloc_Range"][::core::mem::align_of::<memalloc_Range>() - 8usize];
161    ["Offset of field: memalloc_Range::addr"]
162        [::core::mem::offset_of!(memalloc_Range, addr) - 0usize];
163    ["Offset of field: memalloc_Range::size"]
164        [::core::mem::offset_of!(memalloc_Range, size) - 8usize];
165    ["Offset of field: memalloc_Range::type_"]
166        [::core::mem::offset_of!(memalloc_Range, type_) - 16usize];
167};
168impl stdbind_optional_Tag {
169    pub const Some: stdbind_optional_Tag = stdbind_optional_Tag::None;
170}
171#[repr(i32)]
172#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
173pub enum stdbind_optional_Tag {
174    None = 0,
175}
176#[repr(C)]
177#[repr(align(1))]
178pub union stdbind_optional__bindgen_ty_1<T> {
179    pub _phantom_0: ::core::marker::PhantomData<::core::cell::UnsafeCell<T>>,
180    pub empty_: ::core::mem::ManuallyDrop<stdbind_optional__bindgen_ty_1__bindgen_ty_1>,
181    pub value_: ::core::mem::ManuallyDrop<T>,
182}
183#[repr(C)]
184#[derive(Debug, Copy, Clone)]
185pub struct stdbind_optional__bindgen_ty_1__bindgen_ty_1 {
186    pub _address: u8,
187}
188pub type uart_all_Driver = __BindgenOpaqueArray8<[u8; 32usize]>;
189#[repr(C)]
190#[derive(Debug, Copy, Clone)]
191pub struct zbi_platform_id_t {
192    pub vid: u32,
193    pub pid: u32,
194    pub board_name: [::core::ffi::c_char; 32usize],
195}
196#[allow(clippy::unnecessary_operation, clippy::identity_op)]
197const _: () = {
198    ["Size of zbi_platform_id_t"][::core::mem::size_of::<zbi_platform_id_t>() - 40usize];
199    ["Alignment of zbi_platform_id_t"][::core::mem::align_of::<zbi_platform_id_t>() - 4usize];
200    ["Offset of field: zbi_platform_id_t::vid"]
201        [::core::mem::offset_of!(zbi_platform_id_t, vid) - 0usize];
202    ["Offset of field: zbi_platform_id_t::pid"]
203        [::core::mem::offset_of!(zbi_platform_id_t, pid) - 4usize];
204    ["Offset of field: zbi_platform_id_t::board_name"]
205        [::core::mem::offset_of!(zbi_platform_id_t, board_name) - 8usize];
206};
207pub type zbi_topology_processor_flags_t = u16;
208#[repr(C)]
209#[derive(Debug, Copy, Clone)]
210pub struct zbi_topology_arm64_info_t {
211    pub cluster_1_id: u8,
212    pub cluster_2_id: u8,
213    pub cluster_3_id: u8,
214    pub cpu_id: u8,
215    pub gic_id: u8,
216}
217#[allow(clippy::unnecessary_operation, clippy::identity_op)]
218const _: () = {
219    ["Size of zbi_topology_arm64_info_t"]
220        [::core::mem::size_of::<zbi_topology_arm64_info_t>() - 5usize];
221    ["Alignment of zbi_topology_arm64_info_t"]
222        [::core::mem::align_of::<zbi_topology_arm64_info_t>() - 1usize];
223    ["Offset of field: zbi_topology_arm64_info_t::cluster_1_id"]
224        [::core::mem::offset_of!(zbi_topology_arm64_info_t, cluster_1_id) - 0usize];
225    ["Offset of field: zbi_topology_arm64_info_t::cluster_2_id"]
226        [::core::mem::offset_of!(zbi_topology_arm64_info_t, cluster_2_id) - 1usize];
227    ["Offset of field: zbi_topology_arm64_info_t::cluster_3_id"]
228        [::core::mem::offset_of!(zbi_topology_arm64_info_t, cluster_3_id) - 2usize];
229    ["Offset of field: zbi_topology_arm64_info_t::cpu_id"]
230        [::core::mem::offset_of!(zbi_topology_arm64_info_t, cpu_id) - 3usize];
231    ["Offset of field: zbi_topology_arm64_info_t::gic_id"]
232        [::core::mem::offset_of!(zbi_topology_arm64_info_t, gic_id) - 4usize];
233};
234#[repr(C)]
235#[derive(Debug, Copy, Clone)]
236pub struct zbi_topology_x64_info_t {
237    pub apic_ids: [u32; 4usize],
238    pub apic_id_count: u32,
239}
240#[allow(clippy::unnecessary_operation, clippy::identity_op)]
241const _: () = {
242    ["Size of zbi_topology_x64_info_t"]
243        [::core::mem::size_of::<zbi_topology_x64_info_t>() - 20usize];
244    ["Alignment of zbi_topology_x64_info_t"]
245        [::core::mem::align_of::<zbi_topology_x64_info_t>() - 4usize];
246    ["Offset of field: zbi_topology_x64_info_t::apic_ids"]
247        [::core::mem::offset_of!(zbi_topology_x64_info_t, apic_ids) - 0usize];
248    ["Offset of field: zbi_topology_x64_info_t::apic_id_count"]
249        [::core::mem::offset_of!(zbi_topology_x64_info_t, apic_id_count) - 16usize];
250};
251#[repr(C)]
252#[derive(Debug, Copy, Clone)]
253pub struct zbi_topology_riscv64_info_t {
254    pub hart_id: u64,
255    pub isa_strtab_index: u32,
256    pub reserved: u32,
257}
258#[allow(clippy::unnecessary_operation, clippy::identity_op)]
259const _: () = {
260    ["Size of zbi_topology_riscv64_info_t"]
261        [::core::mem::size_of::<zbi_topology_riscv64_info_t>() - 16usize];
262    ["Alignment of zbi_topology_riscv64_info_t"]
263        [::core::mem::align_of::<zbi_topology_riscv64_info_t>() - 8usize];
264    ["Offset of field: zbi_topology_riscv64_info_t::hart_id"]
265        [::core::mem::offset_of!(zbi_topology_riscv64_info_t, hart_id) - 0usize];
266    ["Offset of field: zbi_topology_riscv64_info_t::isa_strtab_index"]
267        [::core::mem::offset_of!(zbi_topology_riscv64_info_t, isa_strtab_index) - 8usize];
268    ["Offset of field: zbi_topology_riscv64_info_t::reserved"]
269        [::core::mem::offset_of!(zbi_topology_riscv64_info_t, reserved) - 12usize];
270};
271#[repr(C)]
272#[derive(Copy, Clone)]
273pub struct zbi_topology_architecture_info_t {
274    pub discriminant: u64,
275    pub __bindgen_anon_1: zbi_topology_architecture_info_t__bindgen_ty_1,
276}
277#[repr(C)]
278#[derive(Copy, Clone)]
279pub union zbi_topology_architecture_info_t__bindgen_ty_1 {
280    pub arm64: zbi_topology_arm64_info_t,
281    pub x64: zbi_topology_x64_info_t,
282    pub riscv64: zbi_topology_riscv64_info_t,
283}
284#[allow(clippy::unnecessary_operation, clippy::identity_op)]
285const _: () = {
286    ["Size of zbi_topology_architecture_info_t__bindgen_ty_1"]
287        [::core::mem::size_of::<zbi_topology_architecture_info_t__bindgen_ty_1>() - 24usize];
288    ["Alignment of zbi_topology_architecture_info_t__bindgen_ty_1"]
289        [::core::mem::align_of::<zbi_topology_architecture_info_t__bindgen_ty_1>() - 8usize];
290    ["Offset of field: zbi_topology_architecture_info_t__bindgen_ty_1::arm64"]
291        [::core::mem::offset_of!(zbi_topology_architecture_info_t__bindgen_ty_1, arm64) - 0usize];
292    ["Offset of field: zbi_topology_architecture_info_t__bindgen_ty_1::x64"]
293        [::core::mem::offset_of!(zbi_topology_architecture_info_t__bindgen_ty_1, x64) - 0usize];
294    ["Offset of field: zbi_topology_architecture_info_t__bindgen_ty_1::riscv64"]
295        [::core::mem::offset_of!(zbi_topology_architecture_info_t__bindgen_ty_1, riscv64) - 0usize];
296};
297#[allow(clippy::unnecessary_operation, clippy::identity_op)]
298const _: () = {
299    ["Size of zbi_topology_architecture_info_t"]
300        [::core::mem::size_of::<zbi_topology_architecture_info_t>() - 32usize];
301    ["Alignment of zbi_topology_architecture_info_t"]
302        [::core::mem::align_of::<zbi_topology_architecture_info_t>() - 8usize];
303    ["Offset of field: zbi_topology_architecture_info_t::discriminant"]
304        [::core::mem::offset_of!(zbi_topology_architecture_info_t, discriminant) - 0usize];
305};
306#[repr(C)]
307#[derive(Copy, Clone)]
308pub struct zbi_topology_processor_t {
309    pub architecture_info: zbi_topology_architecture_info_t,
310    pub flags: zbi_topology_processor_flags_t,
311    pub logical_ids: [u16; 4usize],
312    pub logical_id_count: u8,
313}
314#[allow(clippy::unnecessary_operation, clippy::identity_op)]
315const _: () = {
316    ["Size of zbi_topology_processor_t"]
317        [::core::mem::size_of::<zbi_topology_processor_t>() - 48usize];
318    ["Alignment of zbi_topology_processor_t"]
319        [::core::mem::align_of::<zbi_topology_processor_t>() - 8usize];
320    ["Offset of field: zbi_topology_processor_t::architecture_info"]
321        [::core::mem::offset_of!(zbi_topology_processor_t, architecture_info) - 0usize];
322    ["Offset of field: zbi_topology_processor_t::flags"]
323        [::core::mem::offset_of!(zbi_topology_processor_t, flags) - 32usize];
324    ["Offset of field: zbi_topology_processor_t::logical_ids"]
325        [::core::mem::offset_of!(zbi_topology_processor_t, logical_ids) - 34usize];
326    ["Offset of field: zbi_topology_processor_t::logical_id_count"]
327        [::core::mem::offset_of!(zbi_topology_processor_t, logical_id_count) - 42usize];
328};
329#[repr(C)]
330#[derive(Debug, Copy, Clone)]
331pub struct zbi_topology_cluster_t {
332    pub performance_class: u8,
333}
334#[allow(clippy::unnecessary_operation, clippy::identity_op)]
335const _: () = {
336    ["Size of zbi_topology_cluster_t"][::core::mem::size_of::<zbi_topology_cluster_t>() - 1usize];
337    ["Alignment of zbi_topology_cluster_t"]
338        [::core::mem::align_of::<zbi_topology_cluster_t>() - 1usize];
339    ["Offset of field: zbi_topology_cluster_t::performance_class"]
340        [::core::mem::offset_of!(zbi_topology_cluster_t, performance_class) - 0usize];
341};
342#[repr(C)]
343#[derive(Debug, Copy, Clone)]
344pub struct zbi_topology_cache_t {
345    pub cache_id: u32,
346}
347#[allow(clippy::unnecessary_operation, clippy::identity_op)]
348const _: () = {
349    ["Size of zbi_topology_cache_t"][::core::mem::size_of::<zbi_topology_cache_t>() - 4usize];
350    ["Alignment of zbi_topology_cache_t"][::core::mem::align_of::<zbi_topology_cache_t>() - 4usize];
351    ["Offset of field: zbi_topology_cache_t::cache_id"]
352        [::core::mem::offset_of!(zbi_topology_cache_t, cache_id) - 0usize];
353};
354#[repr(C)]
355#[derive(Debug, Copy, Clone)]
356pub struct zbi_topology_die_t {
357    pub reserved: u64,
358}
359#[allow(clippy::unnecessary_operation, clippy::identity_op)]
360const _: () = {
361    ["Size of zbi_topology_die_t"][::core::mem::size_of::<zbi_topology_die_t>() - 8usize];
362    ["Alignment of zbi_topology_die_t"][::core::mem::align_of::<zbi_topology_die_t>() - 8usize];
363    ["Offset of field: zbi_topology_die_t::reserved"]
364        [::core::mem::offset_of!(zbi_topology_die_t, reserved) - 0usize];
365};
366#[repr(C)]
367#[derive(Debug, Copy, Clone)]
368pub struct zbi_topology_socket_t {
369    pub reserved: u64,
370}
371#[allow(clippy::unnecessary_operation, clippy::identity_op)]
372const _: () = {
373    ["Size of zbi_topology_socket_t"][::core::mem::size_of::<zbi_topology_socket_t>() - 8usize];
374    ["Alignment of zbi_topology_socket_t"]
375        [::core::mem::align_of::<zbi_topology_socket_t>() - 8usize];
376    ["Offset of field: zbi_topology_socket_t::reserved"]
377        [::core::mem::offset_of!(zbi_topology_socket_t, reserved) - 0usize];
378};
379#[repr(C)]
380#[derive(Debug, Copy, Clone)]
381pub struct zbi_topology_numa_region_t {
382    pub start: u64,
383    pub size: u64,
384}
385#[allow(clippy::unnecessary_operation, clippy::identity_op)]
386const _: () = {
387    ["Size of zbi_topology_numa_region_t"]
388        [::core::mem::size_of::<zbi_topology_numa_region_t>() - 16usize];
389    ["Alignment of zbi_topology_numa_region_t"]
390        [::core::mem::align_of::<zbi_topology_numa_region_t>() - 8usize];
391    ["Offset of field: zbi_topology_numa_region_t::start"]
392        [::core::mem::offset_of!(zbi_topology_numa_region_t, start) - 0usize];
393    ["Offset of field: zbi_topology_numa_region_t::size"]
394        [::core::mem::offset_of!(zbi_topology_numa_region_t, size) - 8usize];
395};
396#[repr(C)]
397#[derive(Copy, Clone)]
398pub struct zbi_topology_entity_t {
399    pub discriminant: u64,
400    pub __bindgen_anon_1: zbi_topology_entity_t__bindgen_ty_1,
401}
402#[repr(C)]
403#[derive(Copy, Clone)]
404pub union zbi_topology_entity_t__bindgen_ty_1 {
405    pub processor: zbi_topology_processor_t,
406    pub cluster: zbi_topology_cluster_t,
407    pub cache: zbi_topology_cache_t,
408    pub die: zbi_topology_die_t,
409    pub socket: zbi_topology_socket_t,
410    pub numa_region: zbi_topology_numa_region_t,
411}
412#[allow(clippy::unnecessary_operation, clippy::identity_op)]
413const _: () = {
414    ["Size of zbi_topology_entity_t__bindgen_ty_1"]
415        [::core::mem::size_of::<zbi_topology_entity_t__bindgen_ty_1>() - 48usize];
416    ["Alignment of zbi_topology_entity_t__bindgen_ty_1"]
417        [::core::mem::align_of::<zbi_topology_entity_t__bindgen_ty_1>() - 8usize];
418    ["Offset of field: zbi_topology_entity_t__bindgen_ty_1::processor"]
419        [::core::mem::offset_of!(zbi_topology_entity_t__bindgen_ty_1, processor) - 0usize];
420    ["Offset of field: zbi_topology_entity_t__bindgen_ty_1::cluster"]
421        [::core::mem::offset_of!(zbi_topology_entity_t__bindgen_ty_1, cluster) - 0usize];
422    ["Offset of field: zbi_topology_entity_t__bindgen_ty_1::cache"]
423        [::core::mem::offset_of!(zbi_topology_entity_t__bindgen_ty_1, cache) - 0usize];
424    ["Offset of field: zbi_topology_entity_t__bindgen_ty_1::die"]
425        [::core::mem::offset_of!(zbi_topology_entity_t__bindgen_ty_1, die) - 0usize];
426    ["Offset of field: zbi_topology_entity_t__bindgen_ty_1::socket"]
427        [::core::mem::offset_of!(zbi_topology_entity_t__bindgen_ty_1, socket) - 0usize];
428    ["Offset of field: zbi_topology_entity_t__bindgen_ty_1::numa_region"]
429        [::core::mem::offset_of!(zbi_topology_entity_t__bindgen_ty_1, numa_region) - 0usize];
430};
431#[allow(clippy::unnecessary_operation, clippy::identity_op)]
432const _: () = {
433    ["Size of zbi_topology_entity_t"][::core::mem::size_of::<zbi_topology_entity_t>() - 56usize];
434    ["Alignment of zbi_topology_entity_t"]
435        [::core::mem::align_of::<zbi_topology_entity_t>() - 8usize];
436    ["Offset of field: zbi_topology_entity_t::discriminant"]
437        [::core::mem::offset_of!(zbi_topology_entity_t, discriminant) - 0usize];
438};
439#[repr(C)]
440#[derive(Copy, Clone)]
441pub struct zbi_topology_node_t {
442    pub entity: zbi_topology_entity_t,
443    pub parent_index: u16,
444}
445#[allow(clippy::unnecessary_operation, clippy::identity_op)]
446const _: () = {
447    ["Size of zbi_topology_node_t"][::core::mem::size_of::<zbi_topology_node_t>() - 64usize];
448    ["Alignment of zbi_topology_node_t"][::core::mem::align_of::<zbi_topology_node_t>() - 8usize];
449    ["Offset of field: zbi_topology_node_t::entity"]
450        [::core::mem::offset_of!(zbi_topology_node_t, entity) - 0usize];
451    ["Offset of field: zbi_topology_node_t::parent_index"]
452        [::core::mem::offset_of!(zbi_topology_node_t, parent_index) - 56usize];
453};
454#[repr(C)]
455#[derive(Debug, Copy, Clone)]
456pub struct ArchPhysHandoff {
457    pub _address: u8,
458}
459#[allow(clippy::unnecessary_operation, clippy::identity_op)]
460const _: () = {
461    ["Size of ArchPhysHandoff"][::core::mem::size_of::<ArchPhysHandoff>() - 1usize];
462    ["Alignment of ArchPhysHandoff"][::core::mem::align_of::<ArchPhysHandoff>() - 1usize];
463};
464pub type PhysHandoffPtr_value_type<T> = T;
465pub type PhysHandoffSpan_Ptr = u8;
466pub type PhysHandoffSpan_value_type = PhysHandoffSpan_Ptr;
467pub type PhysHandoffString_Base = u8;
468pub type PhysHandoffTemporaryString = __BindgenOpaqueArray8<[u8; 16usize]>;
469#[repr(C)]
470#[derive(Debug, Copy, Clone)]
471pub struct MappedMmioRange {
472    pub _base: __BindgenOpaqueArray8<[u8; 16usize]>,
473    pub paddr_: u64,
474}
475pub type MappedMmioRange_Base = __BindgenOpaqueArray8<[u8; 16usize]>;
476#[allow(clippy::unnecessary_operation, clippy::identity_op)]
477const _: () = {
478    ["Size of MappedMmioRange"][::core::mem::size_of::<MappedMmioRange>() - 24usize];
479    ["Alignment of MappedMmioRange"][::core::mem::align_of::<MappedMmioRange>() - 8usize];
480    ["Offset of field: MappedMmioRange::paddr_"]
481        [::core::mem::offset_of!(MappedMmioRange, paddr_) - 16usize];
482};
483#[repr(C)]
484#[derive(Debug)]
485pub struct ralloc_region_t {
486    _unused: [u8; 0],
487}
488#[repr(C)]
489#[derive(Debug, Copy, Clone)]
490pub struct PhysBootTimes {
491    pub timestamps_: [arch_EarlyTicks; 5usize],
492}
493#[repr(u64)]
494#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
495pub enum PhysBootTimes_Index {
496    ZbiEntry = 0,
497    PhysSetup = 1,
498    DecompressStart = 2,
499    DecompressEnd = 3,
500    ZbiDone = 4,
501    Count = 5,
502}
503#[allow(clippy::unnecessary_operation, clippy::identity_op)]
504const _: () = {
505    ["Size of PhysBootTimes"][::core::mem::size_of::<PhysBootTimes>() - 40usize];
506    ["Alignment of PhysBootTimes"][::core::mem::align_of::<PhysBootTimes>() - 8usize];
507    ["Offset of field: PhysBootTimes::timestamps_"]
508        [::core::mem::offset_of!(PhysBootTimes, timestamps_) - 0usize];
509};
510#[repr(C)]
511#[derive(Debug, Copy, Clone)]
512pub struct PhysVmObject {
513    pub name: PhysVmObject_Name,
514}
515pub type PhysVmObject_Name = __BindgenOpaqueArray<[u8; 32usize]>;
516#[allow(clippy::unnecessary_operation, clippy::identity_op)]
517const _: () = {
518    ["Size of PhysVmObject"][::core::mem::size_of::<PhysVmObject>() - 32usize];
519    ["Alignment of PhysVmObject"][::core::mem::align_of::<PhysVmObject>() - 1usize];
520    ["Offset of field: PhysVmObject::name"][::core::mem::offset_of!(PhysVmObject, name) - 0usize];
521};
522#[repr(C)]
523#[derive(Debug, Copy, Clone)]
524pub struct PhysVmo {
525    pub _base: PhysVmObject,
526    pub addr: usize,
527    pub stream_size: usize,
528}
529pub const PhysVmo_kMaxExtraHandoffPhysVmos: usize = 3;
530#[allow(clippy::unnecessary_operation, clippy::identity_op)]
531const _: () = {
532    ["Size of PhysVmo"][::core::mem::size_of::<PhysVmo>() - 48usize];
533    ["Alignment of PhysVmo"][::core::mem::align_of::<PhysVmo>() - 8usize];
534    ["Offset of field: PhysVmo::addr"][::core::mem::offset_of!(PhysVmo, addr) - 32usize];
535    ["Offset of field: PhysVmo::stream_size"]
536        [::core::mem::offset_of!(PhysVmo, stream_size) - 40usize];
537};
538#[repr(C)]
539#[derive(Debug, Copy, Clone)]
540pub struct PhysMapping {
541    pub _base: PhysVmObject,
542    pub type_: PhysMapping_Type,
543    pub vaddr: usize,
544    pub size: usize,
545    pub paddr: usize,
546    pub perms: PhysMapping_Permissions,
547    pub kasan_shadow: bool,
548}
549#[repr(i32)]
550#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
551pub enum PhysMapping_Type {
552    Normal = 0,
553    Mmio = 1,
554}
555#[repr(C)]
556#[derive(Debug, Copy, Clone)]
557pub struct PhysMapping_Permissions {
558    pub perms_: __BindgenOpaqueArray8<[u8; 8usize]>,
559}
560pub const PhysMapping_Permissions_kReadable: usize = 0;
561pub const PhysMapping_Permissions_kWritable: usize = 1;
562pub const PhysMapping_Permissions_kExecutable: usize = 2;
563#[allow(clippy::unnecessary_operation, clippy::identity_op)]
564const _: () = {
565    ["Size of PhysMapping_Permissions"][::core::mem::size_of::<PhysMapping_Permissions>() - 8usize];
566    ["Alignment of PhysMapping_Permissions"]
567        [::core::mem::align_of::<PhysMapping_Permissions>() - 8usize];
568    ["Offset of field: PhysMapping_Permissions::perms_"]
569        [::core::mem::offset_of!(PhysMapping_Permissions, perms_) - 0usize];
570};
571#[allow(clippy::unnecessary_operation, clippy::identity_op)]
572const _: () = {
573    ["Size of PhysMapping"][::core::mem::size_of::<PhysMapping>() - 80usize];
574    ["Alignment of PhysMapping"][::core::mem::align_of::<PhysMapping>() - 8usize];
575    ["Offset of field: PhysMapping::type_"][::core::mem::offset_of!(PhysMapping, type_) - 32usize];
576    ["Offset of field: PhysMapping::vaddr"][::core::mem::offset_of!(PhysMapping, vaddr) - 40usize];
577    ["Offset of field: PhysMapping::size"][::core::mem::offset_of!(PhysMapping, size) - 48usize];
578    ["Offset of field: PhysMapping::paddr"][::core::mem::offset_of!(PhysMapping, paddr) - 56usize];
579    ["Offset of field: PhysMapping::perms"][::core::mem::offset_of!(PhysMapping, perms) - 64usize];
580    ["Offset of field: PhysMapping::kasan_shadow"]
581        [::core::mem::offset_of!(PhysMapping, kasan_shadow) - 72usize];
582};
583#[repr(C)]
584#[derive(Debug, Copy, Clone)]
585pub struct PhysVmar {
586    pub _base: PhysVmObject,
587    pub base: usize,
588    pub size: usize,
589    pub mappings: __BindgenOpaqueArray8<[u8; 16usize]>,
590}
591pub type PhysVmar_MappingSpan = __BindgenOpaqueArray8<[u8; 16usize]>;
592#[allow(clippy::unnecessary_operation, clippy::identity_op)]
593const _: () = {
594    ["Size of PhysVmar"][::core::mem::size_of::<PhysVmar>() - 64usize];
595    ["Alignment of PhysVmar"][::core::mem::align_of::<PhysVmar>() - 8usize];
596    ["Offset of field: PhysVmar::base"][::core::mem::offset_of!(PhysVmar, base) - 32usize];
597    ["Offset of field: PhysVmar::size"][::core::mem::offset_of!(PhysVmar, size) - 40usize];
598    ["Offset of field: PhysVmar::mappings"][::core::mem::offset_of!(PhysVmar, mappings) - 48usize];
599};
600#[repr(C)]
601#[derive(Debug, Copy, Clone)]
602pub struct PhysElfImage {
603    pub vmo: PhysVmo,
604    pub vmar: PhysVmar,
605    pub info: PhysElfImage_Info,
606}
607#[repr(C)]
608#[derive(Debug, Copy, Clone)]
609pub struct PhysElfImage_Info {
610    pub relative_entry_point: usize,
611    pub stack_size: __BindgenOpaqueArray8<[u8; 16usize]>,
612}
613#[allow(clippy::unnecessary_operation, clippy::identity_op)]
614const _: () = {
615    ["Size of PhysElfImage_Info"][::core::mem::size_of::<PhysElfImage_Info>() - 24usize];
616    ["Alignment of PhysElfImage_Info"][::core::mem::align_of::<PhysElfImage_Info>() - 8usize];
617    ["Offset of field: PhysElfImage_Info::relative_entry_point"]
618        [::core::mem::offset_of!(PhysElfImage_Info, relative_entry_point) - 0usize];
619    ["Offset of field: PhysElfImage_Info::stack_size"]
620        [::core::mem::offset_of!(PhysElfImage_Info, stack_size) - 8usize];
621};
622pub const PhysElfImage_kZeroFill: usize = 18446744073709551615;
623#[allow(clippy::unnecessary_operation, clippy::identity_op)]
624const _: () = {
625    ["Size of PhysElfImage"][::core::mem::size_of::<PhysElfImage>() - 136usize];
626    ["Alignment of PhysElfImage"][::core::mem::align_of::<PhysElfImage>() - 8usize];
627    ["Offset of field: PhysElfImage::vmo"][::core::mem::offset_of!(PhysElfImage, vmo) - 0usize];
628    ["Offset of field: PhysElfImage::vmar"][::core::mem::offset_of!(PhysElfImage, vmar) - 48usize];
629    ["Offset of field: PhysElfImage::info"][::core::mem::offset_of!(PhysElfImage, info) - 112usize];
630};
631#[repr(C)]
632pub struct PhysHandoff {
633    pub magic: u64,
634    pub times: PhysBootTimes,
635    pub init_array: __BindgenOpaqueArray8<[u8; 16usize]>,
636    pub vmars: __BindgenOpaqueArray8<[u8; 16usize]>,
637    pub temporary_vmar: __BindgenOpaqueArray8<[u8; 8usize]>,
638    pub physmap_base: usize,
639    pub physmap_size: usize,
640    pub zbi: PhysVmo,
641    pub vdso: PhysElfImage,
642    pub userboot: PhysElfImage,
643    pub extra_vmos: __BindgenOpaqueArray8<[u8; 16usize]>,
644    pub entropy_pool: __BindgenOpaqueArray<[u8; 33usize]>,
645    pub arch_handoff: ArchPhysHandoff,
646    pub memory: __BindgenOpaqueArray8<[u8; 16usize]>,
647    pub cpu_topology: __BindgenOpaqueArray8<[u8; 16usize]>,
648    pub crashlog: PhysHandoffTemporaryString,
649    pub nvram: __BindgenOpaqueArray8<[u8; 16usize]>,
650    pub platform_id: stdbind_optional<zbi_platform_id_t>,
651    pub acpi_rsdp: stdbind_optional<u64>,
652    pub smbios_phys: stdbind_optional<u64>,
653    pub efi_memory_attributes: __BindgenOpaqueArray8<[u8; 16usize]>,
654    pub efi_system_table: stdbind_optional<u64>,
655    pub uart: uart_all_Driver,
656    pub uart_mmio: MappedMmioRange,
657    pub mmio_deny: __BindgenOpaqueArray8<[u8; 16usize]>,
658    pub periph_ranges: __BindgenOpaqueArray8<[u8; 16usize]>,
659    pub heap_vmar: __BindgenOpaqueArray8<[u8; 72usize]>,
660}
661pub const PhysHandoff_kMagic: u64 = 18369614220737305130;
662#[allow(clippy::unnecessary_operation, clippy::identity_op)]
663const _: () = {
664    ["Size of PhysHandoff"][::core::mem::size_of::<PhysHandoff>() - 816usize];
665    ["Alignment of PhysHandoff"][::core::mem::align_of::<PhysHandoff>() - 8usize];
666    ["Offset of field: PhysHandoff::magic"][::core::mem::offset_of!(PhysHandoff, magic) - 0usize];
667    ["Offset of field: PhysHandoff::times"][::core::mem::offset_of!(PhysHandoff, times) - 8usize];
668    ["Offset of field: PhysHandoff::init_array"]
669        [::core::mem::offset_of!(PhysHandoff, init_array) - 48usize];
670    ["Offset of field: PhysHandoff::vmars"][::core::mem::offset_of!(PhysHandoff, vmars) - 64usize];
671    ["Offset of field: PhysHandoff::temporary_vmar"]
672        [::core::mem::offset_of!(PhysHandoff, temporary_vmar) - 80usize];
673    ["Offset of field: PhysHandoff::physmap_base"]
674        [::core::mem::offset_of!(PhysHandoff, physmap_base) - 88usize];
675    ["Offset of field: PhysHandoff::physmap_size"]
676        [::core::mem::offset_of!(PhysHandoff, physmap_size) - 96usize];
677    ["Offset of field: PhysHandoff::zbi"][::core::mem::offset_of!(PhysHandoff, zbi) - 104usize];
678    ["Offset of field: PhysHandoff::vdso"][::core::mem::offset_of!(PhysHandoff, vdso) - 152usize];
679    ["Offset of field: PhysHandoff::userboot"]
680        [::core::mem::offset_of!(PhysHandoff, userboot) - 288usize];
681    ["Offset of field: PhysHandoff::extra_vmos"]
682        [::core::mem::offset_of!(PhysHandoff, extra_vmos) - 424usize];
683    ["Offset of field: PhysHandoff::entropy_pool"]
684        [::core::mem::offset_of!(PhysHandoff, entropy_pool) - 440usize];
685    ["Offset of field: PhysHandoff::arch_handoff"]
686        [::core::mem::offset_of!(PhysHandoff, arch_handoff) - 473usize];
687    ["Offset of field: PhysHandoff::memory"]
688        [::core::mem::offset_of!(PhysHandoff, memory) - 480usize];
689    ["Offset of field: PhysHandoff::cpu_topology"]
690        [::core::mem::offset_of!(PhysHandoff, cpu_topology) - 496usize];
691    ["Offset of field: PhysHandoff::crashlog"]
692        [::core::mem::offset_of!(PhysHandoff, crashlog) - 512usize];
693    ["Offset of field: PhysHandoff::nvram"][::core::mem::offset_of!(PhysHandoff, nvram) - 528usize];
694    ["Offset of field: PhysHandoff::platform_id"]
695        [::core::mem::offset_of!(PhysHandoff, platform_id) - 544usize];
696    ["Offset of field: PhysHandoff::acpi_rsdp"]
697        [::core::mem::offset_of!(PhysHandoff, acpi_rsdp) - 592usize];
698    ["Offset of field: PhysHandoff::smbios_phys"]
699        [::core::mem::offset_of!(PhysHandoff, smbios_phys) - 608usize];
700    ["Offset of field: PhysHandoff::efi_memory_attributes"]
701        [::core::mem::offset_of!(PhysHandoff, efi_memory_attributes) - 624usize];
702    ["Offset of field: PhysHandoff::efi_system_table"]
703        [::core::mem::offset_of!(PhysHandoff, efi_system_table) - 640usize];
704    ["Offset of field: PhysHandoff::uart"][::core::mem::offset_of!(PhysHandoff, uart) - 656usize];
705    ["Offset of field: PhysHandoff::uart_mmio"]
706        [::core::mem::offset_of!(PhysHandoff, uart_mmio) - 688usize];
707    ["Offset of field: PhysHandoff::mmio_deny"]
708        [::core::mem::offset_of!(PhysHandoff, mmio_deny) - 712usize];
709    ["Offset of field: PhysHandoff::periph_ranges"]
710        [::core::mem::offset_of!(PhysHandoff, periph_ranges) - 728usize];
711    ["Offset of field: PhysHandoff::heap_vmar"]
712        [::core::mem::offset_of!(PhysHandoff, heap_vmar) - 744usize];
713};