diff options
author | Liav A <liavalb@gmail.com> | 2020-10-31 22:26:47 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-01 10:19:17 +0100 |
commit | 4007ba5137d28918d527535a9ee639beba3dc6f9 (patch) | |
tree | 9bdfe4092271308a6bcf434cd2292d69c1bedbf9 /Kernel | |
parent | 6131048a5f28439c2f1bba4773b4f5ba0f92ad45 (diff) | |
download | serenity-4007ba5137d28918d527535a9ee639beba3dc6f9.zip |
Kernel: Reduce code duplication in the PCI IO access read helpers
We just call the early helpers as they do the same thing like the IO
access helpers.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/PCI/IOAccess.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Kernel/PCI/IOAccess.cpp b/Kernel/PCI/IOAccess.cpp index 7b3161135e..8c565c303f 100644 --- a/Kernel/PCI/IOAccess.cpp +++ b/Kernel/PCI/IOAccess.cpp @@ -46,20 +46,17 @@ IOAccess::IOAccess() u8 IOAccess::read8_field(Address address, u32 field) { - IO::out32(PCI_ADDRESS_PORT, address.io_address_for_field(field)); - return IO::in8(PCI_VALUE_PORT + (field & 3)); + return Access::early_read8_field(address, field); } u16 IOAccess::read16_field(Address address, u32 field) { - IO::out32(PCI_ADDRESS_PORT, address.io_address_for_field(field)); - return IO::in16(PCI_VALUE_PORT + (field & 2)); + return Access::early_read16_field(address, field); } u32 IOAccess::read32_field(Address address, u32 field) { - IO::out32(PCI_ADDRESS_PORT, address.io_address_for_field(field)); - return IO::in32(PCI_VALUE_PORT); + return Access::early_read32_field(address, field); } void IOAccess::write8_field(Address address, u32 field, u8 value) |