Commit Graph

446 Commits

Author SHA1 Message Date
briggs
4fb4a95b7e Install cpu.h. Noted in PR port-powerpc/16285 from smi@sm.sony.co.jp. 2002-04-10 15:36:42 +00:00
matt
f8b9dbe468 Add some MPC745x L3CR cache definitions. 2002-04-03 00:12:41 +00:00
matt
830666e31e Clean the icache for pages when they are entered as executable and before
they were either not mapped at all or mapped as non-executable.  Round
memory regions in pmap_bootstrap.
2002-04-03 00:12:07 +00:00
kleink
032762e1e9 On the 601, construct the CPU counter value from the RTC[UL] registers. 2002-03-26 21:50:39 +00:00
matt
12810ed37d Use size_t in prototype (so this will be LP64 clean for PPC64 someday).
Calculate len separately for icache & dcache in case each has different
cacheline widths.  Make the code for both loops the same except for the
dcbst/icbi.  Deal with sizes >=2GB properly (like that'll happen but ...)
2002-03-26 21:20:24 +00:00
kleink
7e9d845469 * Add MPC601 versions of BAT_VA_MATCH_P() and BAT_VALID_P().
* Make the extern declaration of the battable array incomplete;
  a given port might want to use a differently-sized definition to
  support the 601 BAT implementation, where blocks map up to 8M only.
2002-03-25 21:35:45 +00:00
eeh
de5252061e Use properties to pass around board-specific information rather than a
structure.
2002-03-15 20:59:23 +00:00
eeh
a3833eb1c6 Add this file. 2002-03-13 23:59:58 +00:00
eeh
2277f9518e Delete this file. It's only relevent to 405gp. 2002-03-13 23:09:52 +00:00
eeh
2b55b12b59 405gp-specific DCRs. 2002-03-13 23:09:11 +00:00
eeh
ba8ac60043 pmap improvements:
Remove the cache flush routines that have been moved to cpu.c

Make sure we clear out the unused PA bits in the TTE which causes breakage
on some MMU models.
2002-03-13 00:47:58 +00:00
eeh
4b971968ac Add cache_info to cpu_info which provides details about D$ and I$
sizes and line sizes.  This is needed for cache flusing, clearing
memory, and several other operations.  This information is accessible
from userland through a new CPU_CACHEINFO sysctl.
2002-03-13 00:38:13 +00:00
chs
bd2a5f591d switch all mpc6xx powerpc ports to NEWPMAP by default.
the old pmap is still available with the OLDPMAP option.
2002-03-09 23:35:56 +00:00
nathanw
3be9fbe42e Move #include <dev/sysmon/sysmonvar.h> inside #ifdef _KERNEL. 2002-03-06 06:37:17 +00:00
kleink
8a79f029ad VRSAVE is SPR 256, not 238. 2002-03-04 13:37:42 +00:00
nathanw
1eeb28024d Add sysmon data structures to struct cpu_info. 2002-03-03 07:09:09 +00:00
matt
997374a8dd Add MPC7455 2002-03-03 06:47:25 +00:00
nathanw
5d5aeaa547 Add bit definitions for the MMCR's, and event numbers for the events
that are common to the G3 and G4.
2002-03-03 06:38:31 +00:00
nathanw
7a92615001 Correct the SPR numbers of PMC3 and PMC4.
SIA wasn't retconned, but the SPR number was wrong. Re-add it, and add
USIA.
2002-03-03 05:32:37 +00:00
nathanw
c2b8ec655a Delete the retconned SIAR SPR. 2002-03-03 05:17:48 +00:00
nathanw
ee2cbbfe4a Add MPC7xx/7xxx performance monitor control registers (MMCR0-2, UMMCR0-2). 2002-03-03 05:15:44 +00:00
nathanw
28b2a20fb9 Add bit definitions for the MPC750 thermal management registers. 2002-03-03 04:31:53 +00:00
kleink
4a513728e8 Add end-of-comment missing in previous. 2002-03-02 21:36:27 +00:00
kleink
dc0a08feaa Note that Guarded bit is not implemented on the 601. 2002-03-02 15:07:35 +00:00
simonb
4324f37586 Use "#define<tab>". 2002-02-28 03:17:23 +00:00
kleink
543f1e7a2d Handle the 601's Run Mode/Trace Exception as well. 2002-02-22 13:51:40 +00:00
simonb
2d8577fb83 Clean up some rampant code duplication wrt ieee number handling:
- Add alignment-safe double and float unions.
 - Use the above for the __infinity and __nan constants on all
   architectures that use the standard ieee754 representation of
   those constants.
 - Add a single copy of various ieee754 math functions (frexp, isinf,
   isnan, ldexp and modf) that had numerous duplicates among the
   arch-specific directories.
 - Use the above functions on all architectures where the generic C
   versions where used.  Architectures that had local assembly
   routines are untouched (for those functions only).
2002-02-19 13:08:12 +00:00
kleink
11402be7a5 Header for the 601's I/O Controller Interface Address Translation
segment register format.
2002-02-09 17:44:40 +00:00
briggs
9827f27b9f Update from thorpej:
* Define type and size of _mcount stub to make PIC code happy.
* Rename mcount to __mcount to get it out of the user namespace.
2002-02-07 05:13:35 +00:00
kleink
69e30815cf Add a printf bitmask for HID0. 2002-02-06 19:59:30 +00:00
kleink
cd6a8bc27c Add MPC601 MQ and RTCU/RTCL SPRs. 2002-02-05 19:49:17 +00:00
dbj
0ac4681659 add support for kgdb over zs 2002-01-06 00:35:10 +00:00
dbj
1b65d8fd30 fix single stepping and continuing from breakpoints in ddb 2001-12-27 10:32:23 +00:00
briggs
25e9f1f519 Provide basic bus_space_mmap(). Noted by self and in PR port-powerpc/14873.
This at least allows the compile to complete.  There are still Issues with
vga_pci.c's assumptions about a PC-ish environment.
2001-12-10 20:30:21 +00:00
thorpej
51535d4bf5 Add support for dumping ELF-cormat core files. 2001-12-09 23:05:56 +00:00
chs
f0d9c43220 fix macppc MULTIPROCESSOR compilation. 2001-12-05 05:02:10 +00:00
thorpej
fbd78c8e3c Add PVR processor type fields for IBM 405GP and IBM 405L. 2001-12-02 20:11:49 +00:00
simonb
163e969b09 Include bit definitions for the Debug Status Register; from Artem Belevich
at Riverstone Networks.
2001-10-29 02:02:19 +00:00
simonb
d7357337e0 Fix typo, noted by Artem Belevich. 2001-10-21 15:09:36 +00:00
chs
62b6d75cc8 implement pmap_wired_count(). 2001-09-23 08:12:59 +00:00
wiz
456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
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
a140263932 Add new 7450 SPRs 2001-08-30 21:55:27 +00:00
briggs
89829e4825 defines for OPENPIC_ICR / serial mode. 2001-08-30 03:08:52 +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
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
076780a19c Include the 7410/7450 hid definitions 2001-08-22 21:05:25 +00:00
simonb
e807a5f821 Fix typo, noted by UCHIYAMA Yasushi in private mail. 2001-08-14 04:32:56 +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
matt
78c7d18804 Turn on PMAP_MAP_POOLPAGE 2001-06-28 20:31:37 +00:00
simonb
f285587c4e Fix typo in emac0 base address. 2001-06-25 01:49:15 +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
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
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
756d684c5a Rename/enumerate the PTE protection bits to their real purposes. 2001-06-21 18:03:37 +00:00
briggs
279833d138 Build for kgdb as well as for ddb (mutually exclusive). 2001-06-20 02:40:14 +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
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
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
tsubai
fafb5d4bc3 Make the new pmap optional. Use the old (stable!) pmap by default. 2001-06-10 11:01:26 +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
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
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
e2148768dc Change _MACHINE_PIO_H to _POWERPC_PIO_H 2001-05-27 20:59:15 +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
6a511e05e2 Be consistent with limit constants:
- use "U" suffix for unsigned constants
 - use "L" suffix for long constants
 - use "UL" suffix for unsigned long constants
 - use hexadecimal instead of decimal

Fixes build problems with vi (now that warnings/errors are enabled) on
mips, powerpc and arm platforms.
2001-05-04 15:12:32 +00:00
soren
945b972563 PPC machine type tags haven't been used for a while. 2001-05-03 13:11:24 +00:00
martin
77a926d775 Avoid nesting structure declarations, where the nested structur is used at
the global level later. Besides stylistic matters, this actually breaks C++
programs (indirectly) using this header.
2001-04-30 15:30:39 +00:00
kleink
fe3c9ceaf7 * Move definitions of exact-width integer types from <machine/types.h>
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
  explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
  macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
  intmax_t, pointer-type and size_t arguments.
2001-04-28 15:41:28 +00:00
kleink
99054d7a6c Add definitions for C99 fastest minimum-width integer types. 2001-04-26 16:25:19 +00:00
thorpej
69abdbf60c Undo a misguided previous change to the pmap_update() API. 2001-04-22 23:19:26 +00:00
thorpej
4738622712 Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
2001-04-22 00:33:59 +00:00
thorpej
7f10ba88b1 #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
2001-04-21 23:51:14 +00:00
kleink
f06533a1ee Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 17:13:04 +00:00
kleink
739cb75837 Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 15:29:02 +00:00
kleink
cdcf9f46c5 Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
2001-04-14 22:46:19 +00:00
kleink
a7c20e5788 Add definitions of C99 integer constant macros. 2001-04-14 22:38:33 +00:00
kleink
7affdab52e Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-14 12:19:49 +00:00
kleink
9133b51cd8 Replace the 'unsigned __COMPILER_INT64__' construct with a new name,
__COMPILER_UINT64__, to be supplied - if such a case is made, it shouldn't
be assumed that the unsigned type-specifier may be applied to it.
2001-04-12 22:01:18 +00:00
tsubai
ce8902b7fe Merge my MP tree. At this point, Daystar dual 604 card (i.e. Power Macintosh
9500/180MP and 9600/200MP) runs at least into single-user mode, possibly
multi-user mode (not stable yet).
2001-03-22 04:11:46 +00:00
matt
7e5ee89ff3 Nuke vm_offset_t, vm_size_t from powerpc. 2001-03-04 03:25:34 +00:00
wiz
08ca85d04d De-lint. Reviewed by christos. 2001-02-09 15:54:18 +00:00
tsutsui
93a1c84cac Add pio.h to INCS. 2001-02-07 12:43:52 +00:00
briggs
2f624f78d6 Share a single pio.h instead of having 4 nearly-identical copies. 2001-02-05 19:33:54 +00:00
briggs
e96035c57c Tsubai has convinced me that openpic_init() should remain machine-dependant
as the details might differ between archs, and passing the various options
leads to some clutter.
2001-02-05 19:22:23 +00:00
briggs
522ec180e9 Build with -Wall -Wetc. 2001-02-04 17:38:10 +00:00
briggs
044caccfff Split OpenPIC support into powerpc so ports only need minimal custom
configuration.  openpic_init() now takes a single argument that is the
base of the OpenPIC register space.
2001-02-02 06:11:52 +00:00
takemura
c5fd828440 replace 'long long' with int64_t to compile stand alone program with
compiler other than GCC.
2001-01-03 10:08:55 +00:00
itojun
efa2b7073c make mbstate_t bigger (32 -> 128 bytes).
XXX if you have libc after citrus locale import, please recompile libc,
and your applications that use mbstate_t (rather rare).  really sorry
for the mess.
2000-12-26 10:35:28 +00:00
itojun
823498203f populate _BSD_MBSTATE_T_. add warning regarding to rune_t. 2000-12-21 06:03:47 +00:00
matt
f80f1b8624 Preliminary AltiVec support. 2000-11-25 03:03:35 +00:00
matt
1420862fba Add comments and AltiVec reg state. 2000-11-23 02:35:10 +00:00
tsubai
11b48d8a4d Thermal Management Interrupt is available on 750, too. 2000-11-20 15:16:04 +00:00
matt
95a8447ccf Add G4 specific exceptions (include AltiVec). 2000-11-19 20:48:20 +00:00
matt
bb71a6b332 Add AltiVec VSCR definitions. 2000-11-19 20:41:04 +00:00
matt
b1e1cfdb4a Add AltiVec VEC bit. 2000-11-19 19:52:37 +00:00
tsubai
b11322a19d powerpc HID registers definitions (only HID0 for now). 2000-11-09 11:49:13 +00:00
tshiozak
51a53de0d5 Preparation for the future introduction of multibyte locale.
- MB_LEN_MAX is increased to 32.
 - To ensure binary compatibility for old executables
   under multibyte locale, versioned setlocale is added.
 - __mb_len_cur definision is added in setlocale.c
   and enable it in stdlib.h .
   It is also important for multibyte locale stuffs,
   but I just forgot.
2000-08-08 22:31:13 +00:00
tsubai
2c691df1ec uvm/uvm_inherit.h was removed. 2000-08-02 09:06:56 +00:00
tsubai
7314c0eba6 Clear the reservation in __cpu_simple_lock_try even if it failed to lock.
(From ws@tools.de)
2000-07-08 04:36:56 +00:00
tsubai
9ad1103d98 Make it compile with "options MULTIPROCESSOR". 2000-07-06 22:56:22 +00:00
tsubai
212a0a08d2 Implement powerpc spin lock functions. 2000-07-06 03:52:25 +00:00
itojun
d738f90fd7 raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory.  MHLEN is too small
  already (less than 80) and there are chances for unwanted packet loss due
  to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
  (even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
  extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
2000-06-30 17:55:11 +00:00
kleink
bb2ed0f487 G/c _BSD_INTPTR_T_ and _BSD_UINTPTR_T_. 2000-06-27 05:53:22 +00:00
kleink
47b5c5e3b1 Resolve some formatting nits; add __intptr_t and __uintptr_t. 2000-06-27 04:58:51 +00:00
kleink
e695f72a2e Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
2000-06-26 15:42:16 +00:00
mrg
4c698e84f6 <vm/vm_param.h> -> <uvm/uvm_param.h> 2000-06-26 14:58:58 +00:00
mrg
2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
mrg
f5f84f80c5 <vm/vm_prot.h> becomes <uvm/uvm_prot.h> 2000-06-25 13:37:51 +00:00
kleink
133ea38323 Add a WEAK_ALIAS() macro. 2000-06-23 12:18:45 +00:00
tsubai
1bfa0fc6b6 Add cpu_counter(). 2000-06-11 16:32:42 +00:00
tsubai
5257d23759 Add fpreg area in struct md_coredump. 2000-06-04 11:57:17 +00:00
tsubai
86ac32df3d Add PT_GETFPREGS and PT_SETFPREGS support. 2000-06-04 09:30:43 +00:00
is
8a6db88c1d Prepare for AmigaPPC. 2000-05-25 21:10:14 +00:00
thorpej
855b79db92 Let each platform typedef the new __cpu_simple_lock_t, which should
be the most efficient type used for the atomic operations in the
simplelock structure, and should also be __volatile.
2000-05-02 04:41:04 +00:00
thorpej
f51470a514 Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED.  These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case).  Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
2000-04-29 03:31:45 +00:00
tsubai
be4988ee6d Make kernel profiling work. 2000-04-18 17:06:01 +00:00
minoura
78b105698a Move dl* function definitions to libc on ELF.
Based on the patch supplied by Takuya Shiozaki <tshiozak@astec.co.jp>.
See http://mail-index.netbsd.org/tech-userlevel/2000/02/23/0000.html.
2000-04-02 15:35:47 +00:00
jdolecek
fde0c4e6e0 Prototype vtophys() before defining it. Needed for compilation with
-Wstrict prototypes on macppc.

Problem noted by  Hans-Christian Becker <hcb@phc.chalmers.se> in private mail.
2000-03-30 16:18:24 +00:00
tron
e86957458a Install "machineendian_machdep.h". 2000-03-17 22:36:31 +00:00
mycroft
9e21b6555a In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
2000-03-17 00:09:18 +00:00
mycroft
02905321b2 Foolish consistency. Mainly, always use underscores and sys/endian.h. 2000-03-16 15:09:34 +00:00
kleink
ad7dbd825c Define ISO C99 (unsigned) long long (min, max) symbols. 2000-03-07 19:33:00 +00:00
tsubai
0086d842d5 Rewrite stdarg/varargs. 2000-02-27 17:50:20 +00:00
tsubai
e7edda84b7 Remove vmparam.h. 2000-02-18 08:50:25 +00:00
tsubai
a6343f76db Unused. (PR 9424) 2000-02-16 14:02:13 +00:00
tsubai
90fe757934 Fix typo in comment. 2000-02-13 10:25:07 +00:00
thorpej
dded044fc2 Update for the NKMEMPAGES changes. 2000-02-11 19:25:12 +00:00
tsubai
0867c09dad Change va_arg definition when __lint__ is defined. 2000-02-09 12:54:47 +00:00
kleink
36e6bc645e Improve namespace test macros a bit. 2000-02-05 14:04:36 +00:00
kleink
82464e46d6 Add a C99-style va_copy macro. 2000-02-03 16:16:06 +00:00
danw
6c14ba0dba Fill in the alignment trap handler a bit: now it can fix unaligned
floating point loads and stores (to work around a gcc bug), but will
still cause a bus error on other sorts of unaligned accesses.
2000-01-19 03:30:12 +00:00
kleink
693059feda const -> __const and include <sys/cdefs.h> earlier; fixes PR lib/9052
by Takahiro Kambe.
2000-01-04 14:20:05 +00:00
kleink
11e6c54cfc C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
1999-12-23 10:15:05 +00:00
thorpej
8fc6795a77 - Comment the BAT bits.
- Add defintions for the PowerPC 601 BATs.
- Change the BATU()/BATL() macros to be a bit more flexible; allow size,
  permissions, etc. to be specified.
1999-12-18 01:36:06 +00:00
thorpej
05684a14e6 Comment the MSR bits, and note which ones are not present on the PowerPC 601. 1999-12-18 01:34:15 +00:00
thorpej
0352041467 Hardware Implementation Dependent registers for the PowerPC 601. 1999-12-18 01:33:45 +00:00
danw
83f1c31647 Fix "FPCSR" to "FPSCR". ("Floating Point Status and Control Register") 1999-12-07 15:14:56 +00:00
ragge
0513268399 CL* discarding. 1999-12-04 21:13:19 +00:00
kleink
522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
chs
f3a668ed84 eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
1999-09-12 01:16:55 +00:00
simonb
3c185af5fd Include <sys/endian.h> after defining whether where are little- or
big-endian.  i386, pc532 and vax still include <machine/byte_swap.h>
and define macros for the {n,h}to{h,n}*() functions.  mips also
defines some endian-independent assembly-code aliases for unaligned
memory accesses.
1999-08-21 05:53:50 +00:00
simonb
06a92524c2 Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
1999-08-21 05:39:51 +00:00
tsubai
183ef12cd5 Adapt pmap_extract() change. 1999-07-11 17:44:08 +00:00
thorpej
3ebbe095e0 Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
1999-07-08 18:05:21 +00:00
danw
9d4f4eebdb reorder the fp_rnd constants to match the values used by the
powerpc fpu
1999-07-07 01:52:26 +00:00
thorpej
0288ffb53a pmap_change_wiring() -> pmap_unwire(). 1999-06-17 19:23:20 +00:00
tsubai
0e57d44e45 Add missing CPU_MAXID definition. 1999-05-05 11:20:54 +00:00
tsubai
6168467392 Add cpu.h. 1999-05-05 10:15:53 +00:00
tsubai
fdabab77f2 PT_{STEP,GETREGS,SETREGS} support. 1999-05-03 10:02:19 +00:00
kleink
5cbe23baad Garbage-collect VM_MBUF_SIZE leftover. 1999-05-02 18:12:32 +00:00
ws
5423093850 Modify syncicache on PowerPC from an inline to a real function.
Support different cache line sizes with the same object code in userland.
While here, move the function to implementation name space.
1999-04-17 21:16:45 +00:00
thorpej
4b603c180a Use the same hack as pmap_zero_page() and pmap_copy_page() to provide
direct-mapped pool pages.
1999-04-16 21:45:19 +00:00
thorpej
63b6321834 VM_MBUF_SIZE is in terms of MCLBYTES, not CLBYTES. 1999-03-23 00:31:59 +00:00
thorpej
a77ccfe460 Garbage-collect. 1999-03-20 01:40:25 +00:00
tsubai
61fbe51007 First-cut of profiling support.
XXX userland only, for now.
1999-03-05 07:59:13 +00:00
tsubai
96f0fb14a1 Add RSS accounting. 1999-03-05 06:10:48 +00:00
tsubai
01614b7217 Implement pmap_procwr().
(Not tested.  gdb doesn't work on powerpc yet.)
1999-02-26 14:40:45 +00:00
mycroft
897a8a7f29 Mark [hn]to[nh][ls]() with __const__, so they are subject to CSE. 1999-01-24 12:55:01 +00:00
tsubai
3e7448240b Add missing backslash. 1999-01-17 12:51:03 +00:00
chuck
9cb41178b7 MNN is no longer optional, remove old code 1999-01-16 20:39:03 +00:00
bouyer
dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00
tsubai
0280ba028c Fix void * arithmetic. 1999-01-10 10:13:15 +00:00
sakamoto
64ba00be2c Change r_type bit field size 5 to 6 and reduce unused bit(2 to 1).
Suggested by Mirian Crzig Lennox.
1998-12-03 05:15:06 +00:00
tsubai
4cb00b9fe2 Adapt to gcc change (calling sequence). 1998-12-02 14:23:03 +00:00
thorpej
a6f7e0c05a Implement WARN_REFERENCES(). 1998-12-02 00:58:42 +00:00
tsubai
ac7d3e6487 Add PIC definitions. 1998-11-24 11:17:17 +00:00
ws
82fe9b4f90 The last fix in trap.c missed R2.
And correct the size of the fault buffer while being here.
1998-11-22 21:21:32 +00:00
mycroft
09093330b1 Add {LONG,WORD}_BIT and {DBL,FLT}_{DIG,MAX,MIN}. 1998-11-16 04:12:29 +00:00
thorpej
7083b63277 Back out previous; I'm punting PowerPC to tsubai or sakamoto. 1998-09-16 23:51:27 +00:00
thorpej
ef3f4d39df Need 103 longs for jmp_buf now (128-bit signal mask, at the front of the
jump buffer).
1998-09-16 23:33:18 +00:00
thorpej
cbfc257eda sigset13_t -> int. 1998-09-14 02:48:33 +00:00
thorpej
c7d391b23c Make signal delivery work again. 1998-09-13 09:15:51 +00:00
tsubai
3a8ad815c4 Add some prototypes. 1998-09-01 16:35:50 +00:00
tsubai
b9a44d6b63 vm_offset_t --> [pv]addr_t 1998-08-31 14:43:39 +00:00
tsubai
378fc0778a Change db_expr_t from int to long like other ports. 1998-08-31 14:16:48 +00:00
kleink
708c5f826e Add missing wint_t (currently unused). 1998-08-16 17:16:56 +00:00
wrstuden
0e4dc30457 As ovbcopy & bcopy are now done in terms of mem* routines, it makes
no sense to "#define ovbcopy bcopy".
1998-08-16 02:15:50 +00:00
eeh
a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
kleink
546365a27e _POSIX_SOURCE -> _POSIX_C_SOURCE 1998-08-06 11:25:04 +00:00
mycroft
a24dbc8065 (Always) (practice) (safe) (macro expansion). 1998-07-31 15:07:41 +00:00
thorpej
c8f1cea511 Provide SSIZE_MAX. 1998-07-28 23:20:54 +00:00
tsubai
db105fc687 Make vtophys() return non-zero even if the addr < end. 1998-07-25 15:06:28 +00:00
thorpej
d47ea67c1f Define one page free list, and put all pages on it. 1998-07-08 04:43:18 +00:00
kleink
1fbd0b3749 GC the unused `physadr' type, which was not able to hold a complete physical
address on 2 architectures anyhow.  Also, move the definition of the `label_t'
type inside _KERNEL protection, since it is specific to the in-kernel
setjmp()/longjmp() implementations.
1998-06-14 20:09:22 +00:00
cgd
651b44e211 Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install.  (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.)  The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change.  Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
sakamoto
9125a5f198 Merge in MACHINE_NEW_NONCONTIG support and some fix from Tsubai-San.
UVM support.
1998-06-05 11:27:09 +00:00
sakamoto
9c11ca3d51 Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
1998-05-28 07:56:42 +00:00
kleink
a97fc2f180 If any of _ANSI_SOURCE, _POSIX_C_SOURCE or _XOPEN_SOURCE are defined, don't
provide any identifiers other than sig_atomic_t.
1998-05-25 20:59:01 +00:00
thorpej
1686aca01d Pull in opt_gateway.h as appropriate. 1998-04-29 23:11:00 +00:00
kleink
a53c1863fe Provide definitions for intptr_t and uintptr_t, signed resp. unsigned integral
types large enough to hold any pointer.
1998-04-27 17:39:10 +00:00
drochner
3bb9e75863 Change MBR partition type for NetBSD to 0xa9, like the i386 port.
Provide compatibility via COMPAT_386BSD_MBRPART.
1998-03-02 16:18:17 +00:00
mycroft
79f597383e Fix layout of powerpc_saved_state. 1998-02-23 03:22:16 +00:00
mycroft
d387a356c8 Clean up, add physadr. 1998-02-23 03:21:40 +00:00
mycroft
b7bc9342a8 Fix typo. 1998-02-18 11:10:08 +00:00
mycroft
3b9429b248 Minor changes to make all the float.h files match. 1998-02-18 11:01:27 +00:00
mycroft
b5c132e4d2 Prototype __flt_rounds() consistently. 1998-02-03 01:26:20 +00:00
sakamoto
a013a80854 Import DDB from OpenBSD/powerpc. 1998-01-27 15:13:09 +00:00
sakamoto
7055a6a919 Import DDB from OpenBSD/powerpc. 1998-01-27 09:15:58 +00:00
perry
6f57e5c573 multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom) 1998-01-09 22:23:44 +00:00
thorpej
a26db50632 Don't need __VM_PMAP_HACK anymore. 1998-01-06 08:14:14 +00:00
perry
015e898c02 RCSID Police. 1998-01-05 07:02:46 +00:00
thorpej
b9f1b716f3 Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
1998-01-03 01:12:59 +00:00
thorpej
c162e92a71 Implement pmap_activate(). 1998-01-02 22:17:18 +00:00
kleink
66c2794142 Add _BSD_SUSECONDS_T_ and _BSD_USECONDS_T_; do some space vs. tab formatting
cleanup
1997-11-23 20:20:53 +00:00
thorpej
0b04d28454 Mark uses of long long with /* LONGLONG */ for lint. From
Chris Demetriou <cgd@pa.dec.com>.
1997-11-05 04:36:08 +00:00
thorpej
aefc208b70 asm -> __asm__, volatile -> __volatile 1997-11-05 04:19:04 +00:00
thorpej
4730a8cbec Bug fixes and cleanup from Chris Demetriou <cgd@pa.dec.com>:
- fix _C_LABEL so that it actually works.
- make __RENAME use _C_LABEL.
- fix __RENAME so that it expects an unquoted argument.
- fix __indr_reference and __warn_references so that they
  supply their own final semicolon.
- define __warn_references to nothing if not GNU C (required
  by the way it's used).

The __warn_references semicolon change has to be made
so that __warn_references can be defined into nothing.
(A ; all by itself isn't a great idea.)  The __indr_reference
change was made for consistency.
1997-11-04 23:09:23 +00:00
thorpej
665f7d1a6e Implement __RENAME() in <machine/cdefs.h> 1997-10-22 05:20:32 +00:00
bouyer
6ab3092b11 Add byte-swapping functions (bswap16, bswap32, bswap64) to libkern.
Only assembly version for i386 bswap16 and bswap32 for now (bswap64 uses
bswap32). Contribution of assembly versions of these are welcome.
Add byte-swapping of ext2fs metadata for big-endian systems.
Tested on i386 and sparc.
1997-10-09 15:42:19 +00:00
jtc
4229acf79d Fix tipo inherited from old version of TNF copyright template. 1997-10-09 08:37:20 +00:00
mrg
dc6a98e92c bring mrg-vm-swap2 onto mainilne. 1997-06-12 15:09:23 +00:00
gwr
e2a58b69f7 Add #define __VM_PMAP_HACK as a temporary measure. 1997-05-16 21:35:30 +00:00
thorpej
87bbb0ba3b Always define MACHINE_NONCONTIG. 1997-04-16 23:03:52 +00:00
thorpej
54cc37063b Nuke __BROKEN_INDIRECT_CONFIG 1997-04-16 23:03:16 +00:00
thorpej
49fd2f3af7 Use new va-ppc.h 1997-04-16 23:02:34 +00:00
thorpej
d3112d23d1 Garbage collect stuff now hidden my machine_vec. 1997-04-16 23:02:00 +00:00
thorpej
afd0c2db7e Yow, "what happened"? Anyhow, correct apparerent CVS botch, and fix
RCS ID.
1997-04-16 23:00:53 +00:00
thorpej
974b5a78b0 Minimal profiling definitions - profiling doens't yet work. 1997-04-16 22:58:46 +00:00
thorpej
2849b893e3 s/dummy/md_proc/ 1997-04-16 22:57:48 +00:00
thorpej
cd3712c5bf Update ipkdb's register handling, from Wolfgang Solfrank. 1997-04-16 22:57:06 +00:00
thorpej
805da2b95a Don't define two partition types for NetBSD - just use the standard 0xa5.
(Eww, DOS MBR)
1997-04-16 22:55:10 +00:00
thorpej
ab473e98d6 Definitions for machine_vec interface, from Wolfgang Solfrank. 1997-04-16 22:54:21 +00:00
thorpej
2895975dfc Update for Elf. 1997-04-16 22:52:50 +00:00
thorpej
88e2d78a5c Update to varargs/stdarg implementation; conform to the SVR4 calling
convention.
1997-04-16 22:51:22 +00:00
thorpej
273398acfa Machine-type tags used to communicate the type of system we're running
on to the kernel.  The boot program passes a boot args string plus
additional information like so:

	/pci/scsi@3/disk@0,0:1/netbsd -s<NUL><esym><tag>

The post-<NUL> values are:

	<esym>  end of the kernel symbol table (32-bits)

	<tag>   machine type tag (32-bits)
1997-04-16 21:12:29 +00:00
thorpej
ae9514e076 Definitions for IEEE floating point for NetBSD/powerpc. 1997-04-16 21:07:11 +00:00
thorpej
36a0d58408 Machine-dependent definitions for Elf on NetBSD/powerpc. 1997-04-16 21:06:11 +00:00
fvdl
115b6d92fa Define ALIGNED_POINTER 1997-02-24 23:16:53 +00:00
thorpej
1a0f586e08 Declare booted_device and booted_partition as "extern". 1997-01-31 02:04:14 +00:00
cgd
96acdadef7 First step inn removing config_scan() and the hacks that gave devices
on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:

Define __BROKEN_INDIRECT_CONFIG so that old autoconfiguration
interfaces are used, until drivers are converted to use the new
interfaces (actually, converted back to use the _older_ interfaces)
which prohibit indirect configuration devices from receiving a softc
in their match routine that they can share with their attach routine.
1996-12-05 00:13:47 +00:00
jtc
9da5f60715 PROF -> GPROF 1996-11-30 02:48:57 +00:00
jtc
16b48272c4 Define _BSD_CLOCKID_T_ and _BSD_TIMER_T_ 1996-11-15 22:38:45 +00:00
ws
31bdb14ed5 Rename recently checked in KGDB to IPKDB to resolve conflicts with older KGDB 1996-10-16 19:32:08 +00:00
christos
30efd6881a use in_addr_t and in_port_t 1996-10-13 03:16:41 +00:00
cgd
472889f8e4 moved to aout_machdep.h (via repository copy) 1996-10-08 12:57:37 +00:00
ws
f828028e92 Add some files that CVS missed somehow
These are empty for now, but are needed by MI code
1996-10-01 16:13:50 +00:00
ws
5804d3f648 PowerPC port 1996-09-30 16:34:14 +00:00