Skip to content

Commit 98869e4

Browse files
committed
docs: 更新 CHANGELOG,整理 README 格式
Signed-off-by: YdrMaster <[email protected]>
1 parent e0f842c commit 98869e4

File tree

2 files changed

+114
-66
lines changed

2 files changed

+114
-66
lines changed

CHANGELOG.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99
### Added
1010

1111
- Hint spin loop in hart state monitor module
12-
- Add bench-kernel crate to workspace for sbi call bench
12+
- Add crate *bench-kernel* to workspace for sbi call bench
13+
- Add crate *uart16550* for 16550 define
14+
- Add SBI DBCN extension support
1315

1416
### Modified
1517

1618
- Use instance based RustSBI interface, with separate functions for legacy stdio
1719
- Update sbi-testing to version 0.0.1
18-
- Use crate fast-trap version 0.0.1 in rustsbi-qemu for trap handling
19-
- Use crate rcore-console version 0.0.0 in rustsbi-qemu and test-kernel for `print!` and `println!`
20-
- Use crate aclint version 0.0.0 in rustsbi-qemu for aclint structs
21-
- Use crate os-xtask-utils version 0.0.0 in xtask builder
22-
- Use crate sifive-test-device version 0.0.0 instead of qemu-exit
20+
- Update sbi-spec to version 0.0.5
21+
- Use crate *fast-trap* version 0.0.1 in rustsbi-qemu for trap handling
22+
- Use crate *rcore-console* version 0.0.0 in rustsbi-qemu and test-kernel for `print!` and `println!`
23+
- Use crate *aclint* version 0.0.0 in rustsbi-qemu for aclint structs
24+
- Use crate *os-xtask-utils* version 0.0.0 in xtask builder
25+
- Use crate *sifive-test-device* version 0.0.0 instead of qemu-exit
2326
- Use `wfi` for suspend and stop without enable mie
2427

2528
### Fixed

README.md

Lines changed: 105 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -18,55 +18,100 @@ cargo qemu
1818

1919
When running `cargo qemu`, the test kernel will build and run. Expected output should be:
2020

