Make some integers usize

This commit is contained in:
Sam Tebbs 2020-05-12 14:08:29 +01:00
parent 76ff52b1fa
commit 39fd5a151c
8 changed files with 46 additions and 46 deletions

View file

@ -62,7 +62,7 @@ pub const KERNEL_VMM_PAYLOAD = &paging.kernel_directory;
pub const VMM_MAPPER: vmm.Mapper(VmmPayload) = vmm.Mapper(VmmPayload){ .mapFn = paging.map, .unmapFn = paging.unmap };
/// The size of each allocatable block of memory, normally set to the page size.
pub const MEMORY_BLOCK_SIZE = paging.PAGE_SIZE_4KB;
pub const MEMORY_BLOCK_SIZE: usize = paging.PAGE_SIZE_4KB;
///
/// Assembly to write to a given port with a byte of data.

View file

@ -99,10 +99,10 @@ const TENTRY_AVAILABLE: u32 = 0xE00;
const TENTRY_PAGE_ADDR: u32 = 0xFFFFF000;
/// The number of bytes in 4MB
pub const PAGE_SIZE_4MB: u32 = 0x400000;
pub const PAGE_SIZE_4MB: usize = 0x400000;
/// The number of bytes in 4KB
pub const PAGE_SIZE_4KB: u32 = PAGE_SIZE_4MB / 1024;
pub const PAGE_SIZE_4KB: usize = PAGE_SIZE_4MB / 1024;
/// The kernel's page directory. Should only be used to map kernel-owned code and data
pub var kernel_directory: Directory align(@truncate(u29, PAGE_SIZE_4KB)) = Directory{ .entries = [_]DirectoryEntry{0} ** ENTRIES_PER_DIRECTORY, .tables = [_]?*Table{null} ** ENTRIES_PER_DIRECTORY };