Commit Graph

57 Commits

Author SHA1 Message Date
thorpej
89bf5a8f8e Add trailing ; to CFATTACH_DECL. 2002-10-02 15:52:22 +00:00
thorpej
b96bc0d7bc Use CFATTACH_DECL(). 2002-10-02 04:06:36 +00:00
thorpej
d652bdcafe Use CFATTACH_DECL(). 2002-10-01 02:49:56 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej
6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej
d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
scw
5cff5c076e Don't need <machine/walnut.h> here. 2002-08-27 12:23:06 +00:00
scw
5b79fdfaf7 Add "ecc at plb" device.
Add an "irq" locator to the plb device.
This gets rid of the original hack where ecc support was wedged into
the cpu driver.
2002-08-23 15:01:07 +00:00
simonb
3502025a54 Show the IRQ we attach the ECC handler to. 2002-08-23 13:43:18 +00:00
scw
9ba60b4297 Install the ECC error interrupt handler at the level specified by
a "4xx-ecc-irq" property.
If the property isn't defined, assume the hardware has no ECC support.
This should, ideally, be a config file option.
2002-08-23 12:46:49 +00:00
scw
f384fe8ba7 Don't assume all com ports run at "COM_FREQ", or a multiple thereof.
Use a board-specific property instead.
2002-08-23 11:42:13 +00:00
scw
19c988633d Don't frob cpu-specific DCR registers in common code. 2002-08-23 11:40:07 +00:00
scw
4968573654 Split off common 4xx locore code so it can be re-used by other 4xx ports. 2002-08-23 11:37:53 +00:00
simonb
bff11b16da Remove the "comfound < 2" bogosity. 2002-08-14 12:31:38 +00:00
simonb
2eded71179 Remove an unused global variable (that was marked with an XXX!). 2002-08-14 12:29:50 +00:00
simonb
2f766ff3c2 Use the base space tag from the attach args, don't recreate it all the
time.
Clean up some include files.
2002-08-13 06:15:15 +00:00
simonb
f0302072f1 Use "ibm4xx" instead of "galaxy"; galaxy was an early code name for the
405GP.
2002-08-13 05:43:24 +00:00
simonb
9e00d2d7f9 Fix include file location botch in previous. 2002-08-13 05:25:39 +00:00
simonb
497d6762cf Split out device register definitions to their own files as the are
common across many of the 4xx parts.  Leaves ibm405gp.h with device
address information specific to the 405GP CPU.  Now allows opb.c to
support multiple 4xx CPU types.
2002-08-13 04:57:48 +00:00
simonb
b16f7fe1fc Add a pvr field to 'struct opb_dev', to allow the opb_devs array to
contain info about on-chip devices for more than one CPU type.
2002-08-12 07:55:08 +00:00
simonb
6bf1aaf8eb Reorganise the IBM 4xx bus layout, using terminology from the IBM
documentation:
 - Remove "mainbus" altogether.
 - The new root is "plb" - the Processor Local Bus.
 - Attached to this is the "opb" - the On-chip Peripheral Bus, to which
   all the on-chip devices are attached (except the cpu and pci host
   bridge).
 - Port-specific code can pass an array of 'struct plb_dev' to
   config_rootfound() to attach extra devices to the plb.  The walnut
   port attaches a "pbus" (Peripheral Bus) in here for the RTC and
   pc keyboard controller to attach to.
