🆕 写入磁盘扇区

This commit is contained in:
fslongjin
2022-04-02 17:00:19 +08:00
parent 8294e0d12b
commit 405f55624d
2 changed files with 97 additions and 7 deletions

View File

@ -382,4 +382,18 @@ void ahci_probe_port(const uint32_t device_num);
* @return true done
* @return false failed
*/
bool ahci_read(HBA_PORT *port, uint32_t startl, uint32_t starth, uint32_t count, uint64_t buf);
bool ahci_read(HBA_PORT *port, uint32_t startl, uint32_t starth, uint32_t count, uint64_t buf);
/**
* @brief write data to SATA device using 48bit LBA address
*
* @param port HBA PORT
* @param startl low 32bits of start addr
* @param starth high 32bits of start addr
* @param count total sectors to read
* @param buf buffer
* @return true done
* @return false failed
*/
bool ahci_write(HBA_PORT *port, uint32_t startl, uint32_t starth, uint32_t count,
uint64_t buf);