Skip to content

Instantly share code, notes, and snippets.

@SamTebbs33
Created June 4, 2019 19:08
Show Gist options
  • Save SamTebbs33/ccaccfc488491e24272f78f4f7a7f5fd to your computer and use it in GitHub Desktop.
Save SamTebbs33/ccaccfc488491e24272f78f4f7a7f5fd to your computer and use it in GitHub Desktop.
pub fn map_dir_entry(dir: *Directory, page: u32, phys_addr: u10) void {
var entry: *DirectoryEntry = &dir.entries[page];
entry.accessed = false;
entry.caching_disabled = false;
entry.four_megabyte_pages = true;
entry.available = 0;
entry.present = true;
entry.user_level = false;
entry.writable = true;
entry.write_through = true;
entry.zero = 0;
entry.page_phys_addr = phys_addr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment