aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-21machine,minit: initialize emulated FCSR in enter_supervisor_mode() (#106)Zihao Yu1-0/+4
* If BBL emulates the FPU, the trap handler will load emulated FCSR from x0's save slot into tp. The emulated FCSR should be initialized, else the field of rounding mode will contain garbage codes. This will lead to raising SIGABRT for a user mode program which tries to print a floating point variable. In glibc, __printf_fp_l() (defined in riscv-glibc/stdio-common/printf_fp.c) will call round_away() (defined in riscv-glibc/include/rounding-mode.h). With a garbage rounding mode in emulated FCSR, round_away() may call abort().
2018-05-15Fix for missing supervisor mode when running on E51 (#96)Jim Straus1-3/+10
The E51 core on the U54-MC lacks supervisor mode, thus the plic_s_ie and plic_s_thresh are NULL when running on this core. This adds checks for this case.
2018-04-27Fix typo of perf counter (#100)Zong Li1-2/+2
2018-04-24Enable FPU in PK, regardless of FPU presenceAndrew Waterman1-1/+1
Otherwise, the emulation code will refuse to emulate FP instructions.
2018-04-10SBI emulation of reads and writes to perf counters and config (#98)Alex Solomatnikov1-0/+58
2018-04-09Fix the wrong access of ipi pending address (#99)Zong Li1-2/+2
The MENTRY_IPI_PENDING_OFFSET offset is based on stack pointer
2018-03-21Fix build with compilers defaulting to PIE (#90)aurel322-2/+2
Debian toolchain defaults to PIE, and I guess that will also be the case of most distributions. This cause bbl to be non-functional. This patch fixes that by adding -fno-PIE in the default CFLAGS.
2018-03-20minit: insert printm as work-around for a race conditionWesley W. Terpstra1-0/+1
Reboot does not work reliably without this.
2018-03-16Changed install_subdir to $host_alias with substituted 64->32 instead… (#89)Rishi Khan3-7/+9
* Changed install_subdir to $host_alias with substituted 64->32 instead of hardcoded riscv[32|64]-unknown-elf * Updated readme to reflect changes in install_subdir.
2018-03-15Update config.guess/config.subAndrew Waterman2-861/+950
Closes #87
2018-03-15Don't link build-id stringAndrew Waterman2-0/+4
Closes #88
2018-03-05mtrap: add a halt IPI used for poweroff (#86)Wesley W. Terpstra3-11/+18
Otherwise, linux complains the moment an interrupt arrives and wakes up one of the not-looping cores.
2018-02-01Bump the Linux version PK claims to supportAndrew Waterman1-1/+1
This makes it more compatible with recent glibc.
2018-01-22Merge pull request #77 from riscv/mtrap-fixPalmer Dabbelt1-1/+1
mtrap: loop forever, really
2018-01-22mtrap: loop forever, reallyWesley W. Terpstra1-1/+1
gcc sometimes takes liberties with optimizing away our important halt function!
2018-01-22Merge pull request #76 from riscv/racePalmer Dabbelt1-9/+2
Boot on the first hart
2018-01-22Boot on the first hartPalmer Dabbelt1-9/+2
This code is broken, and it's left over from before we could read the DTB to find harts to boot on.
2018-01-09Remove the repeating bitmask of medeleg register (#74)Zong Li1-1/+0
2017-12-16Merge pull request #73 from riscv/flush_icachePalmer Dabbelt2-0/+4
Add __riscv_flush_icache
2017-12-13Add __riscv_flush_icachePalmer Dabbelt2-0/+4
For BBL's purposes a local i-cache flush should be sufficient.
2017-12-13Merge pull request #72 from riscv/16550Palmer Dabbelt5-0/+95
Add a 16550 UART driver to back the SBI console
2017-12-12Add a 16550 UART driver to back the SBI consolePalmer Dabbelt5-0/+95
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.
2017-12-12Bump encoding.hAndrew Waterman3-23/+26
2017-11-03Merge pull request #69 from riscv/endingsPalmer Dabbelt2-1/+6
Fix line endings in the logo
2017-11-03Fix line endings in the logoPalmer Dabbelt2-1/+6
2017-11-03Merge pull request #68 from riscv/no-platformPalmer Dabbelt23-193/+114
Remove the platform interface
2017-11-03Allow users to pick a logoPalmer Dabbelt7-25/+51
2017-11-03Remove the platform interfacePalmer Dabbelt19-192/+87
We now automatically detect everything that the platform interface used to be used for, so it's now obsolete!
2017-11-02Merge pull request #67 from riscv/dts2Palmer Dabbelt11-28/+64
Detect harts that can't boot Linux instead of hard-coding them
2017-11-02Check if we have extensions before using themPalmer Dabbelt1-5/+12
2017-11-02Initialize the UART firstPalmer Dabbelt1-3/+3
Without this I can't get printf to show me debug info during early boot.
2017-11-02Detect harts that can't boot Linux instead of hard-coding themPalmer Dabbelt11-20/+49
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.
2017-11-01Fix(?) fcvt.s.w emulation for rs1 = -2^31 (#66)Andrew Waterman1-1/+1
2017-10-23Make 4-byte aligned instruction-emulation loads atomicAndrew Waterman1-3/+12
Per the Unix-class platform spec
2017-10-19Order __page_alloc before writing vmrsAndrew Waterman1-2/+6
2017-08-29Stub out sys_prlimit64Andrew Waterman2-0/+2
2017-08-14finisher: support terminating sifive devices simulation (#61)Wesley W. Terpstra6-4/+84
2017-08-10Merge pull request #60 from riscv/hart1Palmer Dabbelt1-8/+6
The DTB argument to boot_other_hart shouldn't be used in BBL
2017-08-09The DTB argument to boot_other_hart shouldn't be used in BBLPalmer Dabbelt1-8/+6
I screwed up refactoring bbl.
2017-08-05Merge pull request #59 from riscv/print-device-treePalmer Dabbelt8-7/+174
Add the '--enable-print-device-tree' argument
2017-08-03Add the '--enable-print-device-tree' argumentPalmer Dabbelt8-7/+174
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.
2017-08-03Merge pull request #58 from riscv/platformPalmer Dabbelt18-41/+218
Add a platform interface
2017-08-03Allow platform__get_logo to return NULLPalmer Dabbelt1-1/+3
2017-08-02Add the '--with-platform' argument and the sifive-vc707-devkit platformPalmer Dabbelt4-1/+62
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.
2017-08-02Move DISABLED_HART_MASK to the platformPalmer Dabbelt7-10/+22
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.
2017-08-02Allow the platform to disable HTIFPalmer Dabbelt3-4/+18
2017-08-02Move the logo behind the platform interfacePalmer Dabbelt3-26/+37
SiFive has a different logo, so let platforms override said logo.
2017-08-02Add a platform interfacePalmer Dabbelt10-1/+77
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.
2017-08-02Ignore some generated filesPalmer Dabbelt1-1/+2
2017-07-17Fix emulation of misaligned RVC loads/storesAndrew Waterman1-2/+5
We were accidentally advancing the PC by 4, not 2.