mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
Kernel/Storage: Make AHCI::HBA::port_regs a flexible array member
Some real hardware apparently uses smaller BAR sizes than sizeof(HBA) with a completely filled port_regs member. Change the port_regs array to a flexible array member, so we don't panic while verifying that the BAR size is large enough to map this struct. Accesses to this array are already bounds checked against AHCI::Limits::MaxPorts.
This commit is contained in:
parent
6fd02d2a04
commit
f85099ea47
1 changed files with 1 additions and 1 deletions
|
@ -401,7 +401,7 @@ struct [[gnu::packed]] HBA {
|
|||
u8 reserved[52];
|
||||
u8 nvmhci[64];
|
||||
u8 vendor_specific[96];
|
||||
PortRegisters port_regs[32];
|
||||
PortRegisters port_regs[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] CommandHeader {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue