Commit Graph

3117 Commits

Author SHA1 Message Date
uwe 118ae09c44 Fix error message. 2002-04-04 17:45:24 +00:00
darrenr ff961593ca apply patches from PR#10170 2002-04-03 16:34:11 +00:00
chs dbb8bddd9c make this compile with DEBUG. 2002-04-02 06:39:32 +00:00
lukem d213d804f7 Rename MEMORY_DISK_SIZE (formerly MINIROOTSIZE) to MEMORY_DISK_ROOT_SIZE,
which was suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> as
being more consistent with what it's controlling...
2002-04-02 05:30:34 +00:00
christos 83c2f7aaf5 compat signal array renaming. 2002-03-31 22:21:02 +00:00
uwe d5f7434c94 Oops, timermatch_msiiep() body now needs to be protected with #ifdef MSIIEP. 2002-03-28 20:04:27 +00:00
uwe 788d7bdd8f Move ms-IIep PCIC driver into mspcic0 at msiiep0. msiiep0 now serves
as a stub bus that knows how to attach drivers for various functions
of PCIC.

This change is a follow up to timer0 at msiiep0 change, since all
children must share same attach arguments and so we no longer can
attach pci0 directly under msiiep0.
2002-03-28 19:50:20 +00:00
pk fd87eee68e bootinfo_relocate(): don't forget to copy the terminating empty record
of the bootinfo[] array.
2002-03-28 16:03:41 +00:00
pk d6197003e5 Pass actual loaded kernel file in bootinfo[]. 2002-03-28 15:46:20 +00:00
pk 61c214b2fe sysctl(CPU_BOOTED_KERNEL): look for kernel path bootinfo[]. 2002-03-28 15:45:01 +00:00
pk 945536cf85 Define bootinfo record to pass the kernel file path from the boot program. 2002-03-28 15:43:23 +00:00
pk 6bcf43ea9c `intterupt' => `interrupt' 2002-03-28 11:59:56 +00:00
pk ed494d4e18 Declare `timer0' as a device on the `msiiep' bus. 2002-03-28 11:55:25 +00:00
pk 0aa6e02940 Untangle clock.c:
* put various time-of-day clock, timer and eeprom drivers in separate files
* avoid unnecessary overhead in interrupt handlers
* make the MSIIEP timer attach through the regular autoconf mechanisms
2002-03-28 11:54:16 +00:00
pk f4062f7921 Include "scsibus.h" to see whether we can query the scsi subsystem. 2002-03-27 16:05:19 +00:00
uwe bf8a9d7f0d Fix cast in sbus_promaddr_to_handle(). 2002-03-21 04:32:25 +00:00
uwe 2837da095f PROM patches for JavaStation-1. 2002-03-21 04:04:12 +00:00
eeh 0cb6a3a2a5 Add bus_space_vaddr(). 2002-03-21 00:30:41 +00:00
eeh 8ccad96d54 Add sbus_promaddr_to_handle() to convert a prom address to a bus_space_handle_t. 2002-03-20 18:39:44 +00:00
christos df95562a0f goodbye PS_STRINGS 2002-03-18 13:27:02 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
martin 94881fb123 Rename ISDN devices, per discussion on tech-kern. The network devices
become ippp (ISDN ppp) and irip (ISDN raw IP). The character device now
are called: /dev/isdn (isdnd <-> kernel communication), /dev/isdnctl (dialing
and other control), /dev/isdntrc* (tracing), /dev/isdnbchan* (raw B channel
access, i.e. for user land PPP) and /dev/isdntel* (telephone devices, i.e.
for answering machines).
2002-03-16 16:55:51 +00:00
uwe 3f9d183e35 Fix cast. 2002-03-13 04:23:25 +00:00
uwe a0d389daa3 Enable audiocs at ebus. 2002-03-12 04:54:03 +00:00
uwe a05702eaac Rework the driver to add EBus DMA support and improve APC DMA support.
Audio-related stuff is left almost intact.

* support audiocs at ebus playback and capture
    tested on krups and u5 (thanks, martin)
* make first attempt at supporting audiocs at sbus capture
* nb: full-duplex is not tested
* while here, fix CSAUDIO_MONITOR_MUTE to be of CSAUDIO_MONITOR_CLASS
    i.e. outputs.monitor.mute -> monitor.monitor.mute

Ok by pk, eeh.
2002-03-12 04:48:28 +00:00
uwe 40a8bc1d34 Drop ebus_bus_map(), use plain bus_space_map() instead. 2002-03-12 00:32:30 +00:00
uwe 4df483e009 Do not pass bus type argument (R.I.P.) to bus_space_map2. 2002-03-12 00:18:25 +00:00
uwe 3dfde702f3 Do not pass bus type argument (R.I.P.) to bus_space_map2. 2002-03-11 23:36:17 +00:00
pk 7e8becd64d * `bus_type_t' is gone.
* Use BUS_ADDR() where appropriate to encode I/O space and physical
  address offset into a `bus_addr_t' value.
* Drop obio_bus_map() since it's now completely equivalent to bus_space_map()
* Use bus_space_map2() to map device space at a fixed virtual address.
* Remove the virtual address argument from sbus_sbus_addr()
2002-03-11 16:27:01 +00:00
pk 221d0f52da `bus_type_t' is gone. Retain bus_space_map2() for MD drivers that need
to map registers to a fixed virtual address.
2002-03-11 16:06:42 +00:00
chs b0263218b6 override cn_trap() with zs_abort() so we can drop to the monitor
if there's no DDB.  fixes PR 12547.
2002-03-11 07:11:26 +00:00
lukem cd19d52695 * rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are now consistently named
* fold opt_mdsize.h into opt_md.h
2002-03-10 19:56:37 +00:00
thorpej a180cee23b Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.
2002-03-08 20:48:27 +00:00
tsutsui 3c8b0446fe Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.
2002-03-06 13:10:18 +00:00
simonb 9bcc70fa1d Don't cast argument to ffs() to long.
Per discussion on port-alpha, noticed by Robert Elz.
2002-03-05 09:40:38 +00:00
jmc 8c3c52f61d Provide a definition for DEV_EEPROM so mem.c will compile if SUN4 is defined. 2002-03-03 03:11:06 +00:00
simonb 4324f37586 Use "#define<tab>". 2002-02-28 03:17:23 +00:00
christos e8116a8f5b - Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
2002-02-27 01:20:51 +00:00
christos 6b030ee036 - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
2002-02-27 01:19:03 +00:00
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