1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

Kernel: Fix NVMe register access

We need to use the volatile keyword when mapping the device registers,
or the compiler may optimize access, which lead to this QEMU error:

pci_nvme_ub_mmiord_toosmall in nvme_mmio_read: MMIO read smaller than
32-bits, offset=0x0
This commit is contained in:
Tom 2022-01-01 13:51:39 -07:00 committed by Brian Gianforcaro
parent c4b78bee45
commit d1e7b69004
4 changed files with 9 additions and 9 deletions

View file

@ -69,7 +69,7 @@ private:
RefPtr<NVMeQueue> m_admin_queue;
NonnullRefPtrVector<NVMeQueue> m_queues;
NonnullRefPtrVector<NVMeNameSpace> m_namespaces;
Memory::TypedMapping<ControllerRegister> m_controller_regs;
Memory::TypedMapping<volatile ControllerRegister> m_controller_regs;
bool m_admin_queue_ready { false };
size_t m_device_count {};
u32 m_bar;