Commit Graph

670 Commits

Author SHA1 Message Date
cube 7aa6248cdf Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
2008-03-18 20:46:35 +00:00
tsutsui 2d5be04276 cnscan() should return -1 (no input) if there is no console device. 2008-03-01 05:21:50 +00:00
jmmv 055a66c56c Remove GENERIC.local from the repository
Make all the kernels that currently include their corresponding GENERIC.local
file use the cinclude directive instead of include.  This way config(1) will
not complain if the file cannot be found.

After doing this, remove the GENERIC.local files from the repository so that
the user will not see modified files during updates, and local changes to
them cannot end up in the repository by mistake.

Discussed in tech-kern@ earlier this month.  No strong objections.
2008-02-29 14:42:32 +00:00
drochner bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
tsutsui 824240f743 options<space><tab> 2008-02-13 14:05:06 +00:00
garbled 81953d91fb Ifdef out all the MPC601 code with PPC_OEA601. Now only arches that have the
possibility of running on an MPC601, are infected with all the extra code
and nops that it added.

Also, fix compilation that I broke with the pmap code, by adding
oeacpufeat to the locores of various ppc arches.  Noted by mlelstv.
2008-02-05 22:31:48 +00:00
joerg 3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00
tsutsui 05517e38f5 - move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
  MD attachments
2008-01-10 15:31:26 +00:00
tsutsui db09bcc34f Move todr_attach(9) calls from each MD attachment to MI mc146818_attach(). 2008-01-10 15:17:39 +00:00
ad c29520cb1a Fix includes. 2008-01-05 00:31:50 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
garbled a3af60a95e s/prep_magic.h/magic.h/ 2007-12-19 19:47:08 +00:00
garbled 2f6e46a275 Change the prep bootloader to reach over into the
powerpc/stand/mkbootimage directory for the magic.h file.
2007-12-19 18:28:50 +00:00
ad 4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
xtraeme 4ba09b41c3 Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
2007-11-04 14:34:19 +00:00
garbled d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
kiyohara 510dbbae54 Add slhci at pcmcia.
And reorder.
2007-08-21 02:48:14 +00:00
ad 63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
martin c2534a819b Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
2007-06-04 08:55:18 +00:00
tsutsui 2340b51076 Set DTR and RTS in NS16550_init().
Some terminal requires it even if hardware flow control is disabled.

