Commit Graph

226 Commits

Author SHA1 Message Date
matt dd2488a8b3 Add support pci_intr_setattr.
Export non-inline version of pci api for modules (_MODULE is defined).
Fix definition of pc_conf_hook and pc_conf_interrupt.
Switch to using inlines instead of macros.
Switch ibm4xx to use <powerpc/pci_machdep.h>
2011-06-22 18:06:32 +00:00
bouyer 063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
mrg de80fec71b add the normal DKWEDGE* options, and enable drvctl. 2011-01-02 11:25:31 +00:00
phx 84715b6c09 Support for reading disklabels from RDB partitions in the kernel.
The code will check for a raw disklabel first, then tries to find the
disklabel in an MBR partition and finally constructs it from RDB
partitions.
RDB is probably only needed for the Pegasos platform, so it can be
disabled in the config file (RDB_PART).
2010-12-31 21:50:27 +00:00
matt a0084da426 Add siisata (but make sure wd0 is still on viaide) 2010-12-20 00:14:40 +00:00
phx 5e554614ee Added viaenv(4), which no longer crashes the system during attachment since
todays bug fix in the driver.
2010-12-10 21:27:21 +00:00
hannken afdfce8e3b Remove unused count from pseudo-device md. 2010-11-23 11:13:52 +00:00
kiyohara 5358a961b8 Indent. 2010-06-09 04:44:01 +00:00
kiyohara 2581e047dd Support MV64361 on PegasosII by gt(4).
+ Support gtpci@gt instead of pegasospci more smartly.
  + Support Gigabit Ethernet by mvgbe@gt.
2010-06-09 04:41:42 +00:00
mrg 309c6e11b7 enable IPFILTER_COMPAT in all kernels that have ipfilter already.
canonicalise several of the ipf option segments in various files
(this mostly means adding commented out IPFILTER_DEFAULT_BLOCK,
or adding commented or uncommented IPFILTER_LOG or IPFILTER_LOOKUP
option statements.)

i built about 20 of these kernels to check, but not all of them.
2010-05-08 22:16:25 +00:00
chs 7654d6d482 enable TMPFS in all GENERICs that have MFS enabled. 2010-04-29 22:40:48 +00:00
pooka 835e533be4 Remove unused count (invariably "4") from pseudo-device fss. 2010-04-16 13:48:27 +00:00
kiyohara 6c6b8bd86e Add scsibus@sbp. 2010-03-29 03:44:37 +00:00
kiyohara 6c12a30afa Add fdc@isa.
tested on PegasosII.
2010-03-14 10:14:14 +00:00
plunky 04e2ab6ae6 add uhso(4) device where appropriate
- follow the lead of other USB driver declarations wrt commented out
    - (cross-)build tested all these kernels
2010-03-07 09:39:42 +00:00
joerg d621e29eca Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
2010-02-08 19:02:25 +00:00
pooka 70d4493c77 Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
2009-12-05 20:11:01 +00:00
jym 92ae85d18e Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
2009-02-06 18:50:26 +00:00
mrg c6a4afa995 add COMPAT_50 to all the configs with COMPAT_40. 2009-01-24 05:06:05 +00:00
ad 6ba528b5bc Remove softdep, pass 1. We are focused on improving journalling.
Proposed on tech-kern@.
2008-11-24 11:41:07 +00:00
ad 0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
tls fca9d633b9 Add accept filters to GENERIC kernels where they exist. 2008-08-10 15:31:20 +00:00
simonb 0751ba4bff Add "options WAPBL" to standard GENERIC/INSTALL type configs. 2008-07-31 07:40:59 +00:00
garbled 9792283735 SMP support for ofppc. (finally) Much thanks to Matt Thomas for help in
figuring out all the crazy nuances of getting this working, and to
Michael Lorenz for testing/fixing my changes on macppc.  Tested with a
quad-proc 7044-270.
Summary of changes:

Bumped CPU_MAXNUM to 16 on ofppc.
Added md_* routines to ofppc/cpu.c, to sync the timebase, and awaken the CPUs.
Fixed a bug in the test for a 64bit bridge cpu early in locore.S
Added code to set the interrupt priority for all CPUs with an openpic.
Change rtas to probe before cpus, to allow use of the rtas freeze/thaw
timebase code routines.
Fix CPU_INFO_FOREACH macro to iterate through detected cpus, not CPU_MAXNUM.
Change most uses of ci_cpuid to ci_index, to deal with CPUs that do not allow
writing to SPR_PIR.  Don't write SPR_PIR unless the secondary cpu identifies
itself as 0.
Change the hatchstack/interrupt stack allocations to allocate a 8192byte
interrupt stack, and a 4096 byte hatch stack, align them to 16 bytes, and
allocate them no lower than 0x10000.  Allocate them separately to prevent the
hatch stack corrupting the interrupt stack later on.
If the CPU is a 64bit cpu, copy SPR_ASR in cpu_hatch()
Set the idle stack to ci->ci_data.cpu_idlelwp->l_addr->u_pcb.pcb_sp.
Add OF_start_cpu().  Add a routine to ofwoea_initppc to spin up secondary
procs early, and place them into a spinloop waiting for the hatch routines
to be ready.
Modify the ipi routines to deal with openpics that reverse byte order on read
from an ipi register. (such as on the 7044)
Change the rtas setup to allocate the rtas physical base address above
the kernel, to avoid mucking up the hatch/interrupt stacks.
2008-04-08 02:33:03 +00:00
phx 232fdde483 Activate genfb, pckbc, pckbd, pms, wskbd, wsmouse and wsdisplay.
Those devices work reliable on a Pegasos2 system with serial console and
with a real keyboard/monitor.
2008-03-29 21:55:32 +00:00
phx 834524db94 INSECURE option is required for the Xserver to access /dev/mem.
Approved by garbled.
2008-03-08 20:51:57 +00:00
phx cb8c72e1d4 Added scsibus at umass for USB keys and ADOSFS for mounting Amiga file systems
on Pegasos computers.
Approved by garbled.
2008-02-23 21:16:05 +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 00bd6f7500 Remove obsolete platform support options. 2008-02-15 12:28:09 +00:00
tsutsui 0a19cf05af Use options<space><tab>.
XXX FIREPOWER options are obsolete?
2008-02-13 14:10:05 +00:00
garbled a72063accc Nevermind, just yank the bridge64 kernels entirely. I don't want to end
up like i386 here.
2008-02-05 19:02:52 +00:00
garbled 094e746de5 Make bridge mode standard in GENERIC, yank INSTALL_B64 2008-02-05 19:01:23 +00:00
garbled 4b513a9954 Rewrite a big chunk of the pmap and locore code for powerpc to better
deal with the 64bit bridge mode.  pmap changes by Matt Thomas, rest by myself.

Change pmap.c to work similar to exec_elf.c to allow us to compile in
multiple pmaps to a single kernel.  This allows the pmap for bridge64 to
co-exist with the 32bit pmap.

Yank __HAVE_PMAP_PHYSSEG from all the oea code.

Add a new global, "oeacpufeat", which is used early in locore to determine
certain cpu features.  This allows us to conditionalize code early in the boot
for certain CPUs that have special needs.

Yank most of the ifdef PPC_OEA_BRIDGE64 code from almost every file it was
found in.  Some of it seemed incorrect, and my 7044 booted just fine
without it.  It would appear that the bridge cpus treat BAT instructions
as nops, so they seem to be safe.

In ofppc, check the oeacpufeat, and if we are on a 64bit proc, clear
MSR[SF], and ASR[V].

With all of these changes, a kernel with both PPC_OEA and PPC_OEA_BRIDGE64
will boot on the POWERIII-2 cpu.  However, it will not yet boot on a 32bit
cpu, because of CACHELINESIZE.  Work remains to be done there to fix that.
2008-02-05 18:10:46 +00:00
garbled 7c8654b9e9 Add an install kernel for 64bit bridge mode cpus. This will hopefully go
away in the next few months.
2008-01-23 23:11:22 +00:00
garbled 80a83a2b7e Add support to ofppc for the IBM 7044-270 machine. This is a POWER3-II
based machine.  Currently the kernel to run on this machine is
incompatible with the standard GENERIC kernel, so for now, we have a
separate GENERIC_B64. Eventually, I hope to combine the two.

Please note, this is a port of 32bit ofppc, not a powerpc64 port.

Thanks to Matt Thomas and Kevin Bowling for helping to make this port
possible.

Summary of changes:

Change ofwpci to use the ofmethod config for configuring the PCI bus,
rather than indirect configuration.
Move the wiring of the interrupt controllers from at the start of the
boot, into the configuration of the first PCI bus.
Rewrite the map_isa_ioregs() hack to work on a machine without BATs
Fix a ton of bugs in the genofw_find_pics routine, and in the map_space code.
Split the pic_openpic into openpic_common and pic_openpic.
Create a new pic_distopenpic driver, for the distributed openpic found on
some newer IBM machines.
Fix a bad panic in pmap_extract on 64bit bridge mode
2008-01-17 23:42:57 +00:00
mrg 626bd12a5c enable PCI_NETBSD_CONFIGURE for ofppc.
the call to pci_configure_bus(9) and it's supporting code is
copied verbatim from the prep port.

this allows us to completely remove the really gross pegasos
specific pegasospci_indirect_attach_hook() that set various
pci command regs, since all those devices (mostly work now,
see below) and additionally PCI plugin cards work now too.

it also makes the pegasos onboard vr(4) ethernet work with
disk boot (it previously only worked with netboot.)

in the generic macppc ofw pci conf hook and for pegasos,
don't configure the viaide(4) device, and don't configure
memory space on the fwohci(4) device.


with this, and my other recent ofppc/ppc changes the pegasos
port is mostly functional.  the marvell gige is not working,
and my 512mb appears as only about 256mb, but otherwise
this port is almost done!
2008-01-11 05:18:58 +00:00
mrg a386f0e8b3 build an INSTALL kernel. it's just GENERIC with md(4) root space. 2008-01-02 11:32:15 +00:00
mrg 3259c65b6e add COMPAT_40, raid and RAID_AUTOCONFIG options. 2008-01-02 02:32:25 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
phx 66e67a4f6b Make USB, IEEE1394 and viaaudio attach to the Pegasos2.
USB works fine. IEEE1394 is untested. Audio doesn't work (playing white noise).
Need to set IO/MEM-enable for IEEE1394 and audio, as the firmware (Smart
Firmware 1.2) doesn't do it.
Patch approved by Tim Rightnour.
2007-12-24 13:54:58 +00:00
phx 5dda38d449 wsmux was missing.
Switched to a smaller default font.
2007-12-15 16:09:08 +00:00
garbled 05fd0d9547 Switch ofppc to the unified powerpc majors file. This should make single
user mode work.
2007-12-10 18:19:45 +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
garbled b0f4d9f970 Apply a set of patches from Frank Wille to make the genfb attachment work
better on ofppc.  In doing so, we also move a few functions around in
macppc and the generic ofw powerpc stuff to allow better sharing of code.
Also, introduce a model_init function.

move ofb_cons.c from macppc/dev to powerpc/oea and rename it to rascons.
This gets rid of some naming confusion, and makes it OFW-MI rather than
macppc specific.
2007-11-26 19:58:29 +00:00
garbled 1fb588bc51 Convert ofppc to the shared ofw_autoconf.c 2007-11-07 19:31:09 +00:00
garbled 8c63679baf Add a bunch of devices to GENERIC. Fix interrupts on the PegasosII with
a nasty little hack.  Getting closer to a working system.
2007-11-06 19:22:59 +00:00
garbled de8e7fde3e Lots of small changes for ofppc:
Remove the ofb driver.  I'm not interested in trying to make this work.
It should be replaced with the genfb driver, which I have added,
commented out because that driver needs work before it will function on
ofppc.  (it's too panic-happy, and ofppc needs a working autoconf.c)

Change the way we do isa_inb/outb.  The new way is a slightly nastier
hack, but won't run afoul of the other isa drivers as much.

Fix ofw_consinit.c to remove the dependency on ofb.
2007-11-05 15:49:02 +00:00
garbled 51861415b8 Get rid of the ofppc use of the ofbus completely, for the last time.
Write a complete OF boot console into ofw_consinit.c and rewire a bunch
of the ifdef logic in that file to use it when appropriate on both macppc
and ofppc.  Get rid of the attempt to wire up the serial console early,
as that is extremely difficult on ofppc.  Yank all the console code out
of ofppc/machdep.c.  (This is a boot console only, not a full blown
console like ofcons.c)

Delete all the ofbus references out of the config files, and pull in
dev/ofw/openfirmio.c and dev/ofw/ofw_subr.c directly rather than pulling
in files.ofw.  It might be worth going back and adding a files.ofw-nobus
to that directory to allow pulling in the openfirmware driver without
pulling in the whole ofbus mess.

Change rtas driver to connect directly to mainbus, like the PCI bus nodes do.
2007-11-04 16:28:27 +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 3f9a46c5fb Add some basic options from i386 GENERIC. 2007-10-25 17:33:25 +00:00