Skip to content

Commit 12935dc

Browse files
committed
docs: upgrade versions
1 parent c80fe46 commit 12935dc

File tree

18 files changed

+39
-29
lines changed

18 files changed

+39
-29
lines changed

docs/labs/0x03/tasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ macro_rules! as_handler {
8282
#[naked]
8383
pub extern "x86-interrupt" fn [<$fn _handler>](_sf: InterruptStackFrame) {
8484
unsafe {
85-
core::arch::asm!("
85+
core::arch::naked_asm!("
8686
push rbp
8787
// ...
8888
push r15
@@ -91,7 +91,7 @@ macro_rules! as_handler {
9191
// ...
9292
pop rbp
9393
iretq",
94-
sym $fn, options(noreturn));
94+
sym $fn);
9595
}
9696
}
9797
}

docs/labs/0x05/tasks.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,10 @@ static mut M: u64 = 0xdeadbeef;
300300

301301
fn main() -> isize {
302302
let mut c = 32;
303+
let m_ptr = &raw mut M;
303304

305+
// do not alloc heap before `fork`
306+
// which may cause unexpected behavior since we won't copy the heap in `fork`
304307
let pid = sys_fork();
305308

306309
if pid == 0 {
@@ -309,9 +312,9 @@ fn main() -> isize {
309312
assert_eq!(c, 32);
310313

311314
unsafe {
312-
println!("child read value of M: {:#x}", M);
313-
M = 0x2333;
314-
println!("child changed the value of M: {:#x}", M);
315+
println!("child read value of M: {:#x}", *m_ptr);
316+
*m_ptr = 0x2333;
317+
println!("child changed the value of M: {:#x}", *m_ptr);
315318
}
316319

317320
c += 32;
@@ -331,8 +334,8 @@ fn main() -> isize {
331334
assert_eq!(ret, 64);
332335

333336
unsafe {
334-
println!("parent read value of M: {:#x}", M);
335-
assert_eq!(M, 0x2333);
337+
println!("parent read value of M: {:#x}", *m_ptr);
338+
assert_eq!(*m_ptr, 0x2333);
336339
}
337340

338341
c += 1024;

docs/labs/0x07/tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ assert!(ret == heap_end, "Failed to allocate heap");
871871
+ default = ["brk_alloc"]
872872
```
873873

874-
在后续的实验中,如果你想要自行实现内存管理算法,可以参考上述过程,通过添加 `feature` 对代码进行隔离,以便于测试和调试。
874+
在后续的实验中,如果你想要自行实现内存管理算法,可以参考上述过程,通过添加 `feature` 对代码进行隔离,以便于测试和调试。
875875

876876
如果想要自主测试其他内存管理操作,可以修改自定义的用户程序,或者直接将其实现为接受用户输入的 Shell 命令,进一步测试并记录你的 `brk` 系统调用的行为。
877877

docs/wiki/fs.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# 文件系统概述
22

3-
<!-- 文件系统的层次结构一篇(磁盘、块设备、分区、文件系统) -->
4-
53
## 导读
64

75
文件系统(File System)为操作系统提供了持久存储设备上高效管理信息的能力:其为上层应用抽象出统一的设备访问接口,屏蔽不同底层块设备的操作细节。文件系统强大而复杂,横跨计算机不同存储体系,涵盖了逻辑设计与物理实现的解耦与联系。因此,本章 Wiki 将从概念出发,逐步介绍文件系统的前世今生。

docs/wiki/linux.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,13 @@ wsl --install -d Ubuntu
8888

8989
```bash
9090
$ rustc --version
91-
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
91+
rustc 1.82.0 (f6e511eec 2024-10-15)
92+
93+
$ rustc +nightly --version
94+
rustc 1.84.0-nightly (3ed6e3cc6 2024-10-17)
9295
9396
$ qemu-system-x86_64 --version
94-
QEMU emulator version 8.2.2 (Debian 1:8.2.2+ds-0ubuntu1)
97+
QEMU emulator version 8.2.2 (Debian 1:8.2.2+ds-0ubuntu1.2)
9598
9699
$ gcc --version
97100
gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
@@ -104,7 +107,10 @@ GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
104107

105108
```bash
106109
$ rustc --version
107-
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
110+
rustc 1.82.0 (f6e511eec 2024-10-15)
111+
112+
$ rustc +nightly --version
113+
rustc 1.84.0-nightly (3ed6e3cc6 2024-10-17)
108114
109115
$ qemu-system-x86_64 --version
110116
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.15)

mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ plugins:
120120
type: iso_datetime
121121

122122
extra_javascript:
123-
- https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js
124-
- https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js
123+
- https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.js
124+
- https://cdn.jsdelivr.net/npm/katex@latest/dist/contrib/auto-render.min.js
125125
- scripts/katex.js
126126

127127
extra_css:
128-
- https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css
128+
- https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css
129129
- css/fonts.css
130130
- css/extra.css
131131
- css/inst.css

src/0x00/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/esp
2+
/.idea
23
/.vscode
34
**/target
45
**/.gdb_history

src/0x00/pkg/boot/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
66

77
[dependencies]
8-
uefi = { version = "0.32", default-features = false }
8+
uefi = { version = "0.33", default-features = false }
99
log = "0.4"
1010

1111
[features]

src/0x01/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/esp
2+
/.idea
23
/.vscode
34
**/target
45
**/.gdb_history

src/0x01/pkg/boot/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66

77
[dependencies]
88
arrayvec = { version = "0.7", default-features = false }
9-
uefi = { version = "0.32", default-features = false }
9+
uefi = { version = "0.33", default-features = false }
1010
log = "0.4"
1111
x86_64 = "0.15"
1212
xmas-elf = "0.9"
@@ -15,4 +15,3 @@ elf = { package = "ysos_elf", path = "../elf" }
1515
[features]
1616
boot = ["uefi/alloc", "uefi/logger", "uefi/panic_handler", "uefi/global_allocator"]
1717
default = ["boot"]
18-

0 commit comments

Comments
 (0)