21-
```
22-
[rustsbi] RustSBI version 0.2.2, adapting to RISC-V SBI v1.0.0
21+
```plaintext
22+
[rustsbi] RustSBI version 0.4.0-alpha.1, adapting to RISC-V SBI v1.0.0
2323
.______ __ __ _______.___________. _______..______ __
2424
| _ \ | | | | / | | / || _ \ | |
2525
| |_) | | | | | | (----`---| |----`| (----`| |_) || |
2626
| / | | | | \ \ | | \ \ | _ < | |
2727
| |\ \----.| `--' |.----) | | | .----) | | |_) || |
2828
| _| `._____| \______/ |_______/ |__| |_______/ |______/ |__|
29-
30-
[rustsbi] Implementation: RustSBI-QEMU Version 0.1.1
31-
[rustsbi-dtb] Hart count: cluster0 with 8 cores
32-
[rustsbi] misa: RV64ACDFIMSU
33-
[rustsbi] mideleg: ssoft, stimer, sext (0x222)
34-
[rustsbi] medeleg: ima, ia, bkpt, la, sa, uecall, ipage, lpage, spage (0xb1ab)
35-
[rustsbi] pmp0: 0x10000000 ..= 0x10001fff (rw-)
36-
[rustsbi] pmp1: 0x2000000 ..= 0x200ffff (rw-)
37-
[rustsbi] pmp2: 0xc000000 ..= 0xc3fffff (rw-)
38-
[rustsbi] pmp3: 0x80000000 ..= 0x8fffffff (rwx)
39-
[rustsbi] enter supervisor 0x80200000
40-
<< Test-kernel: Hart id = 0, DTB physical address = 0x87000000
41-
>> Test-kernel: Testing base extension
42-
<< Test-kernel: Base extension version: 1
43-
<< Test-kernel: SBI specification version: 1.0
44-
<< Test-kernel: SBI implementation Id: 4
45-
<< Test-kernel: SBI implementation version: 202
46-
<< Test-kernel: Device mvendorid: 0
47-
<< Test-kernel: Device marchid: 0
48-
<< Test-kernel: Device mimpid: 0
49-
>> Test-kernel: Testing SBI instruction emulation
50-
<< Test-kernel: Current time: d78c9
51-
<< Test-kernel: Time after operation: da00f
52-
>> Test-kernel: Trigger illegal exception
53-
<< Test-kernel: Value of scause: Exception(IllegalInstruction)
54-
<< Test-kernel: Illegal exception delegate success
55-
>> Stop hart 3, return value 0
56-
>> Hart 0 state return value: 0
57-
>> Hart 1 state return value: 4
58-
>> Hart 2 state return value: 4
59-
>> Hart 3 state return value: 1
60-
>> Hart 4 state return value: 0
61-
<< Test-kernel: test for hart 0 success, wake another hart
62-
>> Wake hart 1, sbi return value 0
63-
>> Start test for hart 1, retentive suspend return value 0
64-
>> Wake hart 2, sbi return value 0
65-
<< The parameter passed to hart 2 resume is: 0x4567890a
66-
>> Start hart 3 with parameter 0x12345678
67-
>> SBI return value: 0
68-
<< The parameter passed to hart 3 start is: 0x12345678
69-
<< Test-kernel: All hart SBI test SUCCESS, shutdown
29+
[rustsbi] Implementation : RustSBI-QEMU Version 0.2.0-alpha.2
30+
[rustsbi] Platform Name : riscv-virtio,qemu
31+
[rustsbi] Platform SMP : 8
32+
[rustsbi] Platform Memory : 0x80000000..0x88000000
33+
[rustsbi] Boot HART : 6
34+
[rustsbi] Device Tree Region : 0x87e00000..0x87e01a8e
35+
[rustsbi] Firmware Address : 0x80000000
36+
[rustsbi] Supervisor Address : 0x80200000
37+
[rustsbi] pmp01: 0x00000000..0x80000000 (-wr)
38+
[rustsbi] pmp02: 0x80000000..0x80200000 (---)
39+
[rustsbi] pmp03: 0x80200000..0x88000000 (xwr)
40+
[rustsbi] pmp04: 0x88000000..0x00000000 (-wr)
41+
42+
_____ _ _ __ _
43+
|_ _|__ ___| |_ | |/ /___ _ __ _ __ ___| |
44+
| |/ _ \/ __| __| | ' // _ \ '__| '_ \ / _ \ |
45+
| | __/\__ \ |_ | . \ __/ | | | | | __/ |
46+
|_|\___||___/\__| |_|\_\___|_| |_| |_|\___|_|
47+
================================================
48+
| boot hart id | 6 |
49+
| smp | 8 |
50+
| timebase frequency | 10000000 Hz |
51+
| dtb physical address | 0x87e00000 |
52+
------------------------------------------------
53+
[ INFO] Testing `Base`
54+
[ INFO] sbi spec version = 2.0
55+
[ INFO] sbi impl = RustSBI
56+
[ INFO] sbi impl version = 0x400
57+
[ INFO] sbi extensions = [Base, TIME, sPI, HSM, SRST]
58+
[ INFO] mvendor id = 0x0
59+
[ INFO] march id = 0x70200
60+
[ INFO] mimp id = 0x70200
61+
[ INFO] Sbi `Base` test pass
62+
[ INFO] Testing `TIME`
63+
[ INFO] read time register successfuly, set timer +1s
64+
[ INFO] timer interrupt delegate successfuly
65+
[ INFO] Sbi `TIME` test pass
66+
[ INFO] Testing `sPI`
67+
[ INFO] send ipi successfuly
68+
[ INFO] Sbi `sPI` test pass
69+
[ INFO] Testing `HSM`
70+
[ INFO] Testing harts: [0, 1, 2, 3]
71+
[DEBUG] hart 0 started
72+
[DEBUG] hart 0 suspended nonretentive
73+
[DEBUG] hart 1 started
74+
[DEBUG] hart 1 suspended nonretentive
75+
[DEBUG] hart 2 started
76+
[DEBUG] hart 2 suspended nonretentive
77+
[DEBUG] hart 3 started
78+
[DEBUG] hart 3 suspended nonretentive
79+
[DEBUG] hart 0 resumed
80+
[DEBUG] hart 0 suspended retentive
81+
[DEBUG] hart 0 stopped
82+
[DEBUG] hart 1 resumed
83+
[DEBUG] hart 1 suspended retentive
84+
[DEBUG] hart 1 stopped
85+
[DEBUG] hart 2 resumed
86+
[DEBUG] hart 2 suspended retentive
87+
[DEBUG] hart 2 stopped
88+
[DEBUG] hart 3 resumed
89+
[DEBUG] hart 3 suspended retentive
90+
[DEBUG] hart 3 stopped
91+
[ INFO] Testing Pass: [0, 1, 2, 3]
92+
[ INFO] Testing harts: [4, 5, 7]
93+
[DEBUG] hart 4 started
94+
[DEBUG] hart 4 suspended nonretentive
95+
[DEBUG] hart 5 started
96+
[DEBUG] hart 5 suspended nonretentive
97+
[DEBUG] hart 7 started
98+
[DEBUG] hart 7 suspended nonretentive
99+
[DEBUG] hart 4 resumed
100+
[DEBUG] hart 4 suspended retentive
101+
[DEBUG] hart 4 stopped
102+
[DEBUG] hart 5 resumed
103+
[DEBUG] hart 5 suspended retentive
104+
[DEBUG] hart 5 stopped
105+
[DEBUG] hart 7 resumed
106+
[DEBUG] hart 7 suspended retentive
107+
[DEBUG] hart 7 stopped
108+
[ INFO] Testing Pass: [4, 5, 7]
109+
[ INFO] Sbi `HSM` test pass
110+
[ INFO] Testing `DBCN`
111+
Hello, world!
112+
[ INFO] writing slice successfuly
113+
[ INFO] reading 0 bytes from console
114+
[ INFO] Sbi `DBCN` test pass
70115
```
71116

72117
## Run test kernel
@@ -75,7 +120,7 @@ When running `cargo qemu`, the test kernel will build and run. Expected output s
75120

76121
You should have `cargo-binutils` installed.
77122

78-
```
123+
```shell
79124
cargo install cargo-binutils
80125
```
81126

@@ -87,10 +132,10 @@ Run with:
87132
cargo test
88133
```
89134

90-
It will run RustSBI-QEMU with a test kernel. The test kernel will test all SBI functions,
135+
It will run RustSBI-QEMU with a test kernel. The test kernel will test all SBI functions,
91136
its command emulation and other features. If it succeeds, there would be output like:
92137

93-
```
138+
```plaintext
94139
running 1 test
95140
Finished dev [unoptimized + debuginfo] target(s) in 0.14s
96141
Compiling test-kernel v0.1.0 (D:\RustProjects\rustsbi-qemu\test-kernel)
@@ -104,32 +149,32 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fini
104149

105150
1. What kind of kernel does this project support?
106151

107-
The rustsbi-qemu project supports raw binary kernels for educational or
108-
competition use. This project itself is only a showcase example illustrating how
109-
implementations should use RustSBI, it does not include a Linux boot support.
110-
You may visit downstream bootloader projects for a Linux capable bootloader.
152+
The rustsbi-qemu project supports raw binary kernels for educational or
153+
competition use. This project itself is only a showcase example illustrating how
154+
implementations should use RustSBI, it does not include a Linux boot support.
155+
You may visit downstream bootloader projects for a Linux capable bootloader.
111156

112157
2. How to enable hypervisor H extension on QEMU?
113158

114-
You should use these following line of parameters:
159+
You should use these following line of parameters:
115160

116-
```rust
117-
command.args(&["-cpu", "rv64,x-h=true"]);
118-
```
161+
```rust
162+
command.args(&["-cpu", "rv64,x-h=true"]);
163+
```
164+
165+
... to enable H extension on QEMU software.
119166

120-
... to enable H extension on QEMU software.
121-
122-
The H extension is enabled by default when QEMU version >= 7.0.0.
167+
The H extension is enabled by default when QEMU version >= 7.0.0.
123168

124169
3. What is the minimum supported Rust version of this package?
125170

126-
You should build RustSBI-QEMU on nightly at least `rustc 1.66.0-nightly (a24a020e6 2022-10-18)`.
171+
You should build RustSBI-QEMU on nightly at least `rustc 1.66.0-nightly (a24a020e6 2022-10-18)`.
127172

128-
## License
173+
## License
129174

130175
This project is licensed under Mulan PSL v2.
131176

132-
```text
177+
```plaintext
133178
Copyright (c) 2021-2023 RustSBI Team
134179
RustSBI-QEMU is licensed under Mulan PSL v2.
135180
You can use this software according to the terms and conditions of the Mulan PSL v2.

0 commit comments

Comments
 (0)