Skip to content

Commit 4d4b3e6

Browse files
committed
fix: el1
1 parent 2bd0405 commit 4d4b3e6

File tree

4 files changed

+27
-24
lines changed

4 files changed

+27
-24
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loader/pie-boot-loader-aarch64/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords.workspace = true
1010
license.workspace = true
1111
name = "pie-boot-loader-aarch64"
1212
repository.workspace = true
13-
version = "0.3.2"
13+
version = "0.3.3"
1414

1515
[dependencies]
1616
aarch64-cpu = "10.0"

loader/pie-boot-loader-aarch64/src/mmu.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -122,28 +122,28 @@ where
122122
));
123123
}
124124

125-
// let size = if table.entry_size() == table.max_block_size() {
126-
// table.entry_size() * (T::TABLE_LEN / 2)
127-
// } else {
128-
// table.max_block_size() * T::TABLE_LEN
129-
// };
130-
// let start = 0x0usize;
131-
132-
// printkv!("eq", "[{:#x}, {:#x})", start, start + size);
133-
134-
// if CurrentEL.read(CurrentEL::EL) == 1 {
135-
// early_err!(table.map(
136-
// MapConfig {
137-
// vaddr: start.into(),
138-
// paddr: start.into(),
139-
// size,
140-
// pte: new_pte(CacheKind::Normal),
141-
// allow_huge: true,
142-
// flush: false,
143-
// },
144-
// access,
145-
// ));
146-
// }
125+
let size = if table.entry_size() == table.max_block_size() {
126+
table.entry_size() * (T::TABLE_LEN / 2)
127+
} else {
128+
table.max_block_size() * T::TABLE_LEN
129+
};
130+
let start = 0x0usize;
131+
132+
printkv!("eq", "[{:#x}, {:#x})", start, start + size);
133+
134+
if CurrentEL.read(CurrentEL::EL) == 1 {
135+
early_err!(table.map(
136+
MapConfig {
137+
vaddr: start.into(),
138+
paddr: start.into(),
139+
size,
140+
pte: new_pte(CacheKind::Normal),
141+
allow_huge: true,
142+
flush: false,
143+
},
144+
access,
145+
));
146+
}
147147
}
148148

149149
let pg = table.paddr().raw() as _;

test_aarch64_uboot.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
cargo test --target aarch64-unknown-none-softfloat -p test-some-rt --test test --features "somehal/force-rebuild-loader" -- --show-output --uboot
3+
# cargo test --target aarch64-unknown-none-softfloat -p test-some-rt --test test -- --show-output --uboot

0 commit comments

Comments
 (0)