XXX: should we sync bebox/stand with prep?
2007-05-19 14:26:08 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
garbled ca2a9952ca Add slide to INSTALL and remove SLIDE irq hack. It turns out to not do
anything after all.
2007-04-26 19:44:02 +00:00
garbled 1d37c1ae36 Rather than use the residual data to guess that we have a raven pchb,
note the raven pchb in device_register, and then look that up when
attaching the pcib.
2007-04-26 19:27:04 +00:00
garbled 5ab2832938 Add special code to properly detect a W83C553 pcib sitting on a RAVEN
based machine.  When we do, we have to frob a few special bits on the
pcib to finish the setup that the prom didn't bother completing for us.
With this change, NetBSD finally runs on the MTX604 board.. Many thanks
to John Baker for providing remote access to the machine, and rebooting
it repeatedly for me.
2007-04-26 17:39:54 +00:00
macallan 43b2c2b989 include files.wsfb 2007-04-10 02:50:32 +00:00
garbled ae2d0d18ae When we have a non-PReP pci bridge, we need to perform a single swizzle
on the pin, to get us the right pin on the underlying PReP bridge to wire
the interrupt to.  Tested with a 4-port fxp card on a 7043-140.  Thanks
to simon for helping me get the math right.
2007-03-22 08:23:10 +00:00
garbled cfa6e1cb25 Add a read entry point to this driver. There are two minor devices
associated with this, 0, the nvram device, and now 1, the residual
device.  The devices allow the user to directly read the contents of the
kernel copy of the nvram, and the residual data respectively.  There is
no provision for write.
2007-03-21 04:13:53 +00:00
garbled bbcca898c4 Add a second check to the prep-pci-intrmap test, to make sure the dictionary
actually contains entries.  It is apparently possible to get a non-null,
but empty dictionary back.  This seems to happen if you inject a ppb-card
on pci0 when you also have a prep pci1 at a later device function.  With
this, my fxp card works in any slot on my 7043-140.
2007-03-21 01:34:32 +00:00
garbled f8ef9d1431 Add the slide device, and the special PCIIDE_SLIDE_SETIRQA option to set
the irq up properly for a RAVEN.  (So far, the only prep machines that
seem to have these chips are RAVEN's, so we should be ok here)
2007-03-20 17:20:59 +00:00
garbled 8e09750d58 The motorola RAVEN is both a pchb and an MPIC. Block out the pci
configuration of it's mem area to keep the PIC available.
2007-03-20 17:16:33 +00:00
garbled a23808d635 Special case the MTX604 and other RAVEN based machines to not attach
wdc@pnpbus.
2007-03-20 05:58:40 +00:00
drochner ab07e481e4 It doesn't make sense to specify "configuration" and "interface"
locators for uhub because a hub can't have sub-devices.
This might be sanity-checked eventually.
Same for ubt now after the change to device attachment.
2007-03-14 12:27:20 +00:00
he f41cb0f1b1 Use mtod(m, char *) when you want to do pointer arithmetic on the result. 2007-03-05 22:36:16 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
garbled 7b388aeeb7 Finish the code in the prep nvram driver that makes it an actual device
(/dev/nvram) and implement all the associated ioctls fully.  Tested with
a hacked up copy of eeprom(8).  Right now it can only be used to see the
nvram GEV contents, not actually edit them.  Will do that later some day.
2007-02-26 23:53:12 +00:00
ad 3363855a4a Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
2007-02-16 02:53:43 +00:00
ad 087fdb9080 Count the number of CPUs at boot and stash in 'ncpu'. Eventually should
have each CPU register at attach, so we can figure out the topology for
the scheduler.
2007-02-15 20:32:47 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
cube 747e90f203 Remove traces of scd(4), which apparently never actually had a driver in
the tree.
2007-01-09 21:59:08 +00:00
yamt 3f0f3de613 update comments on NFS_V2_ONLY after nqnfs removal. no functional changes.
from Arnaud Lacombe.
2006-12-29 21:49:03 +00:00
yamt 8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
wiz 6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
jmmv 7a13fe4abf Remove tmpfs's experimental status. OK'ed by core@. 2006-11-11 18:47:08 +00:00
garbled 54ded9290c Make these files compile with -Wextra -Wno-unused 2006-10-30 17:54:29 +00:00
garbled 3dc1c33272 Add the crypto swcrypto and veriexec psuedo devices. Also add FILEASSOC
and VERIEXEC, following elad's lead.
2006-10-27 20:37:17 +00:00
garbled e5bff3e418 A few changes so pnpbus devices can do isadma. Note that isadma still
does not seem to work properly on prep.
2006-10-27 19:52:51 +00:00
tsutsui 498acdb572 Use a non-zero quality for mftb counter. 2006-10-13 14:17:37 +00:00
chs e8295642bd remove MALLOC_NOINLINE, it doesn't do anything anymore. 2006-10-02 03:28:29 +00:00
pavel c1ebd304cc Replace wrong tests for character device (st.st_mode & S_IFCHR) by
S_ISCHR. Originally discovered by Paul Stoeber in OpenBSD.

OK elad@.
2006-09-23 20:10:14 +00:00
matt 7cac687e36 Generate an intermediate boot.elf with symbols. 2006-09-19 17:51:24 +00:00
garbled 9f65f017a3 Now that the interrupt bug on the 7043-140 is fixed, it also fixes the
long standing issue with interrupts onthe PowerStack E1.  Remove the
quirk entry for the PowerStack E1 and revert to using the IVR.
Also, add a \n to the attachment of the mk clock printf that was missing.
2006-09-07 20:13:05 +00:00
garbled 3053244401 Add preliminary support for the 7025-F40. The MPIC must not be wired up
by the initial PCI_NETBSD_CONFIGURE, nor should it be manually wired by
the indirect stuff.  This is all taken care of by the prep_init() function.
7025-F40 support supports the primary pci bus only.  The second PCI bus
on the machine is still unsupported, but the machine runs and can access
everything except for the two slots the other bus covers.
2006-09-06 22:32:56 +00:00
garbled 38209f62b7 Convert prep to MI todr 2006-09-05 06:32:21 +00:00
bjh21 e10108c7f2 Nothing in the kernel now tests __HAVE_NWSCONS, so stop defining it everywhere. 2006-09-03 13:51:23 +00:00
garbled bb2f95cc58 hptide controller was tested on prep by a user. Adding to GENERIC 2006-09-01 07:41:57 +00:00
garbled a9bf7a7670 I dunno how -Os crept into GENERIC, but yank it. 2006-09-01 07:23:51 +00:00
garbled fcfc216b3b Fix a horrible bug in how we initialize the 8259 interrupt controller.
The bug displayed itself by locking up console output on a 7043-140
following a powercycle.  This may also have been the cause of bogus
interrupts on motorola class machines.
2006-09-01 07:02:28 +00:00
christos e0df1e4c51 PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
2006-08-26 20:26:43 +00:00
tsutsui 6ff205ce76 Remove obsolete #options VERIFIED_EXEC, found by grep(1). 2006-08-26 07:59:21 +00:00
skrll 1a3062e81b s/adpater/adapter/
Prompted by PR/34195
2006-08-14 06:22:33 +00:00
christos b300b74469 Disable SYSTRACE by default on all kernels (discussed with core) 2006-08-12 15:29:52 +00:00
hubertf ded0447fa8 spc(4) can also attach to pcmcia(4), as was already in hpcmips/GENERIC
for quite some time. Add it to all systems that have pcmcia SCSI.

Pointed out by Björn Johannesson <rherdware@yahoo.com> in private mail,
OK'd by matt@
2006-07-31 23:29:54 +00:00
garbled a59f110c72 Rather than hardcode the location of the Interrupt Vector Register, we
try to locate it using the residual data.  On some machines this doesn't
work, so we fall back to hardcoding it.  This should fix isa interrupts
on the 7025-F40, which has the IVR at a different location.
2006-07-13 17:50:37 +00:00
garbled 40bedaf4c8 Add support for rebooting 7024 and 7025 models. Since I cannot figure
out how to properly reboot these machines, instead we make use of the
auto-poweron-alarm time, and power cycle the machine to simulate a
reboot.  This is a hack, but until I get documentation on these machines,
at least you will be able to reboot them.
2006-07-12 21:28:33 +00:00
garbled 793a3b26d8 Change how the MPIC/OpenPIC is configured at boot. Rather than scanning
for a magical PCI device location (that is sometimes wrong), we scan the
residual data for an MPIC, and if we find one, wire it up from there.
This will hopefully allow interrupts to work on the MPC750 and the
7025-F40. I suspect however the interrupt vector address on the 7025 will
still need some work.
2006-06-29 17:16:59 +00:00
liamjfoy aeee5deab9 Add CARP to GENERIC kernel configs. CARP is not enabled by default.
ok: christos
2006-06-28 15:19:27 +00:00
garbled d0b840b1df General fixups:
1) Fix support for the powerstack E1.  This machine needs to use the 8259
directly, and cannot use the prep interrupt vector register.  Place a
quirk entry in the table for the machine.
2) Add a new com0_vreset boot image.  The vreset code only works on a few
machines, and breaks others like the 7025-F40.  Its only limitedly useful
when used with the com0, so just make it an optional image the user can
install by hand if they want.
3) Bump the bootloader to 1.8 with the above change.
2006-06-27 23:26:13 +00:00
garbled 17ca05a76f 1) Modify pnpbus attachment code to properly decode pnp memory range packets.
2) Modify pnpbus attachment code to record the chipid of the device if it
   has one.
