Commit Graph

1352 Commits

Author SHA1 Message Date
scw
30f36059c8 Appease -Wcast-qual for the IBM4XX case. 2005-06-03 11:40:25 +00:00
scw
2224de5016 Appease -Wshadow. 2005-06-03 11:20:06 +00:00
matt
22642767aa constify and adapt for newly enabled warnings. 2005-06-02 17:07:30 +00:00
he
45cee85f31 Remove the hack to compile oea/pmap.c with -Wno-cast-qual, and instead
make use of the new __UNVOLATILE() macro in memset() usage.
2005-06-02 14:35:08 +00:00
he
f483e62113 Put a band-aid over the cast qualification warnings for oea/pmap.c.
It cannot be compiled with -Wno-cast-qual due to a volatile pointer
being passed to memset(), and there's no easy way other than open-
coding memset() to fix this.  So instead we cheat for now and add
-Wno-cast-qual to CFLAGS for this file.  To be documented in doc/HACKS.
2005-06-02 10:22:20 +00:00
he
da2e0654e4 Adapt to const additions. 2005-06-02 10:16:31 +00:00
he
19108310c3 Fix variable shadowing warning. 2005-06-02 09:47:21 +00:00
he
50ea728723 Fix variable shadowing warnings by renaming the innermost variables. 2005-06-02 09:46:09 +00:00
he
aa6dbf4358 Fix shadowing and cast qualification warnings. 2005-06-02 09:19:20 +00:00
he
5d76b8816d Adapt to now compiling with -Wcast-qual - char pointers initialized
to string constants now need to be "const char*".
2005-06-02 09:13:06 +00:00
scw
8f4aee207b Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).
2005-06-01 13:01:35 +00:00
christos
f6b4c20f18 s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name. 2005-05-31 04:03:08 +00:00
chs
6cefe93bda adapt to const changes. 2005-05-31 00:40:17 +00:00
chs
cf01d82b43 in pmap_enter(), preset the ref bit for execute-only mappings too. 2005-05-29 15:57:53 +00:00
kleink
4a6a03b162 Include <sys/cdefs.h> for __signed; related to lib/30072. 2005-05-25 20:58:00 +00:00
lukem
3fd1802e62 Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
2005-04-25 15:02:02 +00:00
kleink
b2cb7fcd8a Push back the descriptions of NaN formats, and descriptions of the
distinction between signalling NaNs and quiet NaNs back into the
machine-dependent headers; treat the implementation of __nanf in the
same spirit.

IEEE 754 leaves the distinction between signalling NaNs and quiet NANs
to the implementation, and unlike our headers used to suggest they're
not identical in the interpretation of the fraction's MSb; in due
course, make those of hppa, mips, sh3, and sh5 reflect reality.
2005-04-15 22:39:10 +00:00
nathanw
1e16e443e6 Rewrite the inner loop of vcopypage() and vzeropage() to be entirely
in inline asm and include turning the DMMU off and back on. This
prevents the compiler (especially gcc -O0) from inserting accesses to
locations in virtual address space when such accesses would fail.
2005-04-11 18:35:38 +00:00
yamt
4a4d83d126 pmap_testout: fix too many arguments for pmap_kenter_pa.
from Shoichi Miyake.  PR/29914.
2005-04-07 12:01:08 +00:00
yamt
6b2d8b66a4 merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
2005-04-01 11:59:21 +00:00
shige
1a445aab8a Remove MD codes from arch/powerpc/ibm4xx. 2005-03-18 12:56:59 +00:00
matt
a6db24a485 Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create).  dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
2005-03-09 19:04:43 +00:00
nathanw
ec956cbe3a Don't enable interrupts while calling trap() if the trapping frame
didn't have them enabled either.

Addresses PR port-macppc/29559.
2005-03-04 22:40:32 +00:00
chs
111117ce57 fix two bugs with wiring:
(1) in pmap_enter_pv(), we would always mark the header entry wired, even if
     the new entry wasn't put there.  noticed by Juergen Hannken-Illjes.
 (2) in pmap_unwire(), we would never examine the header entry.
     noticed by me.

