From 9a52c0f148018845eaab56dd883c7355337f7e08 Mon Sep 17 00:00:00 2001 From: chyyuu Date: Fri, 20 May 2022 00:42:08 +0000 Subject: [PATCH] deploy: 5a362ba7cd307598c13ec1d4e9a35f66fb06f1d9 --- ch9/os/board/constant.QEMU_EXIT_HANDLE.html | 2 +- ch9/os/board/constant.VIRT_TEST.html | 2 +- ch9/os/board/fn.exit_code_encode.html | 2 +- ch9/os/board/index.html | 2 +- ch9/os/board/struct.RISCV64.html | 10 +++++----- ch9/os/board/trait.QEMUExit.html | 2 +- ch9/src/os/boards/qemu.rs.html | 18 ++++++++---------- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/ch9/os/board/constant.QEMU_EXIT_HANDLE.html b/ch9/os/board/constant.QEMU_EXIT_HANDLE.html index 9d17c5b8..e3f7479a 100644 --- a/ch9/os/board/constant.QEMU_EXIT_HANDLE.html +++ b/ch9/os/board/constant.QEMU_EXIT_HANDLE.html @@ -4,5 +4,5 @@
pub const QEMU_EXIT_HANDLE: RISCV64;
+

Constant os::board::QEMU_EXIT_HANDLE

source · []
pub const QEMU_EXIT_HANDLE: RISCV64;
\ No newline at end of file diff --git a/ch9/os/board/constant.VIRT_TEST.html b/ch9/os/board/constant.VIRT_TEST.html index 13b8f2bb..7a9851ee 100644 --- a/ch9/os/board/constant.VIRT_TEST.html +++ b/ch9/os/board/constant.VIRT_TEST.html @@ -4,5 +4,5 @@
-

Constant os::board::VIRT_TEST

source · []
const VIRT_TEST: u64 = 0x100000;
+

Constant os::board::VIRT_TEST

source · []
const VIRT_TEST: u64 = 0x100000;
\ No newline at end of file diff --git a/ch9/os/board/fn.exit_code_encode.html b/ch9/os/board/fn.exit_code_encode.html index a75a2983..09d4892d 100644 --- a/ch9/os/board/fn.exit_code_encode.html +++ b/ch9/os/board/fn.exit_code_encode.html @@ -4,6 +4,6 @@
const fn exit_code_encode(code: u32) -> u32
Expand description

Encode the exit code using EXIT_FAILURE_FLAG.

+

Function os::board::exit_code_encode

source · []
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/ch9/os/board/index.html b/ch9/os/board/index.html index 78f67b22..dc699f87 100644 --- a/ch9/os/board/index.html +++ b/ch9/os/board/index.html @@ -4,7 +4,7 @@
-

Module os::board

source · []

Structs

+

Module os::board

source · []

Structs

RISCV64 configuration

Constants

Traits

diff --git a/ch9/os/board/struct.RISCV64.html b/ch9/os/board/struct.RISCV64.html index fd8bcd04..fe0adeba 100644 --- a/ch9/os/board/struct.RISCV64.html +++ b/ch9/os/board/struct.RISCV64.html @@ -4,14 +4,14 @@
-

Struct os::board::RISCV64

source · []
pub struct RISCV64 {
+    

Struct os::board::RISCV64

source · []
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.

+

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

diff --git a/ch9/os/board/trait.QEMUExit.html b/ch9/os/board/trait.QEMUExit.html index d6cc6fe2..0830b73d 100644 --- a/ch9/os/board/trait.QEMUExit.html +++ b/ch9/os/board/trait.QEMUExit.html @@ -13,5 +13,5 @@

Exit QEMU using EXIT_SUCCESS, aka 0, if possible.

Note: Not possible for X86.

Exit QEMU using EXIT_FAILURE, aka 1.

-

Implementors

+

Implementors

\ No newline at end of file diff --git a/ch9/src/os/boards/qemu.rs.html b/ch9/src/os/boards/qemu.rs.html index 2627b5b3..bb6833e8 100644 --- a/ch9/src/os/boards/qemu.rs.html +++ b/ch9/src/os/boards/qemu.rs.html @@ -129,14 +129,13 @@ 124 125 126 -127
pub const CLOCK_FREQ: usize = 12500000;
 
 pub const MMIO: &[(usize, usize)] = &[
-    (0x1000_0000, 0x1000),        // VIRT_UART0 in virt machine
-    (0x1000_1000, 0x1000),        // VIRT_VIRTIO in virt machine 
-    (0x0C00_0000, 0x40_0000),  // VIRT_PLIC in virt machine
-    (0x0010_0000, 0x00_2000),  // VIRT_TEST/RTC  in virt machine
+    (0x1000_0000, 0x1000),    // VIRT_UART0 in virt machine
+    (0x1000_1000, 0x1000),    // VIRT_VIRTIO in virt machine
+    (0x0C00_0000, 0x40_0000), // VIRT_PLIC in virt machine
+    (0x0010_0000, 0x00_2000), // VIRT_TEST/RTC  in virt machine
 ];
 
 pub type BlockDeviceImpl = crate::drivers::block::VirtIOBlock;
@@ -183,8 +182,8 @@
 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
+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.
@@ -201,7 +200,6 @@
     fn exit_failure(&self) -> !;
 }
 
-
 /// RISCV64 configuration
 pub struct RISCV64 {
     /// Address of the sifive_test mapped device.
@@ -254,9 +252,9 @@
     }
 }
 
-const VIRT_TEST: u64 =0x100000;
+const VIRT_TEST: u64 = 0x100000;
 
-pub const QEMU_EXIT_HANDLE: RISCV64 = RISCV64::new(VIRT_TEST); 
+pub const QEMU_EXIT_HANDLE: RISCV64 = RISCV64::new(VIRT_TEST);
 
\ No newline at end of file