3) Change the clock probes to use the chipid, rather than relying on
potentially untrustworthy subtype and interface.
4) Add decoding of memory ranges to the RESIDUAL_DUMP code.
5) Add a we@pnpbus device to allow netbooting and root device detection
from an IBM we ethernet.  (it will only work if your firmware detects it)
6) Because I moved the pnpbus probe to occur prior to pci and isa, it
screwed up the root device detection and firmware path building code.
Completely rewrite the fw-path detection code to deal with this.
2006-06-23 03:08:41 +00:00
garbled 4c0cfa49ad Attach the pnpbus prior to attaching the pci bus on the prep. This
should allow us to probe for both pnp-attached devices and isa-attached
devices while preferring the pnpbus attachment point.
2006-06-21 20:08:11 +00:00
garbled cb76e8b6d7 Update install WRT recent clock changes, and break INSTALL into INSTALL
and INSTALL_SMALL.  Since floppy images have to fit on one floppy, we
have to really cut down on the drivers on that image, but people
netbooting don't have that problem, so they deserve a more featured
kernel to install with. (namely one with raid support and more ethernet
drivers)
2006-06-20 17:29:07 +00:00
garbled 1efe96e909 Basic prep timecounter support. This greatly increases the stability of
ntp on my 7248, however, my 7043-140 is still a bit flaky.  I suspect the
only way to fix the 7043 is going to be writing a timecounter driver for
the 8254 present on these machines.  Either way, this makes some of the
machines better, and the other machines are still about the same as they
were before, so it's a net gain for the port.
2006-06-20 05:49:09 +00:00
garbled aa0bc147ae A bit of clock rototill. It's safer to detect things known by the
residual with the pnpbus probes, than it is to do it with raw isa probes,
so I've replaced the isa mkclock and mcclock code with a pnpbus attachment.

