Commit Graph

66 Commits

Author SHA1 Message Date
matt
d4182252d5 Make this 64-bit aware. 2014-02-28 05:33:53 +00:00
matt
2d773d76bf Add pmap_ste_spill 2014-02-28 05:32:01 +00:00
matt
73bf23c080 Define HID1_{SYNCBE,ABE} for the 7450 2013-09-22 17:51:31 +00:00
matt
927b8a6c6e Fix -fno-common fallout. 2012-07-28 23:08:56 +00:00
macallan
a6d582eda0 make BATs >256MB work, now macppc works again on 745x CPUs as well
ok riz
2012-02-15 04:33:19 +00:00
matt
69545c610e When making BATU, use (BAT_XBL|BAT_BL) for the extended bat lengths. 2012-02-15 01:46:42 +00:00
matt
413fb4c3c5 Enable XBSEN and HIGHBAT for OEA 7455 and related CPUs.
The BAT entries now have a resolution of 8MB.  (Adjacent entries are merged
up to a total of 2GB per entry).
2012-02-01 05:25:57 +00:00
jym
325494fe33 Modify *ASSERTMSG() so they are now used as variadic macros. The main goal
is to provide routines that do as KASSERT(9) says: append a message
to the panic format string when the assertion triggers, with optional
arguments.

Fix call sites to reflect the new definition.

Discussed on tech-kern@. See
http://mail-index.netbsd.org/tech-kern/2011/09/07/msg011427.html
2011-09-27 01:02:33 +00:00
matt
4a40b01453 Modify mapiodev to take a third argument indicating whether the space
should be prefetchable (true) or not (false).
2011-06-30 00:52:55 +00:00
matt
fc311b7702 PowerPC now exports a common view of cpu.h, vmparam.h and pmap.h
when building a MODULAR kernel or compiling _MODULE.
It should be noted that MODULAR or _MODULE export a view of the kernel
as being MULTIPROCESSOR (even if isn't).
The shared pmap TLB uses mdpg in places where it used mdpg to avoid
deadly embrance inclusion problems.
2011-06-20 20:24:28 +00:00
matt
90b2f9b46e Add #error for unknown PPC variant
Now that oea calls cpu_fixup_stubs, we don't need pmap_fixup_stubs.
2011-06-20 08:07:03 +00:00
matt
79d5c05dc5 Include <powerpc/psl.h> 2011-06-20 06:04:33 +00:00
macallan
852746b927 implement pmap_mmap_flags() and teach PowerPC's bus_space_mmap() to actually
use BUS_SPACE_MAP_PREFETCHABLE which, now that /dev/pci* knows how to use it,
helps improve X performance
2011-02-15 19:39:12 +00:00
matt
e13c032f64 When an OEA kernel is configured for multiple MMU types, use the new
powerpc fixup mechanism to bind the kernel to a particular MMU.  This
avoids an indirect call for every pmap call.
2011-02-12 18:23:09 +00:00
matt
b8ea2c8cad Add support for BookE Freescale MPC85xx (e500 core) processors.
Add fast softint support for PowerPC (though only booke uses it).
Redo FPU/VEC support and add e500 SPE support.
Rework trap/intrs to use a common trapframe format.
Support SOFTFLOAT (no hardfloat or fpu emulation) for BookE.
2011-01-18 01:02:52 +00:00
uebayasi
5d7952a5d1 Move struct vm_page_md definition from vmparam.h to pmap.h, because
it's used only by pmap.  vmparam.h has definitions for wider
audience.

All GENERIC kernels build tested, except ia64.

powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.
2010-11-14 13:33:20 +00:00
uebayasi
41e5df6d3e Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)).  This functionality will be re-added later.
2010-11-06 15:42:43 +00:00
matt
3cba909205 Split <powerpc/spr.h> into a common <powerpc/spr.h> and <powerpc/XXX/spr.h>
where XXX is ibm4xx or oea.
2010-02-25 23:30:04 +00:00
cegger
9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
nisimura
0c9a82b249 protect C constructs from assembler source inclusion. 2009-07-21 07:08:57 +00:00
cegger
1d89a182fb change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
2009-04-21 21:29:58 +00:00
joerg
f5b0fec0e0 Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
2009-03-06 20:31:46 +00:00
he
e7afb03eca Wrap #include "opt_ppcarch.h" in #ifdef _KERNEL_OPT, to allow
lib/librump to build for evbppc.
2008-12-28 10:23:11 +00:00
pooka
29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +00:00
phx
436768b562 Better call it HID0_BTCD, as in prep, mvmeppc and rs6000 locore. 2008-05-25 10:52:08 +00:00
phx
9728e10361 Added HID0[BTAC] bit for the 604. 2008-05-25 10:16:04 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
matt
7aa9230dd8 Add BAT_VA2IDX to abstract out the va to index calculation. 2008-02-23 19:48:43 +00:00
matt
2fb44af084 Add BAT_WIMG and some XBL aware BAT_BL_{512,1G,2G,4G} macros. 2008-02-23 19:28:29 +00:00
matt
e40b7cd828 Add a XBSEN flag for large BATs 2008-02-23 19:23:37 +00:00
matt
a54b0d709b Add multiple inclusion protection.
add oeacpufeat.
2008-02-14 05:35:36 +00:00
matt
e4dab59acd Cleanup/simplify #if/#endif 2008-02-07 00:36:57 +00:00
garbled
4b513a9954 Rewrite a big chunk of the pmap and locore code for powerpc to better
deal with the 64bit bridge mode.  pmap changes by Matt Thomas, rest by myself.

