ahci: complete read/write sectors function

This commit is contained in:
Michael Shaw 2023-05-07 15:21:04 -04:00
commit 69ee1fd79c
6 changed files with 75 additions and 11 deletions

View file

@ -19,6 +19,7 @@
#define ATA_DEV_DRQ 0x08
#define ATA_CMD_READ_DMA_EX 0x25
#define ATA_CMD_WRITE_DMA_EX 0x35
#define ATA_CMD_IDENT 0xEC
#define SATA_SIG_ATA 0x00000101
@ -32,6 +33,10 @@
#define AHCI_DEV_PM 3
#define AHCI_DEV_SATAPI 4
#define AHCI_GHC_ENABLE 0x1
#define AHCI_GHC_IE 0x2
#define AHCI_GHC_AE 0x80000000
#define HBA_PORT_IPM_ACTIVE 0x1
#define HBA_PORT_DET_PRESENT 0x3

View file

@ -80,6 +80,7 @@ extern size_t num_regions;
extern size_t max_regions;
extern struct page *pml4;
extern paddr_t kcr3;
uint64_t cr3_read();
void cr3_write(uint64_t cr3);