/* * Copyright (c) 2021, Liav A. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Kernel { class AHCIController; class SATADiskDevice final : public StorageDevice { friend class AHCIController; public: enum class InterfaceType : u8 { SATA, SATAPI, }; public: static NonnullRefPtr create(const AHCIController&, const AHCIPort&, size_t sector_size, u64 max_addressable_block); virtual ~SATADiskDevice() override; // ^StorageDevice // ^BlockDevice virtual void start_request(AsyncBlockDeviceRequest&) override; virtual String device_name() const override; private: SATADiskDevice(const AHCIController&, const AHCIPort&, size_t sector_size, u64 max_addressable_block); // ^DiskDevice virtual StringView class_name() const override; NonnullRefPtr m_port; }; }