Commit Graph

973 Commits

Author SHA1 Message Date
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
thorpej 452a8fdae2 Rename IPL_IMP -> IPL_VM. 2003-06-16 20:00:56 +00:00
fvdl 7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
simonb 67417f64a8 Sprinkle some TABs to line up the columns in the cputab models array. 2003-06-13 04:29:39 +00:00
msaitoh 6f197c635e Add support IBM 405GPr 2003-06-13 04:05:26 +00:00
scw e05ce46e3e Oops, delete an accidentally committed local change. 2003-06-12 08:47:21 +00:00
scw 0328210bcc Allow <machine/bus.h> to override the definition of BUS_DMA_COHERENT.
For example, machine-dependent code can make it equivalent to
BUS_DMA_NOCACHE if the hardware cannot reliably snoop the bus.
2003-06-12 08:43:07 +00:00
scw b4e18ad59c Back out the last change after consultation with Matt Thomas. It hurts
platforms with fully functional bus snooping.
2003-06-12 08:30:41 +00:00
scw afe2393675 In _bus_dmamem_map(), make BUS_DMA_COHERENT behave the same way as
BUS_DMA_NOCACHE.
2003-06-12 07:32:28 +00:00
scw cd2d76d833 Fix an obvious pasto. 2003-05-19 08:10:03 +00:00
he d963c8ed8a In disasm_fields(), add a buffer length argument and keep track of
the remaining length of the buffer to use with the modified
db_symstr() interface.  Also, convert to using snprintf() via some
local macros appending to the result buffer.
2003-05-17 19:17:43 +00:00
scw d0f3a5b671 Add parentheses around macro arguments. 2003-05-16 21:40:41 +00:00
scw 1f1e54196d Make this compile with DEBUG defined. 2003-05-16 21:38:50 +00:00
kleink 776138ea69 Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc's
convention for these.
2003-05-12 15:22:53 +00:00
thorpej 36da248c07 Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
2003-05-10 21:10:23 +00:00
thorpej b77900c3c2 Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM.  Machine-dependent code is
responsible for initializing them before main() is called.  Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
2003-05-08 18:13:12 +00:00
christos 6ec2f52f71 rename Locore.c -> locore_c.c so that we can compile on case insensitive
filesystems. (from John Gordon)
2003-05-08 12:37:36 +00:00
scw 9ca9578760 Add bit definitions for some registers. 2003-05-01 09:05:56 +00:00
scw dd0d5640b9 Add support for bus_space_{read,write}_region_[124]() 2003-04-30 19:14:44 +00:00
scw 8c5c893bf7 Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
2003-04-29 17:06:03 +00:00
scw c916242d13 Put an isync at the end of the RESTORE_SRS() macro. This is the
recommended workaround for a mtsr/mtsrin errata with PPC750 cpus.
2003-04-29 15:16:14 +00:00
scw c48c683d1f Fix use of an uninitialised variable. This was harmless, other than
spuriously incrementing an interrupt counter.
2003-04-29 15:11:45 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
wiz c42e1fac66 Management, not managment. Mostly from jmc@openbsd. 2003-04-26 22:07:12 +00:00
christos a2dfb1b570 PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
2003-04-19 23:05:28 +00:00
scw c6c94cfec3 Make sure _bus_dmamap_load_mbuf() converts cpu-relative addresses
to bus-relative addresses.

Spotted by John Gordon, on port-powerpc@.
2003-04-18 09:16:05 +00:00
dsl b1986a13d0 change 'data' arg of fp_ioctl to 'void *' to match file.h 2003-04-16 08:58:18 +00:00
scw 201693cb1b Re-read L2CR after enabling the L2 cache to avoid returning without
printing the cache details.
2003-04-10 16:07:15 +00:00
matt dd1424e7ac Add POOL_VTOPHYS. Change vtophys to return -1 if pmap_extract fails.
(callers of vtophys should always supply a valid VA so that
pmap_extract should never fail).
2003-04-09 22:37:32 +00:00
matt c72503e1bd Add some debug printf's. 2003-04-09 22:35:21 +00:00
matt b4c7fb17b2 Cleanup dmamap_sync a bit and add a few more comments. Add support for
cached physaddr's in mbufs.
2003-04-09 22:28:56 +00:00
matt 4daebcbff5 Make the imask_t typedef a struct rather than a naked array. The attribute
on the array typedef was contaminating other u_int32_t naked arrays and
affecting their alignment.
2003-04-09 15:44:26 +00:00
matt 021b37ca56 Add a KASSERT to pmap_extract so that vtophys is never attempted on a
mapped user address.
2003-04-07 21:42:14 +00:00
matt 2f9404413f If extracting an address from the kernel pmap, see if the address is outside
the mapped address range.  If so, try to look it up via the BAT table.  If
successful, translate and return the BAT'ed pa.
2003-04-04 22:38:05 +00:00
matt eb8a295e82 Rework l2cr/l3cr enabling/printing code. Make printing table driven. 2003-04-04 04:04:49 +00:00
matt ea6acde206 MMCRx register definitions should not be prefixed by SPR_ 2003-04-04 04:03:18 +00:00
matt 5bf8112ed1 Add two missing L2CLK speeds. 2003-04-04 04:00:16 +00:00
thorpej cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej c9228c8ddd Use PAGE_SIZE rather than NBPG. 2003-04-02 04:17:50 +00:00
thorpej 86f35f803c Use PAGE_SIZE rather than NBPG. 2003-04-02 02:45:36 +00:00
thorpej 7c0edb9d0e Make PAGE_SIZE, PAGE_SHIFT, and PAGE_MASK compile-time constants for
PowerPC processors.
2003-04-01 23:52:35 +00:00
matt 6a15c68f5d Make sure to turn on the speed knobs in HID0 on the 745x. 2003-03-29 18:18:54 +00:00
matt 2c37db6aec Allow oea_batinit to be called with either the MMU on or off.
(don't reset the BATs if the MMU is off).
2003-03-29 18:09:59 +00:00
matt b3715c2f6a Add 7450 LRSTK and FOLD bits. 2003-03-29 18:08:42 +00:00
matt 8a5a3a480a Switch/adapt to new bus space infrastructure. 2003-03-18 16:40:18 +00:00
matt bff46769b9 fix typo in comment. 2003-03-17 23:15:33 +00:00
matt 582f976e54 Add __HAVE_GENERIC_SOFT_INTERRUPT support. 2003-03-17 16:54:16 +00:00
matt c7b0df67b4 Add CLOCKBASE to opt_ppcparam.h. 2003-03-17 16:53:52 +00:00
matt 5504cc0c26 Use "b" constraint so r0 won't be used. 2003-03-16 06:57:31 +00:00
matt 1d04c635f2 Make the result an early clobber so gcc won't get clever. 2003-03-16 06:56:47 +00:00