mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-25 01:47:28 +00:00
Nobody uses this functionality. I used this code on my old 2007 ICH7 test machine about a year ago, but bare metal is a small aspect of the project, so it's safe to assume that nobody really tests this piece of code. Therefore, let's drop this for good and focus on more modern hardware.
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <AK/StringView.h>
|
|
#include <Kernel/Devices/Storage/AHCI/ATADevice.h>
|
|
#include <Kernel/Devices/Storage/StorageManagement.h>
|
|
#include <Kernel/Sections.h>
|
|
|
|
namespace Kernel {
|
|
|
|
static StorageDevice::LUNAddress convert_ata_address_to_lun_address(AHCIController const& controller, ATA::Address ata_address)
|
|
{
|
|
return StorageDevice::LUNAddress { controller.controller_id(), ata_address.port, ata_address.subport };
|
|
}
|
|
|
|
ATADevice::ATADevice(AHCIController const& controller, ATA::Address ata_address, u16 capabilities, u16 logical_sector_size, u64 max_addressable_block)
|
|
: StorageDevice(convert_ata_address_to_lun_address(controller, ata_address), controller.hardware_relative_controller_id(), logical_sector_size, max_addressable_block)
|
|
, m_controller(controller)
|
|
, m_ata_address(ata_address)
|
|
, m_capabilities(capabilities)
|
|
{
|
|
}
|
|
|
|
ATADevice::~ATADevice() = default;
|
|
|
|
void ATADevice::start_request(AsyncBlockDeviceRequest& request)
|
|
{
|
|
VERIFY(m_controller);
|
|
m_controller->start_request(m_ata_address, request);
|
|
}
|
|
|
|
}
|