Commit Graph

279 Commits

Author SHA1 Message Date
Alexander Kabaev
6fd839f9c7 Add a new sys/limits.h file which in turn depends on machine/_limits.h
to get actual constant values. This is in preparation for machine/limits.h
retirement.

Discussed on:	standards@
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>  (*)
Modified by:	kan
2003-04-23 21:41:59 +00:00
Peter Grehan
1e1e003218 - Convert NetBSD-derived macros to inline functions for better
type-checking and future debug code.
- Remove sparse addressing hack, since the only consumer, the macio ATA
  driver, doesn't require it anymore.
2003-04-18 02:38:10 +00:00
Maxime Henrion
7a648f56cf I deserve a big pointy hat for having missed all those references
to bus_dmasync_op_t in my last commit.
2003-04-10 23:50:06 +00:00
Jake Burkholder
227f9a1c58 - Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
  with PAE.
- Use this to represent physical addresses in the MI vm system and in the
  i386 pmap code.  This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
  detection code, and due to kvtop returning vm_paddr_t instead of u_long.

Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.

Sponsored by:	DARPA, Network Associates Laboratories
Discussed with:	re, phk (cdevsw change)
2003-03-25 00:07:06 +00:00
Jake Burkholder
5501d40bb9 Made the prototypes for pmap_kenter and pmap_kremove MD. These functions
are machine dependent because they are not required to update the tlb when
mappings are added or removed, and doing so is machine dependent.
In addition, an implementation may require that pages mapped with pmap_kenter
have a backing vm_page_t, which is not necessarily true of all physical
pages, and so may choose to pass the vm_page_t to pmap_kenter instead of the
physical address in order to make this requirement clear.
2003-03-16 04:16:03 +00:00
Maxime Henrion
f6c912dd0c Correctly set BUS_SPACE_MAXSIZE in all the busdma backends.
It was bogusly set to 64 * 1024 or 128 * 1024 because it was
bogusly reused in the BUS_DMAMAP_NSEGS definition.
2003-02-26 02:16:06 +00:00
Peter Grehan
9ea031d50b Doh. Forgot to remove _KERNEL version. 2003-02-23 13:47:44 +00:00
Peter Grehan
d273b006c5 Expose powerpc_mb() to user-space. Currently needed for atomic.h users,
this may go away in the future.
2003-02-22 22:58:13 +00:00
Mike Barcroft
8cf5ed5125 Implement fpclassify():
o Add a MD header private to libc called _fpmath.h; this header
  contains bitfield layouts of MD floating-point types.
o Add a MI header private to libc called fpmath.h; this header
  contains bitfield layouts of MI floating-point types.
o Add private libc variables to lib/libc/$arch/gen/infinity.c for
  storing NaN values.
o Add __double_t and __float_t to <machine/_types.h>, and provide
  double_t and float_t typedefs in <math.h>.
o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF,
  HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to
  <math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via
  <machine/float.h>.
o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based
  on the size of its argument.  __fpclassifyl() is never called on
  alpha because (sizeof(long double) == sizeof(double)), which is good
  since __fpclassifyl() can't deal with such a small `long double'.

This was developed by David Schultz and myself with input from bde and
fenner.

PR:		23103
Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
		(significant portions)
Reviewed by:	bde, fenner (earlier versions)
2003-02-08 20:37:55 +00:00
Benno Rice
d8e3618615 Export the ns_per_tick variable through md_var.h rather than by declaring
it extern in cpu.c.
2003-02-05 12:33:49 +00:00
Benno Rice
fb954d9d2f Add cpu.c. This contains one exported function, cpu_setup(), which handles
setup of and printing information about cpus.

Obtained from:	NetBSD (parts)
2003-02-05 12:09:53 +00:00
Benno Rice
19ca68d921 - Update spr.h
- Add hid.h

Obtained from:	NetBSD

NOTE: This undoes some changes I'd made to prefix the processor name defines
with PVR_.  This was due to my original decision to use MPC750 as a cpu name.
With this changed, the PVR_ change is no longer required.
2003-02-05 12:04:29 +00:00
Benno Rice
43e87179f8 Add an inline function wrapper for the mfpvf (Move From Processor Version
Register) instruction.
2003-02-05 11:59:27 +00:00
Benno Rice
c31c26450b Not all cpus are MPC750s. Replace the MPC750 cpu option with OEA. This
stands for Operating Environment Architecture and is the specification that
all of the MPC6xx, MPC7xx, MPC7xxx and IBM7xx CPUs adhere to.
2003-02-05 11:37:59 +00:00
Benno Rice
8bc7bc1ea0 - Rename the "powerpc" timecounter to the "decrementer" timecounter.
- Initialise it earlier.
2003-02-05 11:16:36 +00:00
Benno Rice
cbab7e25fd - Introduce a flags value into the interrupt handler structure.
- Copy the flags passed to inthand_add into the flags value.
- If the interrupt is INTR_FAST, re-enable the irq after running the handler.
2003-02-01 07:20:36 +00:00
Benno Rice
fe5e7c6b2b Rework of how memory resources are discovered and dealt with in macio.
- Store the OpenFirmware "reg" property in the macio ivars.
- Use a struct to define the structure of a "reg" property entry.
- Discover all memory ranges, not just the first.
- In ata_macio, manage our own range and hand out our own allocations using
  bus_space_subregion.
