Commit Graph

32469 Commits

Author SHA1 Message Date
thorpej
7d6525e9b6 Handle the CPU_NTYPES == 0 case (as we would see in bootblocks)
in the CPU types predicates.
2002-07-17 06:17:20 +00:00
thorpej
477ba79eb9 Add a CPU_ISSUN4D predicate. 2002-07-17 06:07:29 +00:00
thorpej
be0b3b8b70 Instead of using a matrix of configured CPU types, first count
how many CPU types are configured into the kernel.  Then, use this
information to define the CPU predicate macros according to the
following rules:

1. If support for a CPU type is not configured into the kernel,
   then the test is always false.

2. Otherwise, if only one CPU type is configured into the kernel,
   then the test is always true.

3. Otherwise, we have to reference the cputyp variable.

Use a similar strategy for short-cutting the page size related
definitions.
2002-07-17 05:57:47 +00:00
thorpej
29b1d0613b Remove CPU_ISSUN4MOR4U, CPU_ISSUN4OR4C, and CPU_ISSUN4COR4M. 2002-07-17 04:56:49 +00:00
thorpej
36fb7ee740 Remote CPU_ISSUN4OR4C and CPU_ISSUN4COR4M, and instead express them
as (CPU_ISSUN4 || CPU_ISSUN4C) and (CPU_ISSUN4C || CPU_ISSUN4M),
respectively.  The compiler can still optimize as desired by expressing
them this way, and it simplifies adding new tests.

While here, just remove CPU_ISSUN4MOR4U; it's not used by anything.
2002-07-17 04:55:56 +00:00
matt
436f257283 Add a common file to do pmap_zero_page/pmap_copy_page/pmap_pageidlezero and
pmap_syncicache.  This file uses a ppc feature in a sick and twisted way
to avoid mapping the physical pages used by those routines.  It performs
the operations with the MMU disabled but PPC exception save and retstore
the machine state and are invoked with the MMU disabled, this doesn't have
an adverse effect on the system.

Currently only enable for MPC6xx and !OLDPMAP.
2002-07-17 03:11:07 +00:00
thorpej
aa54c756ac Print out a meaningful message on the sun4d if the kernel does
not support the sun4d, like we do with sun4c and sun4m.
2002-07-17 02:57:14 +00:00
thorpej
acf4b72be5 Add CPU_SUN4D. 2002-07-17 02:43:43 +00:00
thorpej
5fd1700062 Add SUN4D to the list of arch's in opt_sparc_arch.h. 2002-07-17 02:23:15 +00:00
matt
ece8b74130 Add machdep.powerpc sysctl. Change the default value of powersave to -1
(< 0 mean no powersave available).  Enable powersave by default for
750/7400/7410 but leave if off for 7450/7455.
2002-07-16 23:04:20 +00:00
matt
3dc1994d70 Don't install extintr handler if not supplied.
Make panic message more informative.
2002-07-16 16:39:12 +00:00
ichiro
2255ed4ecb add ixpcom to cdevsw 2002-07-16 14:20:04 +00:00
ichiro
78573b4061 delete unneed file 2002-07-15 17:21:12 +00:00
ichiro
ed89c15166 add configuration file
Netwise APlication Platform Board
2002-07-15 17:18:03 +00:00
ichiro
3aee04fce7 add support ixp12x0 eva-board "IXM1200" 2002-07-15 17:13:30 +00:00
ichiro
7374c0afee add support for ixp12x0 2002-07-15 16:27:15 +00:00
rafal
653e0b546e Fix boot device detection in the face of multiple SCSI controllers. This
isn't perfect (the NetBSD device units must match ARCS device numbers), but
it's better than randomly matching one of the devices.  Fixes PR 16584 from
Scott G. Taylor.
2002-07-15 04:38:59 +00:00
chs
ef1115901f put the OF buffer page in the BSS rather than allocate it at runtime.
from PR 14497.
2002-07-14 20:56:12 +00:00
thorpej
c2a0c6fe7c Add a missing ":" when printing the delay constant message. 2002-07-14 19:42:58 +00:00
drochner
08285ba648 explicitely set ds, es, fs and gs to 0 before calling kvm86;
use the right places in the trap frame (the 4 segment registers which
get loaded on a rti to VM86 mode) to set them for BIOS calls
(we have never set them to anything but 0 before, so it didn't matter)
2002-07-14 14:39:44 +00:00
drochner
ff2b8f83ec fix typo which made textmode check always succeed 2002-07-14 13:56:20 +00:00
fvdl
c24cb24f0d Update comment. 2002-07-14 12:30:36 +00:00
fvdl
ee925d3924 Consistently handle segment selectors in traps and interrupts. 2002-07-14 12:20:45 +00:00
toshii
aa2f38ff11 Recognize hpcboot's "b=xx" option, which specifies the root device to use. 2002-07-13 13:40:28 +00:00
drochner
79c6003c2b make sure struct proc and struct frame are declared 2002-07-13 12:30:11 +00:00
scw
bef00d4895 m68k syscall rototill:
- Switch all m68k-based ports over to __HAVE_SYSCALL_INTERN.
 - Add systrace glue.
 - Define struct mdproc in <m68k/proc.h> instead of <machine/proc.h>.
   (They were all defined exactly the same anyway, other than a couple
   of the MDP_* flags.)
2002-07-13 08:28:40 +00:00
isaki
b35fcc7d5a - Use HZ mechanism.
Pointed out by Perry E. Metzger <perry@piermont.com> on port-x68k.
- Correct microtime() value.
2002-07-13 05:55:26 +00:00
scw
d911ae5d57 SH5 systrace(5) glue. 2002-07-12 20:43:12 +00:00
scw
e6115d56d5 Add some devices which should be present in the latest simulator. 2002-07-12 20:41:55 +00:00
scw
6daca7f652 Ditch the "simulated clock" hack. It would never really have worked,
and the latest simulator won't need it anyway.
2002-07-12 19:52:21 +00:00
scw
e9688612da Make it so kernels can be compiled for 32-bit or 64-bit with a
simple config file option.

Also, don't hard code the endian setting in a header file. Rely instead
on the compiler defining __LITTLE_ENDIAN__ and DTRT as appropriate.
2002-07-12 19:33:27 +00:00
scw
3a5b311011 Cast a pointer to uintptr_t before comparing with a long int. 2002-07-12 19:27:32 +00:00
scottr
3b09fcde6d Correct misplaced #endif that causes compile-time error if
neither M68040 nor M68060 are configured into the kernel.
2002-07-12 18:53:16 +00:00
scw
c02c1c7cd2 Clean up <sh5/asm.h> to be more 64-bit friendly.
Clean up the kernel asm files to be less 32-bit dependent.
2002-07-12 15:42:27 +00:00
scw
1664941b2c Blah, missed a comma. 2002-07-12 13:37:32 +00:00
rafal
fa5c0332f8 Fix PR port-sgimips/17568: the PROM on early Indigo2 machines did not like
the ECOFF version of boot produced by `objcopy'.  Using elf2ecoff make it
work, so use that instead.  Also, don't bother stripping the bootblocks on
install (as that confuses strip, at least for the ECOFF one, and since the
build already strips them).
2002-07-12 13:04:03 +00:00
scw
2675306718 Add IEEE FP mode control functions and definitions for SH5. 2002-07-12 12:20:24 +00:00
scw
67ea1085eb Add MD procfs stub for SH5. 2002-07-12 11:20:12 +00:00
scw
270555326f More SH5 toolchain hacks: Don't define _BSD_WCHAR_T if compiling C++. 2002-07-12 11:19:08 +00:00
matt
bbab86c27b Enable COMPAT_LINUX 2002-07-12 05:30:24 +00:00
simonb
0e084cea1c Add a comment; fix white-space niggle. 2002-07-12 00:40:00 +00:00
simonb
bb0c5d7d98 Don't need to include <sys/malloc.h>, <machine/locore.h> or
<uvm/uvm_extern.h> here.
2002-07-12 00:27:18 +00:00
simonb
85c8470e73 Fix a typo in a comment. 2002-07-12 00:23:04 +00:00
scw
f0643885eb Fix a mem_region botch:
physmemr and availmemr both need to be arrays, where the last element
has `size' set to zero to act as a terminator.
2002-07-11 21:50:22 +00:00
scw
60fb656ee5 Validate the branch target registers and saved PC using the
appropriate macro.
2002-07-11 21:23:30 +00:00
scw
14013f679d Add a macro which verifies that a 64-bit value is a valid effective
address as defined by the cpu's Implemented Effective Address bits.
2002-07-11 21:21:58 +00:00
scw
d08670adc8 Sync with reality. 2002-07-11 21:20:23 +00:00
matt
b35e786de2 Add a linux_syscall_intern entry (appropriately ifdef'ed COMPAT_LINUX).
When/if PPC ever supports LKMs, this should be moved to a separate file.
2002-07-11 19:32:43 +00:00
jdolecek
adaf086af4 do not install apbus.h, apcall.h, romcall.h 2002-07-11 19:04:19 +00:00
mycroft
ade1f1e303 Oops; add scsibus too. 2002-07-11 18:07:22 +00:00
mycroft
8c81ec0a3c Enable the SCSI driver. 2002-07-11 17:56:31 +00:00
christos
f12f20db6c Apply patches from Christian Limpach:
- NeXT label reading support
    - SCSI dma fixes
    - media support for if_xe.c

Some of these need more cleanup, but at least make SCSI support usable on
the NeXT.
2002-07-11 16:03:09 +00:00
scw
0d0a6374ef Some cleanups for the MACHINE_ARCH endian suffix change. 2002-07-11 14:42:55 +00:00
scw
d55184012a Cleanup the sigcontext structure, and sync {,sig}jmp_buf size and
offsets with it.
2002-07-11 14:16:42 +00:00
scw
5c90e3c0d6 In sys___sigreturn14(), validate the saved branch target registers and
program counter to avoid a possible kernel-mode IADDERR exception when
we try to restore the trapframe on return to user-mode.
2002-07-11 14:15:32 +00:00
scw
384b76c19b Install <sh5/pte.h> for the benefit of cpu.h. 2002-07-11 14:11:18 +00:00
scw
e0e8310758 Include <machine/frame.h>, not <sh5/frame.h> 2002-07-11 14:10:39 +00:00
scw
026df6bf33 Cleanup the frame link/unlink macroes. 2002-07-11 14:09:34 +00:00
scw
b234c1aa10 Moved MID_MACHINE definition from <machine/param.h> 2002-07-11 14:08:45 +00:00
scw
e700a799a3 Follow convention for MACHINE_ARCH endian suffix. 2002-07-11 14:07:41 +00:00
simonb
00f3022be0 Remove unused MCLOFSET define. 2002-07-11 13:36:45 +00:00
wiz
7b9b4ac6f7 'environment', not 'enviroment' 2002-07-11 10:53:19 +00:00
drochner
ef054011f7 -if getting info for a mode fails, print out the mode
and continue with the next
-check that text modes are VGA compatible (haven't seen it
 otherwise yet, but to be sure...)
2002-07-11 10:02:21 +00:00
simonb
873edaed34 Clean up some white space niggles. 2002-07-11 01:38:48 +00:00
simonb
dd2d708bd5 Echo the MKING command before executing it. 2002-07-11 01:29:28 +00:00
simonb
ffb069c949 Change the (intentionally) illegal "movd 0,0" to it's .word
equivalent; newer GAS complains about the illegal construct
and errors out.

XXX: what is the illegal instruction for exactly?
2002-07-11 00:41:50 +00:00
simonb
3350e73517 Add kttcp device. 2002-07-11 00:17:39 +00:00
jdolecek
c96cc85feb enable KERNFS and PROCFS - this is GENERIC after all, right?
adresses port-alpha/15348 by Ray Phillips
2002-07-10 22:05:29 +00:00
drochner
1719b0ab59 get some more info out of the VESA BIOS and attach subdevices for
8-bit pseudo color and text modes
still doesn't do anything useful
(It would be easy to attach a wsdisplay, but we have to cooperate with the
PCI or ISA attached VGA drivers. There are open issues.)
2002-07-10 19:15:42 +00:00
drochner
cd34aa2e82 add a function to read from the BIOS vm86
(most of it is already mapped to KVM, but it appears easier to me
to do it this way instead of a lot of range checks)
2002-07-10 19:09:35 +00:00
scw
52876ee77d First cut of the kernel side support for sh5 signals. 2002-07-10 15:55:01 +00:00
scw
528a743ee9 Update sh5_fpsave() prototype to match reality. 2002-07-10 15:53:57 +00:00
scw
a30ba3dd9a Need <sys/types.h> 2002-07-10 15:52:49 +00:00
scw
f78244feaf Before returning to userland, clear the FPU regs saved flag. 2002-07-10 15:52:07 +00:00
scw
0f3678d589 Track FPU register save status. 2002-07-10 15:49:33 +00:00
fredette
6e248e0a29 Define __HAVE_FUNCTION_DESCRIPTORS, which is used by ld.elf_so. 2002-07-10 15:18:06 +00:00
simonb
dbdcffef4f Add kttcp device. 2002-07-10 13:44:02 +00:00
scw
51f3f8ff9c More superh toolchain hacks. This time, it expects wchar_t to be a short. 2002-07-10 12:23:08 +00:00
scw
187f1ae3a1 Some hacks which will go away when we switch to a native NetBSD toolchain.
The SuperH compiler erroneously prepends underscores to global syms...
2002-07-10 11:36:23 +00:00
scw
5f0c27f158 Missed some semi-colons. 2002-07-10 11:31:25 +00:00
scw
0b074fa253 SH5 floating point support, based on sh3. 2002-07-10 10:38:22 +00:00
scw
f616928985 Doh, missed a #endif 2002-07-10 10:30:19 +00:00
scw
ea38860915 SH5 profiling support. 2002-07-10 10:24:16 +00:00
scw
c7510b3b78 Fix FP reg names 2002-07-10 10:22:43 +00:00
scw
293298968a Descend into include subdirs and install relevant headers. 2002-07-10 08:56:11 +00:00
itojun
941a391c59 sync with GENERIC 1.501. comment out devices that are not present.
(you can strip it down even more by commenting out unneeded filesystems)
2002-07-10 08:41:28 +00:00
itojun
0e727055ba whitespace 2002-07-10 08:37:40 +00:00
ichiro
83c0b66d47 add cpu id for "PXA250/210 3rd version CPUcore".
for using many PDA/xscale-core.
2002-07-10 07:00:50 +00:00
kent
9dcee9625e Line 281-304:
Use %edi instead of %edx to keep destination address because memcpy() MAY
break %edx.
2002-07-10 05:56:44 +00:00
matt
6e81c6293f Bump VM kernel buffer space from 128MB to 192MB now that we have 512MB of
KVA space.
2002-07-10 05:25:12 +00:00
fvdl
e539a84832 Since the return address is now part of struct sigframe, adjust the stack
accordingly to match alignment when copying it out.
2002-07-10 01:55:43 +00:00
fvdl
4ddf293c2e Hand-align the fxsave area to be able to determine its offset in structures
more precisely.
2002-07-10 01:54:00 +00:00
matt
2df1a9cfb4 Add more host-bridges. 2002-07-09 23:51:15 +00:00
simonb
926ac99cd5 Use the interrupt numbers for emac and pckbc. 2002-07-09 23:34:28 +00:00
simonb
cf4396a2d7 During native signal delivery, arrange to have the signal handler invoked
directly, using the trampoline only for the return path.  Saves a jsr and
movqd insn in the trampoline.
Changes gratuitously ripped off the i386 work for same.
2002-07-09 23:10:03 +00:00
jdolecek
f4e3c06369 always include ci_s*_locks in struct cpu_info, so that the size doesn't depend
on DIAGNOSTIC/LOCKDEBUG settings
2002-07-09 22:28:30 +00:00
scw
f3309b8981 Redefine USER_SR to avoid clashing with MVMEPPC_PHYS_BASE_MEM in bat[12].
Thanks to Matt Thomas for pointing out the problem.
2002-07-09 20:06:35 +00:00
matt
4f983e2982 Common OFW code has been moved to powerpc/mpc6xx/ofw_subr.S. Now use it. 2002-07-09 19:21:03 +00:00
matt
7c3dbdc01d When allocate VA for the msgbuf, don't allocate pages too since we have
already done that in pmap_bootstrap.  (fixes a small page leak at startup).
2002-07-09 19:05:00 +00:00
mycroft
79d0ee0424 Remove VNODE_OP_NOINLINE, which is already in TX3912. 2002-07-09 14:54:39 +00:00
simonb
cb09cbdc32 Work around an egcs internal compiler error when compiling ip6_mroute.c
with -O2 or greater.
2002-07-09 12:55:47 +00:00
hamajima
b99ebea79a comment out "options OFB_ENABLE_CACHE" again,
because this makes PowerMac 8500 + Millennium II broken.
OKed by tsubai.
2002-07-09 10:14:18 +00:00
jdolecek
9cfce187c5 track rev. 1.36 of GENERIC:
adapted to new interrupt code and shb changes.

also disable tlphy - no bus_dma, so it doesn't compile
2002-07-08 22:49:01 +00:00
jdolecek
07f9e74b2d change to be just wrapper around MMTA 2002-07-08 22:48:04 +00:00
jdolecek
ee95800a31 g/c COMPAT_13 - there wasn't any 1.3 release of mmeye. According
to removal log of sys/arch/sh3/sh3/compat_13_machdep.c, COMPAT_13 was trace
of i386 port.
2002-07-08 22:14:35 +00:00
rearnsha
a1614f2bc8 Changes to allow for the fact that the kernel is now mapped at
0xc0200000.  Tidy up to remove dead comments and code.
Allow more than one L1 entry for the kernel space and use the 'spare'
memory below the kernel code for the initial page tables in the same
way that the iq80310 does.
2002-07-08 16:20:07 +00:00
rearnsha
20ea379ed5 Map the low 4M of memory at 0xc0000000. 2002-07-08 16:17:42 +00:00
rearnsha
9fb9bc0c8a Use the Integrator ldscript and build .bin and .srec versions of the
kernel.
2002-07-08 16:15:44 +00:00
rearnsha
165a2e8904 Script file for linking an Integrator kernel image. 2002-07-08 16:14:54 +00:00
fvdl
b0ba7094b2 netbsd32_sysarch moved here. 2002-07-07 23:28:04 +00:00
fvdl
728043f0da Add definitions for 32bit sysarch calls. 2002-07-07 23:27:00 +00:00
fvdl
c1593a7671 Implement a few 32bit sysarch calls. 2002-07-07 23:25:37 +00:00
fredette
f79af764d7 Now include the HPPA trap number in a user backtrace, and display
backtraces for more traps.
2002-07-07 22:52:54 +00:00
matt
0d4f94281d Change OFB_ENABLE_CACHE to be enabled. 2002-07-07 19:40:05 +00:00
matt
1a8d29efcb Make the gem driver the default now, not the macppc specific gm. 2002-07-07 19:36:47 +00:00
matt
4577742ff6 Use SR 11 as USER_SR. (12 is used as an I/O BAT). 2002-07-07 19:32:49 +00:00
matt
e64bc5acc1 Allow USER_SR to be overriden on a per-port basis 2002-07-07 19:29:18 +00:00
matt
902fd38614 Update OFB_ENABLE_CACHE to search for a empty bat that does not
conflict the USER_SR or one of the kernel SRs.
2002-07-07 18:35:10 +00:00
drochner
cff6339e49 attach "vesabios"
(well, not really yet)
2002-07-07 13:25:43 +00:00
drochner
2eb946d46c call kvm86's GPF handler 2002-07-07 13:24:36 +00:00
drochner
5641e4d726 Initialize the kernel vm86 code before autoconfiguration, so that
BIOS calls can be used for device probing etc.

And now it's getting nasty:
The kvm86 code needs a TSS, and it is most convenient to use proc0's
instead of doing some static allocation. (We might reconsider this if
we want to use vm86 for console initialization, ie much earlier.)
For the TSS slot to be allocated, we have to move the call to
i386_proc0_tss_ldt_init() up.
Since the npx code twiddles CR0 the corresponding pcb field must
be synchronized later. It would probably be cleaner to do this in
the npx driver.
2002-07-07 13:23:17 +00:00
drochner
bc442c7173 -if APM_USE_KVM86 is set, use BIOS calls in virtual 8086 mode
-make sure the register frame is really cleared before use
 (someone added a field to the frame later which didn't get zeroed)
2002-07-07 13:06:56 +00:00
drochner
da32c6df4a add definitions for the in-kernel vm86 code and vesabios attachment,
add an option APM_USE_KVM86 which does what its name implies
2002-07-07 13:03:47 +00:00
drochner
c359f53282 First cut on VESA BIOS access to get extended video modes and framebuffer
access. For now, there is just probing code.
2002-07-07 12:59:58 +00:00
drochner
3b22d7973b This is a (still experimental) framework to run BIOS code in a virtual
8086 machine. Ifff it works, it is much easier and more elegant than
going to real real mode:
-simpler code
-no need for "identity" memory mappings
-easy passing of buffers for bulk data to functions
-some more control
There is no interrupt support ATM, and it lacks a function to access
random virtual memory of the VM. MP issues to consider.
2002-07-07 12:56:34 +00:00
matt
140a273f7a Use lvewx/stvewx for VSCR and save ourselves 12 bytes we don't need to load. 2002-07-07 00:46:20 +00:00
dbj
397ff5c82a protect Debugger() call with ifdef DDB 2002-07-07 00:43:11 +00:00
gmcgarry
4b0692e70a Don't invoke MachFPInterrupt() if we're using SOFTFLOAT. 2002-07-07 00:22:18 +00:00
gmcgarry
cc4037a913 Overhaul the emulation facility. We do this by:
- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
  and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
  emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.
2002-07-06 23:59:18 +00:00
gmcgarry
de0c9630a1 Fix console bell. 2002-07-06 23:15:29 +00:00
matt
263c3cd253 Merge macppc/ofppc locore OFW code and move it here. 2002-07-06 18:01:23 +00:00
matt
51f2834470 Bump max user address to 0xfffff000 (XXX maybe it should be -NBPG?). 2002-07-06 17:15:57 +00:00
fredette
be87bf4822 Fixed the options KDGB_DEVNAME, for recent changes to config(8). 2002-07-06 15:41:38 +00:00
fvdl
7cc42e6abb Move struct savefpu outside ifdef _KERNEL for the benefit of userland
code that includes <machine/pcb.h>
2002-07-06 10:43:32 +00:00
fvdl
405b1a8bb6 Add mtrr.c 2002-07-06 10:23:06 +00:00
gmcgarry
44e6549da3 Invert test of EPASSTHROUGH. Problem reported by
Bernd Sieker <bsieker@freenet.de>.
2002-07-05 23:43:28 +00:00
matt
685778b53b Peform a rototill over the powerpc-based ports.
Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop.  Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
2002-07-05 18:45:15 +00:00
fvdl
8b6c180747 Previous commit left a piece of old code in that would leak top-level
PTPs; remove it.
2002-07-05 16:52:39 +00:00
tsutsui
0fe49daba1 Add keydescs for swapctrlcaps, and clean up formating. 2002-07-05 14:29:06 +00:00
scw
8324df7cf0 Sync the ktrsyscall() arguments with -current reality. 2002-07-05 14:05:58 +00:00
scw
63fd77b84b Sync the sendsig() argument list with -current reality. 2002-07-05 14:04:00 +00:00
scw
8aecaeac04 Roll our own CWARNFLAGS. There are some things in MI code which the
SuperH version of gcc barfs over.
2002-07-05 14:02:31 +00:00
abs
eb73becae2 Ensure all INSTALL config files consistantly include PIPE_SOCKETPAIR,
MALLOC_NOINLINE, and VNODE_OP_NOINLINE. The exceptions are when they
include another config files that already defines the options, or if
they are for an embedded board, just define a few extra options, and
do not already define PIPE_SOCKETPAIR.
2002-07-05 13:40:10 +00:00
scw
59474a8c82 NetBSD, meet the SH-5 cpu.
SH-5, meet NetBSD.

Let's hope this is the start of a long and fruitful relationship. :-)

This code, funded by Wasabi Systems, adds initial support for the
Hitachi SuperH(tm) SH-5 cpu architecture to NetBSD.

At the present time, NetBSD/evbsh5 only runs on a SH-5 core simulator
which has no simulated devices other than a simple console. However, it
is good enough to get to the "root device: " prompt.

Device driver support for Real SH-5 Hardware is in place, particularly for
supporting the up-coming Cayman evaluation board, and should be quite
easy to get running when the hardware is available.

There is no in-tree toolchain for this port at this time. Gcc-current has
rudimentary SH-5 support but it is known to be buggy. A working toolchain
was obtained from SuperH to facilitate this port. Gcc-current will be
fixed in due course.

The SH-5 architecture is fully 64-bit capable, although NetBSD/evbsh5 has
currently only been tested in 32-bit mode. It is bi-endian, via a boot-
time option and it also has an "SHcompact" mode in which it will execute
SH-[34] user-land instructions.

For more information on the SH-5, see www.superh.com. Suffice to say it
is *not* just another respin of the SH-[34].
2002-07-05 13:31:28 +00:00
abs
d38d8c6c75 Regen from GENERIC.in 1.2:
Only difference is that INSTALL now defines VNODE_OP_NOINLINE and MALLOC_NOLINE
2002-07-05 13:27:59 +00:00
abs
a98e1ff5cc Ensure INSTALL media has PIPE_SOCKETPAIR, MALLOC_NOINLINE and VNODE_OP_NOINLINE 2002-07-05 13:18:21 +00:00
abs
7be2718ed4 Use MALLOC_NOINLINE (saves 11K on FOURMEG) 2002-07-05 13:06:45 +00:00
thorpej
011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
lukem
62e9bafd31 use cdev_mouse_init() for wsmux 2002-07-04 23:24:43 +00:00
thorpej
00e59f25b7 Eliminate two unused sigframe members. 2002-07-04 21:33:43 +00:00
thorpej
625abcf84b Eliminate two unused sigframe members. 2002-07-04 20:22:50 +00:00
thorpej
bf7d5bca07 Eliminate 4 unused sigframe members. 2002-07-04 19:20:01 +00:00
scottr
c509ab3f19 Add (unimplemented) cases to handle the 68020 and 68030 to
bus_dmamap_sync().  This corrects a fatal bug on at least some 68030-
based Macs. Closes PR 17180.
2002-07-04 18:09:59 +00:00
scottr
ee8f37fa3f Add support for DHCP network configuration. 2002-07-04 17:59:33 +00:00
thorpej
fe53f433d8 The signal trampoline runs in userspace; do not profile it. 2002-07-04 16:44:10 +00:00
thorpej
9759b269b6 Add ENTRY_NOPROFILE(). 2002-07-04 16:43:21 +00:00
junyoung
3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
fvdl
cf9727c9c6 Uncomment x86_64_iopl args. 2002-07-04 10:49:33 +00:00
fvdl
105d80aaa0 The double fault exception doesn't push an error. 2002-07-04 10:47:02 +00:00
fvdl
9fe7e89bfe Use a seperate stack for the double fault trap. 2002-07-04 10:46:21 +00:00
fvdl
860a1c9ae6 Enable the iopl syscall. 2002-07-04 10:44:00 +00:00
fvdl
03068e0f6f Print a little more info for unhandled traps. For the time being,
halt the CPU, don't call panic() (until DDB is done).
2002-07-04 10:42:00 +00:00
fvdl
9ec0782af4 Make this look a little more like -current i386 pmap.c 2002-07-04 10:38:26 +00:00
fvdl
4839f70ff2 Fix parameter passed to init_x86_64. 2002-07-04 10:34:22 +00:00
fvdl
ffb9c17b1c Match parameter decl of init386 with reality. 2002-07-04 10:22:20 +00:00
thorpej
584c5c23d3 During signal delivery, arrange to have the signal handler invoked
directly, using the trampoline only for the return path.  Saves a
"jsr" in the trampoline.

Reviewed, tested and OK'd by Steve Woodford.
2002-07-04 01:50:39 +00:00
matt
25036f6b2d Properly compensate for rounding the start of a mem_region up. 2002-07-03 20:41:20 +00:00
yamt
7b17e9ce50 add KSTACK_CHECK_DR0. 2002-07-03 02:46:11 +00:00
yamt
d96bff0e27 add KSTACK_CHECK_MAGIC. discussed on tech-kern. 2002-07-02 20:27:44 +00:00
matt
af8dc59949 Add AltiVec routines for save_vec/enable_vec/init_vec. 2002-07-02 15:22:47 +00:00
matt
708f4c7b9b Add VRSAVE. 2002-07-01 20:11:05 +00:00
christos
61a86a83fe add a couple more dependencies so that we can build a kernel without
make depend.
2002-07-01 16:37:08 +00:00
ragge
779789e94f Protect biodone() with spl7(). Found by art@openbsd, but fixed in the
wrong way.
2002-07-01 16:20:35 +00:00
fredette
cfd4248d21 Made the signal trampoline PLABEL-aware.
Added a missing comma to the pmap_redzone() call.
2002-07-01 16:10:02 +00:00
christos
2a01227008 Add example use of WSDISPLAY_CHARFUNCS, from Julio Merino 2002-07-01 13:19:05 +00:00
thorpej
0ba2c1b425 When delivering a signal, arrange for the signal handler to be invoked
directly, using the trampoline only for the return path.
2002-07-01 03:10:01 +00:00
thorpej
47506c123a Add kttcp device. 2002-06-30 23:30:07 +00:00
scottr
9765c0afdf Before reading the (new) Apple Partition Map laid out by sysinst, be sure
to clear the disk label. From Bob Nestor; part 2 of 2 of a fix for
PR 15528.
2002-06-29 19:44:52 +00:00
matt
76c24da31d Add kttcp device. 2002-06-29 19:04:45 +00:00
eeh
c05c5884e6 Turn on parity checking for the PCI bus. 2002-06-29 02:35:22 +00:00
thorpej
7f2925365c Add the kttcp device. 2002-06-28 23:29:26 +00:00
tsutsui
cb383cb5db Define MSGBUFSIZE here only if it's not specified by options(4). 2002-06-28 17:40:20 +00:00
briggs
1b3d605b4e Remove complaint: bus_dmamap_destroy() called for map with valid
mappings bus_dma(9) states: "In the event that the DMA handle contains
a valid mapping, the mapping will be unloaded via the same mechanism
used by bus_dmamap_unload()."  And some drivers do mean to skip the
unload step.
2002-06-28 15:21:00 +00:00
matt
3043c05326 Add common routines to do BAT initialization, trap vector setup,
interrupt vector installation, VM initialization, core-dumps (stubbed),
and network soft interrupts.  Also kvtop and mapiodev.
2002-06-28 02:32:16 +00:00
matt
f7a6553147 Add common syscall dispatcher. Also put child_return in here. 2002-06-28 02:30:06 +00:00
matt
511223b674 If ALTIVEC is not defined, treat EXC_VEC|EXC_USER exceptions as PGM
exceptions.  [Note that we still can't trap these due to issues in
trap_subr.S which are (yet) fixed]
2002-06-27 21:15:35 +00:00
pooka
c558b464ba Assign COPTS instead of adding to it, avoids situation where -mi386
is mixed with -march=something_incompatible

suggested by thorpej
2002-06-27 20:44:08 +00:00
ross
686a24e882 add bktr 2002-06-27 18:34:32 +00:00
gmcgarry
f7458b82ef Back out part of revision 1.20 which was causing PROM re-entry
to fail.  Reported by Jarle Greipsland <jarle@uninett.no>.
2002-06-27 08:45:25 +00:00
junyoung
db4ede9522 Add VGA_CONSOLE_ATI_BROKEN_FONTSEL (disabled by default). 2002-06-27 06:34:23 +00:00
simonb
a441a7dffa Remove some clocktick debug code. 2002-06-27 04:09:15 +00:00
simonb
7471732325 Add the 20Kc processor ID. 2002-06-27 03:43:45 +00:00
matt
cd85109523 Make traps even smaller by noticing the checking of privilege mode and
use of curpcb/USPACE is common and move that into the common trap processing.
2002-06-26 20:00:17 +00:00
drochner
8e82746524 avoid assembler warning 2002-06-26 12:20:29 +00:00
yamt
175fe41cad stack frames can be overwrapped for eg. softintr. 2002-06-26 08:18:01 +00:00
matt
1a5c0cf685 When not using the OLD pmap, bump kernel KVA space to 512MB (OLD pmap stays
at 256MB).
2002-06-26 01:16:22 +00:00
matt
7a12a9737c Revamp how SR(s) are loaded on the user/kernel boundary. We now load all
16 SR registers when transitioning between kernel and user.  Also, don't
reload the kernel SR(s) on every trap but only on traps from user space.
Instead of loading magic SRs for the kernel, load the kernel SRs from the
kernel_pmap_.  This makes trap_subr.S completely ignorant of SR uses and
so they can change with having to change trap_subr.S.  Also note that
since the user and kernel get complete SR sets, user VA space can now be
increased to 4GB if desired.
2002-06-26 01:14:45 +00:00
matt
7c77963b01 Set SR_PRKEY for user pmaps. For the kernel SR(s) set SR_SUKEY|SR_PRKEY.
Note that we never use a PTE PP of 0 or 1 (supervisor protection) so the
"key" is basically unused.  However, use SR_PRKEY for user space is
conceptionally the right thing to do.  Currently the kernel_pmap SR(s) are
ignored but that is going to be fixed shortly.
2002-06-26 01:10:20 +00:00
thorpej
a572f8f4a5 Report stray interrupts. 2002-06-26 01:06:44 +00:00
drochner
a548b203d4 use PCI_ID_CODE instead of a local macro (cosmetics) 2002-06-25 21:18:32 +00:00