while I'm here, move the counter increment in the pmap_enter() path to be
next to the corresponding PV_WIRE() call so it's more obvious they match.
2005-03-02 09:02:42 +00:00
simonb
6e4737fc77 KNF: put "if (...)" and following statement on separate lines. 2005-02-25 07:09:58 +00:00
briggs
dcfd337d24 pmap_extract(): Only attempt to set '*pap' if pap is non-NULL.
PR port-powerpc/29507 from Neil Ludban.
2005-02-22 21:06:56 +00:00
matt
413f4d4de6 Don't clear PCB_FPU/PCB_ALTIVEC when releasing the FPU/AltiVec unit. Add
new flags to indicate whether the PCB currently owns the FPU/AltiVec unit.
2005-02-22 02:59:46 +00:00
briggs
6451b0332b Update to a kcore_hdr_t that is useful for OEA-style CPUs. Adding
support for Book-E and other CPUs will require updating this structure
appropriately.
Contributed by Wasabi Systems, Inc.
2005-02-17 02:21:28 +00:00
briggs
7e9ffb8e19 Install spr.h 2005-02-17 02:14:23 +00:00
chs
4d33e8a954 move recursion-detection code inside interrupt-protected region. PR 24254. 2005-02-13 02:03:54 +00:00
matt
4612c7a119 When building kernel for OEA, allow unaligned accesses since OEA
processors will deal with them properly.
2005-02-12 00:03:21 +00:00
briggs
d6e37f352e Keep track of the CPU's current speed (in kHz) in the cpu info structure,
if we can get it.  May want to expand this in the future to include min
and max speeds for systems where we can adjust the speed.
2005-02-03 14:47:09 +00:00
thorpej
a7ba88252d Eliminate use of M_HASFCS. 2005-01-30 19:03:23 +00:00
simonb
90d5b03202 Fix a typo in a printf string. 2005-01-27 12:35:53 +00:00
shige
5ed37446b2 Add gpio module. 2005-01-23 19:24:31 +00:00
shige
17dda52768 Add driver for On-chip General Purpose I/O. 2005-01-23 19:22:22 +00:00
simonb
dc5fd1a390 Use lis@h/ori@l instead of lis@ha/addi@l since we may use r0 and addi
is one of those funny instructions that treats r0 == 0 when used as the
first arg.

Fixes problems on ibm4xx.  Ok'd by matt@.
2005-01-23 00:23:57 +00:00
shige
9704ef243d Add consinit() and md_consinit funcptr to ibm4xx/machdep.c.
Rename consinit() to obs405_consinit() at evbppc/obs405/consinit.c.

Set md_consinit to obs405_consinit() at initppc().
Consinit fuction calls a function stored at md_consinit pointer.
2005-01-21 19:24:11 +00:00
simonb
3df401ce77 Set up last segment descriptor to send an interrupt after that
descriptor is transmitted, and bypass existing Tx descriptor reaping
method (for now...).

Fixes problems with bad NFS write performance.
2005-01-21 15:19:09 +00:00
simonb
b4e4cddd17 In emac_txeob_intr():
- return 1 if we processed any completed tx packets.
 - try to get more packets going by calling emac_start().
2005-01-21 15:15:20 +00:00
matt
5eeb71a595 Add more support for MPC7447A/MPC7448. 2005-01-21 00:58:34 +00:00
matt
9b69be93b4 Add extended BAT block size definitions. 2005-01-21 00:46:23 +00:00
matt
f75acb0839 Add some HID1 definitions and HID0_XBSEN for 7455+ processors. 2005-01-21 00:45:48 +00:00
matt
a59dee22f1 Correct BHTCLR/XAEN definitions. 2005-01-21 00:09:30 +00:00
matt
dcecffc61f Add MPC7448 and change MPC745x_P macro to deal with it. 2005-01-21 00:04:54 +00:00
matt
c104ee3507 Add entry for MPC7447A 2005-01-20 21:28:47 +00:00
matt
3f8b260589 Add MPC7447A (0x8003) 2005-01-20 21:26:49 +00:00
matt
2201849e4a Split the hw-dependent powermanglement into its own function and make
Idle call that.  Add a ci_idlespin function pointer to cpu_info.
Update INIT_CPUINFO to initialize it to a naked 'blr' instruction.
In oea/cpu_subr.c, add cpu_idlespin and make ci_idlespin point to it.
2005-01-19 22:22:56 +00:00
chs
40345beaa3 ibm4xx/pte.h is no more. 2005-01-19 14:46:26 +00:00
simonb
d22ebd9247 White space nit. 2005-01-19 11:41:07 +00:00
simonb
a8164658f1 A more accurate microtime() implementation. Avoids precision
errors when the clock frequency doesn't divide nicely in to 10^9.
2005-01-19 00:26:54 +00:00
shige
95b240720a Arrange some machine-dependent code.
- ibm40x_machdep.c: ibm40x specific
	. ibm40x_memsize_init
	. mem_regions
	. other functions are moved to machdep.c or ibm4xx_machdep.c.
  - ibm4xx_machdep.c: ibm4xx specific
	. ibm4xx_init (moved from ibm40x_machdep.c)
	. ibm4xx_install_extint (moved from ibm40x_machdep.c)
	. ibm4xx_cpu_startup (moved from ibm40x_machdep.c:ibm4xx_startup)
	. ibm4xx_dumpsys
