refactor: ByteOffset newtype for window/register/ring offsets; named virtio-gpu cmd fields
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
use libkos::fs::Storage;
|
||||
use libkos::syscall;
|
||||
use types::address::{EntryPoint, VirtualAddress};
|
||||
use types::address::{ByteOffset, EntryPoint, VirtualAddress};
|
||||
use types::bounded::{CapSlot, PageCount};
|
||||
use types::budget::Limits;
|
||||
|
||||
@@ -53,7 +53,7 @@ pub(crate) fn load_binary(
|
||||
|
||||
let page_count = PageCount::new(u16::try_from(seg_pages).ok()?)?;
|
||||
let local = libkos::window::request(page_count)?;
|
||||
local.fill_u32(0, seg_pages * PAGE_SIZE / 4, 0);
|
||||
local.fill_u32(ByteOffset::ZERO, seg_pages * PAGE_SIZE / 4, 0);
|
||||
|
||||
let copy_len = segment.file_size.min(segment.mem_size);
|
||||
let src = segment
|
||||
@@ -61,7 +61,7 @@ pub(crate) fn load_binary(
|
||||
.checked_add(copy_len)
|
||||
.and_then(|end| elf_data.get(segment.file_offset..end));
|
||||
if let Some(src) = src.filter(|_| copy_len > 0) {
|
||||
local.copy_from(offset_in_page, src);
|
||||
local.copy_from(ByteOffset::new(offset_in_page), src);
|
||||
}
|
||||
|
||||
for p in 0..seg_pages {
|
||||
|
||||
Reference in New Issue
Block a user