SYMBOL INDEX (1210 symbols across 88 files) FILE: assembly/intrin.c function main (line 7) | int main() { function calc_intrin (line 29) | void calc_intrin(float result[], float matrix[], float vector[]) FILE: risc_v/chapters/ch1/src/lib.rs function eh_personality (line 35) | extern "C" fn eh_personality() {} function panic (line 37) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 53) | extern "C" function kmain (line 70) | extern "C" FILE: risc_v/chapters/ch2/src/lib.rs function eh_personality (line 36) | extern "C" fn eh_personality() {} function panic (line 39) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 55) | extern "C" function kmain (line 72) | extern "C" FILE: risc_v/chapters/ch2/src/uart.rs type Uart (line 8) | pub struct Uart { method new (line 22) | pub fn new(base_address: usize) -> Self { method init (line 28) | pub fn init(&mut self) { method put (line 92) | pub fn put(&mut self, c: u8) { method get (line 99) | pub fn get(&mut self) -> Option { method write_str (line 13) | fn write_str(&mut self, out: &str) -> Result<(), Error> { FILE: risc_v/chapters/ch3/src/kmem.rs type AllocListFlags (line 10) | enum AllocListFlags { method val (line 14) | pub fn val(self) -> usize { type AllocList (line 19) | struct AllocList { method is_taken (line 23) | pub fn is_taken(&self) -> bool { method is_free (line 27) | pub fn is_free(&self) -> bool { method set_taken (line 31) | pub fn set_taken(&mut self) { method set_free (line 35) | pub fn set_free(&mut self) { method set_size (line 39) | pub fn set_size(&mut self, sz: usize) { method get_size (line 47) | pub fn get_size(&self) -> usize { function get_head (line 64) | pub fn get_head() -> *mut u8 { function get_page_table (line 68) | pub fn get_page_table() -> *mut Table { function get_num_allocations (line 72) | pub fn get_num_allocations() -> usize { function init (line 80) | pub fn init() { function kzmalloc (line 94) | pub fn kzmalloc(sz: usize) -> *mut u8 { function kmalloc (line 109) | pub fn kmalloc(sz: usize) -> *mut u8 { function kfree (line 152) | pub fn kfree(ptr: *mut u8) { function coalesce (line 167) | pub fn coalesce() { function print_table (line 210) | pub fn print_table() { type OsGlobalAlloc (line 241) | struct OsGlobalAlloc; method alloc (line 244) | unsafe fn alloc(&self, layout: Layout) -> *mut u8 { method dealloc (line 251) | unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { function alloc_error (line 268) | pub fn alloc_error(l: Layout) -> ! { FILE: risc_v/chapters/ch3/src/lib.rs function eh_personality (line 46) | extern "C" fn eh_personality() {} function panic (line 49) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 65) | extern "C" fn abort() -> ! { function id_map_range (line 102) | pub fn id_map_range(root: &mut page::Table, function kinit (line 125) | extern "C" fn kinit() -> usize { function kmain (line 280) | extern "C" fn kmain() { FILE: risc_v/chapters/ch3/src/page.rs constant PAGE_ORDER (line 19) | const PAGE_ORDER: usize = 12; constant PAGE_SIZE (line 20) | pub const PAGE_SIZE: usize = 1 << 12; function align_val (line 26) | pub const fn align_val(val: usize, order: usize) -> usize { type PageBits (line 32) | pub enum PageBits { method val (line 41) | pub fn val(self) -> u8 { type Page (line 49) | pub struct Page { method is_last (line 56) | pub fn is_last(&self) -> bool { method is_taken (line 67) | pub fn is_taken(&self) -> bool { method is_free (line 77) | pub fn is_free(&self) -> bool { method clear (line 82) | pub fn clear(&mut self) { method set_flag (line 89) | pub fn set_flag(&mut self, flag: PageBits) { method clear_flag (line 93) | pub fn clear_flag(&mut self, flag: PageBits) { function init (line 104) | pub fn init() { function alloc (line 128) | pub fn alloc(pages: usize) -> *mut u8 { function zalloc (line 187) | pub fn zalloc(pages: usize) -> *mut u8 { function dealloc (line 212) | pub fn dealloc(ptr: *mut u8) { function print_page_allocations (line 242) | pub fn print_page_allocations() { type EntryBits (line 309) | pub enum EntryBits { method val (line 335) | pub fn val(self) -> i64 { type Entry (line 344) | pub struct Entry { method is_valid (line 351) | pub fn is_valid(&self) -> bool { method is_invalid (line 357) | pub fn is_invalid(&self) -> bool { method is_leaf (line 362) | pub fn is_leaf(&self) -> bool { method is_branch (line 366) | pub fn is_branch(&self) -> bool { method set_entry (line 370) | pub fn set_entry(&mut self, entry: i64) { method get_entry (line 374) | pub fn get_entry(&self) -> i64 { type Table (line 380) | pub struct Table { method len (line 385) | pub fn len() -> usize { function map (line 401) | pub fn map(root: &mut Table, vaddr: usize, paddr: usize, bits: i64, leve... function unmap (line 474) | pub fn unmap(root: &mut Table) { function virt_to_phys (line 506) | pub fn virt_to_phys(root: &Table, vaddr: usize) -> Option { FILE: risc_v/chapters/ch3/src/uart.rs type Uart (line 8) | pub struct Uart { method new (line 22) | pub fn new(base_address: usize) -> Self { method init (line 28) | pub fn init(&mut self) { method put (line 92) | pub fn put(&mut self, c: u8) { method get (line 99) | pub fn get(&mut self) -> Option { method write_str (line 13) | fn write_str(&mut self, out: &str) -> Result<(), Error> { FILE: risc_v/chapters/ch4/src/cpu.rs type SatpMode (line 10) | pub enum SatpMode { type TrapFrame (line 18) | pub struct TrapFrame { method zero (line 27) | pub const fn zero() -> Self { function build_satp (line 39) | pub const fn build_satp(mode: SatpMode, asid: usize, addr: usize) -> usi... function mhartid_read (line 45) | pub fn mhartid_read() -> usize { function mstatus_write (line 53) | pub fn mstatus_write(val: usize) { function mstatus_read (line 59) | pub fn mstatus_read() -> usize { function stvec_write (line 67) | pub fn stvec_write(val: usize) { function stvec_read (line 73) | pub fn stvec_read() -> usize { function mscratch_write (line 81) | pub fn mscratch_write(val: usize) { function mscratch_read (line 87) | pub fn mscratch_read() -> usize { function mscratch_swap (line 95) | pub fn mscratch_swap(to: usize) -> usize { function sscratch_write (line 103) | pub fn sscratch_write(val: usize) { function sscratch_read (line 109) | pub fn sscratch_read() -> usize { function sscratch_swap (line 117) | pub fn sscratch_swap(to: usize) -> usize { function sepc_write (line 125) | pub fn sepc_write(val: usize) { function sepc_read (line 131) | pub fn sepc_read() -> usize { function satp_write (line 139) | pub fn satp_write(val: usize) { function satp_read (line 145) | pub fn satp_read() -> usize { function satp_fence (line 153) | pub fn satp_fence(vaddr: usize, asid: usize) { function satp_fence_asid (line 159) | pub fn satp_fence_asid(asid: usize) { FILE: risc_v/chapters/ch4/src/kmem.rs type AllocListFlags (line 10) | enum AllocListFlags { method val (line 14) | pub fn val(self) -> usize { type AllocList (line 19) | struct AllocList { method is_taken (line 23) | pub fn is_taken(&self) -> bool { method is_free (line 27) | pub fn is_free(&self) -> bool { method set_taken (line 31) | pub fn set_taken(&mut self) { method set_free (line 35) | pub fn set_free(&mut self) { method set_size (line 39) | pub fn set_size(&mut self, sz: usize) { method get_size (line 47) | pub fn get_size(&self) -> usize { function get_head (line 63) | pub fn get_head() -> *mut u8 { function get_page_table (line 67) | pub fn get_page_table() -> *mut Table { function get_num_allocations (line 71) | pub fn get_num_allocations() -> usize { function init (line 79) | pub fn init() { function kzmalloc (line 93) | pub fn kzmalloc(sz: usize) -> *mut u8 { function kmalloc (line 108) | pub fn kmalloc(sz: usize) -> *mut u8 { function kfree (line 151) | pub fn kfree(ptr: *mut u8) { function coalesce (line 166) | pub fn coalesce() { function print_table (line 209) | pub fn print_table() { type OsGlobalAlloc (line 240) | struct OsGlobalAlloc; method alloc (line 243) | unsafe fn alloc(&self, layout: Layout) -> *mut u8 { method dealloc (line 250) | unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { function alloc_error (line 267) | pub fn alloc_error(l: Layout) -> ! { FILE: risc_v/chapters/ch4/src/lib.rs function eh_personality (line 46) | extern "C" fn eh_personality() {} function panic (line 49) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 65) | extern "C" fn abort() -> ! { function id_map_range (line 101) | pub fn id_map_range(root: &mut page::Table, function kinit (line 123) | extern "C" fn kinit() { function kinit_hart (line 303) | extern "C" fn kinit_hart(hartid: usize) { function kmain (line 326) | extern "C" fn kmain() { FILE: risc_v/chapters/ch4/src/page.rs constant PAGE_ORDER (line 19) | const PAGE_ORDER: usize = 12; constant PAGE_SIZE (line 20) | pub const PAGE_SIZE: usize = 1 << 12; function align_val (line 26) | pub const fn align_val(val: usize, order: usize) -> usize { type PageBits (line 32) | pub enum PageBits { method val (line 41) | pub fn val(self) -> u8 { type Page (line 49) | pub struct Page { method is_last (line 56) | pub fn is_last(&self) -> bool { method is_taken (line 67) | pub fn is_taken(&self) -> bool { method is_free (line 77) | pub fn is_free(&self) -> bool { method clear (line 82) | pub fn clear(&mut self) { method set_flag (line 89) | pub fn set_flag(&mut self, flag: PageBits) { method clear_flag (line 93) | pub fn clear_flag(&mut self, flag: PageBits) { function init (line 104) | pub fn init() { function alloc (line 130) | pub fn alloc(pages: usize) -> *mut u8 { function zalloc (line 189) | pub fn zalloc(pages: usize) -> *mut u8 { function dealloc (line 214) | pub fn dealloc(ptr: *mut u8) { function print_page_allocations (line 244) | pub fn print_page_allocations() { type EntryBits (line 311) | pub enum EntryBits { method val (line 337) | pub fn val(self) -> i64 { type Entry (line 346) | pub struct Entry { method is_valid (line 353) | pub fn is_valid(&self) -> bool { method is_invalid (line 359) | pub fn is_invalid(&self) -> bool { method is_leaf (line 364) | pub fn is_leaf(&self) -> bool { method is_branch (line 368) | pub fn is_branch(&self) -> bool { method set_entry (line 372) | pub fn set_entry(&mut self, entry: i64) { method get_entry (line 376) | pub fn get_entry(&self) -> i64 { type Table (line 382) | pub struct Table { method len (line 387) | pub fn len() -> usize { function map (line 403) | pub fn map(root: &mut Table, function unmap (line 484) | pub fn unmap(root: &mut Table) { function virt_to_phys (line 517) | pub fn virt_to_phys(root: &Table, vaddr: usize) -> Option { FILE: risc_v/chapters/ch4/src/trap.rs function m_trap (line 9) | extern "C" fn m_trap(epc: usize, FILE: risc_v/chapters/ch4/src/uart.rs type Uart (line 7) | pub struct Uart { method new (line 21) | pub fn new(base_address: usize) -> Self { method init (line 25) | pub fn init(&mut self) { method put (line 102) | pub fn put(&mut self, c: u8) { method get (line 109) | pub fn get(&mut self) -> Option { method write_str (line 12) | fn write_str(&mut self, out: &str) -> Result<(), Error> { FILE: risc_v/chapters/ch5/src/cpu.rs type SatpMode (line 14) | pub enum SatpMode { type TrapFrame (line 26) | pub struct TrapFrame { method zero (line 43) | pub const fn zero() -> Self { function build_satp (line 63) | pub const fn build_satp(mode: SatpMode, asid: usize, addr: usize) -> usi... function mhartid_read (line 69) | pub fn mhartid_read() -> usize { function mie_read (line 76) | pub fn mie_read() -> usize { function mie_write (line 84) | pub fn mie_write(val: usize) { function mstatus_write (line 90) | pub fn mstatus_write(val: usize) { function mstatus_read (line 96) | pub fn mstatus_read() -> usize { function stvec_write (line 104) | pub fn stvec_write(val: usize) { function stvec_read (line 110) | pub fn stvec_read() -> usize { function mscratch_write (line 118) | pub fn mscratch_write(val: usize) { function mscratch_read (line 124) | pub fn mscratch_read() -> usize { function mscratch_swap (line 132) | pub fn mscratch_swap(to: usize) -> usize { function sscratch_write (line 140) | pub fn sscratch_write(val: usize) { function sscratch_read (line 146) | pub fn sscratch_read() -> usize { function sscratch_swap (line 154) | pub fn sscratch_swap(to: usize) -> usize { function sepc_write (line 162) | pub fn sepc_write(val: usize) { function sepc_read (line 168) | pub fn sepc_read() -> usize { function satp_write (line 176) | pub fn satp_write(val: usize) { function satp_read (line 182) | pub fn satp_read() -> usize { function satp_fence (line 193) | pub fn satp_fence(vaddr: usize, asid: usize) { function satp_fence_asid (line 206) | pub fn satp_fence_asid(asid: usize) { FILE: risc_v/chapters/ch5/src/kmem.rs type AllocListFlags (line 10) | enum AllocListFlags { method val (line 14) | pub fn val(self) -> usize { type AllocList (line 19) | struct AllocList { method is_taken (line 23) | pub fn is_taken(&self) -> bool { method is_free (line 27) | pub fn is_free(&self) -> bool { method set_taken (line 31) | pub fn set_taken(&mut self) { method set_free (line 35) | pub fn set_free(&mut self) { method set_size (line 39) | pub fn set_size(&mut self, sz: usize) { method get_size (line 47) | pub fn get_size(&self) -> usize { function get_head (line 63) | pub fn get_head() -> *mut u8 { function get_page_table (line 67) | pub fn get_page_table() -> *mut Table { function get_num_allocations (line 71) | pub fn get_num_allocations() -> usize { function init (line 79) | pub fn init() { function kzmalloc (line 93) | pub fn kzmalloc(sz: usize) -> *mut u8 { function kmalloc (line 108) | pub fn kmalloc(sz: usize) -> *mut u8 { function kfree (line 151) | pub fn kfree(ptr: *mut u8) { function coalesce (line 166) | pub fn coalesce() { function print_table (line 209) | pub fn print_table() { type OsGlobalAlloc (line 240) | struct OsGlobalAlloc; method alloc (line 243) | unsafe fn alloc(&self, layout: Layout) -> *mut u8 { method dealloc (line 250) | unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { function alloc_error (line 267) | pub fn alloc_error(l: Layout) -> ! { FILE: risc_v/chapters/ch5/src/lib.rs function eh_personality (line 46) | extern "C" fn eh_personality() {} function panic (line 49) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 65) | extern "C" fn abort() -> ! { function id_map_range (line 101) | pub fn id_map_range(root: &mut page::Table, function kinit (line 123) | extern "C" fn kinit() { function kinit_hart (line 303) | extern "C" fn kinit_hart(hartid: usize) { function kmain (line 326) | extern "C" fn kmain() { FILE: risc_v/chapters/ch5/src/page.rs constant PAGE_ORDER (line 19) | const PAGE_ORDER: usize = 12; constant PAGE_SIZE (line 20) | pub const PAGE_SIZE: usize = 1 << 12; function align_val (line 26) | pub const fn align_val(val: usize, order: usize) -> usize { type PageBits (line 32) | pub enum PageBits { method val (line 41) | pub fn val(self) -> u8 { type Page (line 49) | pub struct Page { method is_last (line 56) | pub fn is_last(&self) -> bool { method is_taken (line 67) | pub fn is_taken(&self) -> bool { method is_free (line 77) | pub fn is_free(&self) -> bool { method clear (line 82) | pub fn clear(&mut self) { method set_flag (line 89) | pub fn set_flag(&mut self, flag: PageBits) { method clear_flag (line 93) | pub fn clear_flag(&mut self, flag: PageBits) { function init (line 104) | pub fn init() { function alloc (line 130) | pub fn alloc(pages: usize) -> *mut u8 { function zalloc (line 189) | pub fn zalloc(pages: usize) -> *mut u8 { function dealloc (line 214) | pub fn dealloc(ptr: *mut u8) { function print_page_allocations (line 244) | pub fn print_page_allocations() { type EntryBits (line 311) | pub enum EntryBits { method val (line 337) | pub fn val(self) -> i64 { type Entry (line 346) | pub struct Entry { method is_valid (line 353) | pub fn is_valid(&self) -> bool { method is_invalid (line 359) | pub fn is_invalid(&self) -> bool { method is_leaf (line 364) | pub fn is_leaf(&self) -> bool { method is_branch (line 368) | pub fn is_branch(&self) -> bool { method set_entry (line 372) | pub fn set_entry(&mut self, entry: i64) { method get_entry (line 376) | pub fn get_entry(&self) -> i64 { type Table (line 382) | pub struct Table { method len (line 387) | pub fn len() -> usize { function map (line 403) | pub fn map(root: &mut Table, function unmap (line 484) | pub fn unmap(root: &mut Table) { function virt_to_phys (line 517) | pub fn virt_to_phys(root: &Table, vaddr: usize) -> Option { FILE: risc_v/chapters/ch5/src/plic.rs constant PLIC_PRIORITY (line 6) | const PLIC_PRIORITY: usize = 0x0c00_0000; constant PLIC_PENDING (line 7) | const PLIC_PENDING: usize = 0x0c00_1000; constant PLIC_INT_ENABLE (line 8) | const PLIC_INT_ENABLE: usize = 0x0c00_2000; constant PLIC_THRESHOLD (line 9) | const PLIC_THRESHOLD: usize = 0x0c20_0000; constant PLIC_CLAIM (line 10) | const PLIC_CLAIM: usize = 0x0c20_0004; function next (line 30) | pub fn next() -> Option { function complete (line 50) | pub fn complete(id: u32) { function set_threshold (line 64) | pub fn set_threshold(tsh: u8) { function is_pending (line 76) | pub fn is_pending(id: u32) -> bool { function enable (line 87) | pub fn enable(id: u32) { function set_priority (line 101) | pub fn set_priority(id: u32, prio: u8) { FILE: risc_v/chapters/ch5/src/trap.rs function m_trap (line 14) | extern "C" fn m_trap(epc: usize, FILE: risc_v/chapters/ch5/src/uart.rs type Uart (line 7) | pub struct Uart { method new (line 21) | pub fn new(base_address: usize) -> Self { method init (line 25) | pub fn init(&mut self) { method put (line 102) | pub fn put(&mut self, c: u8) { method get (line 109) | pub fn get(&mut self) -> Option { method write_str (line 12) | fn write_str(&mut self, out: &str) -> Result<(), Error> { FILE: risc_v/chapters/ch6/src/cpu.rs type SatpMode (line 14) | pub enum SatpMode { type TrapFrame (line 26) | pub struct TrapFrame { method zero (line 43) | pub const fn zero() -> Self { function build_satp (line 63) | pub const fn build_satp(mode: SatpMode, asid: usize, addr: usize) -> usi... function mhartid_read (line 69) | pub fn mhartid_read() -> usize { function mie_read (line 76) | pub fn mie_read() -> usize { function mie_write (line 84) | pub fn mie_write(val: usize) { function mstatus_write (line 90) | pub fn mstatus_write(val: usize) { function mstatus_read (line 96) | pub fn mstatus_read() -> usize { function stvec_write (line 104) | pub fn stvec_write(val: usize) { function stvec_read (line 110) | pub fn stvec_read() -> usize { function mscratch_write (line 118) | pub fn mscratch_write(val: usize) { function mscratch_read (line 124) | pub fn mscratch_read() -> usize { function mscratch_swap (line 132) | pub fn mscratch_swap(to: usize) -> usize { function sscratch_write (line 140) | pub fn sscratch_write(val: usize) { function sscratch_read (line 146) | pub fn sscratch_read() -> usize { function sscratch_swap (line 154) | pub fn sscratch_swap(to: usize) -> usize { function sepc_write (line 162) | pub fn sepc_write(val: usize) { function sepc_read (line 168) | pub fn sepc_read() -> usize { function satp_write (line 176) | pub fn satp_write(val: usize) { function satp_read (line 182) | pub fn satp_read() -> usize { function satp_fence (line 193) | pub fn satp_fence(vaddr: usize, asid: usize) { function satp_fence_asid (line 206) | pub fn satp_fence_asid(asid: usize) { FILE: risc_v/chapters/ch6/src/kmem.rs type AllocListFlags (line 10) | enum AllocListFlags { method val (line 14) | pub fn val(self) -> usize { type AllocList (line 19) | struct AllocList { method is_taken (line 23) | pub fn is_taken(&self) -> bool { method is_free (line 27) | pub fn is_free(&self) -> bool { method set_taken (line 31) | pub fn set_taken(&mut self) { method set_free (line 35) | pub fn set_free(&mut self) { method set_size (line 39) | pub fn set_size(&mut self, sz: usize) { method get_size (line 47) | pub fn get_size(&self) -> usize { function get_head (line 63) | pub fn get_head() -> *mut u8 { function get_page_table (line 67) | pub fn get_page_table() -> *mut Table { function get_num_allocations (line 71) | pub fn get_num_allocations() -> usize { function init (line 79) | pub fn init() { function kzmalloc (line 93) | pub fn kzmalloc(sz: usize) -> *mut u8 { function kmalloc (line 108) | pub fn kmalloc(sz: usize) -> *mut u8 { function kfree (line 151) | pub fn kfree(ptr: *mut u8) { function coalesce (line 166) | pub fn coalesce() { function print_table (line 209) | pub fn print_table() { type OsGlobalAlloc (line 240) | struct OsGlobalAlloc; method alloc (line 243) | unsafe fn alloc(&self, layout: Layout) -> *mut u8 { method dealloc (line 250) | unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { function alloc_error (line 267) | pub fn alloc_error(l: Layout) -> ! { FILE: risc_v/chapters/ch6/src/lib.rs function eh_personality (line 46) | extern "C" fn eh_personality() {} function panic (line 49) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 65) | extern "C" fn abort() -> ! { function id_map_range (line 103) | pub fn id_map_range(root: &mut page::Table, function kinit (line 125) | extern "C" fn kinit() -> usize { function kinit_hart (line 154) | extern "C" fn kinit_hart(hartid: usize) { FILE: risc_v/chapters/ch6/src/page.rs constant PAGE_ORDER (line 19) | const PAGE_ORDER: usize = 12; constant PAGE_SIZE (line 20) | pub const PAGE_SIZE: usize = 1 << 12; function align_val (line 26) | pub const fn align_val(val: usize, order: usize) -> usize { type PageBits (line 32) | pub enum PageBits { method val (line 41) | pub fn val(self) -> u8 { type Page (line 49) | pub struct Page { method is_last (line 56) | pub fn is_last(&self) -> bool { method is_taken (line 67) | pub fn is_taken(&self) -> bool { method is_free (line 77) | pub fn is_free(&self) -> bool { method clear (line 82) | pub fn clear(&mut self) { method set_flag (line 89) | pub fn set_flag(&mut self, flag: PageBits) { method clear_flag (line 93) | pub fn clear_flag(&mut self, flag: PageBits) { function init (line 104) | pub fn init() { function alloc (line 130) | pub fn alloc(pages: usize) -> *mut u8 { function zalloc (line 189) | pub fn zalloc(pages: usize) -> *mut u8 { function dealloc (line 214) | pub fn dealloc(ptr: *mut u8) { function print_page_allocations (line 244) | pub fn print_page_allocations() { type EntryBits (line 311) | pub enum EntryBits { method val (line 337) | pub fn val(self) -> i64 { type Entry (line 346) | pub struct Entry { method is_valid (line 353) | pub fn is_valid(&self) -> bool { method is_invalid (line 359) | pub fn is_invalid(&self) -> bool { method is_leaf (line 364) | pub fn is_leaf(&self) -> bool { method is_branch (line 368) | pub fn is_branch(&self) -> bool { method set_entry (line 372) | pub fn set_entry(&mut self, entry: i64) { method get_entry (line 376) | pub fn get_entry(&self) -> i64 { type Table (line 382) | pub struct Table { method len (line 387) | pub fn len() -> usize { function map (line 403) | pub fn map(root: &mut Table, function unmap (line 484) | pub fn unmap(root: &mut Table) { function virt_to_phys (line 517) | pub fn virt_to_phys(root: &Table, vaddr: usize) -> Option { FILE: risc_v/chapters/ch6/src/plic.rs constant PLIC_PRIORITY (line 6) | const PLIC_PRIORITY: usize = 0x0c00_0000; constant PLIC_PENDING (line 7) | const PLIC_PENDING: usize = 0x0c00_1000; constant PLIC_INT_ENABLE (line 8) | const PLIC_INT_ENABLE: usize = 0x0c00_2000; constant PLIC_THRESHOLD (line 9) | const PLIC_THRESHOLD: usize = 0x0c20_0000; constant PLIC_CLAIM (line 10) | const PLIC_CLAIM: usize = 0x0c20_0004; function next (line 30) | pub fn next() -> Option { function complete (line 50) | pub fn complete(id: u32) { function set_threshold (line 64) | pub fn set_threshold(tsh: u8) { function is_pending (line 76) | pub fn is_pending(id: u32) -> bool { function enable (line 87) | pub fn enable(id: u32) { function set_priority (line 101) | pub fn set_priority(id: u32, prio: u8) { FILE: risc_v/chapters/ch6/src/process.rs constant STACK_PAGES (line 24) | const STACK_PAGES: usize = 2; constant STACK_ADDR (line 27) | const STACK_ADDR: usize = 0xf_0000_0000; constant PROCESS_STARTING_ADDR (line 29) | const PROCESS_STARTING_ADDR: usize = 0x2000_0000; function init_process (line 47) | fn init_process() { function add_process_default (line 56) | pub fn add_process_default(pr: fn()) { function init (line 86) | pub fn init() -> usize { type ProcessState (line 120) | pub enum ProcessState { type Process (line 133) | pub struct Process { method new_default (line 144) | pub fn new_default(func: fn()) -> Self { method drop (line 210) | fn drop(&mut self) { type ProcessData (line 228) | pub struct ProcessData { method zero (line 236) | pub fn zero() -> Self { FILE: risc_v/chapters/ch6/src/trap.rs function m_trap (line 14) | extern "C" fn m_trap(epc: usize, FILE: risc_v/chapters/ch6/src/uart.rs type Uart (line 7) | pub struct Uart { method new (line 21) | pub fn new(base_address: usize) -> Self { method init (line 25) | pub fn init(&mut self) { method put (line 102) | pub fn put(&mut self, c: u8) { method get (line 116) | pub fn get(&mut self) -> Option { method write_str (line 12) | fn write_str(&mut self, out: &str) -> Result<(), Error> { FILE: risc_v/chapters/ch7/src/cpu.rs type SatpMode (line 14) | pub enum SatpMode { type TrapFrame (line 26) | pub struct TrapFrame { method zero (line 43) | pub const fn zero() -> Self { function build_satp (line 63) | pub const fn build_satp(mode: SatpMode, asid: usize, addr: usize) -> usi... function mhartid_read (line 69) | pub fn mhartid_read() -> usize { function mie_read (line 76) | pub fn mie_read() -> usize { function mie_write (line 84) | pub fn mie_write(val: usize) { function mstatus_write (line 90) | pub fn mstatus_write(val: usize) { function mstatus_read (line 96) | pub fn mstatus_read() -> usize { function stvec_write (line 104) | pub fn stvec_write(val: usize) { function stvec_read (line 110) | pub fn stvec_read() -> usize { function mscratch_write (line 118) | pub fn mscratch_write(val: usize) { function mscratch_read (line 124) | pub fn mscratch_read() -> usize { function mscratch_swap (line 132) | pub fn mscratch_swap(to: usize) -> usize { function sscratch_write (line 140) | pub fn sscratch_write(val: usize) { function sscratch_read (line 146) | pub fn sscratch_read() -> usize { function sscratch_swap (line 154) | pub fn sscratch_swap(to: usize) -> usize { function sepc_write (line 162) | pub fn sepc_write(val: usize) { function sepc_read (line 168) | pub fn sepc_read() -> usize { function satp_write (line 176) | pub fn satp_write(val: usize) { function satp_read (line 182) | pub fn satp_read() -> usize { function satp_fence (line 193) | pub fn satp_fence(vaddr: usize, asid: usize) { function satp_fence_asid (line 206) | pub fn satp_fence_asid(asid: usize) { FILE: risc_v/chapters/ch7/src/kmem.rs type AllocListFlags (line 10) | enum AllocListFlags { method val (line 14) | pub fn val(self) -> usize { type AllocList (line 19) | struct AllocList { method is_taken (line 23) | pub fn is_taken(&self) -> bool { method is_free (line 27) | pub fn is_free(&self) -> bool { method set_taken (line 31) | pub fn set_taken(&mut self) { method set_free (line 35) | pub fn set_free(&mut self) { method set_size (line 39) | pub fn set_size(&mut self, sz: usize) { method get_size (line 47) | pub fn get_size(&self) -> usize { function get_head (line 63) | pub fn get_head() -> *mut u8 { function get_page_table (line 67) | pub fn get_page_table() -> *mut Table { function get_num_allocations (line 71) | pub fn get_num_allocations() -> usize { function init (line 79) | pub fn init() { function kzmalloc (line 93) | pub fn kzmalloc(sz: usize) -> *mut u8 { function kmalloc (line 108) | pub fn kmalloc(sz: usize) -> *mut u8 { function kfree (line 151) | pub fn kfree(ptr: *mut u8) { function coalesce (line 166) | pub fn coalesce() { function print_table (line 209) | pub fn print_table() { type OsGlobalAlloc (line 240) | struct OsGlobalAlloc; method alloc (line 243) | unsafe fn alloc(&self, layout: Layout) -> *mut u8 { method dealloc (line 250) | unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { function alloc_error (line 267) | pub fn alloc_error(l: Layout) -> ! { FILE: risc_v/chapters/ch7/src/lib.rs function eh_personality (line 46) | extern "C" fn eh_personality() {} function panic (line 49) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 65) | extern "C" fn abort() -> ! { function id_map_range (line 103) | pub fn id_map_range(root: &mut page::Table, function kinit (line 125) | extern "C" fn kinit() -> usize { function kinit_hart (line 154) | extern "C" fn kinit_hart(hartid: usize) { FILE: risc_v/chapters/ch7/src/page.rs constant PAGE_ORDER (line 19) | const PAGE_ORDER: usize = 12; constant PAGE_SIZE (line 20) | pub const PAGE_SIZE: usize = 1 << 12; function align_val (line 26) | pub const fn align_val(val: usize, order: usize) -> usize { type PageBits (line 32) | pub enum PageBits { method val (line 41) | pub fn val(self) -> u8 { type Page (line 49) | pub struct Page { method is_last (line 56) | pub fn is_last(&self) -> bool { method is_taken (line 67) | pub fn is_taken(&self) -> bool { method is_free (line 77) | pub fn is_free(&self) -> bool { method clear (line 82) | pub fn clear(&mut self) { method set_flag (line 89) | pub fn set_flag(&mut self, flag: PageBits) { method clear_flag (line 93) | pub fn clear_flag(&mut self, flag: PageBits) { function init (line 104) | pub fn init() { function alloc (line 130) | pub fn alloc(pages: usize) -> *mut u8 { function zalloc (line 189) | pub fn zalloc(pages: usize) -> *mut u8 { function dealloc (line 214) | pub fn dealloc(ptr: *mut u8) { function print_page_allocations (line 244) | pub fn print_page_allocations() { type EntryBits (line 311) | pub enum EntryBits { method val (line 337) | pub fn val(self) -> i64 { type Entry (line 346) | pub struct Entry { method is_valid (line 353) | pub fn is_valid(&self) -> bool { method is_invalid (line 359) | pub fn is_invalid(&self) -> bool { method is_leaf (line 364) | pub fn is_leaf(&self) -> bool { method is_branch (line 368) | pub fn is_branch(&self) -> bool { method set_entry (line 372) | pub fn set_entry(&mut self, entry: i64) { method get_entry (line 376) | pub fn get_entry(&self) -> i64 { type Table (line 382) | pub struct Table { method len (line 387) | pub fn len() -> usize { function map (line 403) | pub fn map(root: &mut Table, function unmap (line 484) | pub fn unmap(root: &mut Table) { function virt_to_phys (line 517) | pub fn virt_to_phys(root: &Table, vaddr: usize) -> Option { FILE: risc_v/chapters/ch7/src/plic.rs constant PLIC_PRIORITY (line 6) | const PLIC_PRIORITY: usize = 0x0c00_0000; constant PLIC_PENDING (line 7) | const PLIC_PENDING: usize = 0x0c00_1000; constant PLIC_INT_ENABLE (line 8) | const PLIC_INT_ENABLE: usize = 0x0c00_2000; constant PLIC_THRESHOLD (line 9) | const PLIC_THRESHOLD: usize = 0x0c20_0000; constant PLIC_CLAIM (line 10) | const PLIC_CLAIM: usize = 0x0c20_0004; function next (line 30) | pub fn next() -> Option { function complete (line 50) | pub fn complete(id: u32) { function set_threshold (line 64) | pub fn set_threshold(tsh: u8) { function is_pending (line 76) | pub fn is_pending(id: u32) -> bool { function enable (line 87) | pub fn enable(id: u32) { function set_priority (line 101) | pub fn set_priority(id: u32, prio: u8) { FILE: risc_v/chapters/ch7/src/process.rs constant STACK_PAGES (line 24) | const STACK_PAGES: usize = 2; constant STACK_ADDR (line 27) | const STACK_ADDR: usize = 0xf_0000_0000; constant PROCESS_STARTING_ADDR (line 29) | const PROCESS_STARTING_ADDR: usize = 0x2000_0000; function init_process (line 47) | fn init_process() { function add_process_default (line 56) | pub fn add_process_default(pr: fn()) { function init (line 86) | pub fn init() -> usize { type ProcessState (line 120) | pub enum ProcessState { type Process (line 133) | pub struct Process { method new_default (line 144) | pub fn new_default(func: fn()) -> Self { method drop (line 210) | fn drop(&mut self) { type ProcessData (line 228) | pub struct ProcessData { method zero (line 236) | pub fn zero() -> Self { FILE: risc_v/chapters/ch7/src/sched.rs function schedule (line 9) | pub fn schedule() { function switch_to (line 13) | pub fn switch_to(from: &mut Process, to: &mut Process) { FILE: risc_v/chapters/ch7/src/syscall.rs function do_syscall (line 8) | pub fn do_syscall(mepc: usize, frame: *mut TrapFrame) -> usize { FILE: risc_v/chapters/ch7/src/trap.rs function m_trap (line 15) | extern "C" fn m_trap(epc: usize, FILE: risc_v/chapters/ch7/src/uart.rs type Uart (line 7) | pub struct Uart { method new (line 21) | pub fn new(base_address: usize) -> Self { method init (line 25) | pub fn init(&mut self) { method put (line 102) | pub fn put(&mut self, c: u8) { method get (line 109) | pub fn get(&mut self) -> Option { method write_str (line 12) | fn write_str(&mut self, out: &str) -> Result<(), Error> { FILE: risc_v/chapters/ch8/src/cpu.rs type SatpMode (line 14) | pub enum SatpMode { type TrapFrame (line 26) | pub struct TrapFrame { method zero (line 43) | pub const fn zero() -> Self { function build_satp (line 63) | pub const fn build_satp(mode: SatpMode, asid: usize, addr: usize) -> usi... function mhartid_read (line 69) | pub fn mhartid_read() -> usize { function mie_read (line 76) | pub fn mie_read() -> usize { function mie_write (line 84) | pub fn mie_write(val: usize) { function mstatus_write (line 90) | pub fn mstatus_write(val: usize) { function mstatus_read (line 96) | pub fn mstatus_read() -> usize { function stvec_write (line 104) | pub fn stvec_write(val: usize) { function stvec_read (line 110) | pub fn stvec_read() -> usize { function mscratch_write (line 118) | pub fn mscratch_write(val: usize) { function mscratch_read (line 124) | pub fn mscratch_read() -> usize { function mscratch_swap (line 132) | pub fn mscratch_swap(to: usize) -> usize { function sscratch_write (line 140) | pub fn sscratch_write(val: usize) { function sscratch_read (line 146) | pub fn sscratch_read() -> usize { function sscratch_swap (line 154) | pub fn sscratch_swap(to: usize) -> usize { function mepc_write (line 162) | pub fn mepc_write(val: usize) { function mepc_read (line 168) | pub fn mepc_read() -> usize { function sepc_write (line 176) | pub fn sepc_write(val: usize) { function sepc_read (line 182) | pub fn sepc_read() -> usize { function satp_write (line 190) | pub fn satp_write(val: usize) { function satp_read (line 196) | pub fn satp_read() -> usize { function satp_fence (line 207) | pub fn satp_fence(vaddr: usize, asid: usize) { function satp_fence_asid (line 220) | pub fn satp_fence_asid(asid: usize) { FILE: risc_v/chapters/ch8/src/kmem.rs type AllocListFlags (line 10) | enum AllocListFlags { method val (line 14) | pub fn val(self) -> usize { type AllocList (line 19) | struct AllocList { method is_taken (line 23) | pub fn is_taken(&self) -> bool { method is_free (line 27) | pub fn is_free(&self) -> bool { method set_taken (line 31) | pub fn set_taken(&mut self) { method set_free (line 35) | pub fn set_free(&mut self) { method set_size (line 39) | pub fn set_size(&mut self, sz: usize) { method get_size (line 47) | pub fn get_size(&self) -> usize { function get_head (line 63) | pub fn get_head() -> *mut u8 { function get_page_table (line 67) | pub fn get_page_table() -> *mut Table { function get_num_allocations (line 71) | pub fn get_num_allocations() -> usize { function init (line 79) | pub fn init() { function kzmalloc (line 93) | pub fn kzmalloc(sz: usize) -> *mut u8 { function kmalloc (line 108) | pub fn kmalloc(sz: usize) -> *mut u8 { function kfree (line 151) | pub fn kfree(ptr: *mut u8) { function coalesce (line 166) | pub fn coalesce() { function print_table (line 209) | pub fn print_table() { type OsGlobalAlloc (line 240) | struct OsGlobalAlloc; method alloc (line 243) | unsafe fn alloc(&self, layout: Layout) -> *mut u8 { method dealloc (line 250) | unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { function alloc_error (line 267) | pub fn alloc_error(l: Layout) -> ! { FILE: risc_v/chapters/ch8/src/lib.rs function eh_personality (line 46) | extern "C" fn eh_personality() {} function panic (line 49) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 65) | extern "C" fn abort() -> ! { function id_map_range (line 103) | pub fn id_map_range(root: &mut page::Table, function switch_to_user (line 122) | fn switch_to_user(frame: usize, mepc: usize, satp: usize) -> !; function kinit (line 128) | extern "C" fn kinit() { function kinit_hart (line 160) | extern "C" fn kinit_hart(hartid: usize) { FILE: risc_v/chapters/ch8/src/page.rs constant PAGE_ORDER (line 19) | const PAGE_ORDER: usize = 12; constant PAGE_SIZE (line 20) | pub const PAGE_SIZE: usize = 1 << 12; function align_val (line 26) | pub const fn align_val(val: usize, order: usize) -> usize { type PageBits (line 32) | pub enum PageBits { method val (line 41) | pub fn val(self) -> u8 { type Page (line 49) | pub struct Page { method is_last (line 56) | pub fn is_last(&self) -> bool { method is_taken (line 67) | pub fn is_taken(&self) -> bool { method is_free (line 77) | pub fn is_free(&self) -> bool { method clear (line 82) | pub fn clear(&mut self) { method set_flag (line 89) | pub fn set_flag(&mut self, flag: PageBits) { method clear_flag (line 93) | pub fn clear_flag(&mut self, flag: PageBits) { function init (line 104) | pub fn init() { function alloc (line 130) | pub fn alloc(pages: usize) -> *mut u8 { function zalloc (line 189) | pub fn zalloc(pages: usize) -> *mut u8 { function dealloc (line 214) | pub fn dealloc(ptr: *mut u8) { function print_page_allocations (line 244) | pub fn print_page_allocations() { type EntryBits (line 311) | pub enum EntryBits { method val (line 337) | pub fn val(self) -> i64 { type Entry (line 346) | pub struct Entry { method is_valid (line 353) | pub fn is_valid(&self) -> bool { method is_invalid (line 359) | pub fn is_invalid(&self) -> bool { method is_leaf (line 364) | pub fn is_leaf(&self) -> bool { method is_branch (line 368) | pub fn is_branch(&self) -> bool { method set_entry (line 372) | pub fn set_entry(&mut self, entry: i64) { method get_entry (line 376) | pub fn get_entry(&self) -> i64 { type Table (line 382) | pub struct Table { method len (line 387) | pub fn len() -> usize { function map (line 403) | pub fn map(root: &mut Table, function unmap (line 484) | pub fn unmap(root: &mut Table) { function virt_to_phys (line 517) | pub fn virt_to_phys(root: &Table, vaddr: usize) -> Option { FILE: risc_v/chapters/ch8/src/plic.rs constant PLIC_PRIORITY (line 6) | const PLIC_PRIORITY: usize = 0x0c00_0000; constant PLIC_PENDING (line 7) | const PLIC_PENDING: usize = 0x0c00_1000; constant PLIC_INT_ENABLE (line 8) | const PLIC_INT_ENABLE: usize = 0x0c00_2000; constant PLIC_THRESHOLD (line 9) | const PLIC_THRESHOLD: usize = 0x0c20_0000; constant PLIC_CLAIM (line 10) | const PLIC_CLAIM: usize = 0x0c20_0004; function next (line 30) | pub fn next() -> Option { function complete (line 50) | pub fn complete(id: u32) { function set_threshold (line 64) | pub fn set_threshold(tsh: u8) { function is_pending (line 76) | pub fn is_pending(id: u32) -> bool { function enable (line 87) | pub fn enable(id: u32) { function set_priority (line 101) | pub fn set_priority(id: u32, prio: u8) { FILE: risc_v/chapters/ch8/src/process.rs constant STACK_PAGES (line 19) | const STACK_PAGES: usize = 2; constant STACK_ADDR (line 22) | const STACK_ADDR: usize = 0x1_0000_0000; constant PROCESS_STARTING_ADDR (line 24) | const PROCESS_STARTING_ADDR: usize = 0x8000_0000; function make_syscall (line 41) | fn make_syscall(a: usize) -> usize; function init_process (line 46) | fn init_process() { function add_process_default (line 64) | pub fn add_process_default(pr: fn()) { function init (line 94) | pub fn init() -> usize { type ProcessState (line 123) | pub enum ProcessState { type Process (line 136) | pub struct Process { method get_frame_address (line 148) | pub fn get_frame_address(&self) -> usize { method get_program_counter (line 151) | pub fn get_program_counter(&self) -> usize { method get_table_address (line 154) | pub fn get_table_address(&self) -> usize { method get_state (line 157) | pub fn get_state(&self) -> &ProcessState { method get_pid (line 160) | pub fn get_pid(&self) -> u16 { method get_sleep_until (line 163) | pub fn get_sleep_until(&self) -> usize { method new_default (line 166) | pub fn new_default(func: fn()) -> Self { method drop (line 240) | fn drop(&mut self) { type ProcessData (line 258) | pub struct ProcessData { method zero (line 266) | pub fn zero() -> Self { FILE: risc_v/chapters/ch8/src/sched.rs function schedule (line 8) | pub fn schedule() -> (usize, usize, usize) { FILE: risc_v/chapters/ch8/src/syscall.rs function do_syscall (line 8) | pub fn do_syscall(mepc: usize, frame: *mut TrapFrame) -> usize { FILE: risc_v/chapters/ch8/src/trap.rs function switch_to_user (line 12) | fn switch_to_user(frame: usize, mepc: usize, satp: usize) -> !; function m_trap (line 20) | extern "C" fn m_trap(epc: usize, FILE: risc_v/chapters/ch8/src/uart.rs type Uart (line 7) | pub struct Uart { method new (line 21) | pub fn new(base_address: usize) -> Self { method init (line 25) | pub fn init(&mut self) { method put (line 102) | pub fn put(&mut self, c: u8) { method get (line 109) | pub fn get(&mut self) -> Option { method write_str (line 12) | fn write_str(&mut self, out: &str) -> Result<(), Error> { FILE: risc_v/chapters/ch9/src/block.rs type Geometry (line 13) | pub struct Geometry { type Topology (line 20) | pub struct Topology { type Config (line 33) | pub struct Config { type Header (line 60) | pub struct Header { type Data (line 67) | pub struct Data { type Status (line 72) | pub struct Status { type Request (line 77) | pub struct Request { type BlockDevice (line 89) | pub struct BlockDevice { constant VIRTIO_BLK_T_IN (line 98) | pub const VIRTIO_BLK_T_IN: u32 = 0; constant VIRTIO_BLK_T_OUT (line 99) | pub const VIRTIO_BLK_T_OUT: u32 = 1; constant VIRTIO_BLK_T_FLUSH (line 100) | pub const VIRTIO_BLK_T_FLUSH: u32 = 4; constant VIRTIO_BLK_T_DISCARD (line 101) | pub const VIRTIO_BLK_T_DISCARD: u32 = 11; constant VIRTIO_BLK_T_WRITE_ZEROES (line 102) | pub const VIRTIO_BLK_T_WRITE_ZEROES: u32 = 13; constant VIRTIO_BLK_S_OK (line 105) | pub const VIRTIO_BLK_S_OK: u8 = 0; constant VIRTIO_BLK_S_IOERR (line 106) | pub const VIRTIO_BLK_S_IOERR: u8 = 1; constant VIRTIO_BLK_S_UNSUPP (line 107) | pub const VIRTIO_BLK_S_UNSUPP: u8 = 2; constant VIRTIO_BLK_F_SIZE_MAX (line 110) | pub const VIRTIO_BLK_F_SIZE_MAX: u32 = 1; constant VIRTIO_BLK_F_SEG_MAX (line 111) | pub const VIRTIO_BLK_F_SEG_MAX: u32 = 2; constant VIRTIO_BLK_F_GEOMETRY (line 112) | pub const VIRTIO_BLK_F_GEOMETRY: u32 = 4; constant VIRTIO_BLK_F_RO (line 113) | pub const VIRTIO_BLK_F_RO: u32 = 5; constant VIRTIO_BLK_F_BLK_SIZE (line 114) | pub const VIRTIO_BLK_F_BLK_SIZE: u32 = 6; constant VIRTIO_BLK_F_FLUSH (line 115) | pub const VIRTIO_BLK_F_FLUSH: u32 = 9; constant VIRTIO_BLK_F_TOPOLOGY (line 116) | pub const VIRTIO_BLK_F_TOPOLOGY: u32 = 10; constant VIRTIO_BLK_F_CONFIG_WCE (line 117) | pub const VIRTIO_BLK_F_CONFIG_WCE: u32 = 11; constant VIRTIO_BLK_F_DISCARD (line 118) | pub const VIRTIO_BLK_F_DISCARD: u32 = 13; constant VIRTIO_BLK_F_WRITE_ZEROES (line 119) | pub const VIRTIO_BLK_F_WRITE_ZEROES: u32 = 14; function setup_block_device (line 128) | pub fn setup_block_device(ptr: *mut u32) -> bool { function fill_next_descriptor (line 226) | pub fn fill_next_descriptor(bd: &mut BlockDevice, desc: Descriptor) -> u... function block_op (line 250) | pub fn block_op(dev: usize, buffer: *mut u8, size: u32, offset: u64, wri... function read (line 308) | pub fn read(dev: usize, buffer: *mut u8, size: u32, offset: u64) { function write (line 312) | pub fn write(dev: usize, buffer: *mut u8, size: u32, offset: u64) { function pending (line 319) | pub fn pending(bd: &mut BlockDevice) { function handle_interrupt (line 337) | pub fn handle_interrupt(idx: usize) { FILE: risc_v/chapters/ch9/src/cpu.rs constant FREQ (line 8) | pub const FREQ: u64 = 10_000_000; constant CONTEXT_SWITCH_TIME (line 10) | pub const CONTEXT_SWITCH_TIME: u64 = FREQ / 250; type SatpMode (line 17) | pub enum SatpMode { type TrapFrame (line 29) | pub struct TrapFrame { method new (line 47) | pub const fn new() -> Self { function build_satp (line 62) | pub const fn build_satp(mode: SatpMode, asid: usize, addr: usize) -> usi... function mhartid_read (line 68) | pub fn mhartid_read() -> usize { function mie_read (line 75) | pub fn mie_read() -> usize { function mie_write (line 83) | pub fn mie_write(val: usize) { function mstatus_write (line 89) | pub fn mstatus_write(val: usize) { function mstatus_read (line 95) | pub fn mstatus_read() -> usize { function stvec_write (line 103) | pub fn stvec_write(val: usize) { function stvec_read (line 109) | pub fn stvec_read() -> usize { function mscratch_write (line 117) | pub fn mscratch_write(val: usize) { function mscratch_read (line 123) | pub fn mscratch_read() -> usize { function mscratch_swap (line 131) | pub fn mscratch_swap(to: usize) -> usize { function sscratch_write (line 139) | pub fn sscratch_write(val: usize) { function sscratch_read (line 145) | pub fn sscratch_read() -> usize { function sscratch_swap (line 153) | pub fn sscratch_swap(to: usize) -> usize { function mepc_write (line 161) | pub fn mepc_write(val: usize) { function mepc_read (line 167) | pub fn mepc_read() -> usize { function sepc_write (line 175) | pub fn sepc_write(val: usize) { function sepc_read (line 181) | pub fn sepc_read() -> usize { function satp_write (line 189) | pub fn satp_write(val: usize) { function satp_read (line 195) | pub fn satp_read() -> usize { function satp_fence (line 206) | pub fn satp_fence(vaddr: usize, asid: usize) { function satp_fence_asid (line 219) | pub fn satp_fence_asid(asid: usize) { FILE: risc_v/chapters/ch9/src/kmem.rs type AllocListFlags (line 10) | enum AllocListFlags { method val (line 14) | pub fn val(self) -> usize { type AllocList (line 19) | struct AllocList { method is_taken (line 23) | pub fn is_taken(&self) -> bool { method is_free (line 27) | pub fn is_free(&self) -> bool { method set_taken (line 31) | pub fn set_taken(&mut self) { method set_free (line 35) | pub fn set_free(&mut self) { method set_size (line 39) | pub fn set_size(&mut self, sz: usize) { method get_size (line 47) | pub fn get_size(&self) -> usize { function get_head (line 63) | pub fn get_head() -> *mut u8 { function get_page_table (line 67) | pub fn get_page_table() -> *mut Table { function get_num_allocations (line 71) | pub fn get_num_allocations() -> usize { function init (line 79) | pub fn init() { function kzmalloc (line 93) | pub fn kzmalloc(sz: usize) -> *mut u8 { function kmalloc (line 108) | pub fn kmalloc(sz: usize) -> *mut u8 { function kfree (line 151) | pub fn kfree(ptr: *mut u8) { function coalesce (line 166) | pub fn coalesce() { function print_table (line 209) | pub fn print_table() { type OsGlobalAlloc (line 240) | struct OsGlobalAlloc; method alloc (line 243) | unsafe fn alloc(&self, layout: Layout) -> *mut u8 { method dealloc (line 250) | unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { function alloc_error (line 267) | pub fn alloc_error(l: Layout) -> ! { FILE: risc_v/chapters/ch9/src/lib.rs function eh_personality (line 46) | extern "C" fn eh_personality() {} function panic (line 49) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 65) | extern "C" fn abort() -> ! { function id_map_range (line 101) | pub fn id_map_range(root: &mut page::Table, function switch_to_user (line 120) | fn switch_to_user(frame: usize) -> !; function rust_switch_to_user (line 122) | fn rust_switch_to_user(frame: usize) -> ! { function kinit (line 131) | extern "C" fn kinit() { function kinit_hart (line 197) | extern "C" fn kinit_hart(_hartid: usize) { FILE: risc_v/chapters/ch9/src/page.rs constant PAGE_ORDER (line 19) | const PAGE_ORDER: usize = 12; constant PAGE_SIZE (line 20) | pub const PAGE_SIZE: usize = 1 << 12; function align_val (line 26) | pub const fn align_val(val: usize, order: usize) -> usize { type PageBits (line 32) | pub enum PageBits { method val (line 41) | pub fn val(self) -> u8 { type Page (line 49) | pub struct Page { method is_last (line 56) | pub fn is_last(&self) -> bool { method is_taken (line 67) | pub fn is_taken(&self) -> bool { method is_free (line 77) | pub fn is_free(&self) -> bool { method clear (line 82) | pub fn clear(&mut self) { method set_flag (line 89) | pub fn set_flag(&mut self, flag: PageBits) { method clear_flag (line 93) | pub fn clear_flag(&mut self, flag: PageBits) { function init (line 104) | pub fn init() { function alloc (line 130) | pub fn alloc(pages: usize) -> *mut u8 { function zalloc (line 189) | pub fn zalloc(pages: usize) -> *mut u8 { function dealloc (line 214) | pub fn dealloc(ptr: *mut u8) { function print_page_allocations (line 244) | pub fn print_page_allocations() { type EntryBits (line 311) | pub enum EntryBits { method val (line 337) | pub fn val(self) -> i64 { type Entry (line 346) | pub struct Entry { method is_valid (line 353) | pub fn is_valid(&self) -> bool { method is_invalid (line 359) | pub fn is_invalid(&self) -> bool { method is_leaf (line 364) | pub fn is_leaf(&self) -> bool { method is_branch (line 368) | pub fn is_branch(&self) -> bool { method set_entry (line 372) | pub fn set_entry(&mut self, entry: i64) { method get_entry (line 376) | pub fn get_entry(&self) -> i64 { type Table (line 382) | pub struct Table { method len (line 387) | pub fn len() -> usize { function map (line 403) | pub fn map(root: &mut Table, function unmap (line 484) | pub fn unmap(root: &mut Table) { function virt_to_phys (line 517) | pub fn virt_to_phys(root: &Table, vaddr: usize) -> Option { FILE: risc_v/chapters/ch9/src/plic.rs constant PLIC_PRIORITY (line 9) | const PLIC_PRIORITY: usize = 0x0c00_0000; constant PLIC_PENDING (line 10) | const PLIC_PENDING: usize = 0x0c00_1000; constant PLIC_INT_ENABLE (line 11) | const PLIC_INT_ENABLE: usize = 0x0c00_2000; constant PLIC_THRESHOLD (line 12) | const PLIC_THRESHOLD: usize = 0x0c20_0000; constant PLIC_CLAIM (line 13) | const PLIC_CLAIM: usize = 0x0c20_0004; function next (line 33) | pub fn next() -> Option { function complete (line 53) | pub fn complete(id: u32) { function set_threshold (line 67) | pub fn set_threshold(tsh: u8) { function is_pending (line 79) | pub fn is_pending(id: u32) -> bool { function enable (line 90) | pub fn enable(id: u32) { function set_priority (line 104) | pub fn set_priority(id: u32, prio: u8) { function handle_interrupt (line 116) | pub fn handle_interrupt() { FILE: risc_v/chapters/ch9/src/process.rs constant STACK_PAGES (line 19) | const STACK_PAGES: usize = 2; constant STACK_ADDR (line 22) | const STACK_ADDR: usize = 0x1_0000_0000; function make_syscall (line 42) | fn make_syscall(a: usize) -> usize; function init_process (line 47) | fn init_process() { function add_process_default (line 65) | pub fn add_process_default(pr: fn()) { function init (line 95) | pub fn init() -> usize { type ProcessState (line 123) | pub enum ProcessState { type Process (line 136) | pub struct Process { method get_frame_address (line 147) | pub fn get_frame_address(&self) -> usize { method get_program_counter (line 150) | pub fn get_program_counter(&self) -> usize { method get_table_address (line 153) | pub fn get_table_address(&self) -> usize { method get_state (line 156) | pub fn get_state(&self) -> &ProcessState { method get_pid (line 159) | pub fn get_pid(&self) -> u16 { method get_sleep_until (line 162) | pub fn get_sleep_until(&self) -> usize { method new_default (line 165) | pub fn new_default(func: fn()) -> Self { method drop (line 241) | fn drop(&mut self) { type ProcessData (line 262) | pub struct ProcessData { method zero (line 270) | pub fn zero() -> Self { FILE: risc_v/chapters/ch9/src/rng.rs function setup_entropy_device (line 6) | pub fn setup_entropy_device(_ptr: *mut u32) -> bool { FILE: risc_v/chapters/ch9/src/sched.rs function schedule (line 8) | pub fn schedule() -> usize { FILE: risc_v/chapters/ch9/src/syscall.rs function do_syscall (line 8) | pub fn do_syscall(mepc: usize, frame: *mut TrapFrame) -> usize { FILE: risc_v/chapters/ch9/src/trap.rs function m_trap (line 17) | extern "C" fn m_trap(epc: usize, constant MMIO_MTIMECMP (line 128) | pub const MMIO_MTIMECMP: *mut u64 = 0x0200_4000usize as *mut u64; constant MMIO_MTIME (line 129) | pub const MMIO_MTIME: *const u64 = 0x0200_BFF8 as *const u64; function schedule_next_context_switch (line 131) | pub fn schedule_next_context_switch(qm: u16) { FILE: risc_v/chapters/ch9/src/uart.rs type Uart (line 7) | pub struct Uart { method new (line 21) | pub fn new(base_address: usize) -> Self { method init (line 25) | pub fn init(&mut self) { method put (line 102) | pub fn put(&mut self, c: u8) { method get (line 109) | pub fn get(&mut self) -> Option { method write_str (line 12) | fn write_str(&mut self, out: &str) -> Result<(), Error> { FILE: risc_v/chapters/ch9/src/virtio.rs constant VIRTIO_DESC_F_NEXT (line 14) | pub const VIRTIO_DESC_F_NEXT: u16 = 1; constant VIRTIO_DESC_F_WRITE (line 15) | pub const VIRTIO_DESC_F_WRITE: u16 = 2; constant VIRTIO_DESC_F_INDIRECT (line 16) | pub const VIRTIO_DESC_F_INDIRECT: u16 = 4; constant VIRTIO_AVAIL_F_NO_INTERRUPT (line 18) | pub const VIRTIO_AVAIL_F_NO_INTERRUPT: u16 = 1; constant VIRTIO_USED_F_NO_NOTIFY (line 20) | pub const VIRTIO_USED_F_NO_NOTIFY: u16 = 1; constant VIRTIO_RING_SIZE (line 25) | pub const VIRTIO_RING_SIZE: usize = 1 << 7; type Descriptor (line 35) | pub struct Descriptor { type Available (line 43) | pub struct Available { type UsedElem (line 51) | pub struct UsedElem { type Used (line 57) | pub struct Used { type Queue (line 65) | pub struct Queue { type MmioOffsets (line 77) | pub enum MmioOffsets { method val (line 116) | pub fn val(self) -> usize { method scaled (line 120) | pub fn scaled(self, scale: usize) -> usize { method scale32 (line 124) | pub fn scale32(self) -> usize { type DeviceTypes (line 100) | pub enum DeviceTypes { type StatusField (line 129) | pub enum StatusField { method val (line 141) | pub fn val(self) -> usize { method val32 (line 145) | pub fn val32(self) -> u32 { method test (line 149) | pub fn test(sf: u32, bit: StatusField) -> bool { method is_failed (line 153) | pub fn is_failed(sf: u32) -> bool { method needs_reset (line 157) | pub fn needs_reset(sf: u32) -> bool { method driver_ok (line 161) | pub fn driver_ok(sf: u32) -> bool { method features_ok (line 165) | pub fn features_ok(sf: u32) -> bool { constant MMIO_VIRTIO_START (line 173) | pub const MMIO_VIRTIO_START: usize = 0x1000_1000; constant MMIO_VIRTIO_END (line 174) | pub const MMIO_VIRTIO_END: usize = 0x1000_8000; constant MMIO_VIRTIO_STRIDE (line 175) | pub const MMIO_VIRTIO_STRIDE: usize = 0x1000; constant MMIO_VIRTIO_MAGIC (line 176) | pub const MMIO_VIRTIO_MAGIC: u32 = 0x74_72_69_76; type VirtioDevice (line 183) | pub struct VirtioDevice { method new (line 188) | pub const fn new() -> Self { method new_with (line 192) | pub const fn new_with(devtype: DeviceTypes) -> Self { function probe (line 201) | pub fn probe() { function setup_network_device (line 292) | pub fn setup_network_device(_ptr: *mut u32) -> bool { function setup_gpu_device (line 296) | pub fn setup_gpu_device(_ptr: *mut u32) -> bool { function setup_input_device (line 300) | pub fn setup_input_device(_ptr: *mut u32) -> bool { function handle_interrupt (line 308) | pub fn handle_interrupt(interrupt: u32) { FILE: risc_v/src/block.rs type Geometry (line 22) | pub struct Geometry { type Topology (line 29) | pub struct Topology { type Config (line 42) | pub struct Config { type Header (line 69) | pub struct Header { type Data (line 76) | pub struct Data { type Status (line 81) | pub struct Status { type Request (line 86) | pub struct Request { type BlockDevice (line 105) | pub struct BlockDevice { constant VIRTIO_BLK_T_IN (line 114) | pub const VIRTIO_BLK_T_IN: u32 = 0; constant VIRTIO_BLK_T_OUT (line 115) | pub const VIRTIO_BLK_T_OUT: u32 = 1; constant VIRTIO_BLK_T_FLUSH (line 116) | pub const VIRTIO_BLK_T_FLUSH: u32 = 4; constant VIRTIO_BLK_T_DISCARD (line 117) | pub const VIRTIO_BLK_T_DISCARD: u32 = 11; constant VIRTIO_BLK_T_WRITE_ZEROES (line 118) | pub const VIRTIO_BLK_T_WRITE_ZEROES: u32 = 13; constant VIRTIO_BLK_S_OK (line 121) | pub const VIRTIO_BLK_S_OK: u8 = 0; constant VIRTIO_BLK_S_IOERR (line 122) | pub const VIRTIO_BLK_S_IOERR: u8 = 1; constant VIRTIO_BLK_S_UNSUPP (line 123) | pub const VIRTIO_BLK_S_UNSUPP: u8 = 2; constant VIRTIO_BLK_F_SIZE_MAX (line 126) | pub const VIRTIO_BLK_F_SIZE_MAX: u32 = 1; constant VIRTIO_BLK_F_SEG_MAX (line 127) | pub const VIRTIO_BLK_F_SEG_MAX: u32 = 2; constant VIRTIO_BLK_F_GEOMETRY (line 128) | pub const VIRTIO_BLK_F_GEOMETRY: u32 = 4; constant VIRTIO_BLK_F_RO (line 129) | pub const VIRTIO_BLK_F_RO: u32 = 5; constant VIRTIO_BLK_F_BLK_SIZE (line 130) | pub const VIRTIO_BLK_F_BLK_SIZE: u32 = 6; constant VIRTIO_BLK_F_FLUSH (line 131) | pub const VIRTIO_BLK_F_FLUSH: u32 = 9; constant VIRTIO_BLK_F_TOPOLOGY (line 132) | pub const VIRTIO_BLK_F_TOPOLOGY: u32 = 10; constant VIRTIO_BLK_F_CONFIG_WCE (line 133) | pub const VIRTIO_BLK_F_CONFIG_WCE: u32 = 11; constant VIRTIO_BLK_F_DISCARD (line 134) | pub const VIRTIO_BLK_F_DISCARD: u32 = 13; constant VIRTIO_BLK_F_WRITE_ZEROES (line 135) | pub const VIRTIO_BLK_F_WRITE_ZEROES: u32 = 14; type BlockErrors (line 138) | pub enum BlockErrors { function setup_block_device (line 153) | pub fn setup_block_device(ptr: *mut u32) -> bool { function fill_next_descriptor (line 266) | pub fn fill_next_descriptor(bd: &mut BlockDevice, desc: Descriptor) -> u... function block_op (line 294) | pub fn block_op(dev: usize, function read (line 384) | pub fn read(dev: usize, function write (line 393) | pub fn write(dev: usize, function pending (line 405) | pub fn pending(bd: &mut BlockDevice) { function handle_interrupt (line 437) | pub fn handle_interrupt(idx: usize) { type ProcArgs (line 454) | struct ProcArgs { function read_proc (line 463) | fn read_proc(args_addr: usize) { function process_read (line 477) | pub fn process_read(pid: u16, function write_proc (line 500) | fn write_proc(args_addr: usize) { function process_write (line 514) | pub fn process_write(pid: u16, FILE: risc_v/src/buffer.rs type Buffer (line 12) | pub struct Buffer { method new (line 18) | pub fn new(sz: usize) -> Self { method get_mut (line 25) | pub fn get_mut(&mut self) -> *mut u8 { method get (line 29) | pub fn get(&self) -> *const u8 { method len (line 33) | pub fn len(&self) -> usize { type Output (line 45) | type Output = u8; method index (line 46) | fn index(&self, idx: usize) -> &Self::Output { method index_mut (line 54) | fn index_mut(&mut self, idx: usize) -> &mut Self::Output { method default (line 39) | fn default() -> Self { method clone (line 63) | fn clone(&self) -> Self { method drop (line 78) | fn drop(&mut self) { FILE: risc_v/src/console.rs constant DEFAULT_OUT_BUFFER_SIZE (line 16) | pub const DEFAULT_OUT_BUFFER_SIZE: usize = 10_000; constant DEFAULT_IN_BUFFER_SIZE (line 17) | pub const DEFAULT_IN_BUFFER_SIZE: usize = 1_000; function init (line 21) | pub fn init() { function push_stdout (line 30) | pub fn push_stdout(c: u8) { function pop_stdout (line 43) | pub fn pop_stdout() -> u8 { function push_stdin (line 56) | pub fn push_stdin(c: u8) { function pop_stdin (line 78) | pub fn pop_stdin() -> u8 { function push_queue (line 91) | pub fn push_queue(pid: u16) { FILE: risc_v/src/cpu.rs constant FREQ (line 8) | pub const FREQ: u64 = 10_000_000; constant CONTEXT_SWITCH_TIME (line 10) | pub const CONTEXT_SWITCH_TIME: u64 = FREQ / 500; type SatpMode (line 17) | pub enum SatpMode { type CpuMode (line 24) | pub enum CpuMode { type Registers (line 31) | pub enum Registers { function gp (line 66) | pub const fn gp(r: Registers) -> usize { type FRegisters (line 72) | pub enum FRegisters { type TrapFrame (line 114) | pub struct TrapFrame { method new (line 134) | pub const fn new() -> Self { function build_satp (line 150) | pub const fn build_satp(mode: SatpMode, asid: usize, addr: usize) -> usi... function mhartid_read (line 156) | pub fn mhartid_read() -> usize { function mie_read (line 163) | pub fn mie_read() -> usize { function mie_write (line 171) | pub fn mie_write(val: usize) { function mstatus_write (line 177) | pub fn mstatus_write(val: usize) { function mstatus_read (line 183) | pub fn mstatus_read() -> usize { function stvec_write (line 191) | pub fn stvec_write(val: usize) { function stvec_read (line 197) | pub fn stvec_read() -> usize { function mscratch_write (line 205) | pub fn mscratch_write(val: usize) { function mscratch_read (line 211) | pub fn mscratch_read() -> usize { function mscratch_swap (line 219) | pub fn mscratch_swap(to: usize) -> usize { function sscratch_write (line 227) | pub fn sscratch_write(val: usize) { function sscratch_read (line 233) | pub fn sscratch_read() -> usize { function sscratch_swap (line 241) | pub fn sscratch_swap(to: usize) -> usize { function mepc_write (line 249) | pub fn mepc_write(val: usize) { function mepc_read (line 255) | pub fn mepc_read() -> usize { function sepc_write (line 263) | pub fn sepc_write(val: usize) { function sepc_read (line 269) | pub fn sepc_read() -> usize { function satp_write (line 277) | pub fn satp_write(val: usize) { function satp_read (line 283) | pub fn satp_read() -> usize { function satp_fence (line 294) | pub fn satp_fence(vaddr: usize, asid: usize) { function satp_fence_asid (line 307) | pub fn satp_fence_asid(asid: usize) { constant MMIO_MTIME (line 313) | const MMIO_MTIME: *const u64 = 0x0200_BFF8 as *const u64; function get_mtime (line 315) | pub fn get_mtime() -> usize { function memcpy (line 320) | pub unsafe fn memcpy(dest: *mut u8, src: *const u8, bytes: usize) { function dump_registers (line 337) | pub fn dump_registers(frame: *const TrapFrame) { FILE: risc_v/src/elf.rs constant MAGIC (line 13) | pub const MAGIC: u32 = 0x464c_457f; type Header (line 18) | pub struct Header { type ProgramHeader (line 43) | pub struct ProgramHeader { constant TYPE_EXEC (line 54) | pub const TYPE_EXEC: u16 = 2; constant PROG_READ (line 56) | pub const PROG_READ: u32 = 4; constant PROG_WRITE (line 57) | pub const PROG_WRITE: u32 = 2; constant PROG_EXECUTE (line 58) | pub const PROG_EXECUTE: u32 = 1; constant MACHINE_RISCV (line 60) | pub const MACHINE_RISCV: u16 = 0xf3; constant PH_SEG_TYPE_NULL (line 61) | pub const PH_SEG_TYPE_NULL: u32 = 0; constant PH_SEG_TYPE_LOAD (line 62) | pub const PH_SEG_TYPE_LOAD: u32 = 1; constant PH_SEG_TYPE_DYNAMIC (line 63) | pub const PH_SEG_TYPE_DYNAMIC: u32 = 2; constant PH_SEG_TYPE_INTERP (line 64) | pub const PH_SEG_TYPE_INTERP: u32 = 3; constant PH_SEG_TYPE_NOTE (line 65) | pub const PH_SEG_TYPE_NOTE: u32 = 4; type Program (line 67) | pub struct Program { type LoadErrors (line 72) | pub enum LoadErrors { type File (line 79) | pub struct File { method load (line 85) | pub fn load(buffer: &Buffer) -> Result { method load_proc (line 133) | pub fn load_proc(buffer: &Buffer) -> Result { FILE: risc_v/src/fs.rs constant MAGIC (line 14) | pub const MAGIC: u16 = 0x4d5a; constant BLOCK_SIZE (line 15) | pub const BLOCK_SIZE: u32 = 1024; constant NUM_IPTRS (line 16) | pub const NUM_IPTRS: usize = BLOCK_SIZE as usize / 4; constant S_IFDIR (line 17) | pub const S_IFDIR: u16 = 0o040_000; constant S_IFREG (line 18) | pub const S_IFREG: u16 = 0o100_000; type SuperBlock (line 23) | pub struct SuperBlock { type Inode (line 46) | pub struct Inode { type DirEntry (line 63) | pub struct DirEntry { type MinixFileSystem (line 69) | pub struct MinixFileSystem; method get_inode (line 80) | pub fn get_inode(bdev: usize, inode_num: u32) -> Option { method cache_at (line 129) | fn cache_at(btm: &mut BTreeMap, cwd: &String, inode_num... method init (line 170) | pub fn init(bdev: usize) { method open (line 189) | pub fn open(bdev: usize, path: &str) -> Result { method read (line 208) | pub fn read(bdev: usize, inode: &Inode, buffer: *mut u8, size: u32, of... method write (line 415) | pub fn write(&mut self, _desc: &Inode, _buffer: *const u8, _offset: u3... method stat (line 419) | pub fn stat(&self, inode: &Inode) -> Stat { function syc_read (line 430) | fn syc_read(bdev: usize, buffer: *mut u8, size: u32, offset: u32) -> u8 { type ProcArgs (line 437) | struct ProcArgs { function read_proc (line 447) | fn read_proc(args_addr: usize) { function process_read (line 471) | pub fn process_read(pid: u16, dev: usize, node: u32, buffer: *mut u8, si... type Stat (line 488) | pub struct Stat { type FsError (line 495) | pub enum FsError { FILE: risc_v/src/gpu.rs constant F_VIRGL (line 14) | const F_VIRGL: u32 = 0; constant F_EDID (line 15) | const F_EDID: u32 = 1; constant EVENT_DISPLAY (line 16) | const EVENT_DISPLAY: u32 = 1 << 0; type Config (line 18) | struct Config { type CtrlType (line 28) | enum CtrlType { constant FLAG_FENCE (line 59) | const FLAG_FENCE: u32 = 1 << 0; type CtrlHeader (line 61) | struct CtrlHeader { constant MAX_SCANOUTS (line 69) | const MAX_SCANOUTS: usize = 16; type Rect (line 72) | pub struct Rect { method new (line 80) | pub const fn new(x: u32, y: u32, width: u32, height: u32) -> Self { type DisplayOne (line 87) | struct DisplayOne { type RespDisplayInfo (line 94) | struct RespDisplayInfo { type GetEdid (line 99) | struct GetEdid { type RespEdid (line 105) | struct RespEdid { type Formats (line 112) | enum Formats { type ResourceCreate2d (line 124) | struct ResourceCreate2d { type ResourceUnref (line 132) | struct ResourceUnref { type SetScanout (line 138) | struct SetScanout { type ResourceFlush (line 145) | struct ResourceFlush { type TransferToHost2d (line 153) | struct TransferToHost2d { type AttachBacking (line 161) | struct AttachBacking { type MemEntry (line 168) | struct MemEntry { type DetachBacking (line 175) | struct DetachBacking { type CursorPos (line 181) | struct CursorPos { type UpdateCursor (line 189) | struct UpdateCursor { type Pixel (line 199) | pub struct Pixel { method new (line 206) | pub const fn new(r: u8, g: u8, b: u8, a: u8) -> Self { type Request (line 215) | struct Request { function new (line 221) | pub fn new(request: RqT) -> *mut Self { type Request3 (line 231) | struct Request3 { function new (line 238) | pub fn new(request: RqT, meminfo: RmT) -> *mut Self { type Device (line 249) | pub struct Device { method new (line 260) | pub const fn new() -> Self { method get_framebuffer (line 270) | pub fn get_framebuffer(&self) -> *mut Pixel { method get_width (line 273) | pub fn get_width(&self) -> u32 { method get_height (line 276) | pub fn get_height(&self) -> u32 { function fill_rect (line 292) | pub fn fill_rect(dev: &mut Device, rect: Rect, color: Pixel) { function stroke_rect (line 303) | pub fn stroke_rect(dev: &mut Device, rect: Rect, color: Pixel, size: u32) { function init (line 336) | pub fn init(gdev: usize) { function transfer (line 546) | pub fn transfer(gdev: usize, x: u32, y: u32, width: u32, height: u32) { function setup_gpu_device (line 628) | pub fn setup_gpu_device(ptr: *mut u32) -> bool { function pending (line 732) | pub fn pending(dev: &mut Device) { function handle_interrupt (line 751) | pub fn handle_interrupt(idx: usize) { FILE: risc_v/src/input.rs constant EVENT_BUFFER_ELEMENTS (line 16) | const EVENT_BUFFER_ELEMENTS: usize = 64; type InputType (line 18) | pub enum InputType { type Event (line 26) | pub struct Event { type ConfigSelect (line 33) | pub enum ConfigSelect { type AbsInfo (line 44) | pub struct AbsInfo { type DevIds (line 53) | pub struct DevIds { type Config (line 71) | pub struct Config { type EventType (line 81) | pub enum EventType { constant EVENT_SIZE (line 97) | const EVENT_SIZE: usize = size_of::(); type Device (line 99) | pub struct Device { function setup_input_device (line 119) | pub fn setup_input_device(ptr: *mut u32) -> bool { function repopulate_event (line 242) | unsafe fn repopulate_event(dev: &mut Device, buffer: usize) { function pending (line 257) | fn pending(dev: &mut Device) { function handle_interrupt (line 300) | pub fn handle_interrupt(idx: usize) { FILE: risc_v/src/kmem.rs type AllocListFlags (line 10) | enum AllocListFlags { method val (line 14) | pub fn val(self) -> usize { type AllocList (line 19) | struct AllocList { method is_taken (line 23) | pub fn is_taken(&self) -> bool { method is_free (line 27) | pub fn is_free(&self) -> bool { method set_taken (line 31) | pub fn set_taken(&mut self) { method set_free (line 35) | pub fn set_free(&mut self) { method set_size (line 39) | pub fn set_size(&mut self, sz: usize) { method get_size (line 47) | pub fn get_size(&self) -> usize { function get_head (line 63) | pub fn get_head() -> *mut u8 { function get_page_table (line 67) | pub fn get_page_table() -> *mut Table { function get_num_allocations (line 71) | pub fn get_num_allocations() -> usize { function init (line 79) | pub fn init() { function kzmalloc (line 93) | pub fn kzmalloc(sz: usize) -> *mut u8 { function kmalloc (line 108) | pub fn kmalloc(sz: usize) -> *mut u8 { function kfree (line 151) | pub fn kfree(ptr: *mut u8) { function coalesce (line 166) | pub fn coalesce() { function print_table (line 209) | pub fn print_table() { type OsGlobalAlloc (line 240) | struct OsGlobalAlloc; method alloc (line 243) | unsafe fn alloc(&self, layout: Layout) -> *mut u8 { method dealloc (line 250) | unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) { function alloc_error (line 267) | pub fn alloc_error(l: Layout) -> ! { FILE: risc_v/src/lock.rs constant DEFAULT_LOCK_SLEEP (line 8) | pub const DEFAULT_LOCK_SLEEP: usize = 10000; type MutexState (line 10) | pub enum MutexState { type Mutex (line 16) | pub struct Mutex { method new (line 21) | pub const fn new() -> Self { method val (line 25) | pub fn val(&'a self) -> &'a MutexState { method try_lock (line 30) | pub fn try_lock(&mut self) -> bool { method sleep_lock (line 45) | pub fn sleep_lock(&mut self) { method spin_lock (line 52) | pub fn spin_lock(&mut self) { method unlock (line 57) | pub fn unlock(&mut self) { FILE: risc_v/src/main.rs function eh_personality (line 16) | extern fn eh_personality() {} function panic (line 53) | fn panic(info: &core::panic::PanicInfo) -> ! { function abort (line 69) | extern "C" fn abort() -> ! { function switch_to_user (line 78) | fn switch_to_user(frame: usize) -> !; function rust_switch_to_user (line 85) | fn rust_switch_to_user(frame: usize) -> ! { function kinit (line 94) | extern "C" fn kinit() { function kinit_hart (line 124) | extern "C" fn kinit_hart(_hartid: usize) { FILE: risc_v/src/page.rs constant PAGE_ORDER (line 19) | const PAGE_ORDER: usize = 12; constant PAGE_SIZE (line 20) | pub const PAGE_SIZE: usize = 1 << 12; function align_val (line 26) | pub const fn align_val(val: usize, order: usize) -> usize { type PageBits (line 32) | pub enum PageBits { method val (line 41) | pub fn val(self) -> u8 { type Page (line 49) | pub struct Page { method is_last (line 56) | pub fn is_last(&self) -> bool { method is_taken (line 62) | pub fn is_taken(&self) -> bool { method is_free (line 67) | pub fn is_free(&self) -> bool { method clear (line 72) | pub fn clear(&mut self) { method set_flag (line 79) | pub fn set_flag(&mut self, flag: PageBits) { method clear_flag (line 83) | pub fn clear_flag(&mut self, flag: PageBits) { function init (line 94) | pub fn init() { function alloc (line 120) | pub fn alloc(pages: usize) -> *mut u8 { function zalloc (line 179) | pub fn zalloc(pages: usize) -> *mut u8 { function dealloc (line 204) | pub fn dealloc(ptr: *mut u8) { function print_page_allocations (line 236) | pub fn print_page_allocations() { type EntryBits (line 303) | pub enum EntryBits { method val (line 329) | pub fn val(self) -> usize { type Entry (line 335) | pub struct Entry { method is_valid (line 342) | pub fn is_valid(&self) -> bool { method is_invalid (line 348) | pub fn is_invalid(&self) -> bool { method is_leaf (line 353) | pub fn is_leaf(&self) -> bool { method is_branch (line 357) | pub fn is_branch(&self) -> bool { method set_entry (line 361) | pub fn set_entry(&mut self, entry: usize) { method get_entry (line 365) | pub fn get_entry(&self) -> usize { type Table (line 371) | pub struct Table { method len (line 376) | pub fn len() -> usize { function map (line 392) | pub fn map(root: &mut Table, function unmap (line 473) | pub fn unmap(root: &mut Table) { function virt_to_phys (line 506) | pub fn virt_to_phys(root: &Table, vaddr: usize) -> Option { FILE: risc_v/src/plic.rs constant PLIC_PRIORITY (line 9) | const PLIC_PRIORITY: usize = 0x0c00_0000; constant PLIC_PENDING (line 10) | const PLIC_PENDING: usize = 0x0c00_1000; constant PLIC_INT_ENABLE (line 11) | const PLIC_INT_ENABLE: usize = 0x0c00_2000; constant PLIC_THRESHOLD (line 12) | const PLIC_THRESHOLD: usize = 0x0c20_0000; constant PLIC_CLAIM (line 13) | const PLIC_CLAIM: usize = 0x0c20_0004; function next (line 33) | pub fn next() -> Option { function complete (line 53) | pub fn complete(id: u32) { function set_threshold (line 67) | pub fn set_threshold(tsh: u8) { function is_pending (line 79) | pub fn is_pending(id: u32) -> bool { function enable (line 90) | pub fn enable(id: u32) { function set_priority (line 104) | pub fn set_priority(id: u32, prio: u8) { function handle_interrupt (line 116) | pub fn handle_interrupt() { FILE: risc_v/src/process.rs constant STACK_PAGES (line 22) | pub const STACK_PAGES: usize = 35; constant STACK_ADDR (line 25) | pub const STACK_ADDR: usize = 0x1_0000_0000; constant PROCESS_STARTING_ADDR (line 28) | pub const PROCESS_STARTING_ADDR: usize = 0x2000_0000; function set_running (line 52) | pub fn set_running(pid: u16) -> bool { function set_waiting (line 77) | pub fn set_waiting(pid: u16) -> bool { function set_sleeping (line 100) | pub fn set_sleeping(pid: u16, duration: usize) -> bool { function delete_process (line 125) | pub fn delete_process(pid: u16) { function get_by_pid (line 147) | pub unsafe fn get_by_pid(pid: u16) -> *mut Process { function init_process (line 163) | fn init_process() { function add_kernel_process (line 177) | pub fn add_kernel_process(func: fn()) -> u16 { function ra_delete_proc (line 254) | fn ra_delete_proc() { function add_kernel_process_args (line 261) | pub fn add_kernel_process_args(func: fn(args_ptr: usize), args: usize) -... function init (line 340) | pub fn init() -> usize { type ProcessState (line 370) | pub enum ProcessState { type Process (line 377) | pub struct Process { method drop (line 392) | fn drop(&mut self) { type Descriptor (line 416) | pub enum Descriptor { type ProcessData (line 433) | pub struct ProcessData { method new (line 444) | pub fn new() -> Self { FILE: risc_v/src/rng.rs type EntropyDevice (line 13) | pub struct EntropyDevice { method new (line 20) | pub const fn new() -> Self { function setup_entropy_device (line 39) | pub fn setup_entropy_device(ptr: *mut u32) -> bool { function get_random (line 134) | pub fn get_random() -> u64 { FILE: risc_v/src/sched.rs function schedule (line 9) | pub fn schedule() -> usize { FILE: risc_v/src/syscall.rs function do_syscall (line 25) | pub unsafe fn do_syscall(mepc: usize, frame: *mut TrapFrame) { function make_syscall (line 429) | fn make_syscall(sysno: usize, arg0: usize, arg1: usize, arg2: usize, arg... function do_make_syscall (line 432) | fn do_make_syscall(sysno: usize, arg0: usize, arg1: usize, arg2: usize, ... function syscall_yield (line 436) | pub fn syscall_yield() { function syscall_exit (line 440) | pub fn syscall_exit() { function syscall_execv (line 444) | pub fn syscall_execv(path: *const u8, argv: usize) -> usize { function syscall_fs_read (line 448) | pub fn syscall_fs_read(dev: usize, inode: u32, buffer: *mut u8, size: u3... function syscall_block_read (line 452) | pub fn syscall_block_read(dev: usize, buffer: *mut u8, size: u32, offset... function syscall_sleep (line 456) | pub fn syscall_sleep(duration: usize) { function syscall_get_pid (line 460) | pub fn syscall_get_pid() -> u16 { function exec_func (line 466) | fn exec_func(args: usize) { FILE: risc_v/src/test.rs function test (line 6) | pub fn test() { FILE: risc_v/src/trap.rs function m_trap (line 18) | extern "C" fn m_trap(epc: usize, constant MMIO_MTIMECMP (line 146) | pub const MMIO_MTIMECMP: *mut u64 = 0x0200_4000usize as *mut u64; constant MMIO_MTIME (line 147) | pub const MMIO_MTIME: *const u64 = 0x0200_BFF8 as *const u64; function schedule_next_context_switch (line 149) | pub fn schedule_next_context_switch(qm: u16) { FILE: risc_v/src/uart.rs type Uart (line 8) | pub struct Uart { method new (line 22) | pub fn new(base_address: usize) -> Self { method init (line 26) | pub fn init(&mut self) { method put (line 103) | pub fn put(&mut self, c: u8) { method get (line 110) | pub fn get(&mut self) -> Option { method write_str (line 13) | fn write_str(&mut self, out: &str) -> Result<(), Error> { function handle_interrupt (line 125) | pub fn handle_interrupt() { FILE: risc_v/src/virtio.rs constant VIRTIO_F_RING_INDIRECT_DESC (line 16) | pub const VIRTIO_F_RING_INDIRECT_DESC: u32 = 28; constant VIRTIO_F_RING_EVENT_IDX (line 17) | pub const VIRTIO_F_RING_EVENT_IDX: u32 = 29; constant VIRTIO_F_VERSION_1 (line 18) | pub const VIRTIO_F_VERSION_1: u32 = 32; constant VIRTIO_DESC_F_NEXT (line 20) | pub const VIRTIO_DESC_F_NEXT: u16 = 1; constant VIRTIO_DESC_F_WRITE (line 21) | pub const VIRTIO_DESC_F_WRITE: u16 = 2; constant VIRTIO_DESC_F_INDIRECT (line 22) | pub const VIRTIO_DESC_F_INDIRECT: u16 = 4; constant VIRTIO_AVAIL_F_NO_INTERRUPT (line 24) | pub const VIRTIO_AVAIL_F_NO_INTERRUPT: u16 = 1; constant VIRTIO_USED_F_NO_NOTIFY (line 26) | pub const VIRTIO_USED_F_NO_NOTIFY: u16 = 1; constant VIRTIO_RING_SIZE (line 31) | pub const VIRTIO_RING_SIZE: usize = 1 << 7; type Descriptor (line 41) | pub struct Descriptor { type Available (line 49) | pub struct Available { type UsedElem (line 57) | pub struct UsedElem { type Used (line 63) | pub struct Used { type Queue (line 71) | pub struct Queue { type MmioOffsets (line 83) | pub enum MmioOffsets { method val (line 154) | pub fn val(self) -> usize { method scaled (line 158) | pub fn scaled(self, scale: usize) -> usize { method scale32 (line 162) | pub fn scale32(self) -> usize { type MmioDevice (line 108) | pub struct MmioDevice { type DeviceTypes (line 138) | pub enum DeviceTypes { type StatusField (line 168) | pub enum StatusField { method val (line 180) | pub fn val(self) -> usize { method val32 (line 184) | pub fn val32(self) -> u32 { method test (line 188) | pub fn test(sf: u32, bit: StatusField) -> bool { method is_failed (line 192) | pub fn is_failed(sf: u32) -> bool { method needs_reset (line 196) | pub fn needs_reset(sf: u32) -> bool { method driver_ok (line 200) | pub fn driver_ok(sf: u32) -> bool { method features_ok (line 204) | pub fn features_ok(sf: u32) -> bool { constant MMIO_VIRTIO_START (line 212) | pub const MMIO_VIRTIO_START: usize = 0x1000_1000; constant MMIO_VIRTIO_END (line 213) | pub const MMIO_VIRTIO_END: usize = 0x1000_8000; constant MMIO_VIRTIO_STRIDE (line 214) | pub const MMIO_VIRTIO_STRIDE: usize = 0x1000; constant MMIO_VIRTIO_MAGIC (line 215) | pub const MMIO_VIRTIO_MAGIC: u32 = 0x74_72_69_76; type VirtioDevice (line 222) | pub struct VirtioDevice { method new (line 227) | pub const fn new() -> Self { method new_with (line 231) | pub const fn new_with(devtype: DeviceTypes) -> Self { function probe (line 240) | pub fn probe() { function setup_network_device (line 341) | pub fn setup_network_device(_ptr: *mut u32) -> bool { function handle_interrupt (line 349) | pub fn handle_interrupt(interrupt: u32) { FILE: risc_v/userspace/fb.cpp type Pixel (line 24) | struct Pixel { type Event (line 31) | struct Event { type Rect (line 50) | struct Rect { function u32 (line 57) | constexpr u32 lerp(u32 val, u32 mx1, u32 mx2) { function main (line 62) | int main() function set_pixel (line 89) | void set_pixel(Pixel *fb, u32 x, u32 y, Pixel &color) { function fill_rect (line 95) | void fill_rect(Pixel *fb, u32 x, u32 y, u32 width, u32 height, Pixel &co... function stroke_rect (line 103) | void stroke_rect(Pixel *fb, u32 x, u32 y, u32 width, u32 height, Pixel &... function draw_cosine (line 115) | void draw_cosine(Pixel *fb, u32 x, u32 y, u32 width, u32 height, Pixel &... function draw_circle (line 126) | void draw_circle(Pixel *fb, u32 x, u32 y, f64 r, Pixel &color) FILE: risc_v/userspace/helloworld.cpp function main (line 8) | int main() FILE: risc_v/userspace/shell.cpp function main (line 3) | int main() FILE: risc_v/userspace/sleepy.cpp function main (line 2) | int main() FILE: risc_v/userspace/startlib/printf.cpp function _out_buffer (line 125) | static inline void _out_buffer(char character, void *buffer, size_t idx,... function _putchar (line 133) | void _putchar(char c) function _out_null (line 139) | static inline void _out_null(char character, void *buffer, size_t idx, s... function _out_char (line 148) | static inline void _out_char(char character, void *buffer, size_t idx, s... function _out_fct (line 160) | static inline void _out_fct(char character, void *buffer, size_t idx, si... function _strnlen_s (line 173) | static inline unsigned int _strnlen_s(const char *str, size_t maxsize) function _is_digit (line 183) | static inline bool _is_digit(char ch) function _atoi (line 189) | static unsigned int _atoi(const char **str) function _out_rev (line 200) | static size_t _out_rev(out_fct_type out, char *buffer, size_t idx, size_... function _ntoa_format (line 232) | static size_t _ntoa_format(out_fct_type out, char *buffer, size_t idx, s... function _ntoa_long (line 300) | static size_t _ntoa_long(out_fct_type out, char *buffer, size_t idx, siz... function _ntoa_long_long (line 327) | static size_t _ntoa_long_long(out_fct_type out, char *buffer, size_t idx... function _ftoa (line 361) | static size_t _ftoa(out_fct_type out, char *buffer, size_t idx, size_t m... function _etoa (line 512) | static size_t _etoa(out_fct_type out, char *buffer, size_t idx, size_t m... function sprintf (line 1005) | int sprintf(char *buffer, const char *format, ...) function snprintf (line 1014) | int snprintf(char *buffer, size_t count, const char *format, ...) function vprintf_ (line 1023) | int vprintf_(const char *format, va_list va) function vsnprintf_ (line 1029) | int vsnprintf_(char *buffer, size_t count, const char *format, va_list va) function fctprintf (line 1034) | int fctprintf(void (*out)(char character, void *arg), void *arg, const c...