2005-01-18 17:11:25 +00:00
shige
48188681e8 Add ibm4xx family common module.
- machine-dependent global variables
  - cpu_startup glue
  - softnet/softserial (copy from ibm40x_machdep.c)
2005-01-18 16:56:24 +00:00
matt
98b6754e59 Fix problem with unclosed comments 2005-01-17 22:41:23 +00:00
shige
ce880a5946 Remove openbios dependent code from ibm4xx/ibm40x dependent module. 2005-01-17 17:19:36 +00:00
shige
50f317e0f4 Add board properties database code. 2005-01-17 17:13:49 +00:00
shige
0f2e586866 Add openbios-board related modules.
- openbios.c
	getting board data memory image from openbios.
	setting all board data to board properties database.
  - board_prop.c
	initialize board properties database.
	(set/get board properties [macros in ibm4xx/cpu.h])
2005-01-17 16:23:27 +00:00
chs
95c9f4ab0a add some whitespace. 2005-01-16 23:52:12 +00:00
chs
bfbf7ea9b1 implement pmap_wired_count(). fix some places we would forget to splx().
move the parts of pte.h that were used into pmap.c (since they were really
pmap-internal details) and delete ibm4xx/pte.h.  other misc cleanup.
2005-01-16 21:35:58 +00:00
shige
49c3c14437 Add externs:
- md_device_register (func ptr)
	- ibm4xx_device_register (func)
2005-01-13 17:16:33 +00:00
shige
2e87452aa9 Remove device_register, cpu_rootconf functions.
These functions are moved to ibm4xx/autoconf.c.
2005-01-13 17:14:36 +00:00
shige
79354dbad0 Add device_register function for all ibm4xx machine. 2005-01-13 17:12:28 +00:00
shige
786539f27b Add device_register machine-independent-glue. 2005-01-13 17:11:14 +00:00
chs
67402a485f enable powersave mode on 7450 and family.
also, the HID0_DOZE bit in this context doesn't mean "doze",
it's actually "enable extra BATs".  add an alias for this bit
and use it as appropriate.
2005-01-11 02:09:54 +00:00
matt
b046d5ecf9 Now that countless UVM bugs have been fixed, enable "topdown" memory
allocation by default.
2005-01-10 05:42:09 +00:00
briggs
4137e66929 Allow MSR[POW] off for power saving on 604-era CPUs. From Tim Kelly.
XXX -- needs benchmarking
2005-01-07 21:31:04 +00:00
briggs
35a39caef5 Don't attempt to probe the cache with l2cr on 604ev. From Tim Kelly. 2005-01-07 20:41:35 +00:00
chs
ddc6ab738a drop the big lock in upcallret() like all the other platforms do. 2005-01-03 00:03:25 +00:00
shige
d2306c8cf3 Add functions:
- com_opb_cnattach
	- com_opb_device_register
2004-12-24 14:55:50 +00:00
shige
eb555844f1 Substitute PPC405_ with PPC_IBM405_. 2004-12-17 16:23:57 +00:00
matt
eb30eca3e3 Add -Wa,-maltivec so that AltiVec instuctions will be recognized. 2004-12-09 22:57:12 +00:00
matt
42e9e00c87 Make MSIZE and MCLSHIFT overrideable in <machine/param.h> 2004-12-09 00:37:54 +00:00
briggs
710cfd7aef Add MPC7400 to the list of CPUs for which we try to measure the speed.
Noticed missing by Tim Kelly.
2004-12-08 03:07:03 +00:00
briggs
52af8374ec Minor (old) patch from me to correct CPU ID of 604e vs. 604ev.
Tested by Tim Kelly.
Also patched from Tim to
 - Delay longer for second CPU spinup.
 - Only attempt to print CPU speed and cache configuration on certain
   CPU types.
