Commit Graph

523 Commits

Author SHA1 Message Date
eeh 93b54eb36a Implement pmap_growkernel(). 2001-09-11 04:35:43 +00:00
chris 0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
matt 8402e4d93f Fix a missing restore interrupt. disable interrupts around pvo_enter in
pmap_kenter.  Shouldn't be needed but ...
2001-09-09 04:35:22 +00:00
matt 04bdd02c1a Make pmap_pte_insert STATIC so it will show up in DEBUG kernel with DDB
traces.
2001-08-30 22:06:44 +00:00
matt 4a580ee45e Make sure to restore SR 0 since returning from a syscall is actually
one way of doing a process context switch.
2001-08-30 22:00:48 +00:00
matt a140263932 Add new 7450 SPRs 2001-08-30 21:55:27 +00:00
matt 50b056bc3a Teach db_trace that some low addresses are ok to trace. 2001-08-30 21:44:58 +00:00
briggs 89829e4825 defines for OPENPIC_ICR / serial mode. 2001-08-30 03:08:52 +00:00
briggs 0ea9d87eb1 Create an opt_openpic.h and add both OPENPIC and OPENPIC_SERIAL_MODE to it. 2001-08-30 03:08:22 +00:00
simonb 352f878e45 Gah, fix a number of channel status/select bitfields. 2001-08-29 23:32:21 +00:00
matt dfbb14ad68 __syncicache needs to be exports to userspace as well as the kernel. 2001-08-28 03:03:43 +00:00
simonb 7ec91f6656 Include ${THISPPC}/conf/Makefile.${TARGET_MACHINE}.inc if it exists (ala
mips' Makefile.mips).
2001-08-26 10:59:26 +00:00
matt 550ffff41b Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports.  Make
other mpc6xx ports use it.  Add evcnts for mpc6xx traps.
2001-08-26 02:47:33 +00:00
matt d98bf76f56 Fix bootstrap loss of memory. Fix pmap_activate problem. Revamp debug
messages.
2001-08-22 22:17:57 +00:00
matt 076780a19c Include the 7410/7450 hid definitions 2001-08-22 21:05:25 +00:00
wiz c52d355d71 "wierd" is weird. 2001-08-20 12:20:01 +00:00
chs c489e9bff4 add missing pmap_update(). 2001-08-19 18:09:20 +00:00
simonb e807a5f821 Fix typo, noted by UCHIYAMA Yasushi in private mail. 2001-08-14 04:32:56 +00:00
tsutsui 17f8dae7c0 This file is no longer used. (moved to ofppc/soft_spl.c) 2001-08-09 16:08:34 +00:00
matt f3011c96b4 Fix thinko. Do the mask before the divide. 2001-08-08 21:09:58 +00:00
chs ea127ad258 use pmap_k* in pagemove(), ie. for buffer cache pages.
in vunmapbuf(), call pmap_kremove() explicitly since uvm_km_free_wakeup()
will soon no longer do it for us.
2001-08-04 07:42:07 +00:00
wiz 035b63a542 auxilliary -> auxiliary 2001-07-26 22:53:13 +00:00
wiz 611461bc5e memcpy -> memmove. Noted by Tsubai Masanari. 2001-07-22 13:21:04 +00:00
wiz 0ef3731e14 Replace memcpy's of obviously overlapping regions with memmove.
Noted by Izumi Tsutsui.
2001-07-22 13:08:09 +00:00
wiz c5a6be17f4 bcopy -> memcpy, bzero -> memset, bcmp -> memcmp.
Reviewed by Matt Thomas, ok'd by Tsubai Masanari.
2001-07-22 11:29:44 +00:00
thorpej babefc5331 Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
2001-07-19 15:32:10 +00:00
toshii 4866f1a22b Fix typo. s/extention/extension/ 2001-07-05 08:38:24 +00:00
matt 454a630dbd Print both the lower and upper dbat register when printing dbat registers. 2001-06-30 02:03:16 +00:00
matt 39fa08a172 Reset segment registers 1-7 upon entry to kernel (via trap or interrupts)
so that the bat spill code won't run into spurious valid user pages and
treat them as kernel pages.  Restore segment registers 1-7 upon return to
user mode from either a trap or interrupt.   XXX  eventually do all 16 SRs
2001-06-30 01:24:13 +00:00
matt 7c5977ea4f Fix a spurious debug printf.
Fix pmap_procwr to not check a NULL pvo.  (Duh!)
Reformat pmap_print_mmuregs.  Actually *fill in* the dbat registers.
2001-06-30 01:21:24 +00:00
matt 03ff023c76 Onfault needs to be done even from interrupts so restore that. Default
to EFAULT for the error.
2001-06-28 21:27:47 +00:00
matt 6ca9622494 Add pmap_interrupt_* to pmap_*map_pa. Remove interrupt toggling from
pmap_pte_spill.  Fix pmap_protect.  Macroize mfsrin instruction.
2001-06-28 20:35:21 +00:00
matt 78c7d18804 Turn on PMAP_MAP_POOLPAGE 2001-06-28 20:31:37 +00:00
matt fdb7751e9c Update for thorepj's UVM changes. Don't even try to call uvm_fault or do
pcb_onfault recovery while in interrupt mode.  Just die.  Print out error
returned from uvm_fault (-1 for interrupts).
2001-06-28 18:33:39 +00:00
matt 87a64549c4 Change a bcopy to a structure copy. 2001-06-28 15:23:39 +00:00
matt 6bad4f04a0 Record any stack growth. This fixes a serious problem with core dumps.
Without this change, coredumps will only contain one page of stack
regardless of how many pages of stack the process actually has.
2001-06-26 13:00:18 +00:00
simonb f285587c4e Fix typo in emac0 base address. 2001-06-25 01:49:15 +00:00
simonb 78cdef0bfc Move on-chip 405GP devices to powerpc/ibm4xx/dev. 2001-06-24 02:13:37 +00:00
simonb 8980655597 Move 405GP registers, addresses and other info to ibm405gp.h. Leave only
board-specific addresses and other info in walnut.h.
2001-06-24 01:13:11 +00:00
matt 7effaaaa7c Disable interrupts when dealing with pvo lists. clean up some things.
Keep track of executable ness of pages.  Of sync icache executable pages.
2001-06-23 03:17:32 +00:00
matt dde0daca06 Use __asm __volatile. Use _POWERPC_SPR_H_
Add PTE_RO/PTE_RW for old pmap.
2001-06-23 03:16:11 +00:00
matt e25aa0ea82 Use pmap_kenter_pa instead of pmap_enter for phys_map 2001-06-23 03:10:59 +00:00
matt 5d30ec2c7e Use SPR_xxx for the *MISS HASH CMP, etc. 2001-06-23 02:36:14 +00:00
simonb 363019a6c1 Add a db_active variable that indicates if a call to the debugger is
active.  Seems to be required by the MI com driver nowadays.
2001-06-22 11:40:41 +00:00
simonb 7fe4c3ba1d Make this compile when DEBUG isn't defined. 2001-06-22 03:25:39 +00:00
matt 41d73006f1 DMISS/DCMP/HASH1/HASH2/IMISS/ICMP/RPA are also valid on the MPC6XX
(specially the 603 and maybe the 601)
2001-06-22 00:01:25 +00:00
matt 6d3037579c Change a debugging message a bit. 2001-06-21 22:05:50 +00:00
matt 756d684c5a Rename/enumerate the PTE protection bits to their real purposes. 2001-06-21 18:03:37 +00:00
matt 467c0ed022 Rework pmap_bootstrap. Fix some comments. Add old copyright until i finish
excising that code.
2001-06-21 03:26:12 +00:00
briggs 279833d138 Build for kgdb as well as for ddb (mutually exclusive). 2001-06-20 02:40:14 +00:00
simonb d4bcd9c735 Add/change prototypes so that macpcc builds with -Wstrict-prototypes. 2001-06-19 12:02:55 +00:00
simonb 97b16e911f Move the DSISR SPR bit definitions from <powerpc/mpc6xx/pte.h> to
<powerpc/spr.h>.  Remove unused ISI/SRR1 bit definitions.
2001-06-19 07:14:23 +00:00
christos 59abdecf4b Add a linux specific trapsignal() function. This is just a passthrough
on all platforms but the i386. On the i386 we look at T_PROTFLT and send
a SIGSEGV instead of SIGBUS. This makes allegro lisp 5.0 and pvs (a proof
verification system) to work.

XXX[1]: We need to go through each architecture and verify that we send
        the correct signal on each trap type.
XXX[2]: trap.c on all other architectures but i386 needs to be modified
        to s/trapsignal/(*p->p_emul->e_trapsignal)/g
2001-06-18 02:04:42 +00:00
tsubai 91f99e1981 Forgot to commit this -- move file .../bus_dma.c line to files.${machine}. 2001-06-17 19:32:17 +00:00
simonb 56151c1fef Make this compile and work for the IBM 4xx series CPUs. 2001-06-17 13:39:33 +00:00
simonb d70d5d1ee0 Use _C_LABEL() for externally referenced symbols. 2001-06-17 13:39:02 +00:00
simonb 0647591d3a Globalise "trapexit" for new ddb tracing changes. 2001-06-17 13:38:33 +00:00
matt 38fc9e283d Fix pte_spill to set the index on the proper pvo. Deal with recursion
in pmap_syncicache.
2001-06-16 03:32:48 +00:00
matt 979edf3c4a pmap_syncicache can be called recursively. Properly deal with that
situation.
2001-06-15 22:28:54 +00:00
matt 60f8375758 Replace printf with (*pr) 2001-06-15 22:27:07 +00:00
matt e55c9f74af Add missing braces in pmap_pte_to_pvo (DEBUG|PMAPCHECK defined). Rearrange
some code so that consistency check in pmap_pte_to_pvo do not trigger on
false positives.  Correct/enhance some printfs.
2001-06-15 21:29:54 +00:00
matt 25a2c4d481 While not stricly needed, to match pmap_pvo_find_va, mask of the page
offset bits.
2001-06-15 20:53:45 +00:00
matt 787e1b0b36 When comparing VA's, ignore the page offset bits.
Invert and strengthen a test for pte equality.
2001-06-15 20:43:01 +00:00
matt c7c7dab8f1 Stop overloading unused bits in the pte. Use the low 12bits of the vaddr
instead to store them.  Add a macro to fetch the vaddr without them.
Make all variables/routines prefixed with pmap_
Cleanup & fix some of the vsid bitmap usage.
Cleanup DEBUG printfs.  Add some more checks to pmap_pvo_to_pte.
2001-06-15 18:26:06 +00:00
matt 192642af05 Don't enable PMAPCHECK by default. 2001-06-15 08:17:00 +00:00
matt f6b81171c1 Globalize trapexit. Improve db_trace.c so that you can trace thru traps!
Rework the output so that is also prints the frame address by default.
2001-06-15 08:09:33 +00:00
matt 0278444e19 Add a check to pvo_check which makes sure the pte is really in the
pteg_table.   In pte_to_va, take into account if the PTE_HID is set.
2001-06-15 08:08:04 +00:00
matt ab92d9cd59 phys_map should use kenter/kremove 2001-06-15 08:07:03 +00:00
matt 816a5637cd When releasing the SR VSID, mask off the bits not related to the index
in the pmap vsid bitmap.
2001-06-15 06:27:07 +00:00
simonb 18b2f7e6a1 Add a port to IBM's PPC405GP Reference Board (the "walnut")
by Eduardo Horvath and Simon Burge of Wasabi Systems.

IBM 4xx series CPU features:
 - New pmap and revised trap handler.
 - Support on-chip timers, PCI controller, UARTs
 - Framework for on-chip ethernet and watchdog timer.
General PowerPC features:
 - Add in-kernel PPC floating point emulation
 - New in{,4}_cksum that is between 1.5 and 5 times faster than the
   old version depending on CPU type.
General changes:
 - Kernel support for generic dbsym-style symbols.
2001-06-13 06:01:44 +00:00
tsubai 713feac239 Include powerpc/mpc6xx/{bat.h,pte.h} if PPC_MPC6XX is defined. 2001-06-12 17:20:50 +00:00
simonb 0bdd2faeed Get the opcode mask right for almost all the Op_OE opcodes (only two were
correct).
2001-06-12 05:31:44 +00:00
tsubai a3496ef8a8 When invoking the pcb_onfault mechanism, pass the return value of uvm_fault()
to the onfault routine.
2001-06-10 16:31:59 +00:00
tsubai 29d06d028c Fix printf format error. 2001-06-10 15:54:05 +00:00
tsubai bedfcf904c libkern.h is included in systm.h. Not needed here. 2001-06-10 15:05:44 +00:00
tsubai 5a051092e4 Rename ofb_softc to ofbus_softc. (XXX Is this good name?) 2001-06-10 11:36:03 +00:00
tsubai f6482742de pte_spill -> pmap_pte_spill. 2001-06-10 11:09:28 +00:00
tsubai fafb5d4bc3 Make the new pmap optional. Use the old (stable!) pmap by default. 2001-06-10 11:01:26 +00:00
matt 66822e55be Fix a spl issues. Turn on PMAPCHECK until instability problems are found.
Add a pmap_pvo_verify call you call it from it ddb and verify the pmap
data structures are sound.  Fix warnings when DEBUG was turned on.
2001-06-10 07:56:36 +00:00
matt b9ef9e99da Print a more informative is a uncatchabl DSI or ISI exeception happens in
kernel mode.
2001-06-10 07:49:13 +00:00
briggs c97896cd4d Pull avail_start/avail_end logic for bus_dmamem_alloc() from macppc port,
as suggested by matt@netbsd.org--the vm_physmem array may not be in order.
2001-06-10 02:31:25 +00:00
briggs a2b115fa4c Up the default # of NMBCLUSTERS to 2048 (GATEWAY) & 1024 (non-GATEWAY)
from 512/256.
2001-06-10 02:28:57 +00:00
matt f6d422beb8 Fix warning about braces & if. Include libkern.h for strncpy prototype 2001-06-08 00:21:45 +00:00
matt 75a27eccff Rename pte_spill to pmap_pte_spill. Fix pmap_clear_{referenced,modify}
to return the previous state of the bit.  Make it compile under
-Wmissing-prototypes -Wall.  Change around some debug stuff.
2001-06-08 00:16:24 +00:00
matt e38a49d835 Include a common bus.h and bus_dma.c that powerpc ports can use
if they so choose.
2001-06-06 17:37:37 +00:00
matt 938edd5b75 Introduce a new & faster pmap for the MPC6xx (60x, 7xx, 7xxx) PPC CPUs.
Move MPC6xx dependent header files to powerpc/include/mpc6xx/
2001-06-06 17:36:01 +00:00
chs 821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
tsubai 1a891f65d4 One more gcc-2.95 issue. 2001-05-31 09:19:25 +00:00
tsubai ba87a6d444 Add gcc-2.95 version. 2001-05-30 20:37:48 +00:00
tsubai 2eae10adb5 Inline bswap{16,32} when the argument is constant. 2001-05-30 13:08:34 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
matt 0a3911863f Use structure assignment instead of bcopy. 2001-05-28 00:15:10 +00:00
matt 8fb5853698 Change the bcopy's to structure assignments. 2001-05-28 00:12:21 +00:00
matt e2148768dc Change _MACHINE_PIO_H to _POWERPC_PIO_H 2001-05-27 20:59:15 +00:00
chs 11a9651c8f replace vm_page_t with struct vm_page *. 2001-05-26 21:27:10 +00:00
matt b590763f79 Call __syncicache in db_write_bytes. (makes breakpoints work better). 2001-05-18 20:38:27 +00:00
simonb 96a430ba30 If _SOFT_FLOAT is defined, pull floating point va_args from the GPR
area and not the FPR area (by having the double argument type test
always fail).

Fixes problems using <stdarg.h> with -msoft-float.
2001-05-16 15:41:03 +00:00
simonb b3a4957ee5 Fix spr and tbr register number extraction. tbr is untested, but is the
same format as spr and had the same mistake.
2001-05-06 16:40:22 +00:00
simonb 982e593742 Remove duplicate opcode. 2001-05-06 16:11:17 +00:00
simonb ad336f45ee Fix a bunch of other typos. 2001-05-06 15:30:13 +00:00