Commit Graph

369 Commits

Author SHA1 Message Date
tsubai 849421ec54 Add RCS ID.
Disable debug messages.
1999-10-15 07:20:42 +00:00
tsubai 26cb48e441 Fix typo. 1999-10-15 07:16:16 +00:00
tsubai 3499cf35ad Define fdc, because dev/pcmcia needs it. 1999-10-15 06:43:05 +00:00
haya 4eee111127 This is the first check-in of CardBus driver. CardBus driver contains
CardBus bus stub, YENTA PCI-CardBus bridge (cbb), 3Com 3C575TX driver
(ex) and Intel fxp driver.

TODO:
  o Conform to the KNF more strictly.
  o Be unified with pcmcia code as much as possible.
  o Add more drivers for CardBus card, such as APA-1480 or USB card.

The affected files are listed below.

	sys/arch/i386/conf/files.i386
	sys/arch/macppc/conf/files.macppc
	sys/conf/files
	sys/dev/ic/elinkxl.c
	sys/dev/ic/elinkxlvar.h
	sys/dev/ic/i82365.c
	sys/dev/ic/i82365var.h
	sys/dev/isa/i82365_isasubr.c
	sys/dev/pci/files.pci
	sys/dev/pcmcia/pcmcia.c
	sys/dev/pcmcia/pcmciachip.h

The added files are listed below.

	sys/arch/i386/conf/CARDBUS
	sys/arch/i386/include/rbus_machdep.h
	sys/arch/i386/i386/rbus_machdep.c
	sys/arch/macppc/include/rbus_machdep.h
	sys/arch/macppc/macppc/rbus_machdep.c
	sys/dev/cardbus/if_ex_cardbus.c
	sys/dev/cardbus/Makefile.cardbusdevs
	sys/dev/cardbus/cardbus.c
	sys/dev/cardbus/cardbus_map.c
	sys/dev/cardbus/cardbusdevs
	sys/dev/cardbus/cardbusdevs.h
	sys/dev/cardbus/cardbusdevs_data.h
	sys/dev/cardbus/cardbusvar.h
	sys/dev/cardbus/cardslot.c
	sys/dev/cardbus/cardslotvar.h
	sys/dev/cardbus/devlist2h.awk
	sys/dev/cardbus/files.cardbus
	sys/dev/cardbus/if_fxp_cardbus.c
	sys/dev/cardbus/pccardcis.h
	sys/dev/cardbus/rbus.c
	sys/dev/cardbus/rbus.h
	sys/dev/pci/pccbb.c
	sys/dev/pci/pccbbreg.h
	sys/dev/pci/pccbbvar.h