2004-12-06 04:15:03 +00:00
matt
080d581a20 Make sure to enable interrupts before lower IPL so we don't block any
interrupts (IPI) we shouldn't.
2004-12-04 05:56:28 +00:00
shige
4b61add729 Add header file for IBM405XX(AMCC405XX) Device Control Registers. 2004-12-01 17:55:33 +00:00
thorpej
7a60e77293 bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
2004-11-28 17:34:45 +00:00
matt
e27c3887b6 If setfault() returns nonzero (ie, we trapped), make sure to unsetusr. 2004-11-18 22:56:32 +00:00
matt
589ef8f06a Make sure to do setenv/unsetenv in pairs. This prevents panics in
DIAGNOSTIC kernel when crossing segment boundaries.
2004-11-18 21:09:37 +00:00
thorpej
e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
thorpej
dc2f2fbe74 Centralize the declaration of booted_device and booted_partition. 2004-10-23 17:07:37 +00:00
yamt
d2fe4b34bb move some per-cpu data definitions to MI place so that they can be modified
without touching all ports.  discussed on tech-kern@.
2004-09-22 11:32:02 +00:00
scw
ac3ac35ecb MPC8xx DC_CST is SPR 0x238, not 0x230.
Reported by Jared Momose in private email.
2004-09-20 11:29:19 +00:00
skrll
f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
scw
17d7b87515 It helps to call fpu_sqrt() when dealing with the frsqrte instruction. 2004-09-15 07:04:21 +00:00
scw
db255697d0 Apply suggested changes from PR port-powerpc/24830 arch/powerpc/ibm4xx:
Bad register constraints in copyin(), copyout(), copyinstr(), copyoutstr(),
and delay().
2004-09-02 08:22:58 +00:00
simonb
ac20296fee Remove the unused MKTTE macro. 2004-08-31 01:06:12 +00:00
drochner
46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
thorpej
6c08646cb8 Garbage-collect pagemove(); nothing use it anymore (YAY!!!) 2004-08-28 22:12:40 +00:00
matt
e4726fc65d Add pmap counters for reclaimed pvos and for the times a pvo could not be
obtained.
Switch to EVCNT_ATTACH_STATIC*
In DEBUG/DIAGNOSTIC, decrement/increment pmap_pvo_enter_depth around pool
calls since they could possibly cause a recursion back into pmap_pvo_enter.
2004-08-24 21:31:49 +00:00
nathanw
05e0a219ae Don't prohibit DDB and KGDB together. 2004-08-23 20:55:03 +00:00
chs
80c0e76172 implement pmap_pvo_reclaim(), which steals an existing non-wired pvo entry
for reuse, and use this in pmap_pvo_enter() when we can't allocate a new one.
2004-08-19 15:31:57 +00:00
scw
ad271535d4 In _bus_dmamap_load_buffer(), honour the maximum segment size specified
when the DMA map was created.

The previous behaviour honoured the maximum segment size only when
coalescing adjacent segments.
2004-08-17 08:35:43 +00:00
aymeric
990d2462b0 add a missing break in the EXC_MCHK|EXC_USER case in trap() 2004-08-16 10:16:16 +00:00
aymeric
e2de6e57a9 fix typo in comment 2004-08-16 10:12:40 +00:00
tacha
08adc832cf remove obsolete "pci_enumerate_bus" definition. 2004-08-02 18:07:40 +00:00
uebayasi
33d0780d08 Fix an apparent syntax error. 2004-08-02 13:30:08 +00:00
simonb
ed2e469e3d Remove some debug printf()s.
Reorder an evcnt_attach_static().
2004-07-31 13:28:53 +00:00
manu
66fc5fb621 Empty shell for Darwin audit API 2004-07-28 22:24:06 +00:00
manu
57ae178c88 Added a simple bigcopy, from Srinivasa Kanduru 2004-07-25 09:21:48 +00:00