1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

Kernel/Storage: Add support for non-bus mastering IDE controllers

Although unlikely to happen, a user can have an IDE controller that
doesn't support bus master capability. If that's the case, we need to
check for this, and create an IDEChannel (not BMIDEChannel) to allow
IO operations with the controller.
This commit is contained in:
Liav A 2021-03-27 09:22:25 +03:00 committed by Andreas Kling
parent 833a6bd047
commit 8b446fb579
5 changed files with 40 additions and 24 deletions

View file

@ -72,6 +72,13 @@ public:
{
}
IOAddressGroup(IOAddress io_base, IOAddress control_base)
: m_io_base(io_base)
, m_control_base(control_base)
, m_bus_master_base()
{
}
// Disable default implementations that would use surprising integer promotion.
bool operator==(const IOAddressGroup&) const = delete;
bool operator<=(const IOAddressGroup&) const = delete;
@ -81,7 +88,7 @@ public:
IOAddress io_base() const { return m_io_base; };
IOAddress control_base() const { return m_control_base; }
IOAddress bus_master_base() const { return m_bus_master_base; }
Optional<IOAddress> bus_master_base() const { return m_bus_master_base; }
const IOAddressGroup& operator=(const IOAddressGroup& group)
{
@ -94,7 +101,7 @@ public:
private:
IOAddress m_io_base;
IOAddress m_control_base;
IOAddress m_bus_master_base;
Optional<IOAddress> m_bus_master_base;
};
public: