Commit Graph

3078 Commits

Author SHA1 Message Date
simonb d9ab16ba2f Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
  are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
2002-02-26 15:13:19 +00:00
kleink bc2fec2880 Typo in comments. 2002-02-25 16:18:19 +00:00
scw c4dbe1a160 Allow MD code to provide functions for reading/writing NVRAM/RTC
locations. If passed NULL, the old behaviour using bus_space_{read,write}_1()
is used. Otherwise, all access to the chip goes via the MD functions.

This is necessary for mvmeppc boards where the mk48txx NVRAM/RTC is not
directly addressable.
2002-02-23 17:18:54 +00:00
wiz 37e458fa45 strategy should have an 'r'. Inspired by similar change in OpenBSD. 2002-02-19 17:09:40 +00:00
simonb 2d8577fb83 Clean up some rampant code duplication wrt ieee number handling:
- Add alignment-safe double and float unions.
 - Use the above for the __infinity and __nan constants on all
   architectures that use the standard ieee754 representation of
   those constants.
 - Add a single copy of various ieee754 math functions (frexp, isinf,
   isnan, ldexp and modf) that had numerous duplicates among the
   arch-specific directories.
 - Use the above functions on all architectures where the generic C
   versions where used.  Architectures that had local assembly
   routines are untouched (for those functions only).
2002-02-19 13:08:12 +00:00
uwe b7a9ca77f2 We are using shared headers from dev/ebus now. 2002-02-18 04:55:00 +00:00
uwe e158bed889 Switch to shared EBus headers in dev/ebus. 2002-02-18 04:52:26 +00:00
uwe 8598481f3c Convert to use shared headers in dev/ebus. Move ebus_softc definition here.
Normalize bar field of EBus children PROM "reg" property to be the BAR
offset in PCI config space like on sparc64 when building ebus_attach_args.
2002-02-18 04:50:57 +00:00
wiz 3cc2ef9997 Update description for icsphy. 2002-02-10 17:36:52 +00:00
uwe 7948c19410 Cosmetic changes: clean up debugging ifdefs and use consistent wording
in panic messages.
2002-02-08 13:10:42 +00:00
pk ae36e0e350 bootpath_build(): parse boot path correctly if the boot device arguments
consists of more than one character (we still pay attention to the first
argument character only).  From bt@csfps.de; PR#15495.
2002-02-05 13:54:39 +00:00
pk 3ae8fa4104 Rename `esym' to `kernel_top' and always initialize it in locore from
the information provided by the loader if possible (defaulting to `end').
If the DDB symbols aren't needed, `kernel_top' is adjusted in
autoconf:bootstrap() before calling pmap_bootstrap(). It will also
preserve the bootinfo data (if passed by the loader) for non-DDB kernels.
2002-02-04 08:36:36 +00:00
darrenr 0d5f0d9024 * add machdep.booted_device and machdep.boot_args (both fetched from
appropriate PROM variables).
* return "netbsd" for machdep.booted_kernel if the PROM doesn't return us a
  kernel name.
2002-02-03 14:10:02 +00:00
uwe 4495f84bf9 Driver for pckbc in javastations. Not finished yet. 2002-01-31 17:34:51 +00:00
uwe 39f110f6f7 Auto-configuration output formatting nit.
Don't start the attachment message on a new line.
2002-01-31 11:51:25 +00:00
uwe a147f77669 Comment update for PCI_CONFIG_DUMP: dumping PCI config space for EBus
seems ok now.  But an attempt of reading IGA1682 config space past
offset 64 hangs the machine.
2002-01-29 06:59:26 +00:00
uwe 338616067d Experimental config file for JavaStation NC (aka Krups). Not yet
usable without some additional patches to the tree, but handy to have
checked in for reference.
2002-01-28 08:55:39 +00:00
jdolecek 6d265bd894 add options PIPE_SOCKETPAIR to individual kernel configs
the option is commented out on everything but kernels I was able
to recognize as INSTALL-like or ones for small memory machines
2002-01-27 13:23:08 +00:00
tsutsui b5d7745709 Remove extra brace. 2002-01-25 19:19:46 +00:00
pk fa4a18f612 Remove out-dated comment on pager pages + some other comment nit-pickings. 2002-01-25 17:50:33 +00:00
pk cbfb1366b6 Implement the sun4c hardware-assisted page flush operation in a separate
function.
2002-01-25 17:40:44 +00:00
pk 92be3a121c pmap_kenter_pa4_4c(): set supervisor bit in PTE. 2002-01-24 16:50:34 +00:00
pk 4df7c33bf4 Eliminate `cputyp' test from cpu_switch(). 2002-01-23 15:46:03 +00:00
pk e9b6d353de Add missing `#ifdef SUN4U'. 2002-01-23 10:19:42 +00:00
pk 8769ef5de3 Remove out-dated dependencies on Makefile. 2002-01-22 17:04:31 +00:00
jdolecek ff8305bbac Switch to MI dev/md_root.c for archs which don't have any special
memory disk hooks (i.e. everything except atari).
2002-01-21 21:56:57 +00:00
oster 39b858e3bf Add new RF_* options for RAIDframe bits that are no longer built by default.
While we're here, enable RAIDframe (and RAID_AUTOCONFIG) by default for
architectures that I'm comfortable can deal with it being on by default.

Also: bump the number of 'raid' devices from 4 to 8, since 4 seems to
be insufficient in practise.
2002-01-19 18:45:06 +00:00
eeh de4c6a980a Remove some DEBUG code. 2002-01-19 03:30:54 +00:00
eeh 112afe4fa4 Fix a few more bugs. 2002-01-19 03:02:34 +00:00
manu 5f90ae55b5 Added clockctl 2002-01-12 14:52:40 +00:00
uwe 438dfde149 OBP 2.30 in JS1 is romvec version 3, so g/c PROM_OBP_V2 entry.
Add bare-bones "8042" (pckbc) node and rename bogus zs nodes out of
the way to prevent them from matching.
2002-01-11 01:44:32 +00:00
uwe 6191cedbe6 In the idle loop add a comment to wrpsr in the annulled delay slot of
an ifdefed branch instruction to make it obvious where it belongs to.
The ifdef makes it very confusing visually.
2002-01-08 05:59:31 +00:00
mrg e674bb7dc8 make this hostprog friendly. 2002-01-02 05:21:34 +00:00
mrg dc34af64a7 - add a -i path-to-installboot option
- also recognise $INSTALLBOOT from the environment
- update Usage & share the option list with Help.
2002-01-02 04:13:42 +00:00
uwe 0207013726 Now that sbus_bus_mmap was converted to do the proper address
translation, get rid of sbus_bus_addr.  Since sbus_bus_addr is used by
framebuffer drivers that are shared with sparc64 we cannot just change
the callers to use BUS_ADDR() w/out coordinating the change with
sparc64 that uses a different calling protocol, so stub our
sbus_bus_addr to just return BUS_ADDR.
2001-12-31 15:00:58 +00:00
mrg e5fc1d934a clarify usage. idea from david obrien. 2001-12-31 09:44:04 +00:00
pk 5237c5fb99 In cpu_fork() set tf_npc as well in case a signal is taken in child_return()
which will cause the values of tf_pc and tf_npc set here in cpu_fork()
to be restored and used to return to user space from sigreturn() eventually
(before that the tf_pc and tf_npc set in sendsig() will be used in
proc_trampoline()).

Also, the fork system call never uses the SYSCALL_G2RFLAG shortcut, so drop
the code handling that.
2001-12-30 18:52:54 +00:00
pk 76634d2635 Change interface between cpu_fork() and proc_trampoline() so that `tf_pc'
(instead of `tf_npc') contains the user-space return address. This ensures
entering the signal trampoline code correctly in case we take handled
signal during child_return().
2001-12-30 16:41:29 +00:00
martin b506d6e135 Add PPPoE to all generic kernels that should be able to use it.
XXX TODO: do this for INSTALL kernels too, add sysinst support and make the
XXX needed binaries available on the ramdisk root fs.
2001-12-28 12:21:52 +00:00
uwe 084cc22e99 Define SPARC_PCI_DEBUG only if DEBUG is defined. 2001-12-20 11:38:52 +00:00
uwe 309e659bc4 Rewrite sbus_bus_mmap to conform to new signature and unbreak bus_space_mmap.
This fixes the problem with X server killing the kernel by writing to
the middle of physical memory instead of the frame buffer.
2001-12-20 07:53:59 +00:00
soren 6a76b36417 Use regular read/writes for stream variant calls. 2001-12-15 12:39:55 +00:00
chs ae5b4093b5 when counting PTEs, look at all the segments in a region, not just the first. 2001-12-15 09:00:50 +00:00
chs 5e3151bdf5 make this compile with DEBUG. 2001-12-14 06:06:26 +00:00
gmcgarry bdd225baa1 Add a blurb to the top of all GENERIC files. This serves three purposes:
- to clarify some terminology
- to clarify the intention of the GENERIC file
- to cross-reference some useful man pages
2001-12-14 05:34:45 +00:00
tv 816077b47e Fix problem introduced with the MKMAN->NOMAN conversion. 2001-12-13 22:33:20 +00:00
lukem b0b0a32ad7 Set NOxxx= before <bsd.own.mk> is pulled in (even indirectly).
Otherwise the appropriate MKxxx=no won't be defined .
2001-12-12 12:24:19 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
aymeric 48de85e04b add support for OBP 3.x as seen on some JavaStation 1's 2001-12-11 21:09:52 +00:00
uwe 9a2a6c77e8 tabify 2001-12-11 05:54:56 +00:00
uwe e51c17a95f enable pci bus device. (hi matt!)
fix a whitespace nit while I'm here.
2001-12-11 04:29:26 +00:00
uwe a2b05223ee Add microSPARC-IIep support. 2001-12-11 04:25:58 +00:00
uwe 6767457cab Add microSPARC-IIep support. Move sun4m bootstrap into separate
functions (for normal 4m and for IIep).
2001-12-11 04:21:39 +00:00
uwe 0a2b7fe7d7 Add microSPARC-IIep support. Protect mostek clock code with NMK48TXX
so that this file doesn't require obio, iommu and sbus to link the kernel.
Make todr_handle and establish_hostid() non-static.
2001-12-11 04:17:48 +00:00
uwe d5a5296209 Implement microSPARC-IIep versions of sparc_interrupt4m, raise and microtime. 2001-12-11 03:46:59 +00:00
uwe 2d4ea9ba63 Add constants for microSPARC-IIep registers. 2001-12-11 03:43:22 +00:00
uwe 4924c0ae30 On ms-IIep kernel runs with PCI endian swapping turned on but we need
to turn it off before we pass control to PROM's repl as it expects
PCIC to be in little endian mode and would hang otherwise.
2001-12-11 03:35:02 +00:00
uwe ee71ea68bc microSPARC-IIep is a sun4m but with an integrated PCI controller.
In a lot of places (like pmap &c) we want it to be treated as SUN4M.
But since various low-level things are done very differently from
normal sparcs (and since for now it requires a relocated kernel
anyway), the MSIIEP kernels are not supposed to support any other
system.  So when MSIIEP is defined - insist on SUN4M defined and SUN4
and SUN4C not defined.
2001-12-11 03:28:38 +00:00
uwe 814a815542 Export msiiep_swap_endian(onoff) from msiiep.c to turn on/off
automagic endian swapping performed by PCI controller.  Need it in
several places where we want to enter PROM repl.
2001-12-11 03:24:46 +00:00
uwe 78eadd17b7 Attachment for MI com(4) driver at ebus. 2001-12-11 00:31:08 +00:00
uwe 81f0e10ca5 rtc (ds1287a) time of day clock at ebus. 2001-12-11 00:29:21 +00:00
uwe 255d046f95 EBus support for ms-IIep. 2001-12-11 00:25:31 +00:00
uwe e0046f836b EBus support for ms-IIep. This file should eventually be merged into
sys/dev/ebus/ebusreg.h and shared with sparc64 port.
2001-12-11 00:24:03 +00:00
uwe de47c08727 microSPARC-IIep support. 2001-12-11 00:18:22 +00:00
uwe 02529ca11e Fixed VA for microSPARC-IIep PCI controller. 2001-12-10 23:10:34 +00:00
thorpej 51535d4bf5 Add support for dumping ELF-cormat core files. 2001-12-09 23:05:56 +00:00
hannken de07b4b524 Protect `opt_sparc_arch.h'. Used from /sys/arch/sparc/stand/boot. 2001-12-07 11:00:39 +00:00
lukem 612e777b6e s/defopt/defflag/ 2001-12-04 23:14:48 +00:00
thorpej 2684ea2b22 Don't declare which exec formats to support in loadfile_machdep.h.
Instead, give each user of loadfile() control over which exec formats
it wants to support.
2001-12-04 18:54:34 +00:00
jmc 30dcee15c0 Grab the appropriate loadfile_elf depending on machine arch 2001-12-04 11:31:10 +00:00
darrenr 860b0688ac defopt "options SUN4*", put #define for each of SUN4, SUN4C, SUN4M and SUN4U
into opt_arch_sparc.h and include this wherever they are used.
2001-12-04 00:05:04 +00:00
lukem ecb81c3f6d - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
  "options FOO=xxx"). options that take a value were converted to
  defparam recently.
- minor whitespace & formatting cleanups
2001-11-28 10:21:10 +00:00
lukem 9f42ccc795 use #ifdef DDB (for consistency with the rest of the kernel) 2001-11-28 05:45:27 +00:00
atatat 155e541aa2 Instead of checking for previous usage, just append to some make
variables.  Tweak some variables to provide for more uniform defaults.
Minor adaption to makefiles for already converted ports.
2001-11-23 05:18:59 +00:00
atatat 2bf2c362fb The bridge(4) pseudo-device no longer requires the port to
__HAVE_GENERIC_SOFT_INTERRUPTS, so add it back to all GENERIC configs.
2001-11-23 05:00:22 +00:00
uwe 1eebb3fde3 Add patches for Mr.Coffee with OBP2.
Miscellaneous cosmetic changes.
2001-11-22 04:18:28 +00:00
jmc 5ac54229c9 Don't make the symlinks on clean rules as well as obj rules. Breaks r/o source
trees that haven't gotten to the make obj recursion part of make build
otherwise.
2001-11-22 00:14:20 +00:00
uwe 8390d1903a Skip relocation if OpenFirmware already loaded us at the right address. 2001-11-21 21:38:00 +00:00
wiz 1fd7eeefcd "than" instead of "then". 2001-11-21 19:14:19 +00:00
lukem 03aef4723c cleanup:
options SPACE TAB
	makeoptions TAB
	psuedo-device TAB
	remove trailing whitespace
	replace multiple spaces -> tabs
	options "FOO" -> options FOO
	options "FOO=bar" -> options FOO=bar
	options "FOO=\"bar\"" -> options FOO="\"bar\""
2001-11-20 12:56:17 +00:00
lukem 99bccc3cab - pull in opt_kgdb.h where necessary
- replace opt_kgdb_machdep.h with opt_kgdb.h
- defparam opt_kgdb.h:
	KGDB_DEV KGDB_DEVNAME KGDB_DEVADDR KGDB_DEVRATE KGDB_DEVMODE
- move from opt_ddbparam.h to opt_ddb.h:
	DDB_FROMCONSOLE DDB_ONPANIC DDB_HISTORY_SIZE DDB_BREAK_CHAR SYMTAB_SPACE
- replace KGDBDEV with KGDB_DEV
- replace KGDBADDR with KGDB_DEVADDR
- replace KGDBMODE with KGDB_DEVMODE
- replace KGDBRATE with KGDB_DEVRATE
- use `9600' instead of `0x2580' for 9600 baud rate
- use correct quotes for  options KGDB_DEVNAME="\"com\""
- use correct quotes for  options KGDB_DEV="17*256+0"
- remove unnecessary dependancy on Makefile for kgdb_stub.o
- minor whitespace cleanup
2001-11-20 08:43:19 +00:00
atatat d5de3c2fb2 Abstract out a large chunk of the kernel build machinery so that new
build features (such as ross's DEBUGLIST) can easily be applied to all
ports.  This should reduce the complexity of each port's kernel
Makefile considerably.  Line counts:

     227 arch/i386/conf/Makefile.i386.orig
      98 arch/i386/conf/Makefile.i386
     227 arch/alpha/conf/Makefile.alpha.orig
      99 arch/alpha/conf/Makefile.alpha
     219 arch/sparc/conf/Makefile.sparc.orig
     102 arch/sparc/conf/Makefile.sparc
     215 arch/vax/conf/Makefile.vax.orig
     102 arch/vax/conf/Makefile.vax
     253 conf/Makefile.kern.inc

Roll i386, alpha, sparc, and vax over to the new build machinery.
2001-11-16 00:23:02 +00:00
soren 662f877587 MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
2001-11-15 18:06:11 +00:00
uwe 0c392b9e2f Move dvma_cachealign to cache.c where it belongs and declare it in
cache.h, so that kernel can be linked without iommu support (for the
sake of microSPARC-IIep that has a very different iotlb).
2001-11-13 03:04:50 +00:00
pk 4f1fe56be8 Remove redundant declarations. 2001-11-12 16:32:25 +00:00
scw 45e7238a02 Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
2001-11-09 19:53:11 +00:00
thorpej 47514a31be Remove unneeded declarations of the db_machine_init() function. The
ARM ports are the only ones that actually have one, and it is about
to change.
2001-11-09 06:52:23 +00:00
thorpej 88ff68974a Changes from Martin Husemann and myself:
- Make the 32-bit SPARC profile support work with the GCC 2.95.3
  SPARC ELF compiler, which uses a different name for mcount.
- Make the 64-bit SPARC profile support header look more like the 32-bit
  SPARC header (no functional change -- 64-bit SPARC already used the
  correct mcount name).
2001-11-03 20:24:42 +00:00
thorpej 44f1c938e8 Don't actually need elf64 support in installboot(8). 2001-10-31 22:13:03 +00:00
thorpej 6797e85570 Include support for elf64. 2001-10-31 17:21:47 +00:00
thorpej e727e3f180 Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly.  BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
2001-10-31 17:20:45 +00:00
thorpej 4810d73020 Build the loadfile() a.out, ECOFF, and ELF back-ends as separate
objects.
2001-10-31 01:51:42 +00:00
thorpej 715b4d636e Use the standalone byteorder routines. 2001-10-30 23:39:08 +00:00
thorpej 380b5498e9 Make sure to load/store bbinfo values as big-endian. 2001-10-30 05:52:30 +00:00
thorpej f16413a699 Rather than using nlist(3), use a magic structure with a magic
number that installboot(8) can search for.  Suggested by cgd@netbsd.org.
2001-10-30 05:13:09 +00:00
darrenr b6e4899865 fix so it compiles on a system without 'options SUN4M' 2001-10-27 17:44:18 +00:00
jmc 6d536163de Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
2001-10-26 06:45:33 +00:00
thorpej 2a073cf8d0 Set MACHINE_ARCH explicitly in Makefiles for which it is constant.
Also, since config(8) now explcitly sets MACHINE, there is no need
to do it here in the Makefile.
2001-10-23 19:42:16 +00:00
mrg 35a5f0448e add a note about keeping this file in sync with the sparc64 conf.c. also
add some unused code for the pci bus device.  (hi uwe!)
2001-10-22 16:40:47 +00:00
uwe bfa2f82c18 Minor cleanup. Garbage-collect unused declaration of comsoft() now
that sparc has generic soft interrupts.  In softnet() - return
immediately if netisr is zero.
2001-10-18 12:32:25 +00:00