| Age | Commit message (Collapse) | Author |
|
XXX pullup-10
|
|
is created on the stack SP remains 16-byte aligned as per the ABI
requirements.
Patch from Rin with some updates from me.
|
|
Add MULTIPROCESSOR support for RISC-V, but leave disabled for the moment
as it's not 100% stable.
Some other improvements to spl and cpu identification / reporting.
|
|
|
|
needs this so it can detect struct lwp correctly.
|
|
|
|
|
|
Thanks for Simon Burge for plic(4).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tweak csr_cycle_read and csr_asid_write for code style, and add some
KNF whitespace.
|
|
Remove bits no longer in the RISC-V supervisor spec.
Update defines for the user-mode sstatus value.
|
|
Avoid a magic number in CLKF_USERMODE().
|
|
read/write/set-bits/clear-bits inline functions. Keep the
open-coded 32-bit version of riscvreg_cycle_read() than reads
a 64-bit cycle counter values.
Added benefit of fixing these so that the inline asm uses __volatile
and aren't opmtimised to nops by the compiler.
|
|
|
|
Fix pte_nv_entry for the kernel.
Fix pte_pde_ptpage. PTE.{X,W,R} must be zero for pointer to next level.
|
|
|
|
at 32 bits.
|
|
|
|
fields.
|
|
|
|
|
|
|
|
enough. Spotted by Simon.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
to cpu_counter().
Add a 64-bit cycle counter on _LP64.
|
|
|
|
|
|
for a 64bit constant.
Bump VM_PHYSSEG_MAX from 1 to 16.
|
|
|
|
Also set NKMEMPAGES_MAX_UNLIMITED while we're here.
|
|
Beagle-v now boots to the msgbufaddr panic same as qemu
|
|
|
|
[ 1.0000000] panic: kernel diagnostic assertion "msgbufaddr != 0" failed: file "/home/nick/netbsd/nbcvs/src/sys/arch/riscv/riscv/riscv_machdep.c", line 564
[ 1.0000000] cpu0: Begin traceback...
[ 1.0000000] trace fp ffffffc000801dd0
[ 1.0000000] fp ffffffc000801e10 ?() at ffffffc0001eee98
[ 1.0000000] fp ffffffc000801e30 ?() at ffffffc0002ad984
[ 1.0000000] fp ffffffc000801ee0 ?() at ffffffc000005430
[ 1.0000000] cpu0: End traceback...
[ 1.0000000] Trapframe @ 0xffffffc000801cb0 (cause=3 (breakpoint), status=0x100, pc=0xffffffc0000007e4, va=0):
[ 1.0000000] ra =0xffffffc0001eee9c, sp =0xffffffc000801dd0, gp =0xffffffc0006a8f40, tp = 0
[ 1.0000000] s0 =0xffffffc000600ac0, s1 = 0x1000, s2 =0xffffffc000438df0, s3 =0xffffffc000801d80
[ 1.0000000] s4 =0xffffffc0001eed78, s5 =0xffffffc0006d55f8, s6 =0xffffffc000801d88, s7 =0xffffffc0006dfdb8
[ 1.0000000] s8 =0xffffffc000428c18, s9 =0xffffffc000801dd0, s10=0xffffffc0000a3822, s11=0xffffffc0006d55f8
[ 1.0000000] a0 = 0x17, a1 = 0xa, a2 = 0, a3 =0xffffffc00041f658
[ 1.0000000] a4 = 0, a5 = 0x1, a5 = 0, a7 = 0x1
[ 1.0000000] t0 =0xffffffc0006dfe30, t1 =0xffffffc000801bb8, t2 =0xffffffc000803000, t3 = 0x75
[ 1.0000000] t4 = 0, t5 = 0x63, t6 = 0x1
[ 1.0000000] kernel: breakpoint
Stopped in pid 0.0 (system) at ffffffc0000007e4: c.ebreak
db>
|
|
|
|
QEMU RV64 virt can boot into virtual mode
OpenSBI v1.0
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : riscv-virtio,qemu
Platform Features : medeleg
Platform HART Count : 1
Platform IPI Device : aclint-mswi
Platform Timer Device : aclint-mtimer @ 10000000Hz
Platform Console Device : uart8250
Platform HSM Device : ---
Platform Reboot Device : sifive_test
Platform Shutdown Device : sifive_test
Firmware Base : 0x80000000
Firmware Size : 252 KB
Runtime SBI Version : 0.3
Domain0 Name : root
Domain0 Boot HART : 0
Domain0 HARTs : 0*
Domain0 Region00 : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01 : 0x0000000080000000-0x000000008003ffff ()
Domain0 Region02 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address : 0x0000000080200000
Domain0 Next Arg1 : 0x00000000bfe00000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Boot HART ID : 0
Boot HART Domain : root
Boot HART ISA : rv64imafdcsuh
Boot HART Features : scounteren,mcounteren,mcountinhibit,time
Boot HART PMP Count : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 54
Boot HART MHPM Count : 16
Boot HART MIDELEG : 0x0000000000001666
Boot HART MEDELEG : 0x0000000000f0b509
------------
NetBSD start
sp: 0x0000_0000_80a0_2000
pc: 0x0000_0000_8020_0090
hart: 0x0000_0000_0000_0000
dtb: 0x0000_0000_bfe0_0000
l1: 0x0000_0000_80a0_2000
l2: 0x0000_0000_80a0_3000
uspace: 0x0000_0000_80a0_0000
bootstk: 0x0000_0000_80a0_2000
vtopdiff:0xffff_ffbf_7fe0_0000
bss: 0x0000_0000_808a_8bdc - 0x0000_0000_80a0_4000
0x0000_0000_80a0_3800: 0x0000_0000_2028_0821
kern 0x0000_0000_80a0_2000: 0x0000_0000_2008_002f
kern 0x0000_0000_80a0_2008: 0x0000_0000_2010_002f
kern 0x0000_0000_80a0_2010: 0x0000_0000_2018_002f
kern 0x0000_0000_80a0_2018: 0x0000_0000_2020_002f
kern 0x0000_0000_80a0_2020: 0x0000_0000_2028_002f
kern 0x0000_0000_80a0_2028: 0x0000_0000_2030_002f
kern 0x0000_0000_80a0_2030: 0x0000_0000_2038_002f
kern 0x0000_0000_80a0_2038: 0x0000_0000_2040_002f
kern 0x0000_0000_80a0_2040: 0x0000_0000_2048_002f
kern 0x0000_0000_80a0_2048: 0x0000_0000_2050_002f
kern 0x0000_0000_80a0_2050: 0x0000_0000_2058_002f
kern 0x0000_0000_80a0_2058: 0x0000_0000_2060_002f
kern 0x0000_0000_80a0_2060: 0x0000_0000_2068_002f
kern 0x0000_0000_80a0_2068: 0x0000_0000_2070_002f
kern 0x0000_0000_80a0_2070: 0x0000_0000_2078_002f
kern 0x0000_0000_80a0_2078: 0x0000_0000_2080_002f
dtb 0x0000_0000_80a0_2080: 0x0000_0000_2ff8_0027
PM
[ 1.0000000] FDT<0xffffffc002000000>
[ 1.0000000] consinit ok
[ 1.0000000] NetBSD/riscv (fdt) booting ...
[ 1.0000000] FDT /memory @ 0x80000000 size 0x40000000
[ 1.0000000] init_riscv: memory start 80000000 end c0000000 (len 40000000)
[ 1.0000000] bootargs: root=ld4a -v -x
[ 1.0000000] bootflag 'r' not recognised
[ 1.0000000] bootflag 'o' not recognised
[ 1.0000000] bootflag 'o' not recognised
[ 1.0000000] bootflag 't' not recognised
[ 1.0000000] bootflag '=' not recognised
[ 1.0000000] bootflag 'l' not recognised
[ 1.0000000] bootflag ' ' not recognised
[ 1.0000000] bootflag ' ' not recognised
[ 1.0000000] ------------------------------------------
[ 1.0000000] kern_vtopdiff = 0xffffffbf7fe00000
[ 1.0000000] memory_start = 0x 80000000
[ 1.0000000] memory_end = 0x c0000000
[ 1.0000000] memory_size = 0x 40000000
[ 1.0000000] kernstart_phys = 0x 80200000
[ 1.0000000] kernend_phys = 0x 80a00000
[ 1.0000000] VM_MIN_KERNEL_ADDRESS = 0xffffffc000000000
[ 1.0000000] kernstart_mega = 0xffffffc000000000
[ 1.0000000] kernstart = 0xffffffc000000000
[ 1.0000000] kernend = 0xffffffc000800000
[ 1.0000000] kernend_mega = 0xffffffc000800000
[ 1.0000000] VM_MAX_KERNEL_ADDRESS = 0xffffffd000000000
[ 1.0000000] ------------------------------------------
[ 1.0000000] panic: kernel diagnostic assertion "msgbufaddr != 0" failed: file "/home/nick/netbsd/nbcvs/src/sys/arch/riscv/riscv/riscv_machdep.c", line 564
|
|
Remove the RISC-V Host Target Interface (HTIF) Emulation code.
|
|
|
|
|
|
|
|
|