i have a big struct that i will not be able to change other then how i address the data, my problem is that offsets of items are wrong
century offset: 108
iapc_boot_arch_flags offset: 110
virtio.printf("{any} offset: {any}\n", .{ LocalAcpiTables.fadt.iapc_boot_arch_flags, @offsetOf(acpi.FADT, "century") });
virtio.printf("{any} offset: {any}\n", .{ LocalAcpiTables.fadt.iapc_boot_arch_flags, @offsetOf(acpi.FADT, "iapc_boot_arch_flags") });
also this is the struct:
pub const FADT align(1) = extern struct {
h: SDTHeader,
firmware_control: u32,
dsdt: u32,
reserved: u8,
preferred_pm_profile: u8,
sci_interrupt: u16,
smi_command_port: u32,
acpi_enable: u8,
acpi_disable: u8,
s4bios_req: u8,
pstate_control: u8,
pm1a_event_block: u32,
pm1b_event_block: u32,
pm1a_control_block: u32,
pm1b_control_block: u32,
pm2_control_block: u32,
pm_timer_block: u32,
gpe0_block: u32,
gpe1_block: u32,
pm1_event_length: u8,
pm1_control_length: u8,
pm2_control_length: u8,
pm_timer_length: u8,
gpe0_length: u8,
gpe1_length: u8,
gpe1_base: u8,
cstate_control: u8,
worst_c2_latency: u16,
worst_c3_latency: u16,
flush_size: u16,
flush_stride: u16,
duty_offset: u8,
duty_width: u8,
day_alarm: u8,
month_alarm: u8,
century: u8,
iapc_boot_arch_flags: u16,
reserved2: u8,
flags: u32,
reset_reg: genericAddressStructure,
reset_value: u8,
reserved3: [3]u8,
x_firmware_control: u64,
x_dsdt: u64,
x_pm1a_event_block: genericAddressStructure,
x_pm1b_event_block: genericAddressStructure,
x_pm1a_control_block: genericAddressStructure,
x_pm1b_control_block: genericAddressStructure,
x_pm2_control_block: genericAddressStructure,
x_pm_timer_block: genericAddressStructure,
x_gpe0_block: genericAddressStructure,
x_gpe1_block: genericAddressStructure,
};