mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-21 09:14:34 +00:00
Merge remote-tracking branch 'origin/master' into hardware
This commit is contained in:
commit
9716eba039
5 changed files with 19 additions and 24 deletions
|
|
@ -4,29 +4,23 @@ cpu: CPU.VexRiscv @ sysbus
|
||||||
privilegeArchitecture: PrivilegeArchitecture.Priv1_10
|
privilegeArchitecture: PrivilegeArchitecture.Priv1_10
|
||||||
|
|
||||||
uart: UART.LiteX_UART @ {
|
uart: UART.LiteX_UART @ {
|
||||||
sysbus 0x60006000;
|
sysbus 0x60007000;
|
||||||
sysbus 0xF0006000 // shadow
|
sysbus 0xF0007000 // shadow
|
||||||
}
|
}
|
||||||
-> cpu@1002
|
-> cpu@1002
|
||||||
|
|
||||||
uartconsole: UART.LiteX_UART @ {
|
uartconsole: UART.LiteX_UART @ {
|
||||||
sysbus 0x60007000;
|
sysbus 0x60009000;
|
||||||
sysbus 0xF0007000 // shadow
|
sysbus 0xF0009000 // shadow
|
||||||
}
|
}
|
||||||
-> cpu@1003
|
-> cpu@1003
|
||||||
|
|
||||||
uartserver0: UART.LiteX_UART @ {
|
uartserver0: UART.LiteX_UART @ {
|
||||||
sysbus 0x60008000;
|
sysbus 0x6000B000;
|
||||||
sysbus 0xF0008000 // shadow
|
sysbus 0xF000B000 // shadow
|
||||||
}
|
}
|
||||||
-> cpu@1004
|
-> cpu@1004
|
||||||
|
|
||||||
uartserver1: UART.LiteX_UART @ {
|
|
||||||
sysbus 0x60009000;
|
|
||||||
sysbus 0xF0009000 // shadow
|
|
||||||
}
|
|
||||||
-> cpu@1005
|
|
||||||
|
|
||||||
timer0: Timers.LiteX_Timer_32 @ {
|
timer0: Timers.LiteX_Timer_32 @ {
|
||||||
sysbus 0x60002000;
|
sysbus 0x60002000;
|
||||||
sysbus 0xF0002000 // shadow
|
sysbus 0xF0002000 // shadow
|
||||||
|
|
@ -49,20 +43,20 @@ sram: Memory.MappedMemory @ {
|
||||||
fbmem: Memory.MappedMemory @ sysbus 0xB0000000
|
fbmem: Memory.MappedMemory @ sysbus 0xB0000000
|
||||||
size: 0x6000
|
size: 0x6000
|
||||||
|
|
||||||
memlcd: Video.BetrustedLCD @ sysbus 0xF000C000
|
memlcd: Video.BetrustedLCD @ sysbus 0xF000E000
|
||||||
|
|
||||||
keyboard: Input.BetrustedKbd @ sysbus 0xF0015000
|
keyboard: Input.BetrustedKbd @ sysbus 0xF0017000
|
||||||
|
|
||||||
trng_server: Miscellaneous.BetrustedRNGServer @ sysbus 0xF001A000
|
trng_kernel: Miscellaneous.BetrustedRNGKernel @ sysbus 0xF001B000
|
||||||
|
|
||||||
trng_kernel: Miscellaneous.BetrustedRNGKernel @ sysbus 0xF0019000
|
trng_server: Miscellaneous.BetrustedRNGServer @ sysbus 0xF001C000
|
||||||
|
|
||||||
cpu_timer: Timers.LiteX_CPUTimer @ sysbus 0xf0000800
|
cpu_timer: Timers.LiteX_CPUTimer @ sysbus 0xf0000800
|
||||||
frequency: 100000000
|
frequency: 100000000
|
||||||
// IRQ #100 is Machine Timer Interrupt
|
// IRQ #100 is Machine Timer Interrupt
|
||||||
-> cpu@100
|
-> cpu@100
|
||||||
|
|
||||||
ticktimer: Timers.TickTimer @ sysbus 0xF0012000
|
ticktimer: Timers.TickTimer @ sysbus 0xF0014000
|
||||||
periodInMs: 1
|
periodInMs: 1
|
||||||
-> cpu @ 1008
|
-> cpu @ 1008
|
||||||
|
|
||||||
|
|
@ -78,4 +72,3 @@ flash_mem: Memory.MappedMemory @ {
|
||||||
sysbus:
|
sysbus:
|
||||||
init:
|
init:
|
||||||
Tag <0xF0000000 0x1000> "CTRL"
|
Tag <0xF0000000 0x1000> "CTRL"
|
||||||
Tag <0xF001B000 0x1000> "TRNG"
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ machine StartGdbServer 3333 true
|
||||||
showAnalyzer uart
|
showAnalyzer uart
|
||||||
showAnalyzer uartconsole
|
showAnalyzer uartconsole
|
||||||
showAnalyzer uartserver0
|
showAnalyzer uartserver0
|
||||||
showAnalyzer uartserver1
|
|
||||||
showAnalyzer memlcd
|
showAnalyzer memlcd
|
||||||
|
|
||||||
logLevel -1 kbd
|
logLevel -1 kbd
|
||||||
|
|
|
||||||
|
|
@ -122,8 +122,8 @@ pub extern "C" fn trap_handler(
|
||||||
match ex {
|
match ex {
|
||||||
RiscvException::StorePageFault(pc, addr) | RiscvException::LoadPageFault(pc, addr) => {
|
RiscvException::StorePageFault(pc, addr) | RiscvException::LoadPageFault(pc, addr) => {
|
||||||
#[cfg(any(feature = "debug-print", feature = "print-panics"))]
|
#[cfg(any(feature = "debug-print", feature = "print-panics"))]
|
||||||
println!(
|
print!(
|
||||||
"KERNEL({}): RISC-V fault: {} @ {:08x}, addr {:08x}",
|
"KERNEL({}): RISC-V fault: {} @ {:08x}, addr {:08x} - ",
|
||||||
pid, ex, pc, addr
|
pid, ex, pc, addr
|
||||||
);
|
);
|
||||||
let virt = addr & !0xfff;
|
let virt = addr & !0xfff;
|
||||||
|
|
@ -164,6 +164,7 @@ pub extern "C" fn trap_handler(
|
||||||
flush_mmu();
|
flush_mmu();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
println!("Handing page {:08x} to process", new_page);
|
||||||
ArchProcess::with_current_mut(|process| {
|
ArchProcess::with_current_mut(|process| {
|
||||||
crate::arch::syscall::resume(
|
crate::arch::syscall::resume(
|
||||||
current_pid().get() == 1,
|
current_pid().get() == 1,
|
||||||
|
|
@ -171,6 +172,7 @@ pub extern "C" fn trap_handler(
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
println!("Page was not allocated");
|
||||||
}
|
}
|
||||||
RiscvException::InstructionPageFault(RETURN_FROM_ISR, _offset) => {
|
RiscvException::InstructionPageFault(RETURN_FROM_ISR, _offset) => {
|
||||||
// If we hit this address, then an ISR has just returned. Since
|
// If we hit this address, then an ISR has just returned. Since
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ pub enum SysCall {
|
||||||
/// * **ServerExists**: The server hash is already in use.
|
/// * **ServerExists**: The server hash is already in use.
|
||||||
CreateServerWithAddress(SID /* server hash */),
|
CreateServerWithAddress(SID /* server hash */),
|
||||||
|
|
||||||
/// Connect to a server. This turns a 128-bit Serever ID into a 32-bit
|
/// Connect to a server. This turns a 128-bit Server ID into a 32-bit
|
||||||
/// Connection ID. Blocks until the server is available.
|
/// Connection ID. Blocks until the server is available.
|
||||||
///
|
///
|
||||||
/// # Errors
|
/// # Errors
|
||||||
|
|
@ -236,7 +236,7 @@ pub enum SysCall {
|
||||||
/// None
|
/// None
|
||||||
Connect(SID /* server id */),
|
Connect(SID /* server id */),
|
||||||
|
|
||||||
/// Try to connect to a server. This turns a 128-bit Serever ID into a 32-bit
|
/// Try to connect to a server. This turns a 128-bit Server ID into a 32-bit
|
||||||
/// Connection ID.
|
/// Connection ID.
|
||||||
///
|
///
|
||||||
/// # Errors
|
/// # Errors
|
||||||
|
|
@ -275,7 +275,7 @@ pub enum SysCall {
|
||||||
/// Create a new Server
|
/// Create a new Server
|
||||||
///
|
///
|
||||||
/// This will return a 128-bit Server ID that can be used to send messages
|
/// This will return a 128-bit Server ID that can be used to send messages
|
||||||
/// to this server. The returned Derver ID is random.
|
/// to this server. The returned Server ID is random.
|
||||||
///
|
///
|
||||||
/// # Returns
|
/// # Returns
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,7 @@ fn renode_image(debug: bool) -> Result<(), DynError> {
|
||||||
"graphics-server",
|
"graphics-server",
|
||||||
"ticktimer-server",
|
"ticktimer-server",
|
||||||
"com",
|
"com",
|
||||||
|
"xous-names",
|
||||||
] {
|
] {
|
||||||
init.push(build(pkg, debug, Some(TARGET), None)?);
|
init.push(build(pkg, debug, Some(TARGET), None)?);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue