Age | Commit message (Collapse) | Author | Files | Lines |
|
The UART drivers all return -1 if no character is present, and so that's
what we should do if there's no UART at all.
See discussion on https://github.com/riscv-non-isa/riscv-sbi-doc/issues/82
|
|
The LLVM IAS does not support the older name for the `mtval` CSR. This
updates the name to the current spelling, which is required to build
with the LLVM IAS. This remains compatible with binutils as well.
|
|
This replaces use of the old `sbadaddr` CSR name with the current
`stval` name. The old spelling is not supported by the LLVM IAS,
however, the modern spelling is supported by both LLVM and binutils.
|
|
Tested using the RocketChip CPU option.
(see https://github.com/enjoy-digital/litex)
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
|
|
|
|
|
|
Otherwise, linux complains the moment an interrupt arrives and
wakes up one of the not-looping cores.
|
|
gcc sometimes takes liberties with optimizing away our important halt function!
|
|
QEMU currently provides the console via HTIF and the SBI. That's a bit
messy because BBL polls for serial input, which means that typing too
quickly loses characters. While QEMU has a standard 16550 device model,
there's no way to have two consoles share the console in QEMU (as they'd
step all over each other) so that means we can't have both the HTIF
console and the 16550 console.
With this patch, QEMU can be changed to use a 16650 instead of the HTIF
for serial output. Linux will use the SBI for early printk support
(which is fine, polling for output is stable) and then swap over as soon
as it detects the UART. When Linux swaps it prints out the whole
history, but there's probably a way to get around that. There's a few
lines that are output to both, but it appears the Linux driver is close
enough to ours that nothing catastrophic happens -- there's not much to
the device, so hopefully that pans out on real hardware too.
Once Linux swaps over to natively using the driver we get reliable
console input. If you don't have the in-kernel driver then Linux never
swaps over and keeps using the SBI console just like before.
|
|
We now automatically detect everything that the platform interface used
to be used for, so it's now obsolete!
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
https://github.com/riscv/riscv-isa-manual/commit/f2ed45b1791bb602657adc2ea9ab5fc409c62542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
being placed on same page (#32)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The old code truncated the upper 32 bits, and even if it got that right,
it would have generated spurious interrupts.
|
|
Yuck.
|