There is still much 405GP specific code; the next round of changes will
generalise this to enable easier support for other 4xx CPUs.
2002-08-12 02:06:18 +00:00
simonb
5b415a20e5 Fix for when EMAC_EVENT_COUNTERS isn't defined. Problem reported by
Allen Briggs.
2002-08-09 14:10:30 +00:00
simonb
acce3a5e36 Add a driver the for IBM 405gp (and possibly other IBM 4xx cpus) ethernet
MAC (emac).  Much thanks to Jason Thorpe for debugging help writing this
driver.  Tested on the walnut, and an earlier version of this driver works
on the OpenBlockSS.
2002-08-09 04:17:26 +00:00
chs
301f1ebf31 move more inlines to cpu.h: mftb(), mftbl() and mfpvr().
(the mftb() in pmap.c only wanted the lower 32 bits, so that's now mftbl()).
2002-08-06 06:14:33 +00:00
simonb
7cfa7d3ce0 Sprinkle a small amount of KNF. 2002-08-03 13:12:44 +00:00
chs
810cde53cc use a completely separate trap handler for syscall traps.
this reduces syscall overhead by 10% to 20% depending on cpu type.
2002-08-02 03:46:42 +00:00
simonb
d16ca1844f Add driver for 405gp (and other 4xx?) watchdog timer. 2002-08-01 23:15:37 +00:00
simonb
873edaed34 Clean up some white space niggles. 2002-07-11 01:38:48 +00:00
matt
685778b53b Peform a rototill over the powerpc-based ports.
Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop.  Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
2002-07-05 18:45:15 +00:00
christos
281c8c638b apply the fix from the powerpc port. this is almost a copy of powerpc/trap.c
and needs to be refactored.
2002-06-17 21:08:56 +00:00
christos
3b50728cf4 MD systrace gluons. 2002-06-17 16:32:57 +00:00
matt
f62dc5c664 Remove redundant declarations. 2002-05-13 07:04:24 +00:00
eeh
67c9b24c04 Follow the post-UBC semantics of resetting ref/mod collection inside of
pmap_clear_{reference,modify}().
2002-03-28 18:07:31 +00:00
eeh
0754ce0386 Use properties instead of board_info. 2002-03-15 21:12:07 +00:00
eeh
75343f2177 Use new non-PCI mainbus. 2002-03-15 21:10:46 +00:00
eeh
d26d3b351c This should be pretty standard. 2002-03-13 23:12:11 +00:00
eeh
266bd056b2 Adapt to the new, separate mainbus. 2002-03-13 19:13:10 +00:00
eeh
8e235a382a Add a vector for machine check traps. 2002-03-13 19:11:53 +00:00
eeh
d94ffa460b Generic mainbus driver. 2002-03-13 01:04:16 +00:00
eeh
ba8ac60043 pmap improvements:
Remove the cache flush routines that have been moved to cpu.c

Make sure we clear out the unused PA bits in the TTE which causes breakage
on some MMU models.
2002-03-13 00:47:58 +00:00
eeh
9129e6fe1d Generalized IBM UIC driver. 2002-03-13 00:40:50 +00:00
eeh
4b971968ac Add cache_info to cpu_info which provides details about D$ and I$
sizes and line sizes.  This is needed for cache flusing, clearing
memory, and several other operations.  This information is accessible
from userland through a new CPU_CACHEINFO sysctl.
2002-03-13 00:38:13 +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
simonb
abf4139889 Include libkern.h for strcmp() prototype. 2002-03-08 01:36:34 +00:00
chs
b744097a5f allow writing to write-only mappings. fixes PR 3493. 2002-02-14 07:08:02 +00:00
thorpej
9235283af1 Rename NOCACHE -> PPC_4XX_NOCACHE to avoid conflict with the namei
flag of the same name.

From Frank van der Linden <fvdl@wasabisystems.com>.
2001-11-26 23:26:33 +00:00
thorpej
77fdde7f2c Reset the unused RPN bits in a TLBLO to 0, as specified by the PPC401B3
user's manual, page 8-40.

From Frank van der Linden <fvdl@wasabisystems.com>.
2001-11-26 23:24:20 +00:00
simonb
15a42388c0 In pmap_enter(), sync the instruction cache if VM_PROT_EXECUTE. Fixes
problems when executing programs where text is copied to a page without
a dma sync (like NFS data bcopy'd to a buffer cache page).

From discussion with Jason Thorpe and Eduardo Horvath.
2001-11-06 04:49:49 +00:00
simonb
545af90346 Don't return at the end of a void function. 2001-10-29 02:00:01 +00:00