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
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
c5f18f61c0
Add sbi_shutdown call
11 years ago
Andrew Waterman
3f9b5d7ab8
Fix VM, MIP encoding
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
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
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
19c8f69148
Relocate binaries that conflict with the pk's address space
Of course, this is only possible for PIEs, e.g. the dynamic linker.
11 years ago
Yunsup Lee
015195b66e
Revert "Enable support for the four custom instructions"
This reverts commit 2fa1726f0e .
Refactoring support for custom instructions.
12 years ago
Andrew Waterman
069bdd3f0d
Implement draft of new calling convention
Here is the new syscall ABI:
syscall number in a7
args in a0 - a6
return value in a0
Here is the integer register map:
x0 -> x0
x1 -> ra
x2 -> sp
x3 -> tp
x4 -> gp
x5 -> t0
x6 -> t1
x7 -> t2
x8 -> s0
x9 -> s1
x10 -> a0
x11 -> a1
x12 -> a2
x13 -> a3
x14 -> a4
x15 -> a5
x16 -> a6
x17 -> a7
x18 -> s2
x19 -> s3
x20 -> s4
x21 -> s5
x22 -> s6
x23 -> s7
x24 -> s8
x25 -> s9
x26 -> s10
x27 -> s11
x28 -> t3
x29 -> t4
x30 -> t5
x31 -> t6
12 years ago
Andrew Waterman
514adef486
don't forget to release locks!
12 years ago
Andrew Waterman
6d45e8de32
Prioritize fdiv/fsqrt emulation
12 years ago
Andrew Waterman
fda0d85ae4
Don't rely on the C library
12 years ago
Arun Thomas
2fa1726f0e
Enable support for the four custom instructions
* Update generated encoding.h (generated from riscv-opcodes)
12 years ago
Andrew Waterman
1d953bf6fc
Support glibc 2.20 programs
12 years ago
Christopher Celio
024053cd98
Fix uarch counter printout type.
12 years ago