mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-24 02:16:19 +04:00
Added newline at the end of file, mapped all of PLIC and CLINT
This commit is contained in:
parent
982c4afb77
commit
a2a94006f3
@ -159,10 +159,26 @@ fn kinit() -> usize {
|
|||||||
page::map(&mut root, 0x1000_0000, 0x1000_0000, page::EntryBits::ReadWrite.val());
|
page::map(&mut root, 0x1000_0000, 0x1000_0000, page::EntryBits::ReadWrite.val());
|
||||||
|
|
||||||
// CLINT
|
// CLINT
|
||||||
|
// -> MSIP
|
||||||
page::map(&mut root, 0x0200_0000, 0x0200_0000, page::EntryBits::ReadWrite.val());
|
page::map(&mut root, 0x0200_0000, 0x0200_0000, page::EntryBits::ReadWrite.val());
|
||||||
|
// -> MTIMECMP
|
||||||
|
page::map(&mut root, 0x0200_b000, 0x0200_b000, page::EntryBits::ReadWrite.val());
|
||||||
|
// -> MTIME
|
||||||
|
page::map(&mut root, 0x0200_b000, 0x0200_b000, page::EntryBits::ReadWrite.val());
|
||||||
|
page::map(&mut root, 0x0200_c000, 0x0200_c000, page::EntryBits::ReadWrite.val());
|
||||||
|
|
||||||
// PLIC
|
// PLIC
|
||||||
|
// -> Source priority
|
||||||
page::map(&mut root, 0x0c00_0000, 0x0c00_0000, page::EntryBits::ReadWrite.val());
|
page::map(&mut root, 0x0c00_0000, 0x0c00_0000, page::EntryBits::ReadWrite.val());
|
||||||
|
// -> Pending array
|
||||||
|
page::map(&mut root, 0x0c00_1000, 0x0c00_1000, page::EntryBits::ReadWrite.val());
|
||||||
|
// -> Interrupt enables
|
||||||
|
page::map(&mut root, 0x0c00_2000, 0x0c00_2000, page::EntryBits::ReadWrite.val());
|
||||||
|
// -> Priority threshold and claim/complete registers
|
||||||
|
for i in 0..=8 {
|
||||||
|
let m = 0x0c20_0000 + (i << 12);
|
||||||
|
page::map(&mut root, m, m, page::EntryBits::ReadWrite.val());
|
||||||
|
}
|
||||||
|
|
||||||
// When we return from here, we'll go back to boot.S and switch into supervisor mode
|
// When we return from here, we'll go back to boot.S and switch into supervisor mode
|
||||||
// We will return the SATP register to be written when we return.
|
// We will return the SATP register to be written when we return.
|
||||||
|
Loading…
Reference in New Issue
Block a user