Commit Graph

1394 Commits

Author SHA1 Message Date
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
manu
f6a07159af typo 2004-07-15 20:21:55 +00:00
manu
1e147c565c Remove an outdated comment. 2004-07-15 11:51:56 +00:00
manu
51267dac7d Correctly set MSR static user bits on thread creation, as the calling
process might not have done it. This fixes crashes on thread creation.
2004-07-14 19:58:51 +00:00
matt
635306e7ba Clear PSL_SE on a scheduler activation upcall. 2004-07-09 22:59:17 +00:00
matt
4f6490d718 Add some comments, clean things up so routines can be called from the
idle loop.
2004-07-09 22:00:46 +00:00
manu
99b82f59fb Fix semantic problems with commpage functions, by Wolfgang Solfrank 2004-07-08 13:24:39 +00:00
manu
0d64053852 I copy/pasted the copyright notice from another file but I forgot to
change the name of the contributor: Wasabi Systems did not contribute
that file.
2004-07-08 07:36:25 +00:00
christos
f68663bc91 kill duplicate code. 2004-07-07 22:02:12 +00:00
manu
9ff70d0082 Assembly versions of commpage functions for Powerpc, by Peter Grehan.
bigcopy is still missing
gettimeofday is implemented as a system call, whereas on Darwin, it reads
the data from the commpage (the kernel updates it).
2004-07-06 14:11:49 +00:00
pk
a7c40722d8 Call inittodr() from main(). Let file system code set the recorded `last
update' time (if any) through the new function setrootfstime().
2004-07-05 07:28:45 +00:00
manu
67cf1bc043 MacOS X.3 introduces a new sigreturn for PowerPC, with a usercontext
versionning argument. For now we only implement the X.2 flavor.
2004-07-04 21:03:55 +00:00
manu
7fef082024 Move all the MD bits of commpage to a new file.
Map the comm page as RW in kernel (we want to modify it but not to execute it),
and RX in userland (no need to modify it but we want to execute it
2004-07-03 22:17:18 +00:00
manu
26200ee754 In MacOS X.3, the kernel maps tw opages of memory in every user process.
This areas is called the comm pages. It is used to provide fast access to
several data and functions.

The comm pages are mapped starting at 0xffff800 (address chosed so that
absolute branch can be used, so it can be accessed even when dynamic linking
is not ready). NetBSD has the user stack here, so we need to provide a
Darwin-specific stack setup routine which sets the top of the stack at
0xbfff0000.

This implementation is not complete but it does enough to get MacOS X.3
starting again (static binaries run, dynamic binaries still have an issue).
in the comm pages functions, we only implement bcopy, pthread_self and
memcpy.

TODO:
- clean up the powerpc specific code from MD parts
- for now we map only one page to avoid a crash, we want two pages.
- write all the comm functions.
2004-07-03 00:14:30 +00:00
kleink
0fea7f39a2 On OEA, turn PSL_USER* into runtime values appropriate for the CPU model
we're executing on; besides dealing with the bits not implemented in the
601's MSR it also removes the silent failure behaviour when passing
PSL_VEC set on a CPU not implementing it.

Also, fix those masks for the 4xx again.
2004-06-26 21:48:30 +00:00
kleink
5b37ad104f Repair a sentence. 2004-06-26 16:04:55 +00:00
kleink
0edffeb867 On MPC601s, rewrite any (unimplemented) tlbsync instruction as a sync. 2004-06-23 22:04:44 +00:00
kleink
8a98994beb Get rid of the silly CPU601 hooks and move BAT register restoration and
obliteration to RESTORE_{KERN,USER}_SRS, respectively; have oea_init()
patch these sequences to be skipped on non-MPC601s.  The code sequence
matching heuristic isn't as pretty as the one for VRSAVE and MQ but works
well enough with the current structure of the trap code, and can be easily
updated when necessary.
2004-06-09 23:24:51 +00:00
kleink
15764c5ab2 pmap_extract(): consider the MPC601's different battable layout, and its
use of I/O segments.
2004-06-09 19:30:57 +00:00
kleink
00fcabcfc9 Print SPR 0x100 as VRSAVE on non-4xx. 2004-06-09 19:19:05 +00:00
kleink
b7ca652249 Add MPC601 support. 2004-06-08 19:29:53 +00:00
kleink
1e669a49c6 Repair a comment misplaced in rev. 1.43. 2004-06-08 19:07:00 +00:00
kleink
d92e6963e4 Add some BAT-style predicate macros. 2004-06-06 21:23:53 +00:00
kleink
7498ed2ff7 Mark cr0 as clobbered in mfrtc(). 2004-06-06 10:45:06 +00:00
thorpej
e33c2bb5d5 Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
2004-06-04 04:45:49 +00:00
matt
3c0ef6aa5f Fix softnet intr handling (to be like the generic ppc softintr). 2004-06-01 00:49:41 +00:00
kleink
7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
matt
886b18bf35 Add PT_MACHDEP_STRINGS so that kdump(1) can print out the PowerPC-specific
ptrace requests.
2004-05-06 22:53:02 +00:00
kleink
0e5d242328 Update for new pci_devinfo(9) signature. 2004-04-24 15:49:00 +00:00
matt
e3aa635a37 Fix tpyo. 2004-04-18 23:32:46 +00:00
matt
0f0d66d66e Add entry for netns/ns_cksum.c 2004-04-18 23:31:45 +00:00
matt
8cd24529dc Add a SAVE/DISCARD flag to save_{fpu,vec}_lwp. Use it appropriately.
Nuke struct fpu and use struct fpreg instead (except for the names, they
were identical).  On MP machines, this will avoid an unneeded IPI to save
the register contents that are about to discarded.
2004-04-16 23:58:08 +00:00
hannken
3dc578de5e Make it compile when PPC_HAVE_FPU is not defined. 2004-04-16 08:52:41 +00:00
matt
ee00feaab9 Revamp how user MSR/SRR1 are dealt with.
Add a PSL_USEROK_P(psl) macro which valids the bits (replaces the use of
PSL_USERSTATIC).
Add a PSL_USERSRR1 mask which is used to mask out status bits in the upper
half of SRR1.
Make sure PSL_VEC is set appropriately in userret().  PSL_VEC is in the same
region as SSR1 status bits so it's not preserved on exceptions.  Thus we
need to make to set it.
When returning a MSR/SRR1 to userland, always clear the status bits.
Add emulation of the mfpvr, mtmsr, and mfmsr instructions.
2004-04-15 21:07:06 +00:00
matt
949694f7d9 When seeing if the FP or VEC unit has been stolen by another process, check
PSL_{FP|VEC} instead of PCB_{FP|VEC}.  The former will only be set if the
process owned the {FP,VEC} unit when it trapped into the kernel.  The latter
would be set if the lwp ever used the {FP,VEC} unit.
2004-04-06 02:25:22 +00:00
simonb
3ce5632009 Fix tyop. 2004-04-05 04:53:01 +00:00
matt
15fc41dbb0 When trying to figure out which code to return, use the exception enable
bits to mask out the undesired exceptions.  (Thanks to Todd Whitesel for
the idea).
2004-04-04 22:20:44 +00:00
matt
e7c76e51e6 Add SIGFPE handling code. Report the proper SIGINFO ksi_code when a SIGFPE
happens.  When a SIGFPE occurs, disable the exception enables in the FPSCR.
2004-04-04 19:21:36 +00:00
matt
bc8d283982 Reformat the __asm a bit. 2004-04-04 17:35:15 +00:00
matt
5bf797c2e1 Add int get_fpu_fault_code(void). 2004-04-04 17:26:58 +00:00
matt
481d181cd4 In cpu_getmcontext, make sure the returned MSR has the FP exception mode
(PSL_FE0|PSL_FE1) saved in the PSL.  In cpu_setmcontext, copy the FP
exception bits to the PCB where they live.
2004-04-04 17:26:10 +00:00
matt
847bed9428 Fix the way cpu_setmcontext was restoring FPSCR. Make the opposite of the
way that cpu_getmcontext was saving it.  (FPSCR was being saved incorrectly
before and thus obliterated when a signal happened).
2004-04-04 17:20:15 +00:00
matt
7681ce429d Make sure that the SRR1 we pass to userland reflects PSL_FE0|PSL_FE1 even
if the lwp doesn't currently own the FPU.  When returning, copy those bits
back to the PCB.  (In case the user decided to the FP exception mode in the
signal handler).
2004-04-04 17:10:32 +00:00
matt
4dc0aa3dee Don't add PSL_FE_FDLT to srr1, but put in pcb_flags. It will be added to
the SRR1 only when the lwp owns the FPU.
2004-04-04 17:05:31 +00:00
matt
44003b5fca The FP exception mode bits from the MSR will be stored in pcb_flags. From
there, they will copied to MSR as needed (when FP is enabled).  They will be
cleared from the MSR when the lwp loses the FPU.  Hence they need to be stored
someplace else.
2004-04-04 17:01:44 +00:00
matt
aed3d18029 On FPU'ed systems, initialize the default FP exception mode. 2004-04-04 16:57:00 +00:00
matt
c0dce2fdd9 Be a lot more explicit about the MSR bits a user process can change. 2004-04-04 16:49:12 +00:00
matt
0d6bda4d21 When returning back to user mode, if the lwp has lost the FPU, not only
clear PSL_FP bit (to force a FPU Unavailable exception) but clear
PSL_FE0 and PSL_FE1 so that the FP execption mode is changes to ignore.
This will prevent spurious FP exceptions being made when the running lwp
doesn't own the FPU.
2004-04-04 16:47:02 +00:00
matt
ef47d758dd Remove softintr__init call. 2004-04-01 16:58:06 +00:00
simonb
f05568af64 Make the "cond" variable an unsigned variable. Stops sign extension
problems when we shift it left and right while creating the new value
for the condition register.

Fixes problems reported by Juergen Hannken-Illjes in toolchain/24938.
2004-03-30 00:04:37 +00:00
simonb
06f98319d7 Fix the LINTSTUB entries- the second arg to these functions is a
bus_space_handle_t, not a bus_addr_t.
2004-03-29 01:15:14 +00:00
simonb
d4c87e3c2e Use "%#x" instead of "%x" so it's obvious the printed number is in hex. 2004-03-29 01:12:01 +00:00
drochner
c83eb997b8 nothing cares about __HAVE_SIGINFO anymore, so nuke it 2004-03-26 21:39:57 +00:00
drochner
d19f706361 all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 17:34:18 +00:00
matt
06bf53b3d7 Add diagnostic to skip calling uvm_fault when the lwp's USERSR is unset. 2004-03-25 18:50:50 +00:00
matt
040b0bc071 Move data structures to softintr.c. Remove an unneeded if. Fix a typo. 2004-03-25 18:46:27 +00:00
matt
a266f24eb9 Add latent generic soft interrupt initialization. 2004-03-24 23:50:18 +00:00
matt
7f65c1cc37 Generic soft interrupt support for PowerPC ports. 2004-03-24 23:39:39 +00:00
atatat
19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00