From 9b5d7aa153e47526025ed54cbc080b0e42828dfd Mon Sep 17 00:00:00 2001 From: wyfcyx Date: Wed, 29 Mar 2023 12:43:37 +0000 Subject: [PATCH] deploy: 243b07f7490914a72d1d03b32c151b776ab6a028 --- ch4/implementors/core/marker/trait.Freeze.js | 2 +- ch4/implementors/core/marker/trait.Send.js | 2 +- ch4/implementors/core/marker/trait.Sync.js | 2 +- ch4/implementors/core/marker/trait.Unpin.js | 2 +- .../panic/unwind_safe/trait.RefUnwindSafe.js | 2 +- .../panic/unwind_safe/trait.UnwindSafe.js | 2 +- ch4/implementors/os/board/trait.QEMUExit.js | 3 - ch4/os/all.html | 2 +- ch4/os/board/constant.EXIT_FAILURE.html | 1 - ch4/os/board/constant.EXIT_FAILURE_FLAG.html | 1 - ch4/os/board/constant.EXIT_RESET.html | 1 - ch4/os/board/constant.EXIT_SUCCESS.html | 1 - ch4/os/board/constant.QEMU_EXIT_HANDLE.html | 1 - ch4/os/board/constant.VIRT_TEST.html | 1 - ch4/os/board/fn.exit_code_encode.html | 2 - ch4/os/board/index.html | 6 +- ch4/os/board/sidebar-items.js | 2 +- ch4/os/board/struct.RISCV64.html | 20 --- ch4/os/board/trait.QEMUExit.html | 10 -- ch4/os/lang_items/fn.panic.html | 2 +- ch4/os/lang_items/index.html | 2 +- ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html | 1 - ch4/os/sbi/constant.SBI_SET_TIMER.html | 1 - ch4/os/sbi/fn.console_putchar.html | 2 +- ch4/os/sbi/fn.sbi_call.html | 2 - ch4/os/sbi/fn.set_timer.html | 2 +- ch4/os/sbi/fn.shutdown.html | 2 +- ch4/os/sbi/index.html | 5 +- ch4/os/sbi/sidebar-items.js | 2 +- ch4/os/task/struct.TASK_MANAGER.html | 24 +-- ch4/os/task/struct.TaskManager.html | 18 +- ch4/os/task/struct.TaskManagerInner.html | 2 +- ch4/search-index.js | 2 +- ch4/src/os/boards/qemu.rs.html | 160 ------------------ ch4/src/os/lang_items.rs.html | 8 +- ch4/src/os/sbi.rs.html | 82 ++------- ch4/src/os/task/mod.rs.html | 4 +- 37 files changed, 61 insertions(+), 323 deletions(-) delete mode 100644 ch4/implementors/os/board/trait.QEMUExit.js delete mode 100644 ch4/os/board/constant.EXIT_FAILURE.html delete mode 100644 ch4/os/board/constant.EXIT_FAILURE_FLAG.html delete mode 100644 ch4/os/board/constant.EXIT_RESET.html delete mode 100644 ch4/os/board/constant.EXIT_SUCCESS.html delete mode 100644 ch4/os/board/constant.QEMU_EXIT_HANDLE.html delete mode 100644 ch4/os/board/constant.VIRT_TEST.html delete mode 100644 ch4/os/board/fn.exit_code_encode.html delete mode 100644 ch4/os/board/struct.RISCV64.html delete mode 100644 ch4/os/board/trait.QEMUExit.html delete mode 100644 ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html delete mode 100644 ch4/os/sbi/constant.SBI_SET_TIMER.html delete mode 100644 ch4/os/sbi/fn.sbi_call.html diff --git a/ch4/implementors/core/marker/trait.Freeze.js b/ch4/implementors/core/marker/trait.Freeze.js index bc4bea37..44bdcb74 100644 --- a/ch4/implementors/core/marker/trait.Freeze.js +++ b/ch4/implementors/core/marker/trait.Freeze.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["os"] = [{"text":"impl Freeze for RISCV64","synthetic":true,"types":["os::board::RISCV64"]},{"text":"impl Freeze for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Freeze for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl Freeze for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl Freeze for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl Freeze for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> Freeze for SimpleRange<T> where
    T: Freeze
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> Freeze for SimpleRangeIterator<T> where
    T: Freeze
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl Freeze for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl Freeze for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl Freeze for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl Freeze for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl Freeze for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl Freeze for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl Freeze for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl Freeze for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl Freeze for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl Freeze for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl Freeze for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> !Freeze for UPSafeCell<T>","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl Freeze for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl Freeze for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl Freeze for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl !Freeze for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl Freeze for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl Freeze for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl Freeze for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; +implementors["os"] = [{"text":"impl Freeze for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Freeze for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl Freeze for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl Freeze for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl Freeze for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> Freeze for SimpleRange<T> where
    T: Freeze
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> Freeze for SimpleRangeIterator<T> where
    T: Freeze
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl Freeze for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl Freeze for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl Freeze for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl Freeze for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl Freeze for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl Freeze for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl Freeze for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl Freeze for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl Freeze for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl Freeze for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl Freeze for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> !Freeze for UPSafeCell<T>","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl Freeze for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl Freeze for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl Freeze for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl !Freeze for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl Freeze for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl Freeze for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl Freeze for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch4/implementors/core/marker/trait.Send.js b/ch4/implementors/core/marker/trait.Send.js index f91a3be7..55a3eb56 100644 --- a/ch4/implementors/core/marker/trait.Send.js +++ b/ch4/implementors/core/marker/trait.Send.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["os"] = [{"text":"impl Send for RISCV64","synthetic":true,"types":["os::board::RISCV64"]},{"text":"impl Send for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Send for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl Send for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl Send for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl Send for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> Send for SimpleRange<T> where
    T: Send
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> Send for SimpleRangeIterator<T> where
    T: Send
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl Send for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl Send for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl Send for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl Send for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl Send for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl Send for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl Send for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl Send for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl Send for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl Send for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl Send for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> Send for UPSafeCell<T> where
    T: Send
","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl Send for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl Send for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl Send for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl Send for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl Send for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl Send for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl Send for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; +implementors["os"] = [{"text":"impl Send for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Send for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl Send for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl Send for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl Send for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> Send for SimpleRange<T> where
    T: Send
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> Send for SimpleRangeIterator<T> where
    T: Send
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl Send for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl Send for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl Send for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl Send for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl Send for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl Send for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl Send for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl Send for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl Send for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl Send for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl Send for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> Send for UPSafeCell<T> where
    T: Send
","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl Send for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl Send for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl Send for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl Send for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl Send for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl Send for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl Send for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch4/implementors/core/marker/trait.Sync.js b/ch4/implementors/core/marker/trait.Sync.js index 13959b22..c1166523 100644 --- a/ch4/implementors/core/marker/trait.Sync.js +++ b/ch4/implementors/core/marker/trait.Sync.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["os"] = [{"text":"impl Sync for RISCV64","synthetic":true,"types":["os::board::RISCV64"]},{"text":"impl Sync for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Sync for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl Sync for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl Sync for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl Sync for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> Sync for SimpleRange<T> where
    T: Sync
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> Sync for SimpleRangeIterator<T> where
    T: Sync
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl Sync for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl Sync for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl Sync for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl Sync for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl Sync for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl Sync for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl Sync for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl Sync for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl Sync for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl Sync for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl Sync for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl Sync for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl Sync for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl Sync for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl Sync for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl Sync for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl Sync for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl Sync for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]},{"text":"impl<T> Sync for UPSafeCell<T>","synthetic":false,"types":["os::sync::up::UPSafeCell"]}]; +implementors["os"] = [{"text":"impl Sync for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Sync for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl Sync for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl Sync for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl Sync for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> Sync for SimpleRange<T> where
    T: Sync
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> Sync for SimpleRangeIterator<T> where
    T: Sync
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl Sync for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl Sync for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl Sync for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl Sync for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl Sync for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl Sync for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl Sync for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl Sync for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl Sync for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl Sync for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl Sync for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl Sync for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl Sync for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl Sync for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl Sync for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl Sync for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl Sync for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl Sync for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]},{"text":"impl<T> Sync for UPSafeCell<T>","synthetic":false,"types":["os::sync::up::UPSafeCell"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch4/implementors/core/marker/trait.Unpin.js b/ch4/implementors/core/marker/trait.Unpin.js index 977e8b92..69306136 100644 --- a/ch4/implementors/core/marker/trait.Unpin.js +++ b/ch4/implementors/core/marker/trait.Unpin.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["os"] = [{"text":"impl Unpin for RISCV64","synthetic":true,"types":["os::board::RISCV64"]},{"text":"impl Unpin for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Unpin for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl Unpin for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl Unpin for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl Unpin for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> Unpin for SimpleRange<T> where
    T: Unpin
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> Unpin for SimpleRangeIterator<T> where
    T: Unpin
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl Unpin for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl Unpin for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl Unpin for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl Unpin for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl Unpin for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl Unpin for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl Unpin for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl Unpin for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl Unpin for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl Unpin for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl Unpin for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> Unpin for UPSafeCell<T> where
    T: Unpin
","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl Unpin for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl Unpin for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl Unpin for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl Unpin for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl Unpin for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl Unpin for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl Unpin for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; +implementors["os"] = [{"text":"impl Unpin for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl Unpin for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl Unpin for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl Unpin for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl Unpin for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> Unpin for SimpleRange<T> where
    T: Unpin
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> Unpin for SimpleRangeIterator<T> where
    T: Unpin
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl Unpin for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl Unpin for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl Unpin for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl Unpin for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl Unpin for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl Unpin for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl Unpin for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl Unpin for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl Unpin for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl Unpin for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl Unpin for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> Unpin for UPSafeCell<T> where
    T: Unpin
","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl Unpin for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl Unpin for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl Unpin for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl Unpin for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl Unpin for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl Unpin for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl Unpin for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch4/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/ch4/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js index b851f3d2..7b6effd1 100644 --- a/ch4/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/ch4/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["os"] = [{"text":"impl RefUnwindSafe for RISCV64","synthetic":true,"types":["os::board::RISCV64"]},{"text":"impl RefUnwindSafe for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl RefUnwindSafe for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl RefUnwindSafe for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl RefUnwindSafe for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl RefUnwindSafe for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> RefUnwindSafe for SimpleRange<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> RefUnwindSafe for SimpleRangeIterator<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl RefUnwindSafe for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl RefUnwindSafe for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl RefUnwindSafe for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl RefUnwindSafe for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl RefUnwindSafe for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl RefUnwindSafe for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl RefUnwindSafe for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl RefUnwindSafe for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl RefUnwindSafe for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl RefUnwindSafe for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl RefUnwindSafe for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> !RefUnwindSafe for UPSafeCell<T>","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl RefUnwindSafe for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl RefUnwindSafe for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl RefUnwindSafe for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl !RefUnwindSafe for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl RefUnwindSafe for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl RefUnwindSafe for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl RefUnwindSafe for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; +implementors["os"] = [{"text":"impl RefUnwindSafe for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl RefUnwindSafe for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl RefUnwindSafe for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl RefUnwindSafe for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl RefUnwindSafe for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> RefUnwindSafe for SimpleRange<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> RefUnwindSafe for SimpleRangeIterator<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl RefUnwindSafe for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl RefUnwindSafe for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl RefUnwindSafe for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl RefUnwindSafe for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl RefUnwindSafe for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl RefUnwindSafe for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl RefUnwindSafe for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl RefUnwindSafe for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl RefUnwindSafe for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl RefUnwindSafe for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl RefUnwindSafe for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> !RefUnwindSafe for UPSafeCell<T>","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl RefUnwindSafe for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl RefUnwindSafe for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl RefUnwindSafe for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl !RefUnwindSafe for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl RefUnwindSafe for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl RefUnwindSafe for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl RefUnwindSafe for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch4/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/ch4/implementors/core/panic/unwind_safe/trait.UnwindSafe.js index cf813eed..50340237 100644 --- a/ch4/implementors/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/ch4/implementors/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,3 +1,3 @@ (function() {var implementors = {}; -implementors["os"] = [{"text":"impl UnwindSafe for RISCV64","synthetic":true,"types":["os::board::RISCV64"]},{"text":"impl UnwindSafe for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl UnwindSafe for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl UnwindSafe for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl UnwindSafe for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl UnwindSafe for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> UnwindSafe for SimpleRange<T> where
    T: UnwindSafe
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> UnwindSafe for SimpleRangeIterator<T> where
    T: UnwindSafe
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl UnwindSafe for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl UnwindSafe for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl UnwindSafe for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl UnwindSafe for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl UnwindSafe for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl UnwindSafe for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl UnwindSafe for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl UnwindSafe for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl UnwindSafe for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl UnwindSafe for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl UnwindSafe for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> UnwindSafe for UPSafeCell<T> where
    T: UnwindSafe
","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl UnwindSafe for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl UnwindSafe for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl UnwindSafe for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl UnwindSafe for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl UnwindSafe for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl UnwindSafe for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl UnwindSafe for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; +implementors["os"] = [{"text":"impl UnwindSafe for Stdout","synthetic":true,"types":["os::console::Stdout"]},{"text":"impl UnwindSafe for PhysAddr","synthetic":true,"types":["os::mm::address::PhysAddr"]},{"text":"impl UnwindSafe for VirtAddr","synthetic":true,"types":["os::mm::address::VirtAddr"]},{"text":"impl UnwindSafe for PhysPageNum","synthetic":true,"types":["os::mm::address::PhysPageNum"]},{"text":"impl UnwindSafe for VirtPageNum","synthetic":true,"types":["os::mm::address::VirtPageNum"]},{"text":"impl<T> UnwindSafe for SimpleRange<T> where
    T: UnwindSafe
","synthetic":true,"types":["os::mm::address::SimpleRange"]},{"text":"impl<T> UnwindSafe for SimpleRangeIterator<T> where
    T: UnwindSafe
","synthetic":true,"types":["os::mm::address::SimpleRangeIterator"]},{"text":"impl UnwindSafe for FrameTracker","synthetic":true,"types":["os::mm::frame_allocator::FrameTracker"]},{"text":"impl UnwindSafe for StackFrameAllocator","synthetic":true,"types":["os::mm::frame_allocator::StackFrameAllocator"]},{"text":"impl UnwindSafe for FRAME_ALLOCATOR","synthetic":true,"types":["os::mm::frame_allocator::FRAME_ALLOCATOR"]},{"text":"impl UnwindSafe for KERNEL_SPACE","synthetic":true,"types":["os::mm::memory_set::KERNEL_SPACE"]},{"text":"impl UnwindSafe for MemorySet","synthetic":true,"types":["os::mm::memory_set::MemorySet"]},{"text":"impl UnwindSafe for MapArea","synthetic":true,"types":["os::mm::memory_set::MapArea"]},{"text":"impl UnwindSafe for MapType","synthetic":true,"types":["os::mm::memory_set::MapType"]},{"text":"impl UnwindSafe for MapPermission","synthetic":true,"types":["os::mm::memory_set::MapPermission"]},{"text":"impl UnwindSafe for PTEFlags","synthetic":true,"types":["os::mm::page_table::PTEFlags"]},{"text":"impl UnwindSafe for PageTableEntry","synthetic":true,"types":["os::mm::page_table::PageTableEntry"]},{"text":"impl UnwindSafe for PageTable","synthetic":true,"types":["os::mm::page_table::PageTable"]},{"text":"impl<T> UnwindSafe for UPSafeCell<T> where
    T: UnwindSafe
","synthetic":true,"types":["os::sync::up::UPSafeCell"]},{"text":"impl UnwindSafe for TaskContext","synthetic":true,"types":["os::task::context::TaskContext"]},{"text":"impl UnwindSafe for TaskControlBlock","synthetic":true,"types":["os::task::task::TaskControlBlock"]},{"text":"impl UnwindSafe for TaskStatus","synthetic":true,"types":["os::task::task::TaskStatus"]},{"text":"impl UnwindSafe for TaskManager","synthetic":true,"types":["os::task::TaskManager"]},{"text":"impl UnwindSafe for TaskManagerInner","synthetic":true,"types":["os::task::TaskManagerInner"]},{"text":"impl UnwindSafe for TASK_MANAGER","synthetic":true,"types":["os::task::TASK_MANAGER"]},{"text":"impl UnwindSafe for TrapContext","synthetic":true,"types":["os::trap::context::TrapContext"]}]; if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch4/implementors/os/board/trait.QEMUExit.js b/ch4/implementors/os/board/trait.QEMUExit.js deleted file mode 100644 index 34fffcbd..00000000 --- a/ch4/implementors/os/board/trait.QEMUExit.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = {}; -implementors["os"] = []; -if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ch4/os/all.html b/ch4/os/all.html index d9e845e0..64250033 100644 --- a/ch4/os/all.html +++ b/ch4/os/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Typedefs

Statics

Constants

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Macros

Functions

Typedefs

Statics

Constants

\ No newline at end of file diff --git a/ch4/os/board/constant.EXIT_FAILURE.html b/ch4/os/board/constant.EXIT_FAILURE.html deleted file mode 100644 index 63c57814..00000000 --- a/ch4/os/board/constant.EXIT_FAILURE.html +++ /dev/null @@ -1 +0,0 @@ -EXIT_FAILURE in os::board - Rust
const EXIT_FAILURE: u32 = _; // 78_643u32
\ No newline at end of file diff --git a/ch4/os/board/constant.EXIT_FAILURE_FLAG.html b/ch4/os/board/constant.EXIT_FAILURE_FLAG.html deleted file mode 100644 index edd3b3d9..00000000 --- a/ch4/os/board/constant.EXIT_FAILURE_FLAG.html +++ /dev/null @@ -1 +0,0 @@ -EXIT_FAILURE_FLAG in os::board - Rust
const EXIT_FAILURE_FLAG: u32 = 0x3333;
\ No newline at end of file diff --git a/ch4/os/board/constant.EXIT_RESET.html b/ch4/os/board/constant.EXIT_RESET.html deleted file mode 100644 index f9e7b284..00000000 --- a/ch4/os/board/constant.EXIT_RESET.html +++ /dev/null @@ -1 +0,0 @@ -EXIT_RESET in os::board - Rust
const EXIT_RESET: u32 = 0x7777;
\ No newline at end of file diff --git a/ch4/os/board/constant.EXIT_SUCCESS.html b/ch4/os/board/constant.EXIT_SUCCESS.html deleted file mode 100644 index dc0585d5..00000000 --- a/ch4/os/board/constant.EXIT_SUCCESS.html +++ /dev/null @@ -1 +0,0 @@ -EXIT_SUCCESS in os::board - Rust
const EXIT_SUCCESS: u32 = 0x5555;
\ No newline at end of file diff --git a/ch4/os/board/constant.QEMU_EXIT_HANDLE.html b/ch4/os/board/constant.QEMU_EXIT_HANDLE.html deleted file mode 100644 index f4f559fc..00000000 --- a/ch4/os/board/constant.QEMU_EXIT_HANDLE.html +++ /dev/null @@ -1 +0,0 @@ -QEMU_EXIT_HANDLE in os::board - Rust
pub const QEMU_EXIT_HANDLE: RISCV64;
\ No newline at end of file diff --git a/ch4/os/board/constant.VIRT_TEST.html b/ch4/os/board/constant.VIRT_TEST.html deleted file mode 100644 index 5247f2a6..00000000 --- a/ch4/os/board/constant.VIRT_TEST.html +++ /dev/null @@ -1 +0,0 @@ -VIRT_TEST in os::board - Rust
const VIRT_TEST: u64 = 0x100000;
\ No newline at end of file diff --git a/ch4/os/board/fn.exit_code_encode.html b/ch4/os/board/fn.exit_code_encode.html deleted file mode 100644 index 02cbd01b..00000000 --- a/ch4/os/board/fn.exit_code_encode.html +++ /dev/null @@ -1,2 +0,0 @@ -exit_code_encode in os::board - Rust
const fn exit_code_encode(code: u32) -> u32
Expand description

Encode the exit code using EXIT_FAILURE_FLAG.

-
\ No newline at end of file diff --git a/ch4/os/board/index.html b/ch4/os/board/index.html index e324f6ef..128b0725 100644 --- a/ch4/os/board/index.html +++ b/ch4/os/board/index.html @@ -1,4 +1,2 @@ -os::board - Rust

Module os::board

source · []
Expand description

Constants used in rCore for qemu

-

Structs

RISCV64 configuration

-

Constants

Traits

Functions

Encode the exit code using EXIT_FAILURE_FLAG.

-
\ No newline at end of file +os::board - Rust

Module os::board

source · []
Expand description

Constants used in rCore for qemu

+

Constants

\ No newline at end of file diff --git a/ch4/os/board/sidebar-items.js b/ch4/os/board/sidebar-items.js index eef7dbee..c552d5dd 100644 --- a/ch4/os/board/sidebar-items.js +++ b/ch4/os/board/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":[["CLOCK_FREQ",""],["EXIT_FAILURE",""],["EXIT_FAILURE_FLAG",""],["EXIT_RESET",""],["EXIT_SUCCESS",""],["MMIO",""],["QEMU_EXIT_HANDLE",""],["VIRT_TEST",""]],"fn":[["exit_code_encode","Encode the exit code using EXIT_FAILURE_FLAG."]],"struct":[["RISCV64","RISCV64 configuration"]],"trait":[["QEMUExit",""]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":[["CLOCK_FREQ",""],["MMIO",""]]}; \ No newline at end of file diff --git a/ch4/os/board/struct.RISCV64.html b/ch4/os/board/struct.RISCV64.html deleted file mode 100644 index 118fd244..00000000 --- a/ch4/os/board/struct.RISCV64.html +++ /dev/null @@ -1,20 +0,0 @@ -RISCV64 in os::board - Rust
pub struct RISCV64 {
-    addr: u64,
-}
Expand description

RISCV64 configuration

-

Fields

addr: u64

Address of the sifive_test mapped device.

-

Implementations

Create an instance.

-

Trait Implementations

Exit qemu with specified exit code.

-

Exit QEMU using EXIT_SUCCESS, aka 0, if possible. Read more

-

Exit QEMU using EXIT_FAILURE, aka 1.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

-

Immutably borrows from an owned value. Read more

-

Mutably borrows from an owned value. Read more

-

Returns the argument unchanged.

-

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-

The type returned in the event of a conversion error.

-

Performs the conversion.

-
\ No newline at end of file diff --git a/ch4/os/board/trait.QEMUExit.html b/ch4/os/board/trait.QEMUExit.html deleted file mode 100644 index 0a2361b1..00000000 --- a/ch4/os/board/trait.QEMUExit.html +++ /dev/null @@ -1,10 +0,0 @@ -QEMUExit in os::board - Rust
pub trait QEMUExit {
-    fn exit(&self, code: u32) -> !;
-    fn exit_success(&self) -> !;
-    fn exit_failure(&self) -> !;
-}

Required Methods

Exit with specified return code.

-

Note: For X86, code is binary-OR’ed with 0x1 inside QEMU.

-

Exit QEMU using EXIT_SUCCESS, aka 0, if possible.

-

Note: Not possible for X86.

-

Exit QEMU using EXIT_FAILURE, aka 1.

-

Implementors

\ No newline at end of file diff --git a/ch4/os/lang_items/fn.panic.html b/ch4/os/lang_items/fn.panic.html index 41caf6f1..ae19822a 100644 --- a/ch4/os/lang_items/fn.panic.html +++ b/ch4/os/lang_items/fn.panic.html @@ -1,2 +1,2 @@ -panic in os::lang_items - Rust
fn panic(info: &PanicInfo<'_>) -> !
Expand description

panic handler

+panic in os::lang_items - Rust
fn panic(info: &PanicInfo<'_>) -> !
Expand description

panic handler

\ No newline at end of file diff --git a/ch4/os/lang_items/index.html b/ch4/os/lang_items/index.html index b4c12520..b0d22df0 100644 --- a/ch4/os/lang_items/index.html +++ b/ch4/os/lang_items/index.html @@ -1,3 +1,3 @@ -os::lang_items - Rust
Expand description

The panic handler

+os::lang_items - Rust
Expand description

The panic handler

Functions

panic 🔒

panic handler

\ No newline at end of file diff --git a/ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html b/ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html deleted file mode 100644 index 10915495..00000000 --- a/ch4/os/sbi/constant.SBI_CONSOLE_PUTCHAR.html +++ /dev/null @@ -1 +0,0 @@ -SBI_CONSOLE_PUTCHAR in os::sbi - Rust
const SBI_CONSOLE_PUTCHAR: usize = 1;
\ No newline at end of file diff --git a/ch4/os/sbi/constant.SBI_SET_TIMER.html b/ch4/os/sbi/constant.SBI_SET_TIMER.html deleted file mode 100644 index 0d9f9f56..00000000 --- a/ch4/os/sbi/constant.SBI_SET_TIMER.html +++ /dev/null @@ -1 +0,0 @@ -SBI_SET_TIMER in os::sbi - Rust
const SBI_SET_TIMER: usize = 0;
\ No newline at end of file diff --git a/ch4/os/sbi/fn.console_putchar.html b/ch4/os/sbi/fn.console_putchar.html index 33b4e0c5..d0471813 100644 --- a/ch4/os/sbi/fn.console_putchar.html +++ b/ch4/os/sbi/fn.console_putchar.html @@ -1,2 +1,2 @@ -console_putchar in os::sbi - Rust
pub fn console_putchar(c: usize)
Expand description

use sbi call to putchar in console (qemu uart handler)

+console_putchar in os::sbi - Rust
pub fn console_putchar(c: usize)
Expand description

use sbi call to putchar in console (qemu uart handler)

\ No newline at end of file diff --git a/ch4/os/sbi/fn.sbi_call.html b/ch4/os/sbi/fn.sbi_call.html deleted file mode 100644 index a9dc2963..00000000 --- a/ch4/os/sbi/fn.sbi_call.html +++ /dev/null @@ -1,2 +0,0 @@ -sbi_call in os::sbi - Rust

Function os::sbi::sbi_call

source · []
fn sbi_call(which: usize, arg0: usize, arg1: usize, arg2: usize) -> usize
Expand description

general sbi call

-
\ No newline at end of file diff --git a/ch4/os/sbi/fn.set_timer.html b/ch4/os/sbi/fn.set_timer.html index 4bd301f6..a4c82337 100644 --- a/ch4/os/sbi/fn.set_timer.html +++ b/ch4/os/sbi/fn.set_timer.html @@ -1,2 +1,2 @@ -set_timer in os::sbi - Rust

Function os::sbi::set_timer

source · []
pub fn set_timer(timer: usize)
Expand description

use sbi call to set timer

+set_timer in os::sbi - Rust

Function os::sbi::set_timer

source · []
pub fn set_timer(timer: usize)
Expand description

use sbi call to set timer

\ No newline at end of file diff --git a/ch4/os/sbi/fn.shutdown.html b/ch4/os/sbi/fn.shutdown.html index f8d25dea..f71d2b8e 100644 --- a/ch4/os/sbi/fn.shutdown.html +++ b/ch4/os/sbi/fn.shutdown.html @@ -1,2 +1,2 @@ -shutdown in os::sbi - Rust

Function os::sbi::shutdown

source · []
pub fn shutdown() -> !
Expand description

use sbi call to shutdown the kernel

+shutdown in os::sbi - Rust

Function os::sbi::shutdown

source · []
pub fn shutdown(failure: bool) -> !
Expand description

use sbi call to shutdown the kernel

\ No newline at end of file diff --git a/ch4/os/sbi/index.html b/ch4/os/sbi/index.html index dbb5a634..cfd89b06 100644 --- a/ch4/os/sbi/index.html +++ b/ch4/os/sbi/index.html @@ -1,6 +1,5 @@ -os::sbi - Rust

Module os::sbi

source · []
Expand description

SBI call wrappers

-

Constants

Functions

use sbi call to putchar in console (qemu uart handler)

-
sbi_call 🔒

general sbi call

+os::sbi - Rust

Module os::sbi

source · []
Expand description

SBI call wrappers

+

Functions

use sbi call to putchar in console (qemu uart handler)

use sbi call to set timer

use sbi call to shutdown the kernel

\ No newline at end of file diff --git a/ch4/os/sbi/sidebar-items.js b/ch4/os/sbi/sidebar-items.js index 777a084d..8ebce08e 100644 --- a/ch4/os/sbi/sidebar-items.js +++ b/ch4/os/sbi/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":[["SBI_CONSOLE_PUTCHAR",""],["SBI_SET_TIMER",""]],"fn":[["console_putchar","use sbi call to putchar in console (qemu uart handler)"],["sbi_call","general sbi call"],["set_timer","use sbi call to set timer"],["shutdown","use sbi call to shutdown the kernel"]]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"fn":[["console_putchar","use sbi call to putchar in console (qemu uart handler)"],["set_timer","use sbi call to set timer"],["shutdown","use sbi call to shutdown the kernel"]]}; \ No newline at end of file diff --git a/ch4/os/task/struct.TASK_MANAGER.html b/ch4/os/task/struct.TASK_MANAGER.html index 92531979..5f1fac27 100644 --- a/ch4/os/task/struct.TASK_MANAGER.html +++ b/ch4/os/task/struct.TASK_MANAGER.html @@ -1,21 +1,21 @@ -TASK_MANAGER in os::task - Rust
pub struct TASK_MANAGER {
+TASK_MANAGER in os::task - Rust
pub struct TASK_MANAGER {
     __private_field: (),
 }
Expand description

a TaskManager global instance through lazy_static!

-

Fields

__private_field: ()

Methods from Deref<Target = TaskManager>

Run the first task in task list.

+

Fields

__private_field: ()

Methods from Deref<Target = TaskManager>

Run the first task in task list.

Generally, the first task in task list is an idle task (we call it zero process later). But in ch4, we load apps statically, so the first task is a real app.

-

Change the status of current Running task into Ready.

-

Change the status of current Running task into Exited.

-

Find next task to run and return task id.

+

Change the status of current Running task into Ready.

+

Change the status of current Running task into Exited.

+

Find next task to run and return task id.

In this case, we only return the first Ready task in task list.

-

Get the current ‘Running’ task’s token.

-

Get the current ‘Running’ task’s trap contexts.

-

Change the current ‘Running’ task’s program break

-

Switch current Running task to the task we have found, +

Get the current ‘Running’ task’s token.

+

Get the current ‘Running’ task’s trap contexts.

+

Change the current ‘Running’ task’s program break

+

Switch current Running task to the task we have found, or there is no Ready task and we can exit with all applications completed

-

Trait Implementations

The resulting type after dereferencing.

-

Dereferences the value.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Trait Implementations

The resulting type after dereferencing.

+

Dereferences the value.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

diff --git a/ch4/os/task/struct.TaskManager.html b/ch4/os/task/struct.TaskManager.html index 82127684..9cc07d03 100644 --- a/ch4/os/task/struct.TaskManager.html +++ b/ch4/os/task/struct.TaskManager.html @@ -1,4 +1,4 @@ -TaskManager in os::task - Rust
pub struct TaskManager {
+TaskManager in os::task - Rust
pub struct TaskManager {
     num_app: usize,
     inner: UPSafeCell<TaskManagerInner>,
 }
Expand description

The task manager, where all the tasks are managed.

@@ -10,17 +10,17 @@ borrowing checks to runtime. You can see examples on how to use innerTaskManager.

Fields

num_app: usize

total number of tasks

inner: UPSafeCell<TaskManagerInner>

use inner value to get mutable access

-

Implementations

Run the first task in task list.

+

Implementations

Run the first task in task list.

Generally, the first task in task list is an idle task (we call it zero process later). But in ch4, we load apps statically, so the first task is a real app.

-

Change the status of current Running task into Ready.

-

Change the status of current Running task into Exited.

-

Find next task to run and return task id.

+

Change the status of current Running task into Ready.

+

Change the status of current Running task into Exited.

+

Find next task to run and return task id.

In this case, we only return the first Ready task in task list.

-

Get the current ‘Running’ task’s token.

-

Get the current ‘Running’ task’s trap contexts.

-

Change the current ‘Running’ task’s program break

-

Switch current Running task to the task we have found, +

Get the current ‘Running’ task’s token.

+

Get the current ‘Running’ task’s trap contexts.

+

Change the current ‘Running’ task’s program break

+

Switch current Running task to the task we have found, or there is no Ready task and we can exit with all applications completed

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

diff --git a/ch4/os/task/struct.TaskManagerInner.html b/ch4/os/task/struct.TaskManagerInner.html index cda2bf2b..0756da4b 100644 --- a/ch4/os/task/struct.TaskManagerInner.html +++ b/ch4/os/task/struct.TaskManagerInner.html @@ -1,4 +1,4 @@ -TaskManagerInner in os::task - Rust
struct TaskManagerInner {
+TaskManagerInner in os::task - Rust
struct TaskManagerInner {
     tasks: Vec<TaskControlBlock>,
     current_task: usize,
 }
Expand description

The task manager inner in ‘UPSafeCell’

diff --git a/ch4/search-index.js b/ch4/search-index.js index 463f3a50..52776c6a 100644 --- a/ch4/search-index.js +++ b/ch4/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"os":{"doc":"The main module and entrypoint","t":[0,5,0,0,0,0,0,14,14,5,0,0,0,0,0,0,17,17,17,17,17,17,8,17,3,17,12,11,11,10,11,5,10,11,10,11,11,11,11,11,11,11,2,17,17,17,2,17,17,17,17,17,5,3,11,11,11,11,5,11,11,11,11,5,5,5,2,2,2,2,2,2,2,2,2,2,0,2,0,0,5,0,0,2,2,12,12,12,12,17,17,3,3,3,3,8,17,6,17,3,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,8,6,3,3,12,10,11,11,11,11,11,11,11,12,10,11,11,11,12,11,5,5,5,11,11,11,11,5,11,11,11,10,11,11,12,12,11,11,11,11,11,11,11,11,11,7,7,5,5,5,13,13,3,3,3,4,3,18,18,18,18,12,11,11,11,11,12,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,5,5,5,11,11,11,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,12,11,11,11,11,11,12,11,11,5,11,5,5,11,11,11,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,18,18,18,3,3,3,18,18,18,18,18,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,5,11,11,11,11,11,11,11,11,11,11,11,11,17,17,5,5,5,5,2,0,3,11,11,11,11,12,11,11,11,11,11,17,17,17,17,17,0,0,5,17,5,5,5,5,5,3,3,3,3,12,11,11,11,11,11,11,11,5,0,12,5,5,11,5,11,11,11,11,11,11,12,11,11,11,5,11,5,11,12,12,5,11,5,11,12,12,5,0,0,12,11,11,11,11,11,11,11,11,11,3,11,11,11,11,11,12,12,12,11,11,11,11,5,13,13,13,3,4,12,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,12,11,12,12,12,11,12,11,11,11,11,11,11,17,17,5,5,5,3,0,5,5,12,12,12,5,5,12,5,5,12,5,12,3,11,11,11,11,11,12,12,12,11,12,12,11,11,11,12],"n":["board","clear_bss","config","console","lang_items","loader","mm","print","println","rust_main","sbi","sync","syscall","task","timer","trap","CLOCK_FREQ","EXIT_FAILURE","EXIT_FAILURE_FLAG","EXIT_RESET","EXIT_SUCCESS","MMIO","QEMUExit","QEMU_EXIT_HANDLE","RISCV64","VIRT_TEST","addr","borrow","borrow_mut","exit","exit","exit_code_encode","exit_failure","exit_failure","exit_success","exit_success","from","into","new","try_from","try_into","type_id","CLOCK_FREQ","KERNEL_HEAP_SIZE","KERNEL_STACK_SIZE","MEMORY_END","MMIO","PAGE_SIZE","PAGE_SIZE_BITS","TRAMPOLINE","TRAP_CONTEXT","USER_STACK_SIZE","kernel_stack_position","Stdout","borrow","borrow_mut","from","into","print","try_from","try_into","type_id","write_str","panic","get_app_data","get_num_app","FrameTracker","KERNEL_SPACE","KERNEL_SPACE","MapPermission","MemorySet","PageTableEntry","PhysAddr","PhysPageNum","VirtAddr","VirtPageNum","address","frame_alloc","frame_allocator","heap_allocator","init","memory_set","page_table","remap_test","translated_byte_buffer","0","0","0","0","PA_WIDTH_SV39","PPN_WIDTH_SV39","PhysAddr","PhysPageNum","SimpleRange","SimpleRangeIterator","StepByOne","VA_WIDTH_SV39","VPNRange","VPN_WIDTH_SV39","VirtAddr","VirtPageNum","aligned","aligned","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","ceil","ceil","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","current","end","eq","eq","eq","eq","floor","floor","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","get_bytes_array","get_end","get_mut","get_pte_array","get_start","indexes","into","into","into","into","into","into","into_iter","into_iter","l","ne","ne","ne","ne","new","new","next","page_offset","page_offset","partial_cmp","partial_cmp","partial_cmp","partial_cmp","r","step","step","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","FRAME_ALLOCATOR","FrameAllocator","FrameAllocatorImpl","FrameTracker","StackFrameAllocator","__private_field","alloc","alloc","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","current","dealloc","dealloc","deref","drop","end","fmt","frame_alloc","frame_allocator_test","frame_dealloc","from","from","from","init","init_frame_allocator","into","into","into","new","new","new","ppn","recycled","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","HEAP_ALLOCATOR","HEAP_SPACE","handle_alloc_error","heap_test","init_heap","Framed","Identical","KERNEL_SPACE","MapArea","MapPermission","MapType","MemorySet","R","U","W","X","__private_field","activate","all","append_to","append_to","areas","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","copy_data","data_frames","deref","difference","ebss","edata","ekernel","empty","eq","eq","erodata","etext","extend","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_elf","from_iter","hash","insert","insert_framed_area","intersection","intersects","into","into","into","into","into","is_all","is_empty","map","map_one","map_perm","map_trampoline","map_type","ne","new","new_bare","new_kernel","not","page_table","partial_cmp","push","remap_test","remove","sbss_with_stack","sdata","set","shrink_to","shrink_to","srodata","stext","strampoline","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union","unmap","unmap_one","vpn_range","A","D","G","PTEFlags","PageTable","PageTableEntry","R","U","V","W","X","all","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","difference","empty","empty","eq","executable","extend","find_pte","find_pte_create","flags","fmt","fmt","fmt","fmt","fmt","frames","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_iter","from_token","hash","insert","intersection","intersects","into","into","into","is_all","is_empty","is_valid","map","ne","new","new","not","partial_cmp","ppn","readable","remove","root_ppn","set","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","translated_byte_buffer","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","union","unmap","writable","SBI_CONSOLE_PUTCHAR","SBI_SET_TIMER","console_putchar","sbi_call","set_timer","shutdown","UPSafeCell","up","UPSafeCell","borrow","borrow_mut","exclusive_access","from","inner","into","new","try_from","try_into","type_id","SYSCALL_EXIT","SYSCALL_GET_TIME","SYSCALL_SBRK","SYSCALL_WRITE","SYSCALL_YIELD","fs","process","syscall","FD_STDOUT","sys_write","sys_exit","sys_get_time","sys_sbrk","sys_yield","TASK_MANAGER","TaskContext","TaskManager","TaskManagerInner","__private_field","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","change_current_program_brk","change_program_brk","context","current_task","current_trap_cx","current_user_token","deref","exit_current_and_run_next","find_next_task","from","from","from","get_current_token","get_current_trap_cx","inner","into","into","into","mark_current_exited","mark_current_exited","mark_current_suspended","mark_current_suspended","num_app","ra","run_first_task","run_first_task","run_next_task","run_next_task","s","sp","suspend_current_and_run_next","switch","task","tasks","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","TaskContext","borrow","borrow_mut","from","goto_trap_return","into","ra","s","sp","try_from","try_into","type_id","zero_init","__switch","Exited","Ready","Running","TaskControlBlock","TaskStatus","base_size","borrow","borrow","borrow_mut","borrow_mut","change_program_brk","clone","clone_into","eq","from","from","get_trap_cx","get_user_token","heap_bottom","into","into","memory_set","new","program_brk","task_cx","task_status","to_owned","trap_cx_ppn","try_from","try_from","try_into","try_into","type_id","type_id","MSEC_PER_SEC","TICKS_PER_SEC","get_time","get_time_ms","set_next_trigger","TrapContext","context","enable_timer_interrupt","init","kernel_satp","kernel_sp","sepc","set_kernel_trap_entry","set_user_trap_entry","sstatus","trap_from_kernel","trap_handler","trap_handler","trap_return","x","TrapContext","app_init_context","borrow","borrow_mut","from","into","kernel_satp","kernel_sp","sepc","set_sp","sstatus","trap_handler","try_from","try_into","type_id","x"],"q":["os","","","","","","","","","","","","","","","","os::board","","","","","","","","","","","","","","","","","","","","","","","","","","os::config","","","","","","","","","","","os::console","","","","","","","","","","os::lang_items","os::loader","","os::mm","","","","","","","","","","","","","","","","","","","os::mm::address","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::frame_allocator","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::heap_allocator","","","","","os::mm::memory_set","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::page_table","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::sbi","","","","","","os::sync","","os::sync::up","","","","","","","","","","","os::syscall","","","","","","","","os::syscall::fs","","os::syscall::process","","","","os::task","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::task::context","","","","","","","","","","","","","os::task::switch","os::task::task","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::timer","","","","","os::trap","","","","","","","","","","","","","","","os::trap::context","","","","","","","","","","","","","","",""],"d":["Constants used in rCore for qemu","clear BSS segment","Constants used in rCore","SBI console driver, for text output","The panic handler","Loading user applications into memory","Memory management implementation","print string macro","println string macro","the rust entry-point of os","SBI call wrappers","Synchronization and interior mutability primitives","Implementation of syscalls","Task management implementation","RISC-V timer-related functionality","Trap handling functionality","","","","","","","","","RISCV64 configuration","","Address of the sifive_test mapped device.","","","Exit with specified return code.","Exit qemu with specified exit code.","Encode the exit code using EXIT_FAILURE_FLAG.","Exit QEMU using EXIT_FAILURE, aka 1.","","Exit QEMU using EXIT_SUCCESS, aka 0, if possible.","","Returns the argument unchanged.","Calls U::from(self).","Create an instance.","","","","","","","","","","","","","","Return (bottom, top) of a kernel stack in kernel space.","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","panic handler","get applications data","Get the total number of applications.","","","","","","","","","","","Implementation of physical and virtual address and page …","","Implementation of FrameAllocator which controls all the …","The global allocator","initiate heap allocator, frame allocator and kernel space","Implementation of MapArea and MemorySet.","Implementation of PageTableEntry and PageTable.","","","","","","","physical address","","Definitions","physical page number","a simple range structure for type T","iterator for the simple range structure","","","a simple range structure for virtual page number","","virtual address","virtual page number","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","frame allocator instance through lazy_static!","","","manage a frame which has the same lifecycle as the tracker","an implementation for frame allocator","","","","","","","","","","","","","","","","","allocate a frame","a simple test for frame allocator","deallocate a frame","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","initiate the frame allocator using ekernel and MEMORY_END","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","heap allocator instance","heap space ([u8; KERNEL_HEAP_SIZE])","panic when heap allocation error occurs","","initiate heap allocator","","","a memory set instance through lazy_static! managing kernel …","map area structure, controls a contiguous piece of virtual …","map permission corresponding to that in pte: R W X U","map type for memory set: identical or framed","memory set structure, controls virtual-memory space","","","","","","","Returns the set containing all flags.","","","","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","data: start-aligned but maybe with shorter length assume …","","","Returns the difference between the flags in self and other.","","","","Returns an empty set of flags.","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","Include sections in elf and trampoline and TrapContext and …","","","Inserts the specified flags in-place.","Assume that no conflicts.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","","","","Mention that trampoline is not collected by areas.","","","","","Without kernel stacks.","Returns the complement of this set of flags.","","","","","Removes the specified flags in-place.","","","Inserts or removes the specified flags depending on the …","","","","","","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","","","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","","","","","","","page table entry flags","page table structure","page table entry structure","","","","","","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","","Temporarily used to get arguments from user space.","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","","","","","","Returns the complement of this set of flags.","","","","Removes the specified flags in-place.","","Inserts or removes the specified flags depending on the …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","","","translate a pointer to a mutable u8 Vec through page table","","","","","","","","","","Returns the union of between the flags in self and other.","","","","","use sbi call to putchar in console (qemu uart handler)","general sbi call","use sbi call to set timer","use sbi call to shutdown the kernel","","Uniprocessor interior mutability primitives","Wrap a static data structure inside it so that we are able …","","","Exclusive access inner data in UPSafeCell. Panic if the …","Returns the argument unchanged.","inner data","Calls U::from(self).","User is responsible to guarantee that inner struct is only …","","","","","","","","","File and filesystem-related syscalls","Process management syscalls","handle syscall exception with syscall_id and other …","","write buf of length len to a file with fd","task exits and submit an exit code","get current time","change data segment size","current task gives up resources for other tasks","a TaskManager global instance through lazy_static!","task context structure containing some registers","The task manager, where all the tasks are managed.","The task manager inner in ‘UPSafeCell’","","","","","","","","Change the current ‘Running’ task’s program break","Change the current ‘Running’ task’s program break","Implementation of TaskContext","id of current Running task","Get the current ‘Running’ task’s trap contexts.","Get the current ‘Running’ task’s token.","","Exit the current ‘Running’ task and run the next task …","Find next task to run and return task id.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Get the current ‘Running’ task’s token.","Get the current ‘Running’ task’s trap contexts.","use inner value to get mutable access","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Change the status of current Running task into Exited.","Change the status of current Running task into Exited.","Change the status of current Running task into Ready.","Change the status of current Running task into Ready.","total number of tasks","return address ( e.g. __restore ) of __switch ASM function","Run the first task in task list.","Run the first task in task list.","Switch current Running task to the task we have found, or …","Switch current Running task to the task we have found, or …","callee saved registers: s 0..11","kernel stack pointer of app","Suspend the current ‘Running’ task and run the next …","Rust wrapper around __switch.","Types related to task management","task list","","","","","","","","","","task context structure containing some registers","","","Returns the argument unchanged.","set Task Context{__restore ASM funciton: trap_return, sp: …","Calls U::from(self).","return address ( e.g. __restore ) of __switch ASM function","callee saved registers: s 0..11","kernel stack pointer of app","","","","init task context","Switch to the context of next_task_cx_ptr, saving the …","","","","task control block structure","task status: UnInit, Ready, Running, Exited","","","","","","change the location of the program break. return None if …","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","get current time in microseconds","set the next timer interrupt","trap context structure containing sstatus, sepc and …","Implementation of TrapContext","enable timer interrupt in sie CSR","initialize CSR stvec as the entry of __alltraps","Addr of Page Table","kernel stack","CSR sepc","","","CSR sstatus ","Unimplement: traps/interrupts/exceptions from kernel mode …","handle an interrupt, exception, or system call from user …","Addr of trap_handler function","set the new addr of __restore asm function in TRAMPOLINE …","general regs[0..31]","trap context structure containing sstatus, sepc and …","init app context","","","Returns the argument unchanged.","Calls U::from(self).","Addr of Page Table","kernel stack","CSR sepc","set stack pointer to x_2 reg (sp)","CSR sstatus ","Addr of trap_handler function","","","","general regs[0..31]"],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,50,3,0,50,3,50,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,15,16,17,0,0,0,0,0,0,0,0,0,0,0,0,13,15,22,13,15,16,17,19,22,13,15,16,17,19,13,15,13,15,16,17,19,13,15,16,17,19,13,15,16,17,22,22,13,15,16,17,13,15,13,15,16,17,22,13,13,13,15,15,15,16,16,16,17,17,17,19,16,19,16,16,19,17,22,13,15,16,17,19,22,19,19,13,15,16,17,22,19,22,13,15,13,15,16,17,19,51,17,13,15,16,17,19,22,13,15,16,17,19,22,13,15,16,17,19,22,13,15,16,17,19,0,0,0,0,0,25,52,24,27,24,25,27,24,25,24,52,24,25,27,24,27,0,0,0,27,24,25,24,0,27,24,25,52,27,24,27,24,27,24,25,27,24,25,27,24,25,0,0,0,0,0,34,34,0,0,0,0,0,30,30,30,30,35,29,30,29,31,29,30,30,30,30,30,30,30,30,29,31,35,34,30,29,31,35,34,30,34,30,34,30,30,30,30,31,31,35,30,0,0,0,30,34,30,0,0,30,34,30,30,30,30,30,29,31,35,34,30,30,30,30,29,30,30,30,29,30,30,29,31,35,34,30,30,30,31,31,31,29,31,30,31,29,29,30,29,30,29,0,30,0,0,30,29,31,0,0,0,30,30,30,34,30,30,29,29,29,31,35,34,30,29,31,35,34,30,29,31,35,34,30,30,31,31,31,39,39,39,0,0,0,39,39,39,39,39,39,39,39,39,39,39,39,38,39,39,32,39,38,32,39,38,39,38,39,38,39,39,39,39,39,38,39,38,39,32,32,38,39,39,39,39,39,32,32,39,38,39,39,39,39,32,39,39,39,39,32,39,38,39,39,38,32,39,32,38,39,39,38,38,39,32,39,39,39,39,39,38,39,32,32,0,32,39,38,32,39,38,32,39,38,39,32,38,0,0,0,0,0,0,0,0,0,26,26,26,26,26,26,26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,44,53,46,44,53,46,44,0,0,53,0,0,46,0,44,44,53,46,44,44,44,44,53,46,0,44,0,44,44,47,0,44,0,44,47,47,0,0,0,53,44,53,46,44,53,46,44,53,46,0,47,47,47,47,47,47,47,47,47,47,47,47,0,49,49,49,0,0,48,48,49,48,49,48,49,49,49,48,49,48,48,48,48,49,48,48,48,48,48,49,48,48,49,48,49,48,49,0,0,0,0,0,0,0,0,0,45,45,45,0,0,45,0,0,45,0,45,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45],"f":[0,[[]],0,0,0,0,0,0,0,[[],1],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[2,1],[[3,2],1],[2,2],[[],1],[3,1],[[],1],[3,1],[[]],[[]],[4,3],[[],5],[[],5],[[],6],0,0,0,0,0,0,0,0,0,0,[7],0,[[]],[[]],[[]],[[]],[8],[[],5],[[],5],[[],6],[[9,10],11],[12,1],[7],[[],7],0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[13,14],[15,14],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[13,16],[15,17],[13,13],[15,15],[16,16],[17,17],[[[19,[18]]],[[19,[18]]]],[[]],[[]],[[]],[[]],[[]],[[13,13],20],[[15,15],20],[[16,16],20],[[17,17],20],0,0,[[13,13],14],[[15,15],14],[[16,16],14],[[17,17],14],[13,16],[15,17],[[13,21],11],[[15,21],11],[[16,21],11],[[17,21],11],[[]],[16,13],[7,13],[[]],[17,15],[7,15],[[]],[[]],[13,16],[7,16],[7,17],[15,17],[[]],[[]],[16],[19],[16],[16],[19],[17],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[19],0,[[13,13],14],[[15,15],14],[[16,16],14],[[17,17],14],[[],22],[[],19],[22,23],[13,7],[15,7],[[13,13],[[23,[20]]]],[[15,15],[[23,[20]]]],[[16,16],[[23,[20]]]],[[17,17],[[23,[20]]]],0,[[]],[17],[[]],[[]],[[]],[[]],[[]],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],[[],6],[[],6],[[],6],0,0,0,0,0,0,[[],[[23,[16]]]],[24,[[23,[16]]]],[[]],[[]],[[]],[[]],[[]],[[]],0,[16],[[24,16]],[25,26],[27],0,[[27,21],11],[[],[[23,[27]]]],[[]],[16],[[]],[[]],[[]],[[24,16,16]],[[]],[[]],[[]],[[]],[[]],[16,27],[[],24],0,0,[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],0,0,[28,1],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,[29],[[],30],[[29,15,15],14],[[31,32,17]],0,[[30,30],30],[[30,30]],[[30,30],30],[[30,30]],[30,33],0,[[30,30],30],[[30,30]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[34,34],[30,30],[[]],[[]],[[30,30],20],[30,30],[[30,30],14],[[31,32]],0,[35,36],[[30,30],30],0,0,0,[[],30],[[34,34],14],[[30,30],14],0,0,[[30,37]],[[34,21],11],[[30,21],11],[[30,21],11],[[30,21],11],[[30,21],11],[[30,21],11],[[]],[[]],[[]],[[]],[[]],[33,[[23,[30]]]],[33,30],[33,30],[[]],[37,30],[30],[[30,30]],[[29,15,15,30]],[[30,30],30],[[30,30],14],[[]],[[]],[[]],[[]],[[]],[30,14],[30,14],[[31,32]],[[31,32,17]],0,[29],0,[[30,30],14],[[15,15,34,30],31],[[],29],[[],29],[30,30],0,[[30,30],[[23,[20]]]],[[29,31,23]],[[]],[[30,30]],0,0,[[30,30,14]],[[29,15,15],14],[[31,32,17]],0,0,0,[[30,30],30],[[30,30]],[[30,30],30],[[]],[[]],[[30,30]],[29,7],[[29,17],[[23,[38]]]],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],[[],6],[[],6],[[30,30],30],[[31,32]],[[31,32,17]],0,0,0,0,0,0,0,0,0,0,0,0,[[],39],[[39,39],39],[[39,39]],[[39,39],39],[[39,39]],[39,33],0,0,[[39,39],39],[[39,39]],[[]],[[]],[[]],[[]],[[]],[[]],[39,39],[38,38],[[]],[[]],[[39,39],20],[39,39],[[39,39],14],[[39,39],39],[[],39],[[],38],[[39,39],14],[38,14],[[39,37]],[[32,17],[[23,[38]]]],[[32,17],[[23,[38]]]],[38,39],[[39,21],11],[[39,21],11],[[39,21],11],[[39,21],11],[[39,21],11],0,[[]],[[]],[[]],[33,[[23,[39]]]],[33,39],[33,39],[37,39],[7,32],[39],[[39,39]],[[39,39],39],[[39,39],14],[[]],[[]],[[]],[39,14],[39,14],[38,14],[[32,17,16,39]],[[39,39],14],[[],32],[[16,39],38],[39,39],[[39,39],[[23,[20]]]],[38,16],[38,14],[[39,39]],0,[[39,39,14]],[[39,39],39],[[39,39]],[[39,39],39],[[]],[[]],[[39,39]],[32,7],[[32,17],[[23,[38]]]],[[7,33,7],40],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],[[39,39],39],[[32,17]],[38,14],0,0,[7],[[7,7,7,7],7],[7],[[],1],0,0,0,[[]],[[]],[26,41],[[]],0,[[]],[[],26],[[],5],[[],5],[[],6],0,0,0,0,0,0,0,[7,42],0,[[7,33,7],42],[43,1],[[],42],[43,42],[[],42],0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[44,43],[[23,[7]]]],[43,[[23,[7]]]],0,0,[[],45],[[],7],[46,44],[[]],[44,[[23,[7]]]],[[]],[[]],[[]],[44,7],[44,45],0,[[]],[[]],[[]],[[]],[44],[[]],[44],0,0,[[]],[44,1],[[]],[44],0,0,[[]],0,0,0,[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],[[],6],0,[[]],[[]],[[]],[7,47],[[]],0,0,0,[[],5],[[],5],[[],6],[[],47],0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[48,43],[[23,[7]]]],[49,49],[[]],[[49,49],14],[[]],[[]],[48,45],[48,7],0,[[]],[[]],0,[7,48],0,0,0,[[]],0,[[],5],[[],5],[[],5],[[],5],[[],6],[[],6],0,0,[[],7],[[],7],[[]],0,0,[[]],[[]],0,0,0,[[]],[[]],0,[[],1],[[],1],0,[[],1],0,0,[[7,7,7,7,7],45],[[]],[[]],[[]],[[]],0,0,0,[[45,7]],0,0,[[],5],[[],5],[[],6],0],"p":[[15,"never"],[15,"u32"],[3,"RISCV64"],[15,"u64"],[4,"Result"],[3,"TypeId"],[15,"usize"],[3,"Arguments"],[3,"Stdout"],[15,"str"],[6,"Result"],[3,"PanicInfo"],[3,"PhysAddr"],[15,"bool"],[3,"VirtAddr"],[3,"PhysPageNum"],[3,"VirtPageNum"],[8,"Clone"],[3,"SimpleRange"],[4,"Ordering"],[3,"Formatter"],[3,"SimpleRangeIterator"],[4,"Option"],[3,"StackFrameAllocator"],[3,"FRAME_ALLOCATOR"],[3,"UPSafeCell"],[3,"FrameTracker"],[3,"Layout"],[3,"MemorySet"],[3,"MapPermission"],[3,"MapArea"],[3,"PageTable"],[15,"u8"],[4,"MapType"],[3,"KERNEL_SPACE"],[3,"Arc"],[8,"IntoIterator"],[3,"PageTableEntry"],[3,"PTEFlags"],[3,"Vec"],[3,"RefMut"],[15,"isize"],[15,"i32"],[3,"TaskManager"],[3,"TrapContext"],[3,"TASK_MANAGER"],[3,"TaskContext"],[3,"TaskControlBlock"],[4,"TaskStatus"],[8,"QEMUExit"],[8,"StepByOne"],[8,"FrameAllocator"],[3,"TaskManagerInner"]]}\ +"os":{"doc":"The main module and entrypoint","t":[0,5,0,0,0,0,0,14,14,5,0,0,0,0,0,0,17,17,2,17,17,17,2,17,17,17,17,17,5,3,11,11,11,11,5,11,11,11,11,5,5,5,2,2,2,2,2,2,2,2,2,2,0,2,0,0,5,0,0,2,2,12,12,12,12,17,17,3,3,3,3,8,17,6,17,3,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,12,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,8,6,3,3,12,10,11,11,11,11,11,11,11,12,10,11,11,11,12,11,5,5,5,11,11,11,11,5,11,11,11,10,11,11,12,12,11,11,11,11,11,11,11,11,11,7,7,5,5,5,13,13,3,3,3,4,3,18,18,18,18,12,11,11,11,11,12,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,5,5,5,11,11,11,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,12,11,11,11,11,11,12,11,11,5,11,5,5,11,11,11,5,5,5,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,18,18,18,3,3,3,18,18,18,18,18,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11,11,5,11,11,11,11,11,11,11,11,11,11,11,11,5,5,5,2,0,3,11,11,11,11,12,11,11,11,11,11,17,17,17,17,17,0,0,5,17,5,5,5,5,5,3,3,3,3,12,11,11,11,11,11,11,11,5,0,12,5,5,11,5,11,11,11,11,11,11,12,11,11,11,5,11,5,11,12,12,5,11,5,11,12,12,5,0,0,12,11,11,11,11,11,11,11,11,11,3,11,11,11,11,11,12,12,12,11,11,11,11,5,13,13,13,3,4,12,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,12,11,12,12,12,11,12,11,11,11,11,11,11,17,17,5,5,5,3,0,5,5,12,12,12,5,5,12,5,5,12,5,12,3,11,11,11,11,11,12,12,12,11,12,12,11,11,11,12],"n":["board","clear_bss","config","console","lang_items","loader","mm","print","println","rust_main","sbi","sync","syscall","task","timer","trap","CLOCK_FREQ","MMIO","CLOCK_FREQ","KERNEL_HEAP_SIZE","KERNEL_STACK_SIZE","MEMORY_END","MMIO","PAGE_SIZE","PAGE_SIZE_BITS","TRAMPOLINE","TRAP_CONTEXT","USER_STACK_SIZE","kernel_stack_position","Stdout","borrow","borrow_mut","from","into","print","try_from","try_into","type_id","write_str","panic","get_app_data","get_num_app","FrameTracker","KERNEL_SPACE","KERNEL_SPACE","MapPermission","MemorySet","PageTableEntry","PhysAddr","PhysPageNum","VirtAddr","VirtPageNum","address","frame_alloc","frame_allocator","heap_allocator","init","memory_set","page_table","remap_test","translated_byte_buffer","0","0","0","0","PA_WIDTH_SV39","PPN_WIDTH_SV39","PhysAddr","PhysPageNum","SimpleRange","SimpleRangeIterator","StepByOne","VA_WIDTH_SV39","VPNRange","VPN_WIDTH_SV39","VirtAddr","VirtPageNum","aligned","aligned","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","ceil","ceil","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","cmp","cmp","cmp","current","end","eq","eq","eq","eq","floor","floor","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","get_bytes_array","get_end","get_mut","get_pte_array","get_start","indexes","into","into","into","into","into","into","into_iter","into_iter","l","ne","ne","ne","ne","new","new","next","page_offset","page_offset","partial_cmp","partial_cmp","partial_cmp","partial_cmp","r","step","step","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","FRAME_ALLOCATOR","FrameAllocator","FrameAllocatorImpl","FrameTracker","StackFrameAllocator","__private_field","alloc","alloc","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","current","dealloc","dealloc","deref","drop","end","fmt","frame_alloc","frame_allocator_test","frame_dealloc","from","from","from","init","init_frame_allocator","into","into","into","new","new","new","ppn","recycled","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","HEAP_ALLOCATOR","HEAP_SPACE","handle_alloc_error","heap_test","init_heap","Framed","Identical","KERNEL_SPACE","MapArea","MapPermission","MapType","MemorySet","R","U","W","X","__private_field","activate","all","append_to","append_to","areas","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","copy_data","data_frames","deref","difference","ebss","edata","ekernel","empty","eq","eq","erodata","etext","extend","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_elf","from_iter","hash","insert","insert_framed_area","intersection","intersects","into","into","into","into","into","is_all","is_empty","map","map_one","map_perm","map_trampoline","map_type","ne","new","new_bare","new_kernel","not","page_table","partial_cmp","push","remap_test","remove","sbss_with_stack","sdata","set","shrink_to","shrink_to","srodata","stext","strampoline","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","union","unmap","unmap_one","vpn_range","A","D","G","PTEFlags","PageTable","PageTableEntry","R","U","V","W","X","all","bitand","bitand_assign","bitor","bitor_assign","bits","bits","bits","bitxor","bitxor_assign","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","complement","contains","difference","empty","empty","eq","executable","extend","find_pte","find_pte_create","flags","fmt","fmt","fmt","fmt","fmt","frames","from","from","from","from_bits","from_bits_truncate","from_bits_unchecked","from_iter","from_token","hash","insert","intersection","intersects","into","into","into","is_all","is_empty","is_valid","map","ne","new","new","not","partial_cmp","ppn","readable","remove","root_ppn","set","sub","sub_assign","symmetric_difference","to_owned","to_owned","toggle","token","translate","translated_byte_buffer","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","union","unmap","writable","console_putchar","set_timer","shutdown","UPSafeCell","up","UPSafeCell","borrow","borrow_mut","exclusive_access","from","inner","into","new","try_from","try_into","type_id","SYSCALL_EXIT","SYSCALL_GET_TIME","SYSCALL_SBRK","SYSCALL_WRITE","SYSCALL_YIELD","fs","process","syscall","FD_STDOUT","sys_write","sys_exit","sys_get_time","sys_sbrk","sys_yield","TASK_MANAGER","TaskContext","TaskManager","TaskManagerInner","__private_field","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","change_current_program_brk","change_program_brk","context","current_task","current_trap_cx","current_user_token","deref","exit_current_and_run_next","find_next_task","from","from","from","get_current_token","get_current_trap_cx","inner","into","into","into","mark_current_exited","mark_current_exited","mark_current_suspended","mark_current_suspended","num_app","ra","run_first_task","run_first_task","run_next_task","run_next_task","s","sp","suspend_current_and_run_next","switch","task","tasks","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","TaskContext","borrow","borrow_mut","from","goto_trap_return","into","ra","s","sp","try_from","try_into","type_id","zero_init","__switch","Exited","Ready","Running","TaskControlBlock","TaskStatus","base_size","borrow","borrow","borrow_mut","borrow_mut","change_program_brk","clone","clone_into","eq","from","from","get_trap_cx","get_user_token","heap_bottom","into","into","memory_set","new","program_brk","task_cx","task_status","to_owned","trap_cx_ppn","try_from","try_from","try_into","try_into","type_id","type_id","MSEC_PER_SEC","TICKS_PER_SEC","get_time","get_time_ms","set_next_trigger","TrapContext","context","enable_timer_interrupt","init","kernel_satp","kernel_sp","sepc","set_kernel_trap_entry","set_user_trap_entry","sstatus","trap_from_kernel","trap_handler","trap_handler","trap_return","x","TrapContext","app_init_context","borrow","borrow_mut","from","into","kernel_satp","kernel_sp","sepc","set_sp","sstatus","trap_handler","try_from","try_into","type_id","x"],"q":["os","","","","","","","","","","","","","","","","os::board","","os::config","","","","","","","","","","","os::console","","","","","","","","","","os::lang_items","os::loader","","os::mm","","","","","","","","","","","","","","","","","","","os::mm::address","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::frame_allocator","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::heap_allocator","","","","","os::mm::memory_set","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::mm::page_table","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::sbi","","","os::sync","","os::sync::up","","","","","","","","","","","os::syscall","","","","","","","","os::syscall::fs","","os::syscall::process","","","","os::task","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::task::context","","","","","","","","","","","","","os::task::switch","os::task::task","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","os::timer","","","","","os::trap","","","","","","","","","","","","","","","os::trap::context","","","","","","","","","","","","","","",""],"d":["Constants used in rCore for qemu","clear BSS segment","Constants used in rCore","SBI console driver, for text output","The panic handler","Loading user applications into memory","Memory management implementation","print string macro","println string macro","the rust entry-point of os","SBI call wrappers","Synchronization and interior mutability primitives","Implementation of syscalls","Task management implementation","RISC-V timer-related functionality","Trap handling functionality","","","","","","","","","","","","","Return (bottom, top) of a kernel stack in kernel space.","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","panic handler","get applications data","Get the total number of applications.","","","","","","","","","","","Implementation of physical and virtual address and page …","","Implementation of FrameAllocator which controls all the …","The global allocator","initiate heap allocator, frame allocator and kernel space","Implementation of MapArea and MemorySet.","Implementation of PageTableEntry and PageTable.","","","","","","","physical address","","Definitions","physical page number","a simple range structure for type T","iterator for the simple range structure","","","a simple range structure for virtual page number","","virtual address","virtual page number","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","frame allocator instance through lazy_static!","","","manage a frame which has the same lifecycle as the tracker","an implementation for frame allocator","","","","","","","","","","","","","","","","","allocate a frame","a simple test for frame allocator","deallocate a frame","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","initiate the frame allocator using ekernel and MEMORY_END","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","heap allocator instance","heap space ([u8; KERNEL_HEAP_SIZE])","panic when heap allocation error occurs","","initiate heap allocator","","","a memory set instance through lazy_static! managing kernel …","map area structure, controls a contiguous piece of virtual …","map permission corresponding to that in pte: R W X U","map type for memory set: identical or framed","memory set structure, controls virtual-memory space","","","","","","","Returns the set containing all flags.","","","","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","data: start-aligned but maybe with shorter length assume …","","","Returns the difference between the flags in self and other.","","","","Returns an empty set of flags.","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","Include sections in elf and trampoline and TrapContext and …","","","Inserts the specified flags in-place.","Assume that no conflicts.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","","","","Mention that trampoline is not collected by areas.","","","","","Without kernel stacks.","Returns the complement of this set of flags.","","","","","Removes the specified flags in-place.","","","Inserts or removes the specified flags depending on the …","","","","","","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","","","","","","","","","","","","","","","","","","Returns the union of between the flags in self and other.","","","","","","","page table entry flags","page table structure","page table entry structure","","","","","","Returns the set containing all flags.","Returns the intersection between the two sets of flags.","Disables all flags disabled in the set.","Returns the union of the two sets of flags.","Adds the set of flags.","Returns the raw value of the flags currently stored.","","","Returns the left flags, but with all the right flags …","Toggles the set of flags.","","","","","","","","","","","","Returns the complement of this set of flags.","Returns true if all of the flags in other are contained …","Returns the difference between the flags in self and other.","Returns an empty set of flags.","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Convert from underlying bit representation, unless that …","Convert from underlying bit representation, dropping any …","Convert from underlying bit representation, preserving all …","","Temporarily used to get arguments from user space.","","Inserts the specified flags in-place.","Returns the intersection between the flags in self and …","Returns true if there are flags common to both self and …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if all flags are currently set.","Returns true if no flags are currently stored.","","","","","","Returns the complement of this set of flags.","","","","Removes the specified flags in-place.","","Inserts or removes the specified flags depending on the …","Returns the set difference of the two sets of flags.","Disables all flags enabled in the set.","Returns the symmetric difference between the flags in self …","","","Toggles the specified flags in-place.","","","translate a pointer to a mutable u8 Vec through page table","","","","","","","","","","Returns the union of between the flags in self and other.","","","use sbi call to putchar in console (qemu uart handler)","use sbi call to set timer","use sbi call to shutdown the kernel","","Uniprocessor interior mutability primitives","Wrap a static data structure inside it so that we are able …","","","Exclusive access inner data in UPSafeCell. Panic if the …","Returns the argument unchanged.","inner data","Calls U::from(self).","User is responsible to guarantee that inner struct is only …","","","","","","","","","File and filesystem-related syscalls","Process management syscalls","handle syscall exception with syscall_id and other …","","write buf of length len to a file with fd","task exits and submit an exit code","get current time","change data segment size","current task gives up resources for other tasks","a TaskManager global instance through lazy_static!","task context structure containing some registers","The task manager, where all the tasks are managed.","The task manager inner in ‘UPSafeCell’","","","","","","","","Change the current ‘Running’ task’s program break","Change the current ‘Running’ task’s program break","Implementation of TaskContext","id of current Running task","Get the current ‘Running’ task’s trap contexts.","Get the current ‘Running’ task’s token.","","Exit the current ‘Running’ task and run the next task …","Find next task to run and return task id.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Get the current ‘Running’ task’s token.","Get the current ‘Running’ task’s trap contexts.","use inner value to get mutable access","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Change the status of current Running task into Exited.","Change the status of current Running task into Exited.","Change the status of current Running task into Ready.","Change the status of current Running task into Ready.","total number of tasks","return address ( e.g. __restore ) of __switch ASM function","Run the first task in task list.","Run the first task in task list.","Switch current Running task to the task we have found, or …","Switch current Running task to the task we have found, or …","callee saved registers: s 0..11","kernel stack pointer of app","Suspend the current ‘Running’ task and run the next …","Rust wrapper around __switch.","Types related to task management","task list","","","","","","","","","","task context structure containing some registers","","","Returns the argument unchanged.","set Task Context{__restore ASM funciton: trap_return, sp: …","Calls U::from(self).","return address ( e.g. __restore ) of __switch ASM function","callee saved registers: s 0..11","kernel stack pointer of app","","","","init task context","Switch to the context of next_task_cx_ptr, saving the …","","","","task control block structure","task status: UnInit, Ready, Running, Exited","","","","","","change the location of the program break. return None if …","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","get current time in microseconds","set the next timer interrupt","trap context structure containing sstatus, sepc and …","Implementation of TrapContext","enable timer interrupt in sie CSR","initialize CSR stvec as the entry of __alltraps","Addr of Page Table","kernel stack","CSR sepc","","","CSR sstatus ","Unimplement: traps/interrupts/exceptions from kernel mode …","handle an interrupt, exception, or system call from user …","Addr of trap_handler function","set the new addr of __restore asm function in TRAMPOLINE …","general regs[0..31]","trap context structure containing sstatus, sepc and …","init app context","","","Returns the argument unchanged.","Calls U::from(self).","Addr of Page Table","kernel stack","CSR sepc","set stack pointer to x_2 reg (sp)","CSR sstatus ","Addr of trap_handler function","","","","general regs[0..31]"],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,12,13,14,0,0,0,0,0,0,0,0,0,0,0,0,10,12,19,10,12,13,14,16,19,10,12,13,14,16,10,12,10,12,13,14,16,10,12,13,14,16,10,12,13,14,19,19,10,12,13,14,10,12,10,12,13,14,19,10,10,10,12,12,12,13,13,13,14,14,14,16,13,16,13,13,16,14,19,10,12,13,14,16,19,16,16,10,12,13,14,19,16,19,10,12,10,12,13,14,16,47,14,10,12,13,14,16,19,10,12,13,14,16,19,10,12,13,14,16,19,10,12,13,14,16,0,0,0,0,0,22,48,21,24,21,22,24,21,22,21,48,21,22,24,21,24,0,0,0,24,21,22,21,0,24,21,22,48,24,21,24,21,24,21,22,24,21,22,24,21,22,0,0,0,0,0,31,31,0,0,0,0,0,27,27,27,27,32,26,27,26,28,26,27,27,27,27,27,27,27,27,26,28,32,31,27,26,28,32,31,27,31,27,31,27,27,27,27,28,28,32,27,0,0,0,27,31,27,0,0,27,31,27,27,27,27,27,26,28,32,31,27,27,27,27,26,27,27,27,26,27,27,26,28,32,31,27,27,27,28,28,28,26,28,27,28,26,26,27,26,27,26,0,27,0,0,27,26,28,0,0,0,27,27,27,31,27,27,26,26,26,28,32,31,27,26,28,32,31,27,26,28,32,31,27,27,28,28,28,36,36,36,0,0,0,36,36,36,36,36,36,36,36,36,36,36,36,35,36,36,29,36,35,29,36,35,36,35,36,35,36,36,36,36,36,35,36,35,36,29,29,35,36,36,36,36,36,29,29,36,35,36,36,36,36,29,36,36,36,36,29,36,35,36,36,35,29,36,29,35,36,36,35,35,36,29,36,36,36,36,36,35,36,29,29,0,29,36,35,29,36,35,29,36,35,36,29,35,0,0,0,0,0,0,23,23,23,23,23,23,23,23,23,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,41,49,43,41,49,43,41,0,0,49,0,0,43,0,41,41,49,43,41,41,41,41,49,43,0,41,0,41,41,44,0,41,0,41,44,44,0,0,0,49,41,49,43,41,49,43,41,49,43,0,44,44,44,44,44,44,44,44,44,44,44,44,0,46,46,46,0,0,45,45,46,45,46,45,46,46,46,45,46,45,45,45,45,46,45,45,45,45,45,46,45,45,46,45,46,45,46,0,0,0,0,0,0,0,0,0,42,42,42,0,0,42,0,0,42,0,42,0,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42],"f":[0,[[]],0,0,0,0,0,0,0,[[],1],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[2],0,[[]],[[]],[[]],[[]],[3],[[],4],[[],4],[[],5],[[6,7],8],[9,1],[2],[[],2],0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[10,11],[12,11],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[10,13],[12,14],[10,10],[12,12],[13,13],[14,14],[[[16,[15]]],[[16,[15]]]],[[]],[[]],[[]],[[]],[[]],[[10,10],17],[[12,12],17],[[13,13],17],[[14,14],17],0,0,[[10,10],11],[[12,12],11],[[13,13],11],[[14,14],11],[10,13],[12,14],[[10,18],8],[[12,18],8],[[13,18],8],[[14,18],8],[[]],[13,10],[2,10],[[]],[14,12],[2,12],[[]],[2,13],[10,13],[[]],[12,14],[[]],[2,14],[[]],[13],[16],[13],[13],[16],[14],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[16],0,[[10,10],11],[[12,12],11],[[13,13],11],[[14,14],11],[[],19],[[],16],[19,20],[10,2],[12,2],[[10,10],[[20,[17]]]],[[12,12],[[20,[17]]]],[[13,13],[[20,[17]]]],[[14,14],[[20,[17]]]],0,[[]],[14],[[]],[[]],[[]],[[]],[[]],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],5],[[],5],[[],5],[[],5],[[],5],[[],5],0,0,0,0,0,0,[[],[[20,[13]]]],[21,[[20,[13]]]],[[]],[[]],[[]],[[]],[[]],[[]],0,[13],[[21,13]],[22,23],[24],0,[[24,18],8],[[],[[20,[24]]]],[[]],[13],[[]],[[]],[[]],[[21,13,13]],[[]],[[]],[[]],[[]],[[]],[13,24],[[],21],0,0,[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],5],[[],5],[[],5],0,0,[25,1],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,0,[26],[[],27],[[26,12,12],11],[[28,29,14]],0,[[27,27],27],[[27,27]],[[27,27],27],[[27,27]],[27,30],0,[[27,27],27],[[27,27]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[31,31],[27,27],[[]],[[]],[[27,27],17],[27,27],[[27,27],11],[[28,29]],0,[32,33],[[27,27],27],0,0,0,[[],27],[[31,31],11],[[27,27],11],0,0,[[27,34]],[[31,18],8],[[27,18],8],[[27,18],8],[[27,18],8],[[27,18],8],[[27,18],8],[[]],[[]],[[]],[[]],[[]],[30,[[20,[27]]]],[30,27],[30,27],[[]],[34,27],[27],[[27,27]],[[26,12,12,27]],[[27,27],27],[[27,27],11],[[]],[[]],[[]],[[]],[[]],[27,11],[27,11],[[28,29]],[[28,29,14]],0,[26],0,[[27,27],11],[[12,12,31,27],28],[[],26],[[],26],[27,27],0,[[27,27],[[20,[17]]]],[[26,28,20]],[[]],[[27,27]],0,0,[[27,27,11]],[[26,12,12],11],[[28,29,14]],0,0,0,[[27,27],27],[[27,27]],[[27,27],27],[[]],[[]],[[27,27]],[26,2],[[26,14],[[20,[35]]]],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],5],[[],5],[[],5],[[],5],[[],5],[[27,27],27],[[28,29]],[[28,29,14]],0,0,0,0,0,0,0,0,0,0,0,0,[[],36],[[36,36],36],[[36,36]],[[36,36],36],[[36,36]],[36,30],0,0,[[36,36],36],[[36,36]],[[]],[[]],[[]],[[]],[[]],[[]],[36,36],[35,35],[[]],[[]],[[36,36],17],[36,36],[[36,36],11],[[36,36],36],[[],36],[[],35],[[36,36],11],[35,11],[[36,34]],[[29,14],[[20,[35]]]],[[29,14],[[20,[35]]]],[35,36],[[36,18],8],[[36,18],8],[[36,18],8],[[36,18],8],[[36,18],8],0,[[]],[[]],[[]],[30,[[20,[36]]]],[30,36],[30,36],[34,36],[2,29],[36],[[36,36]],[[36,36],36],[[36,36],11],[[]],[[]],[[]],[36,11],[36,11],[35,11],[[29,14,13,36]],[[36,36],11],[[],29],[[13,36],35],[36,36],[[36,36],[[20,[17]]]],[35,13],[35,11],[[36,36]],0,[[36,36,11]],[[36,36],36],[[36,36]],[[36,36],36],[[]],[[]],[[36,36]],[29,2],[[29,14],[[20,[35]]]],[[2,30,2],37],[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],5],[[],5],[[],5],[[36,36],36],[[29,14]],[35,11],[2],[2],[11,1],0,0,0,[[]],[[]],[23,38],[[]],0,[[]],[[],23],[[],4],[[],4],[[],5],0,0,0,0,0,0,0,[2,39],0,[[2,30,2],39],[40,1],[[],39],[40,39],[[],39],0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[41,40],[[20,[2]]]],[40,[[20,[2]]]],0,0,[[],42],[[],2],[43,41],[[]],[41,[[20,[2]]]],[[]],[[]],[[]],[41,2],[41,42],0,[[]],[[]],[[]],[[]],[41],[[]],[41],0,0,[[]],[41,1],[[]],[41],0,0,[[]],0,0,0,[[],4],[[],4],[[],4],[[],4],[[],4],[[],4],[[],5],[[],5],[[],5],0,[[]],[[]],[[]],[2,44],[[]],0,0,0,[[],4],[[],4],[[],5],[[],44],0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[45,40],[[20,[2]]]],[46,46],[[]],[[46,46],11],[[]],[[]],[45,42],[45,2],0,[[]],[[]],0,[2,45],0,0,0,[[]],0,[[],4],[[],4],[[],4],[[],4],[[],5],[[],5],0,0,[[],2],[[],2],[[]],0,0,[[]],[[]],0,0,0,[[]],[[]],0,[[],1],[[],1],0,[[],1],0,0,[[2,2,2,2,2],42],[[]],[[]],[[]],[[]],0,0,0,[[42,2]],0,0,[[],4],[[],4],[[],5],0],"p":[[15,"never"],[15,"usize"],[3,"Arguments"],[4,"Result"],[3,"TypeId"],[3,"Stdout"],[15,"str"],[6,"Result"],[3,"PanicInfo"],[3,"PhysAddr"],[15,"bool"],[3,"VirtAddr"],[3,"PhysPageNum"],[3,"VirtPageNum"],[8,"Clone"],[3,"SimpleRange"],[4,"Ordering"],[3,"Formatter"],[3,"SimpleRangeIterator"],[4,"Option"],[3,"StackFrameAllocator"],[3,"FRAME_ALLOCATOR"],[3,"UPSafeCell"],[3,"FrameTracker"],[3,"Layout"],[3,"MemorySet"],[3,"MapPermission"],[3,"MapArea"],[3,"PageTable"],[15,"u8"],[4,"MapType"],[3,"KERNEL_SPACE"],[3,"Arc"],[8,"IntoIterator"],[3,"PageTableEntry"],[3,"PTEFlags"],[3,"Vec"],[3,"RefMut"],[15,"isize"],[15,"i32"],[3,"TaskManager"],[3,"TrapContext"],[3,"TASK_MANAGER"],[3,"TaskContext"],[3,"TaskControlBlock"],[4,"TaskStatus"],[8,"StepByOne"],[8,"FrameAllocator"],[3,"TaskManagerInner"]]}\ }'); if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/ch4/src/os/boards/qemu.rs.html b/ch4/src/os/boards/qemu.rs.html index 155d09c5..890a4b8a 100644 --- a/ch4/src/os/boards/qemu.rs.html +++ b/ch4/src/os/boards/qemu.rs.html @@ -5,86 +5,6 @@ 5 6 7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87
//! Constants used in rCore for qemu
 
 pub const CLOCK_FREQ: usize = 12500000;
@@ -92,85 +12,5 @@
 pub const MMIO: &[(usize, usize)] = &[
     (0x0010_0000, 0x00_2000), // VIRT_TEST/RTC  in virt machine
 ];
-
-//ref:: https://github.com/andre-richter/qemu-exit
-use core::arch::asm;
-
-const EXIT_SUCCESS: u32 = 0x5555; // Equals `exit(0)`. qemu successful exit
-
-const EXIT_FAILURE_FLAG: u32 = 0x3333;
-const EXIT_FAILURE: u32 = exit_code_encode(1); // Equals `exit(1)`. qemu failed exit
-const EXIT_RESET: u32 = 0x7777; // qemu reset
-
-pub trait QEMUExit {
-    /// Exit with specified return code.
-    ///
-    /// Note: For `X86`, code is binary-OR'ed with `0x1` inside QEMU.
-    fn exit(&self, code: u32) -> !;
-
-    /// Exit QEMU using `EXIT_SUCCESS`, aka `0`, if possible.
-    ///
-    /// Note: Not possible for `X86`.
-    fn exit_success(&self) -> !;
-
-    /// Exit QEMU using `EXIT_FAILURE`, aka `1`.
-    fn exit_failure(&self) -> !;
-}
-
-/// RISCV64 configuration
-pub struct RISCV64 {
-    /// Address of the sifive_test mapped device.
-    addr: u64,
-}
-
-/// Encode the exit code using EXIT_FAILURE_FLAG.
-const fn exit_code_encode(code: u32) -> u32 {
-    (code << 16) | EXIT_FAILURE_FLAG
-}
-
-impl RISCV64 {
-    /// Create an instance.
-    pub const fn new(addr: u64) -> Self {
-        RISCV64 { addr }
-    }
-}
-
-impl QEMUExit for RISCV64 {
-    /// Exit qemu with specified exit code.
-    fn exit(&self, code: u32) -> ! {
-        // If code is not a special value, we need to encode it with EXIT_FAILURE_FLAG.
-        let code_new = match code {
-            EXIT_SUCCESS | EXIT_FAILURE | EXIT_RESET => code,
-            _ => exit_code_encode(code),
-        };
-
-        unsafe {
-            asm!(
-                "sw {0}, 0({1})",
-                in(reg)code_new, in(reg)self.addr
-            );
-
-            // For the case that the QEMU exit attempt did not work, transition into an infinite
-            // loop. Calling `panic!()` here is unfeasible, since there is a good chance
-            // this function here is the last expression in the `panic!()` handler
-            // itself. This prevents a possible infinite loop.
-            loop {
-                asm!("wfi", options(nomem, nostack));
-            }
-        }
-    }
-
-    fn exit_success(&self) -> ! {
-        self.exit(EXIT_SUCCESS);
-    }
-
-    fn exit_failure(&self) -> ! {
-        self.exit(EXIT_FAILURE);
-    }
-}
-
-const VIRT_TEST: u64 = 0x100000;
-
-pub const QEMU_EXIT_HANDLE: RISCV64 = RISCV64::new(VIRT_TEST);
 
\ No newline at end of file diff --git a/ch4/src/os/lang_items.rs.html b/ch4/src/os/lang_items.rs.html index 69dd544d..1a15de1f 100644 --- a/ch4/src/os/lang_items.rs.html +++ b/ch4/src/os/lang_items.rs.html @@ -18,25 +18,27 @@ 18 19 20 +21
//! The panic handler
 
 use crate::sbi::shutdown;
 use core::panic::PanicInfo;
+use log::*;
 
 #[panic_handler]
 /// panic handler
 fn panic(info: &PanicInfo) -> ! {
     if let Some(location) = info.location() {
-        println!(
+        error!(
             "[kernel] Panicked at {}:{} {}",
             location.file(),
             location.line(),
             info.message().unwrap()
         );
     } else {
-        println!("[kernel] Panicked: {}", info.message().unwrap());
+        error!("[kernel] Panicked: {}", info.message().unwrap());
     }
-    shutdown()
+    shutdown(true)
 }
 
\ No newline at end of file diff --git a/ch4/src/os/sbi.rs.html b/ch4/src/os/sbi.rs.html index cc238733..2d4f9cb9 100644 --- a/ch4/src/os/sbi.rs.html +++ b/ch4/src/os/sbi.rs.html @@ -21,84 +21,28 @@ 21 22 23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51
//! SBI call wrappers
 
-use core::arch::asm;
-
-const SBI_SET_TIMER: usize = 0;
-const SBI_CONSOLE_PUTCHAR: usize = 1;
-
-// const SBI_CONSOLE_GETCHAR: usize = 2;
-// const SBI_CLEAR_IPI: usize = 3;
-// const SBI_SEND_IPI: usize = 4;
-// const SBI_REMOTE_FENCE_I: usize = 5;
-// const SBI_REMOTE_SFENCE_VMA: usize = 6;
-// const SBI_REMOTE_SFENCE_VMA_ASID: usize = 7;
-// const SBI_SHUTDOWN: usize = 8;
-
-#[inline(always)]
-/// general sbi call
-fn sbi_call(which: usize, arg0: usize, arg1: usize, arg2: usize) -> usize {
-    let mut ret;
-    unsafe {
-        asm!(
-            "li x16, 0",
-            "ecall",
-            inlateout("x10") arg0 => ret,
-            in("x11") arg1,
-            in("x12") arg2,
-            in("x17") which,
-        );
-    }
-    ret
+/// use sbi call to putchar in console (qemu uart handler)
+pub fn console_putchar(c: usize) {
+    #[allow(deprecated)]
+    sbi_rt::legacy::console_putchar(c);
 }
 
 /// use sbi call to set timer
 pub fn set_timer(timer: usize) {
-    sbi_call(SBI_SET_TIMER, timer, 0, 0);
+    sbi_rt::set_timer(timer as _);
 }
 
-/// use sbi call to putchar in console (qemu uart handler)
-pub fn console_putchar(c: usize) {
-    sbi_call(SBI_CONSOLE_PUTCHAR, c, 0, 0);
-}
-
-/// use sbi call to getchar from console (qemu uart handler)
-// pub fn console_getchar() -> usize {
-//     sbi_call(SBI_CONSOLE_GETCHAR, 0, 0, 0)
-// }
-use crate::board::QEMUExit;
 /// use sbi call to shutdown the kernel
-pub fn shutdown() -> ! {
-    crate::board::QEMU_EXIT_HANDLE.exit_failure();
+pub fn shutdown(failure: bool) -> ! {
+    use sbi_rt::{system_reset, NoReason, Shutdown, SystemFailure};
+    if !failure {
+        system_reset(Shutdown, NoReason);
+    } else {
+        system_reset(Shutdown, SystemFailure);
+    }
+    unreachable!()
 }
 
\ No newline at end of file diff --git a/ch4/src/os/task/mod.rs.html b/ch4/src/os/task/mod.rs.html index e9525497..e9aec252 100644 --- a/ch4/src/os/task/mod.rs.html +++ b/ch4/src/os/task/mod.rs.html @@ -221,6 +221,7 @@ mod task; use crate::loader::{get_app_data, get_num_app}; +use crate::sbi::shutdown; use crate::sync::UPSafeCell; use crate::trap::TrapContext; use alloc::vec::Vec; @@ -357,8 +358,7 @@ // go back to user mode } else { println!("All applications completed!"); - use crate::board::QEMUExit; - crate::board::QEMU_EXIT_HANDLE.exit_success(); + shutdown(false); } } }