Change pmap.c to work similar to exec_elf.c to allow us to compile in
multiple pmaps to a single kernel.  This allows the pmap for bridge64 to
co-exist with the 32bit pmap.

Yank __HAVE_PMAP_PHYSSEG from all the oea code.

Add a new global, "oeacpufeat", which is used early in locore to determine
certain cpu features.  This allows us to conditionalize code early in the boot
for certain CPUs that have special needs.

Yank most of the ifdef PPC_OEA_BRIDGE64 code from almost every file it was
found in.  Some of it seemed incorrect, and my 7044 booted just fine
without it.  It would appear that the bridge cpus treat BAT instructions
as nops, so they seem to be safe.

In ofppc, check the oeacpufeat, and if we are on a 64bit proc, clear
MSR[SF], and ASR[V].

With all of these changes, a kernel with both PPC_OEA and PPC_OEA_BRIDGE64
will boot on the POWERIII-2 cpu.  However, it will not yet boot on a 32bit
cpu, because of CACHELINESIZE.  Work remains to be done there to fix that.
2008-02-05 18:10:46 +00:00
aymeric
59e6a9a3d5 bump the default data size to 256MB (i.e. double it) because compiling
gcc during a standard native system build doesn't pass with 128MB.
2008-01-19 22:32:47 +00:00
garbled
ade34db359 When compiling in bridge mode, add a prototype for pmap_setup_segment0_map() 2008-01-09 21:21:45 +00:00
garbled
22e3ca58a3 Make the SR601_VALID_P check less draconic wrt valid io segregs. There
are perfectly valid iosegregs for which the old test would fail.
2007-04-09 17:35:14 +00:00
thorpej
712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
matt
6ec9b8bc84 Define a PHYSMAP_VSID for mapping pa==va. 2006-09-21 18:43:30 +00:00
sanjayl
265929b20e 1st cut of Powermac G5 support (uses bridge mode). 2006-08-05 21:26:48 +00:00
ross
0d8bcff6f5 Fix typo inside PPC_OEA64 2005-12-27 02:19:27 +00:00
perry
5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +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
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
kleink
d92e6963e4 Add some BAT-style predicate macros. 2004-06-06 21:23:53 +00:00
wiz
d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00