Andrew Waterman
18efb61dc4
Zero-initialize x-registers for debuggability
11 years ago
Andrew Waterman
cc3a93bf30
Stub out a few system calls
11 years ago
Andrew Waterman
e81b125dc4
Fix single-precision FP emulation
11 years ago
Andrew Waterman
d2d16a63e2
Disable RVC in fixed-size assembly blocks
11 years ago
Andrew Waterman
04d07c02bb
Fix RVC build
11 years ago
Andrew Waterman
25acd5c8fd
Don't automatically run autoconf
Run it yourself if you modify configure.ac, and commit the configure script.
11 years ago
Andrew Waterman
89f4e2a9ef
Fix DECLARE_CAUSE macros
11 years ago
Andrew Waterman
a710501a3f
Store RV logo in rodata, rather than making it on the fly
This works around a stack overflow.
11 years ago
Andrew Waterman
6aa84fd30d
Undo last commit
It breaks programs that rely on ELF program headers.
11 years ago
Andrew Waterman
39f189549b
Avoid stack overflow with -msoft-float
11 years ago
Andrew Waterman
41e85e084a
Don't let brk stomp on mmap'd regions
We were already trying to handle this case, but we got it wrong.
11 years ago
Andrew Waterman
a6da37f217
New M-mode timer and SBI call to use it
11 years ago
Andrew Waterman
027ba300cb
Use sbadaddr (not sepc) to resolve instruction page faults
11 years ago
Andrew Waterman
621793b43a
Fully initialize page tables to zero
Previously, a bug caused only some page tables to be zeroed on RV64.
11 years ago
Andrew Waterman
0b66cbb5a9
Fix regression causing sbrk to fail spuriously
11 years ago
Andrew Waterman
c31914e944
Assume RTC frequency of 10 MHz
Of course, this should probably be read from a CSR or platform register.
11 years ago
Andrew Waterman
cffdcee338
Make boot loader/SBI changes to support SMP Linux
11 years ago
Andrew Waterman
835d03d216
"Fix" mremap bug by returning -ENOSYS
mremap was badly broken, and maybe it's not worth the time to fix it.
glibc still seems to work ok, because the malloc implementation handles
mremap failure gracefully (though at a performance cost).
11 years ago
Andrew Waterman
b2251a985c
Merge pull request #9 from palmer-dabbelt/destdir
Change the behavior of the DESTDIR make variable
11 years ago
Palmer Dabbelt
3cf271ebe5
Change the behavior of the DESTDIR make variable
DESTDIR is a common make idiom. As per the GNU coding standards
https://www.gnu.org/prep/standards/html_node/DESTDIR.html
"DESTDIR is a variable prepended to each installed target file, like
this:
$(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo
$(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a
The DESTDIR variable is specified by the user on the make command
line as an absolute file name. For example:
make DESTDIR=/tmp/stage install
DESTDIR should be supported only in the install* and uninstall*
targets, as those are the only targets where it is useful.
If your installation step would normally install /usr/local/bin/foo
and /usr/local/lib/libfoo.a, then an installation invoked as in the
example above would install /tmp/stage/usr/local/bin/foo and
/tmp/stage/usr/local/lib/libfoo.a instead."
The current Makefile.in uses DESTDIR, but has a slightly non-standard
behavior: the target install location doesn't include "$prefix". This
breaks package managers, because stuff ends up getting installed to
the wrong location.
Unfortunately the only way I can think of to fix this involves
silently changing the behavior of DESTDIR. Hopefully nobody is using
it...?
[port of 8a2088b59162fe16c16d26ddc1cfcaaaa8c4156f in riscv-fesvr]
11 years ago
Andrew Waterman
c5f18f61c0
Add sbi_shutdown call
11 years ago
Andrew Waterman
3f9b5d7ab8
Fix VM, MIP encoding
11 years ago
Andrew Waterman
f2034b7472
Update README
11 years ago
Andrew Waterman
87683e74f5
Split pk functionality into pk and bbl
pk is now an AEE only (i.e. it can only execute user programs).
bbl is now an SEE only (i.e. it can only host kernels).
11 years ago
Andrew Waterman
50a2d6ca7f
Fix build using glibc toolchain
11 years ago
Andrew Waterman
1a8572a47d
Upgrade to privileged architecture 1.7
11 years ago
Andrew Waterman
ac7853a1bc
Initialize the mailbox on boot
This fixes a bug when running on HW.
11 years ago
Andrew Waterman
33e738d643
Add ASCII art boot logo
It's only printed when booting the Linux kernel. Feel free to improve the
quality of the ASCII art. It looks like this when rendered:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv
rr vvvvvvvvvvvvvvvvvvvvvv
rr vvvvvvvvvvvvvvvvvvvvvvvv rr
rrrr vvvvvvvvvvvvvvvvvvvvvvvvvv rrrr
rrrrrr vvvvvvvvvvvvvvvvvvvvvv rrrrrr
rrrrrrrr vvvvvvvvvvvvvvvvvv rrrrrrrr
rrrrrrrrrr vvvvvvvvvvvvvv rrrrrrrrrr
rrrrrrrrrrrr vvvvvvvvvv rrrrrrrrrrrr
rrrrrrrrrrrrrr vvvvvv rrrrrrrrrrrrrr
rrrrrrrrrrrrrrrr vv rrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrr
INSTRUCTION SETS WANT TO BE FREE
11 years ago
Andrew Waterman
d3d746f016
Assume even less about mstatus reset value
11 years ago
Andrew Waterman
2d8f51fcca
"Fix" RV32 programs running on RV64 pk
Only allocate virtual addresses under 2^31. We might revise the
RV32-on-RV64 semantics to zero-extend the RV32 virtual addresses,
which would allow the user program's use of the full 4 GB.
11 years ago
Andrew Waterman
15b3ac1e94
Fix loading of misaligned ELF segments
11 years ago
Andrew Waterman
e474878db4
Fix stack discipline for recursive traps
11 years ago
Andrew Waterman
01fd29cb6e
Make PK compile on RV32
Of course, it doesn't work, because there's no support for
fromhost/tohost devices in RV32.
11 years ago
Andrew Waterman
a24e1934dd
Remove errant statement forcing mem size to 64M
h/t Palmer
11 years ago
Andrew Waterman
e554f30be8
Don't rely on mstatus.fs to determine FPU presence
11 years ago
Andrew Waterman
91058db5a6
Fix FP store emulation bug
11 years ago
Andrew Waterman
aedc6165cc
New virtual memory implementation (Sv39)
11 years ago
Andrew Waterman
f6659f1c76
Make printk safer and use less stack
11 years ago
Andrew Waterman
a79f62f72a
Merge [shm]call into ecall, [shm]ret into eret
11 years ago
Andrew Waterman
40668501fa
Fix some bugs in FP emulation
11 years ago
Andrew Waterman
438823e130
Use hcall instead of mcall for sbi calls
11 years ago
Andrew Waterman
6517fe26a2
Update to new privileged spec
11 years ago
Andrew Waterman
a4ae7da6ef
Fix softfloat float->int corner cases
11 years ago
Andrew Waterman
5c86450130
work in progress on new supervisor spec
11 years ago
Andrew Waterman
d2b36b1484
Fix FLE.D emulation
11 years ago
Andrew Waterman
6d84558e15
Emulate FP CSRs
11 years ago
Andrew Waterman
d05359c14e
return -ENOSYS for ioctl, rather than aborting
11 years ago
Andrew Waterman
0a81fd3a93
Support linkat, unlinkat, mkdirat syscalls
Also, old-style syscalls e.g. open are now implemented with e.g. openat.
11 years ago
Christopher Celio
b222ef6bcb
Increased max number of files,fds statically supported by pk.
The SPECINT benchmark 445.gobmk reads in a lot of files and would
sometimes fail due to being unable to open more files.
11 years ago
Andrew Waterman
68a2fe242b
Don't automatically set --host
11 years ago