scw
e6b13790fa
SH5 needs __HAVE_FUNCTION_DESCRIPTORS defined in order for ld.elf_so
...
to resolve SHmedia function pointers correctly.
2003-03-26 14:46:32 +00:00
scw
eefd7219fd
Sign-extend the return value, as required by the ABI.
...
While I'm here, simplify the asm operands/constraints.
2003-03-26 12:00:41 +00:00
scw
955a468334
Add PIC support.
2003-03-24 14:26:16 +00:00
scw
2e5c2cd2ae
Define just one mcount for both 32 and 64-bit ABIs; there's really no
...
advantage in having two slightly different versions.
Also save/restore FP register parameters.
2003-03-24 14:24:38 +00:00
scw
28db85d8f6
Relax the initial user stack alignment from 16 to 8 bytes.
...
Add a workaround for what appears to be a bug in binutils whereby
the entry point of an SHmedia binary can sometimes specify
SHcompact code (LSB is clear).
2003-03-24 14:21:27 +00:00
scw
5d74e4ddb2
Now that we can deal with debug exceptions, use a BRK instruction for
...
ddb breakpoints instead of TRAPA in order to simplify the trapa (syscall)
handler.
2003-03-19 11:37:57 +00:00
scw
2bce28091c
Fix some comments.
...
Set up stack frames in copyin/copyout and friends (if DDB is defined) so
that ddb stack traces can trace through them.
2003-03-19 11:34:28 +00:00
scw
7c18481cf2
G/C an obsolete comment.
2003-03-19 11:31:55 +00:00
scw
bfca0494bd
Try to configure all children of cprc0, not just clock.
2003-03-13 14:37:36 +00:00
scw
d4f824014d
A bunch of things:
...
- Clean up the way cpu-specific tlb/cache functions are configured
and used.
- Add a workaround for a problem whereby cpu* at superhyway? fails
to probe.
- Print more info about the cpu/cache.
- Move the RESVEC handlers back into generic sh5 code and ditch
the panic stack hack.
- Make the on-chip SCIF device the default console on Cayman.
- Add experimental support for booting via a standalone bootstrap
program (not yet committed) and using the boot parameters passed
in by it.
- Add a few more SH elf constants.
- Tick a couple of items off the TODO list.
2003-03-13 13:44:16 +00:00
scw
31b3a7c37f
In scif_getc(), check SCIF_SCFSR2_RDF in addition to SCIF_SCFSR2_DR to
...
detect waiting Rx data. This fixes an occasional console lockup when
when pasting text at the ddb prompt.
2003-03-13 13:19:01 +00:00
tshiozak
31e2cbf0b5
add some ISO C 1995 I18N functions and types:
...
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.
2003-03-02 22:18:11 +00:00
kent
cd7d9faeaf
Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
2003-01-28 01:07:51 +00:00
scw
e212eb9e09
Fix pasto in last commit.
2003-01-22 13:46:44 +00:00
scw
a4b020d99e
In cpu_upcall(), validate the address of the upcall handler so as to
...
avoid a kernel-mode exception if restoring an invalid SPC.
2003-01-22 13:40:57 +00:00
scw
3b0144945a
Fix a cpu_switchto() botch.
2003-01-22 13:38:51 +00:00
scw
fe8c97c2e1
In _MCONTEXT_TO_SIGCONTEXT(), set r24 to the magic number expected
...
by sh5's sys___sigreturn14().
2003-01-22 13:38:11 +00:00
scw
1ec8a7e381
Add _UC_UCONTEXT_ALIGN.
2003-01-22 13:35:55 +00:00
scw
2dd1c1657f
Add sigcontext/mcontext conversion macros.
2003-01-21 11:28:01 +00:00
scw
a57f525335
Define {,UN}LINK_BIG_FRAME() macros for dealing with stackframes
...
greater than 511 bytes in size.
2003-01-21 11:27:18 +00:00
scw
c3be47693c
Use 'int' instead of 'u_int32_t' in a couple of places to avoid
...
depending on sys/types.h.
2003-01-21 11:26:04 +00:00
scw
0767992461
If we don't explicitly recognise the trap type, only panic if it
...
came from kernel mode. Otherwise, print details of the exception
and send a SIGILL to the process.
The is necessary now that debug exceptions are handled here.
2003-01-20 22:32:26 +00:00
scw
def0257e54
Split struct reg into integer and FP parts, to be more like every other port.
...
As a side benefit, advertise PT_[GS]ETFPREGS.
2003-01-20 20:07:52 +00:00
scw
c64b785002
Add sh5 kernel support for SAs.
...
This gets the Cayman to multi-user with a non-SA aware userland.
2003-01-19 19:49:47 +00:00
scw
8b92aecb3f
Use the full 'sh5le-unknown-netbsd-' prefixed toolchain names, and
...
set optimisation to -O2 now that gcc seems to generate decent sh5 code.
2003-01-19 19:46:57 +00:00
wiz
1035faff1d
writable, not writeable.
2003-01-06 20:30:28 +00:00
wiz
c6f1277bfa
synchronous, not syncronous.
2003-01-06 13:10:25 +00:00
thorpej
dca15fc8c2
Use aprint_normal() for cfprint routines.
2003-01-01 02:10:08 +00:00
manu
4a06119a9d
Pass the system call table to trace_enter() and ktrsys() so that it is
...
possible to use alternate system call tables. This is usefull for
displaying correctly the arguments in Mach binaries traces.
If NULL is given, then the regular systam call table for the process is used.
2002-12-21 16:23:56 +00:00
thorpej
e8cc3884de
Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
2002-12-10 17:14:02 +00:00
thorpej
78ea2dd367
Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
...
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
2002-12-10 05:14:24 +00:00
scw
d4cfbd3754
Implement __cpu_simple_lock{,init,try}() for sh5.
2002-12-07 22:31:33 +00:00
scw
50247a2a3c
Fix PRIiPTR.
2002-12-07 21:37:35 +00:00
scw
57c2c2b87f
Add a hack at the end of setregs() which works around a bug which can,
...
under some circumstances, leave turds in the icache following vmspace
teardown.
It's not yet clear if this is a pmap bug or a toolchain problem since
the hack is unecessary when the kernel is compiled with -O0. Of course
that could just be masking the problem due to increased icache pressure...
2002-12-06 10:22:15 +00:00
scw
f051850107
Avoid strict-alias warnings.
2002-12-06 10:14:10 +00:00
scw
41085b101b
fsina.s, fsrra.s and fcosa.s take single-precision operands, not double.
2002-12-06 10:12:13 +00:00
scw
87897c05fe
Qualify ptel and tlbcookie fields with volatile since they are
...
modified by the TLB miss handler.
2002-12-06 10:10:48 +00:00
lukem
0635de35a3
Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
2002-11-26 23:30:07 +00:00
scw
918d34d917
Quell an uninitialised variable warning.
2002-11-24 12:07:52 +00:00
scw
2fcea657de
Implemented #2 : Improved TLB management
2002-11-23 09:27:03 +00:00
scw
a3885e9bdd
- Change VM_MIN_KERNEL_ADDRESS to start at KSEG1 instead of KSEG0.
...
- Overhaul the TLB management code such that we now keep track of
the exact TLB slot at which a mapping was inserted, both for user-
space and kernel mappings. This addresses #2 on the TODO list.
2002-11-23 09:25:54 +00:00
scw
dbaff62d21
Make this compile again.
2002-11-23 09:14:14 +00:00
manu
d584ed9598
Add a realcode argument to trace_enter and ktrsyscall. realcode is the
...
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.
2002-11-15 20:06:00 +00:00
scw
bc159224ed
Missing newline.
2002-10-31 14:52:54 +00:00
scw
78aeffb90b
Add an explicit ULL suffix to a 64-bit constant to appease gcc-current.
2002-10-31 14:52:30 +00:00
scw
3795c4e6f4
Since we keep a list of all mappings for a given physical page (even
...
unmanaged mappings) so we can deal with cache aliases, make sure to
skip unmanaged/wired mappings (added via pmap_kenter_pa()) when doing
things like pmap_page_protect().
2002-10-31 14:34:17 +00:00
scw
6a3f09110b
Catch NMIs when DDB is defined, instead of DEBUG.
...
Drop the interrupt level to zero when before handling ASTs in the
exit path of h/w interrupts.
2002-10-31 14:24:16 +00:00
scw
8bf915f645
When setting the SP for a process, copy the same value to the
...
process' FP for the sake of consistency.
2002-10-31 14:20:39 +00:00
jdolecek
c82ab2eb79
now that mem_no is emitted by config(8), there is no reason to keep
...
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
scw
b67ad48827
Put bit definitions for the FP control/status register in <sh5/fpu.h> and
...
use them instead of "magic" numbers in the source.
2002-10-24 13:58:48 +00:00