- Fix bus_space_subregion to handle subregions of sparse maps.
2003-01-30 11:28:29 +00:00
Benno Rice
7b4359b47d Put the right fix in. Instead of deleting the declaration of __FBSDID, we
undef it before this definition.
2003-01-28 10:54:31 +00:00
Benno Rice
7b180a30e1 Remove a duplicate definition of the __FBSDID macro. 2003-01-27 04:24:57 +00:00
Andrew Gallatin
87c48ca382 include cdefs.h so as to unbreak the libc build 2003-01-20 22:05:39 +00:00
Peter Grehan
f48649e525 Stub profile.h, required for userland builds.
Approved by:  Benno
2003-01-18 11:31:58 +00:00
Peter Grehan
4e84a94d6b <machine/ieee.h>, taken from sparc64
Approved by:  Benno
2003-01-18 11:30:59 +00:00
Peter Grehan
8e9238c604 Fix bugs with operand ordering and unnecessary sync/eieio ops. Mostly
obtained from Alpha atomic.h

Approved by:  Benno
2003-01-18 11:28:36 +00:00
Peter Grehan
add0e67094 Allow the MD frame definition to be seen in. Required for truss/ptrace.
Approved by:  Benno
2003-01-18 11:25:21 +00:00
Peter Grehan
5cbdd8139a RAIDframe requires LONG_BIT
Approved by:  Benno
2003-01-18 11:23:42 +00:00
Peter Grehan
0a9b03cb65 Prepended underscores to macro local vars, avoiding gcc "declaration
shadows global" warning

Approved by:  benno
2003-01-18 11:20:06 +00:00
Peter Grehan
0212856f3c Change definition of int64 to avoid gcc3.2.1 complaints. Taken from i386
Approved by:  benno
2003-01-18 11:18:42 +00:00
Peter Grehan
a5550be852 - define HAS_STREAM_METHODS correctly
- dmamap_load_mbuf/load_uio prototypes

Submitted partly by:  Hiten Pandya <hiten@unixdaemons.com>
2003-01-08 11:43:36 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Tim J. Robbins
b30a7779d4 MB_LEN_MAX is not MD, move it to the MI limits.h. 2002-12-22 06:38:45 +00:00
Peter Wemm
23eeeff7be Split 4.x and 5.x signal handling so that we can keep 4.x signal
handling clean and functional as 5.x evolves.  This allows some of the
nasty bandaids in the 5.x codepaths to be unwound.

Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an
anti-foot-shooting measure in place, 5.x folks need this for a while) and
finish encapsulating the older stuff under COMPAT_43.  Since the ancient
stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *'
to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn
is supposed to take), add a compile time check to prevent foot shooting
there too.  Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc.

Tested on: i386, alpha, ia64.  Compiled on sparc64 (a few days ago).
Approved by: re
2002-10-25 19:10:58 +00:00
Peter Grehan
f86c114f3d Add the USER_SR segment register to pcb state. Initialize correctly,
and save/restore during a context switch.

The USER_SR could be overwritten when the current thread was switched
out with a faulting copyin/copyout.

Approved by: Benno
2002-10-21 05:27:41 +00:00
Peter Wemm
af3f249f3a The a.out md_coredump stuff isn't referenced anywhere anymore, and
hasn't been filled in for ages..  Nuked.
2002-10-15 00:02:50 +00:00
Mike Barcroft
7a77412855 Add standards visibility conditionals. Change any uses of sigset_t to
struct __sigset to avoid depending on objects from <sys/signal.h>.
2002-10-13 00:31:46 +00:00
Mike Barcroft
ddb056b7d4 Add conditionals to allow va_list to be defined in other headers. 2002-10-06 22:02:06 +00:00
Mike Barcroft
0b058e3cbd o Add conditionals to allow va_list to be defined in other headers.
o Standardize on _MACHINE_STDARG_H_ to allow multiple header includes.
o Restrict the definition of va_copy() to C99 environments.
2002-10-06 22:01:07 +00:00
Mike Barcroft
e61d3b10d7 Fix namespace issues by using visibility conditionals from
<sys/cdefs.h>.
2002-10-05 05:47:56 +00:00
Juli Mallett
e6abe47dbf Define _MACHINE. 2002-10-05 02:56:49 +00:00
Mike Barcroft
085f8416a2 style(9) <machine/setjmp.h> headers so they look mostly the same. 2002-10-04 22:10:06 +00:00
Peter Grehan
d13782ef14 Clean up ddb warnings/errors and enable in GENERIC
Approved by: benno
Motivated by: gallatin
2002-10-04 01:19:18 +00:00
Peter Wemm
1a8ec9c55a PIC_GOTOFF is OBE. 2002-09-23 07:27:45 +00:00
Mike Barcroft
c0d4804d67 Be careful not to define GCC-specific optimizations in the non-GCC
case.
2002-09-23 04:32:17 +00:00
Peter Grehan
d889f46119 Removed osigframe. No need for COMPAT_43 signal bin-compat in PPC.
Approved by: benno
2002-09-19 04:46:36 +00:00
Peter Grehan
c94c0cf8de psim device support
Approved by: benno
2002-09-19 04:45:58 +00:00
Peter Grehan
a379a1422d <machine/types.> -> <sys/types.h>
Approved by: benno
2002-09-19 04:45:32 +00:00
Peter Grehan
50122aa981 Fix clearing of recoverable exception MSR bit when disabling
interrupts

Approved by: benno
2002-09-19 04:45:06 +00:00
Peter Grehan
663a6cc057 Additional machdep sysctl constants needed for userland utils
Approved by: benno
2002-09-19 04:44:35 +00:00
Peter Grehan
6dfada4cca Added sparse address support, required by the macio ATA device
Approved by: benno
2002-09-19 04:44:04 +00:00
Peter Grehan
6e1073f023 Fixed branch labels
Approved by: benno
2002-09-19 04:39:59 +00:00
Mike Barcroft
86954511d2 Implement C99's va_copy() macro. 2002-09-18 07:33:16 +00:00