simplify kernel mapping calls

This commit is contained in:
Robert Morris 2019-07-23 12:17:17 -04:00
parent 55bc96d419
commit 54178ad94d
8 changed files with 53 additions and 45 deletions

View file

@ -199,6 +199,8 @@ virtio_disk_rw(struct buf *b)
buf0.reserved = 0;
buf0.sector = sector;
// buf0 is on a kernel stack, which is not direct mapped,
// thus the call to kernelpa().
desc[idx[0]].addr = (uint64) kernelpa((uint64) &buf0);
desc[idx[0]].len = sizeof(buf0);
desc[idx[0]].flags = VRING_DESC_F_NEXT;