1999-10-15 06:07:17 +00:00
tsubai 956c00aaf3 Change kernel segment base to 0xf00000. Some PM9500s won't boot with the
old value (0xfffff0).
XXX I don't know why...
1999-10-13 04:01:06 +00:00
tsubai bc7211f403 Use battable to map obio space rather than using bat1 registers statically. 1999-10-13 03:51:32 +00:00
tsubai 9f58dd36d0 Change char *bootpath to char bootpath[]. 1999-10-13 03:27:47 +00:00
tsubai eb1c1bdb92 Make media-bay CD detachable. 1999-10-04 22:58:10 +00:00
thorpej e6c88a7686 Update for SCSIPI changes. 1999-09-30 22:59:52 +00:00
wrstuden 25faa820de Add support for reading MacOS-partitioned disks. Stolen from the mac68k
port, but modified in that macppc searches for netbsd-partitioned disks
before MacOS partitioned disks, since installboot generates a fake MacOS
partition table which isn't the one we want to use.
1999-09-27 17:02:43 +00:00
tsubai efb6bddd34 lcsplx() should return old cpl... 1999-09-21 12:36:32 +00:00
matt 9ac5036f93 Make the DEFPA run under the macppc port (tested on a B&W G3). Add it to
the GENERIC config file.
1999-09-19 22:02:37 +00:00
thorpej 11cae42531 Centralize the declaration and clearing of `cold'. 1999-09-17 19:59:35 +00:00
thorpej 3b01d1b872 Rename the machine-dependent autoconfiguration entry point `cpu_configure()',
and rename config_init() to configure() and call cpu_configure() from there.
1999-09-15 18:10:33 +00:00
chs f3a668ed84 eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
1999-09-12 01:16:55 +00:00
augustss 14b98cd440 Add uaudio driver. 1999-09-09 12:33:43 +00:00
tsubai f7b9562c8c Inline some functions. 1999-09-08 17:28:02 +00:00
tsubai 0724f6dd3b Recognize PCMCIA eject button. (Tested on only PowerBook 2400.) 1999-09-05 05:30:30 +00:00
thorpej c068ef8152 Add `umass'. 1999-08-29 16:55:48 +00:00
tsubai 5d7288c24d Increase md size to 2MB. 1999-08-28 16:49:49 +00:00
tsubai b65b00c391 Change the start address of INSTALL kernel to 0x800000 to use larger
contiguous space for memory disk.
1999-08-27 07:59:49 +00:00
augustss db574ba708 Add umodem device. 1999-08-16 22:27:08 +00:00
tsubai 775199a39f Make configurable without ams. 1999-08-16 06:28:09 +00:00
tsubai be72fab2f7 My last change was wrong. Revert. 1999-08-15 12:47:15 +00:00
thorpej 28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
thorpej eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
tsubai d633663ab8 Add mediabay. 1999-08-05 00:31:01 +00:00
tsubai 4eb4de3592 Make ``boot kernelname'' work on OF-3.x too. 1999-08-03 07:08:36 +00:00
augustss f641c4b3b6 Make two wsmux pseudo devices and add mux locators. 1999-07-29 19:36:58 +00:00
augustss 3652732791 Add wsmux device.
(Also add lots of missing chrtoblktbl[] entries.)
1999-07-29 19:14:35 +00:00
augustss a7cd454b1d It's time to be COMPAT_14. 1999-07-29 10:37:12 +00:00
cgd f886376518 be more efficient when doing the SYSTEM_LD_TAIL for -g kernels: don't
copy them just to strip them, use strip -o.
1999-07-26 05:20:44 +00:00
tsubai 07bc0e694d media-bay CD support. 1999-07-21 19:20:04 +00:00
tsubai bfba58c1e1 grackle uses different I/O address. 1999-07-20 17:31:59 +00:00
christos 41cc9a0eb8 enable PPP_BSDCOMP, PPP_DEFLATE, PPP_FILTER, PFIL_HOOKS, IPFILTER_LOG
on the GENERIC kernels that had them commented out.
XXX: Please note, that not all the kernels have all the options defined!
1999-07-20 07:40:34 +00:00
tsubai 035071b460 Add VM_MAX_KERNEL_BUF definition. 1999-07-18 17:54:19 +00:00
tsubai e9f1ccdcd1 Decrease default NKMEMCLUSTERS. (128MB -> 8MB) 1999-07-18 17:53:18 +00:00
tsubai 4aec314394 Add PowerBook LCD brightness and speaker volume button device.
Only brightness works for now.
1999-07-12 17:48:26 +00:00
tsubai b7fc95a188 Add read/set LCD brightness and eject PCMCIA card function. 1999-07-12 15:54:55 +00:00
tsubai a9cb7eabb2 One more pmap_extract() fix. 1999-07-11 17:47:21 +00:00
tsubai a192e5bd20 Enable soft poweroff on PowerBook. 1999-07-11 16:59:31 +00:00
thorpej 0945bf58b0 Add examples for including the kernel crypto bits from either crypto-us
or crypto-intl, commented out, with instructions to use only one, and
adjust the prefix as necessary.
1999-07-09 18:55:33 +00:00
mrg ecdad0ec33 clean up a bit after jason :)
- fix emitrules() like emitfiles() to deal with the prefix (otherwise it
  would attempt to find the file in the normal base for the NORMAL_C rule).
- add emitincludes() which adds include directives for each prefix to the
  $INCLUDES variable in the makefile.
- add %INCLUDES to each Makefile.arch to deal with the above.

this makes "prefix" actually work in a usable manner, and now i can move
on to fixing compiler warnings (errors) in the ESP code. :)
1999-07-09 09:52:55 +00:00
thorpej 3ebbe095e0 Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
1999-07-08 18:05:21 +00:00
itojun 5effafcaa6 kernel configuration for IPv6/IPsec. should be in GENERIC in the future.
(source code will be committed soon)
1999-07-01 07:00:12 +00:00
tsubai 654e155756 Display verbose messages about L2 cache. 1999-06-30 16:34:19 +00:00
itojun 427639cdce - Call ip6intr if INET6 is defined.
- remove "need-flag" for mac68k esp driver, as it is not used in anywhere
  and conflicts with IPsec ESP header.

This should be the only MD change in IPv6 support, except kernel config file.
Very sorry if you have any compilation problem with it (I believe it is okay).
If your favorite arch is not included in here, please add a
call to ip6intr() from softintr handle.
1999-06-28 08:20:40 +00:00
tsubai 5b34d35e45 findroot() should also use "compatible" property. 1999-06-24 08:14:48 +00:00
tsubai a2ded1ab73 NVRAM read/write functions. 1999-06-22 13:12:11 +00:00
tsubai 2068c8b6e4 Use RTC on PB. 1999-06-22 11:29:11 +00:00
wrstuden 17900cd587 Install ofwboot.elf in addition to ofwboot. Thanks to Chris for info on how
to do this!
1999-06-21 21:02:49 +00:00
tsubai 9ac9208434 More initialization by calling Open Firmware. 1999-06-20 05:34:59 +00:00
cgd 7c02d93c04 nuke current definitions provided by __BUS_SPACE_COMPAT_OLDDEFS.
I'll do what I can to make new ones soon.  8-)
1999-06-18 04:49:24 +00:00
tsubai a8d7da0d21 Add "trackpad" definition. 1999-06-17 06:59:05 +00:00
tsubai c28bad1d51 Define PowerBook G3 Japanese keyboard. 1999-06-16 08:48:37 +00:00
tsubai a2e8151f8e Define symbolic name of PMU commands. 1999-06-16 07:43:58 +00:00
tsubai 4df925b8b0 * Don't use DMA interrupt.
* Stop DMA explicitly in finish routine.
1999-06-14 08:53:06 +00:00
tsubai 86d2f9253a Consider "have /psuedo-hid and only ADB keyboard" case to make the
new PowerBook G3 happy.
1999-06-14 06:22:50 +00:00
thorpej 2c35c7bd03 Only declare block major numbers for devices which can be the root device. 1999-06-07 20:31:27 +00:00
thorpej d76e7b8c6d Don't pass a nam2blk around at all; just have setroot() and friends reference
dev_name2blk[] directly.  Addresses PR #7622 (ITOH Yasufumi), although
in a different way.
1999-06-07 20:16:08 +00:00
thorpej 2580d306ab Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags.  PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that.  INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now).  This will eventually
change now these maps are locked, as well.
1999-05-26 19:16:28 +00:00
thorpej 5832084eaf bus_dmamem_map() maps DMA safe memory, which is usually one or more
managed pages, into KVA space.  Since the pages are managed, we should
use pmap_enter(), not pmap_kenter_pa().

Also, when entering the mappings, enter with an access_type of
VM_PROT_READ | VM_PROT_WRITE.  We do this for a couple of reasons:

	(1) On systems that have H/W mod/ref attributes, the hardware
	    may not be able to track mod/ref done by a bus master.

	(2) On systems that have to do mod/ref emulation, this prevents
	    a mod/ref page fault from potentially happening while in an
	    interrupt context, which can be problematic.

This latter change is fairly important if we ever want to be able to
transfer DMA-safe memory pages to anonymous memory objects; we will need
to know that the pages are modified, or else data could be lost!

Note that while the pages are unowned (i.e. "just DMA-safe memory pages"),
they won't consume any swap resources, as the mappings are wired, and
the pages aren't on the active or inactive queues.
1999-05-25 23:14:03 +00:00
lukem e4a87aa1a9 * convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes
1999-05-20 08:21:42 +00:00
thorpej f98d358a1f Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m).  The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary.  Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
thorpej e5f47f6307 Rewrite the USB keyboard console attachment (again). Grumble, Macintosh
firmware sets the "stdin" property of /chosen to be a pseudo-hid (yes, they
even spell it incorrectly) that merges all keyboard input into one stream,
so we can't find the USB controller we're attached to.  Instead, just give
it to the first USB keyboard found during autoconfiguration.  So that we
have SOMETHING available early on, use OpenFirmware i/o to do keyboard
input to the console wsdisplay until the USB code attaches the keyboard.

From Jason Thorpe <thorpej@nas.nasa.gov>
1999-05-13 23:37:19 +00:00
wrstuden 3c5aad8d3c For whatever reason, we just can't call pci_init() that early on Bandit
systems.  Why?  Who knows.  Firmware bugs, maybe.  In any case, moving
the call out of the ADB path works.  "Good enough for me."
1999-05-07 22:20:38 +00:00
wrstuden 1e90fa5723 BusLogic cards seem to work in my G3. :-) 1999-05-07 20:10:54 +00:00
drochner fe310dd299 include <lib/libkern/libkern.h> for intoa()/inet_ntoa() 1999-05-07 16:19:27 +00:00
wrstuden fb7f9b828f Add pciide config info. 1999-05-06 19:28:20 +00:00
thorpej 680c3ddbd2 Completely rewrite how cninit() determines which keyboard to use with
the console.  New algorithm:

* if stdin == keyboard, and parent of keyboard == adb, use ADB.
* else, must be a USB keyboard.  Search backwards though the parents
until the USB controller is located.  Determine its location in the PCI
domain, and which type of controller it is, and tell that controller that
it has the console input device.  The USB code will then attach the first
USB keyboard as the console input device during autoconfiguration.

The iMac and Blue and White G3 consoles are fully functional now!
1999-05-06 19:24:47 +00:00
thorpej ac9eee8693 Take all of the OpenFirmware "stdin" grovelling out of the ADB keyboard
driver, as the smarts for this all live somewhere else now.
1999-05-06 19:20:59 +00:00
thorpej 35df607966 Allow pci_init() to be called twice, once just to find the PCI-Host
bridges and determine the "pci chipset" values (for making PCI tags),
and again to actually map the configuration space registers.
1999-05-06 19:16:44 +00:00
tsubai 661ae33963 Remove unused codes. 1999-05-06 04:37:44 +00:00
wrstuden af849de633 MAke this cross-tools happy. 1999-05-06 01:04:48 +00:00
tsubai 9042054e51 Fix a small bug to make both IO and MEM enable bits in csr are set. 1999-05-05 08:43:53 +00:00
thorpej fc645b996a - Always config_found() PCI busses, so we know if present PCI busses
aren't configured.
- Grab the bus's memory space tag from the pci_bridge structure for
the bus.
1999-05-05 04:40:00 +00:00
thorpej 654b0fff46 - Completely rewrite how bus space tags for PCI space are set up. Instead
of hard-coding them, decode the "ranges" property of the PCI bus node in
OpenFirmware.
- Do a little cleanup, and share some more code between the Bandit/Chaos
and MPC106.

XXX The bus_space(9) implementation for macppc really needs to be
rewritten.
1999-05-05 04:37:19 +00:00
thorpej c448c97f2b - Add come comments.
- Do a little cleanup.
- Protect the entirety of pci_conf_{read,write}() with splhigh()/splx().
1999-05-05 04:32:28 +00:00
thorpej 341f87673b Add a bus space tag for PCI memory space to the pci_bridge structure. 1999-05-05 04:26:48 +00:00
tsubai 28b7777fd0 Provide CACHELINESIZE when _STANDALONE is defined too. 1999-05-03 05:19:59 +00:00
tsubai 8e885e921e Check "mac-io" and "/pci/mac-io". 1999-05-01 10:37:57 +00:00
tsubai 8dbaa0169e Find "mac-io" and "/pci/mac-io". 1999-05-01 10:36:08 +00:00
tsubai 5fff3dafe9 Use "compatible" property to match. 1999-05-01 10:23:42 +00:00
tsubai 9697f9c401 Add more sanity check. 1999-04-30 04:35:35 +00:00
tsubai 599ebb4db1 Now we can use symbols in DDB. :-) 1999-04-29 05:15:30 +00:00
tsubai 741030cc8a Add loadfile_machdep.h 1999-04-29 03:17:12 +00:00
tsubai e4e1fcbaa6 Use MI loadfile(). 1999-04-29 03:16:20 +00:00
wrstuden 9b0e678d51 Fix compilation errors. 1999-04-22 18:48:59 +00:00
ws 5423093850 Modify syncicache on PowerPC from an inline to a real function.
Support different cache line sizes with the same object code in userland.
While here, move the function to implementation name space.
1999-04-17 21:16:45 +00:00
thorpej e49833cd68 Now that we have direct-mapped pool pages, we can garbage-collect VM_MBUF_SIZE
and don't need to allocate mb_map.
1999-04-16 21:47:11 +00:00
thorpej 48a53c250d Add a stub pciide_machdep_compat_intr_establish() for Power Macintosh.
Power Macintoshes with PCI IDE (e.g. the new Blue G3) don't have them
wired to compatibility mode, so just return a NULL cookie.  We still have
to have this routine for the PCI IDE driver to link.
1999-04-16 21:15:29 +00:00
chs f455dd6596 add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
1999-04-11 04:04:04 +00:00
tsubai bee9b5d9ab Enable "de". 1999-04-01 16:11:45 +00:00
thorpej 967b8c433c Don't call configure() from cpu_startup(). 1999-04-01 00:17:45 +00:00
tsubai 7c3a6002b3 Use interrupt-map property rather than hard-coding irqs.
(From Dan Winship <danw@MIT.EDU>. Slightly modified by me)
1999-03-29 12:12:03 +00:00
tsubai e1410f9e82 Remove unused file. 1999-03-28 13:39:30 +00:00
tsubai 85cece609b Remove unused files. 1999-03-28 13:16:45 +00:00
mycroft 9c6b797796 Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
  because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
  avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot.  Also, DO NOT use
  pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
  access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
  access_type = 0.  This should probably be revisited.
1999-03-26 23:41:25 +00:00
tsubai 6dbdfeab77 include GENERIC. 1999-03-26 16:40:09 +00:00
tsubai 35a4f16a60 ``INSTALL'' + USB doesn't work (binutils bug?).
So use this instead.
1999-03-26 14:58:22 +00:00