kernel/x86: fix HPET ACPI table alignment
vendor_id shall come after the bitfields Move hpet_address to separate struct definition so we can apply the correct packed flags. see also: https://wiki.osdev.org/HPET Change-Id: Iced005846fedd4b895910e9b61137d5349db5b41 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4859 Reviewed-by: Jérôme Duval <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
901fc0c75f
commit
4ddb4993c8
@@ -95,21 +95,24 @@ struct hpet_regs {
|
||||
};
|
||||
|
||||
|
||||
typedef struct acpi_hpet_addr {
|
||||
uint8 address_space;
|
||||
uint8 register_width;
|
||||
uint8 register_offset;
|
||||
uint8 reserved;
|
||||
uint64 address;
|
||||
} _PACKED acpi_hpet_addr;
|
||||
|
||||
|
||||
typedef struct acpi_hpet {
|
||||
acpi_descriptor_header header; /* "HPET" signature and acpi header */
|
||||
uint16 vendor_id;
|
||||
uint8 legacy_capable : 1;
|
||||
uint8 reserved1 : 1;
|
||||
uint8 countersize : 1;
|
||||
uint8 comparators : 5;
|
||||
uint8 hw_revision;
|
||||
struct hpet_addr {
|
||||
uint8 address_space;
|
||||
uint8 register_width;
|
||||
uint8 register_offset;
|
||||
uint8 reserved;
|
||||
uint64 address;
|
||||
} hpet_address;
|
||||
uint8 comparators : 5;
|
||||
uint8 countersize : 1;
|
||||
uint8 reserved1 : 1;
|
||||
uint8 legacy_capable : 1;
|
||||
uint16 vendor_id;
|
||||
acpi_hpet_addr hpet_address;
|
||||
uint8 number;
|
||||
uint16 min_tick;
|
||||
} _PACKED acpi_hpet;
|
||||
|
||||
Reference in New Issue
Block a user