While writing the mkclock code, I realized that on motorola prep machines
the mkclock uses the same port range as the nvram part. (it's actually
the same chip/part).  This was causing the nvram not to work on those
machines.  Now the nvram code will recognize this, and wire up the
mkclock as well.  The mkclock probe is just a stub probe used to
pre-detect the fact that this is one of those machines.
2006-06-15 18:15:32 +00:00
tsutsui 261274d592 Put newline if there is no input on Boot: prompt. 2006-06-10 07:49:29 +00:00
tsutsui e684286988 Fix a botch on ANSIfy. 2006-06-09 18:11:58 +00:00
garbled 76847dcb92 Completely rework how we look up PCI interrupts on prep:
1) Rather than build an array of the pci->intr mappings, build a proplib
tree.
2) add a SIMPLEQ of device properties to the pci_chipset_tag to hold the
proplib trees of each bus.
3) Move the interrupt routing code from pci_conf_interrupt to pci_map_intr()
4) Deal properly with non-native PCI bridge chips that are not recognized
by the prep firmware, and therefore are not noted in the residual data.

The major win of this restructure is #4. Hopefully I haven't broken
anything. Tested on a 7248-100, 7043-140 and 7024-E20.
2006-06-09 01:19:10 +00:00
garbled b18c709a99 Make the space for the ramdisk slightly larger. 2006-06-01 21:16:05 +00:00
garbled fed113c6f4 Rewrite the pci bus attribute decodings to be human-readable by using the
proper pcipnp structure file to read them rather than magical array offsets.

Add more complete decoding of the VPD, including extendedvpd, and TLB.  While
I was here, fix a bug where we never printed the L1 cache data properly.
2006-05-30 23:56:38 +00:00
garbled 6a298274ec Add code to decode small vendor items that are documented. Namely we can
now decode the chipid, and L2 processor affinity data.

