Palmer Dabbelt
21209988c7
Initialize the UART first
Without this I can't get printf to show me debug info during early boot.
9 years ago
Palmer Dabbelt
9204785053
Detect harts that can't boot Linux instead of hard-coding them
This checks to see if a hart can't boot Linux by looking for a
compatible "mmu-type" field. If the hart can't boot Linux, then bbl
masks it off.
9 years ago
Andrew Waterman
220b1bee10
Fix(?) fcvt.s.w emulation for rs1 = -2^31 ( #66 )
9 years ago
Andrew Waterman
18087efa98
Make 4-byte aligned instruction-emulation loads atomic
Per the Unix-class platform spec
9 years ago
Andrew Waterman
4c64de3213
Order __page_alloc before writing vmrs
9 years ago
Andrew Waterman
fb4e31229f
Stub out sys_prlimit64
9 years ago
Wesley W. Terpstra
3f20915eff
finisher: support terminating sifive devices simulation ( #61 )
9 years ago
Palmer Dabbelt
2dcae927fd
Merge pull request #60 from riscv/hart1
The DTB argument to boot_other_hart shouldn't be used in BBL
9 years ago
Palmer Dabbelt
147cfa612b
The DTB argument to boot_other_hart shouldn't be used in BBL
I screwed up refactoring bbl.
9 years ago
Palmer Dabbelt
6b501de8e8
Merge pull request #59 from riscv/print-device-tree
Add the '--enable-print-device-tree' argument
9 years ago
Palmer Dabbelt
ca24f3c904
Add the '--enable-print-device-tree' argument
I'm trying to debug some device tree problems while booting Linux and
figured it would be really nice to have access to the device tree while
trying to debug these problems. I think this might be useful for lots
of people, so I went ahead and cleaned up the code enough that it should
actaully work in most cases.
9 years ago
Palmer Dabbelt
2187c4512d
Merge pull request #58 from riscv/platform
Add a platform interface
9 years ago
Palmer Dabbelt
f0f85949a0
Allow platform__get_logo to return NULL
9 years ago
Palmer Dabbelt
0d202e9dd4
Add the '--with-platform' argument and the sifive-vc707-devkit platform
Since we don't have a coherent platform specification right now, we've
ended up with slightly different platforms between spike and our FPGA
dev kit. For now I've added an autoconf option that allows users to
select the relevant platform.
9 years ago
Palmer Dabbelt
298984cbe6
Move DISABLED_HART_MASK to the platform
Some platforms can't boot Linux on all the harts. This commit allows
platforms to define the set of harts that should be prevented from
booting past BBL. This is essentially just a new mechanism for defining
the DISABLED_HART_MASK.
9 years ago
Palmer Dabbelt
62effc6bfe
Allow the platform to disable HTIF
9 years ago
Palmer Dabbelt
bb19fef663
Move the logo behind the platform interface
SiFive has a different logo, so let platforms override said logo.
9 years ago
Palmer Dabbelt
9037b1d9f2
Add a platform interface
SiFive's pk fork is the second one I've had to maintain, and it's a huge
pain because people keep just leaving changes all over the tree. I want
to introduce an interface that the platform-specific details can live
behind so I don't have to keep doing these painful merges.
9 years ago
Palmer Dabbelt
8b80f2ea28
Ignore some generated files
9 years ago
Andrew Waterman
57bb80fb7d
Fix emulation of misaligned RVC loads/stores
We were accidentally advancing the PC by 4, not 2.
9 years ago
Andrew Waterman
66701f82f8
FMV.X.S/FMV.S.X -> FMV.X.W/FMV.W.X
9 years ago
Andrew Waterman
3aebe0db7f
README.md: Explicitly list the requirement of a separate build directory.
h/t Karsten Merker
9 years ago
Andrew Waterman
5ca090ba6c
Use uint64_t, not uintptr_t, to represent FDT addresses/sizes
This fixes RV32 pk.
9 years ago
Andrew Waterman
770dcd9f1f
Fix RV32 compilation error
9 years ago
Andrew Waterman
0f0ac647fe
Increase PK stack size to 3% of memory, up to 8 MiB
9 years ago
Andrew Waterman
5f736b9ab8
Always write sbadaddr on trap redirection
9 years ago
Andrew Waterman
3a3c1f5a1a
Load instructions as unsigned values, not signed
This matches the behavior of mbabaddr/mtval.
9 years ago
Wesley W. Terpstra
8197cad40c
mtrap: allow override of DISABLED_HART_MASK from CFLAGS
9 years ago
Andrew Waterman
a2c8937e63
Remove num_harts; use hart_mask exclusively
9 years ago
Andrew Waterman
dce2b7dd8e
Rename HART_MASK to DISABLED_HART_MASK to clarify polarity
9 years ago
Wesley W. Terpstra
31eab7e4dd
fdt: update the status length when masking cpus
9 years ago
Wesley W. Terpstra
8b4421bacb
bbl: prevent named cores from booting
9 years ago
Wesley W. Terpstra
91636ac463
fdt: redact clint, plic, and debug hardware
9 years ago
Wesley W. Terpstra
cd558016be
fdt: support redaction
9 years ago
Andrew Waterman
d1200e3a54
Remove SBI console printm to speed up PK simulation
9 years ago
Wesley W. Terpstra
733fae9216
clint: move hart wakeup till after all FDT parsing
The clint was wiping out information discovered by the plic.
Initialize hart stacks as they are discovered.
Then fill in clint+plic info
Then wake the harts.
9 years ago
Andrew Waterman
078ea399c6
New PMP encoding
9 years ago
Wesley W. Terpstra
52d46dd684
fdt: look for the phandle of a cpu's nested interrupt controller
9 years ago
Andrew Waterman
6f407a8d54
Attempt to read instruction from mbadaddr
9 years ago
Wesley W. Terpstra
75f1854cd9
plic: discovered via fdt
9 years ago
Wesley W. Terpstra
b394a92597
uart: find it using fdt
9 years ago
Wesley W. Terpstra
cfe60c100d
fdt: rewrite parser using a single design pattern
9 years ago
Wesley W. Terpstra
9fa7b30887
uart: add physical device driver
9 years ago
Andrew Waterman
3473915b3a
Separate page faults from physical memory access exceptions
9 years ago
Wesley W. Terpstra
96e5ed750e
bbl: copy dtb after the kernel
9 years ago
Wesley W. Terpstra
96965a8cc6
pk: does not use dtb
9 years ago
Wesley W. Terpstra
a1a5cbcacb
fdt: add a size method
9 years ago
Andrew Waterman
fc1af65c15
Set up PMPs, permissively for now
9 years ago
Wesley W. Terpstra
23ab37ad78
SBI: a0+a1 hold hartid+dtb pointer between boot loader stages
9 years ago
Wesley W. Terpstra
316f85e9ae
machine: add FDT parser
9 years ago