MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / ATADiskDevice

Class ATADiskDevice

Kernel/include/atadrive.h:8–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7namespace ATA{
8 class ATADiskDevice : public DiskDevice{
9 public:
10 ATADiskDevice(int port, int drive); // Constructor
11 int ReadDiskBlock(uint64_t lba, uint32_t count, void* buffer); // Read bytes
12 int WriteDiskBlock(uint64_t lba, uint32_t count, void* buffer); // Write bytes
13
14 uint32_t prdBufferPhys;
15 uint8_t* prdBuffer;
16
17 uint32_t prdtPhys;
18 uint64_t* prdt;
19 uint64_t prd;
20
21 int port;
22 int drive; // 0 - Master, 1 - Slave
23
24 int blocksize = 512;
25
26 private:
27 Semaphore driveLock = Semaphore(1);
28 };
29}

Callers

nothing calls this directly

Calls 1

SemaphoreClass · 0.85

Tested by

no test coverage detected