mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-10 08:06:48 +00:00
修复ahci缓冲区地址错误的问题
This commit is contained in:
parent
05dc7ac73b
commit
3063a340e2
@ -315,13 +315,13 @@ static bool ahci_write(HBA_PORT *port, uint32_t startl, uint32_t starth, uint32_
|
||||
int i = 0;
|
||||
for (i = 0; i < cmdheader->prdtl - 1; ++i)
|
||||
{
|
||||
cmdtbl->prdt_entry[i].dba = buf;
|
||||
cmdtbl->prdt_entry[i].dba = virt_2_phys(buf);
|
||||
cmdtbl->prdt_entry[i].dbc = 8 * 1024 - 1; // 8K bytes
|
||||
cmdtbl->prdt_entry[i].i = 0;
|
||||
buf += 4 * 1024; // 4K words
|
||||
count -= 16; // 16 sectors
|
||||
}
|
||||
cmdtbl->prdt_entry[i].dba = buf;
|
||||
cmdtbl->prdt_entry[i].dba = virt_2_phys(buf);
|
||||
|
||||
cmdtbl->prdt_entry[i].dbc = count << 9; // 512 bytes per sector
|
||||
cmdtbl->prdt_entry[i].i = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user