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

Revert "Kernel: Implement an asynchronous device request stack"

This reverts commit 2fd5ce1eb0.

This broke booting without SMP. (PR was #3921)
This commit is contained in:
Andreas Kling 2020-11-04 21:25:26 +01:00
parent 70eaadc1cd
commit 501cef2bd7
17 changed files with 245 additions and 803 deletions

View file

@ -39,7 +39,6 @@
#include <AK/OwnPtr.h>
#include <AK/RefPtr.h>
#include <Kernel/Devices/Device.h>
#include <Kernel/IO.h>
#include <Kernel/Lock.h>
#include <Kernel/PCI/Access.h>
@ -51,8 +50,6 @@
namespace Kernel {
class AsyncBlockDeviceRequest;
struct PhysicalRegionDescriptor {
PhysicalAddress offset;
u16 size { 0 };
@ -86,15 +83,13 @@ private:
void initialize(bool force_pio);
void detect_disks();
void start_request(AsyncBlockDeviceRequest&, bool, bool);
void complete_current_request(AsyncDeviceRequest::RequestResult);
void wait_for_irq();
bool ata_read_sectors_with_dma(u32, u16, UserOrKernelBuffer&, bool);
bool ata_write_sectors_with_dma(u32, u16, const UserOrKernelBuffer&, bool);
bool ata_read_sectors(u32, u16, UserOrKernelBuffer&, bool);
bool ata_write_sectors(u32, u16, const UserOrKernelBuffer&, bool);
void ata_read_sectors_with_dma(bool);
void ata_read_sectors(bool);
bool ata_do_read_sector();
void ata_write_sectors_with_dma(bool);
void ata_write_sectors(bool);
void ata_do_write_sector();
inline void prepare_for_irq();
// Data members
u8 m_channel_number { 0 }; // Channel number. 0 = master, 1 = slave
@ -113,10 +108,5 @@ private:
RefPtr<PATADiskDevice> m_master;
RefPtr<PATADiskDevice> m_slave;
AsyncBlockDeviceRequest* m_current_request { nullptr };
u32 m_current_request_block_index { 0 };
bool m_current_request_uses_dma { false };
bool m_current_request_flushing_cache { false };
};
}