Also fix a bug where we were reporting the service processor type as a
memory controller.
2006-05-29 22:11:15 +00:00
garbled c9e13db63a Implement partial support for the RS6K PCI Bridge found on 7025-F40
models.  This code was made possible by assistance from Cory Bajus.

Add code that asks the PCI bridge what it's config base address is, and
use that when wiring up an indirect bridge type.
Move prep's user segment register to 10, because the 7025's PCI config
address is at 11, where the user segment used to be.
Add a battable entry for 0xbf800000 for machines with RS6K bridges.

There is still probably work left to be done before a 7025-F40 is fully
supported.
2006-05-25 02:11:13 +00:00
garbled 1f280c6eaf Add a small convenience function 2006-05-24 16:10:18 +00:00
elad 8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
garbled 4ea28c9a6f enable raid in GENERIC. it works. 2006-05-10 19:25:31 +00:00
garbled a83699fcd9 add MEMORY_DISK_SERVER=0. only saves 600bytes. lame. 2006-05-10 18:40:33 +00:00
garbled f32de2a8cc Enable a few options from i386's INSTALL_SMALL that save as much space as
possible.  I think this should save about 10k on prep's bootfloppies.
2006-05-10 17:53:12 +00:00
garbled cd01d819fb Move PCI_NETBSD_CONFIGURE to std.prep. Add *.local files like i386 has. 2006-05-10 17:28:41 +00:00
garbled a6d48d192d Switch prep to use the MI mbr/disklabel code. 2006-05-10 02:49:53 +00:00
garbled 5f1b3eb60e Use inb/outb macros instead of casting things to volatile. 2006-05-09 03:35:37 +00:00
garbled 5410dc443b convert some of the simple __asm statements to the standard powerpc
macros, like mtmsr().
2006-05-09 03:13:00 +00:00
garbled ed0efbc5de de-__P these files. 2006-05-09 02:52:39 +00:00
garbled cfbb4ec285 More KNF. That should be the rest of the .c files. 2006-05-09 02:48:36 +00:00
garbled aa9567ed00 KNF these files. 2006-05-09 01:18:10 +00:00
garbled e7b3b846b3 Fix something that never should have worked before, that got broken by
proplib change.  I'm assuming it was wierdness in the devprop API.
2006-05-08 23:12:13 +00:00
garbled be39d7253e Switch prep over to evcnt(9). While I was here, I also switched it to
use struct cpu_info for the cpu stuff.  Tested on 7248 and 7043.
2006-05-08 17:08:34 +00:00
thorpej fb44a8574b Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
2006-05-05 18:04:41 +00:00
garbled 2baa5f42bc Generic soft interrupt support for prep. Mostly copied from macppc,
tested on 7248 and 7043.
2006-05-03 17:47:05 +00:00
garbled 64b69ee83d Support fixes for the Motorola Powerstack E1.
1) The E1 seems to have the int. siop wired to irq 14-level and the internal
   wdc wired to irq 14-edge.  special case and fail the wdc probe on E1's.
2) If we fail to map the NVRAM registers, return, rather than trying to talk
   to them and panic'ing the box.
3) revert my previous "fix" to pnpbus to make irq's default to level.  It
   was wrong, and didn't even fix the powerstack.

With this, we have limited PowerStack E1 support.  The machine cannot
talk to it's IDE controller, and cannot detect it's boot device
automatically, but it does come up and run. Tested with NFS root.
2006-04-26 19:48:01 +00:00
snj d97db3840b s/allready/already/ 2006-04-25 02:19:31 +00:00
garbled 8937ee204d Make this work on 7024 and 7025 models by not repeating the base address
of the pci bus when we are a pci bus on a ppb.
2006-04-24 18:10:57 +00:00
drochner 1168954c68 adjust comments for the new location of wskbdmap_mfii.c,
addresses PR kern/33290 by henry nelson
2006-04-19 10:31:44 +00:00
garbled fc8134ddce Disable some things to make it a wee bit smaller. 2006-04-13 19:38:10 +00:00