Commit Graph

237 Commits

Author SHA1 Message Date
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
Peter Wemm
66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
Mike Barcroft
dd1b6791a8 Now that _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ are the same on all
architectures, move the definition directly into <time.h> and finish
the removal of <machine/ansi.h>.
2002-09-03 00:06:58 +00:00
Peter Wemm
447b3772dc Change hw.physmem and hw.usermem to unsigned long like they used to be
in the original hardwired sysctl implementation.

The buf size calculator still overflows an integer on machines with large
KVA (eg: ia64) where the number of pages does not fit into an int.  Use
'long' there.

Change Maxmem and physmem and related variables to 'long', mostly for
completeness.  Machines are not likely to overflow 'int' pages in the
near term, but then again, 640K ought to be enough for anybody.  This
comes for free on 32 bit machines, so why not?
2002-08-30 04:04:37 +00:00
Jake Burkholder
bafbd49201 Renamed poorly named setregs to exec_setregs. Moved its prototype to
imgact.h with the other exec support functions.
2002-08-29 06:17:48 +00:00
Mike Barcroft
646d21a5a3 Since arm and powerpc aren't far enough to set stathz, take a
preemptive strike and change _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_
to 128.

Approved by:	benno
2002-08-26 03:44:11 +00:00
Mike Barcroft
bd8e0716d9 Move several MI types from <machine/_types.h> to <sys/_types.h>.
These types are unlikely to ever become very MD.  They include:
clockid_t, ct_rune_t, fflags_t, intrmask_t, mbstate_t, off_t, pid_t,
rune_t, socklen_t, timer_t, wchar_t, and wint_t.

While moving them, make a few adjustments (submitted by bde):
o __ct_rune_t needs to be precisely `int', not necessarily __int32_t,
  since the arg type of the ctype functions is int.
o __rune_t, __wchar_t and __wint_t inherit this via a typedef of
  __ct_rune_t.
o Some minor wording changes in the comment blocks for ct_rune_t and
  mbstate_t.

Submitted by:	bde (partially)
2002-08-23 16:49:06 +00:00
Mike Barcroft
abbd890233 o Merge <machine/ansi.h> and <machine/types.h> into a new header
called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
  macros, which are only MD because of gratuitous differences between
  architectures.
o Change all headers to make use of this.  This mainly involves
  changing:
    #ifdef _BSD_FOO_T_
    typedef	_BSD_FOO_T_	foo_t;
    #undef _BSD_FOO_T_
    #endif
  to:
    #ifndef _FOO_T_DECLARED
    typedef	__foo_t	foo_t;
    #define	_FOO_T_DECLARED
    #endif

Concept by:	bde
Reviewed by:	jake, obrien
2002-08-21 16:20:02 +00:00
Alan Cox
dde5f1949f o Introduce pmap_page_is_mapped(). Its purpose is to obsolete
the PG_MAPPED flag.
2002-08-07 19:37:22 +00:00
Mike Barcroft
49545b3891 Create a new header <machine/_stdint.h> for storing MD parts of
<stdint.h>.  Previously, parts were defined in <machine/ansi.h> and
<machine/limits.h>.  This resulted in two problems:
  (1) Defining macros in <machine/ansi.h> gets in the way of that
      header only defining types.
  (2) Defining C99 limits in <machine/limits.h> adds pollution to
      <limits.h>.
2002-07-29 17:41:23 +00:00
Mike Barcroft
f889202ba4 Remove label_t and physadr, which seem to have never been used in
FreeBSD.

Submitted by:	bde
2002-07-10 15:47:59 +00:00
Benno Rice
99bc8c72f7 Add setjmp (needed for DDB). 2002-07-10 12:26:17 +00:00
Benno Rice
45b4eca56d Add DDB support. 2002-07-10 12:21:54 +00:00
Benno Rice
db015117ba Metadata definitions. 2002-07-10 12:14:23 +00:00
Benno Rice
b98807d45e Add the OF_getetheraddr function required by if_gem. 2002-07-09 13:43:06 +00:00
Benno Rice
7ade8bb67c Changes for KSE3.
Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-07-09 12:57:23 +00:00
Benno Rice
f5db3c1695 Add this file, which I forgot in a previous commit.
This relates to the trap/interrupt cleanup.

Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-07-09 12:50:58 +00:00
Benno Rice
25b60a3b49 1) Add busdma machdep code.
2) Add bus_pio.h and bus_memio.h (which do nothing).

Submitted by:	Peter Grehan <peterg@ptree32.com.au> (1)
2002-07-09 12:47:14 +00:00
Benno Rice
ca01920852 Driver for OpenPIC compatible interrupt controllers.
It's fairly PowerMac specific at the moment, but that should be fixable.
2002-07-09 11:26:10 +00:00
Benno Rice
7abc408094 - Add the "compatible" property to the list that we keep in ivars.
- Add interrupt alloc/setup/teardown/dealloc support, via whichever PIC
  OpenFirmware gives us.
2002-07-09 11:13:33 +00:00
Benno Rice
f6a7723dff Add interrupt handling support code.
I've tried to make this fairly platform-independant as some PowerPC platforms
may not have openpic-style interrupt controllers.  This may not have the best
performance but it works for now.
2002-07-09 11:12:20 +00:00
Mike Barcroft
ba5fe51088 Move __offsetof() macro from <machine/ansi.h> to <sys/cdefs.h>. It's
hardly MD, since all our platforms share the same macro.  It's not
really compiler dependent either, but this helps in reducing
<machine/ansi.h> to only type definitions.
2002-07-08 16:43:35 +00:00
Mike Barcroft
a19d429398 Since printf(3) now supports the `j' conversion specifier, use that
when printing intmax_t and uintmax_t.

Forgotten by:	mike
Noticed by:	bde
2002-06-30 05:48:03 +00:00
Benno Rice
71cf3a3574 Add an inline to call eieio.
("Enforce In-order Execution of I/O".  I am not making this up.)
2002-06-29 10:00:07 +00:00
Benno Rice
bfcf2ca287 We don't need to clear RI in the MSR when entering a critical section. 2002-06-29 09:55:57 +00:00
Benno Rice
14d617bf1f in_cksum et al.
Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-06-29 09:49:26 +00:00
Benno Rice
a088981493 Implement vtophys() 2002-06-29 09:47:06 +00:00
Benno Rice
8bbfa33a79 Add pmap_mapdev and pmap_unmapdev. 2002-06-29 09:45:59 +00:00
Benno Rice
8b8aa9c1e6 To quote Peter:
The case in cpu_switch() where there isn't a higher priority thread
(choosethread() == curthread) uses r4 as the PCB context pointer. However, the
use of r4 after the label L2 is incorrect, since it was probably trashed by
the call to choosethread, and in any case was set up to curthread at the start
of the routine.

This condition will occur when an interrupt thread schedules a netisr, which
is a lower priority thread.

Another (probably unnecessary) difference is that I was paranoid about
register trashing, so I decided to save r2 and r13 as well.

Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-06-29 09:39:44 +00:00
Ian Dowse
2f384b348a Make vm_pindex_t 64-bit on all platforms. This is necessary to avoid
overflows with the large file sizes that UFS2 permits.

Reviewed by:	dillon, alc, tegge
2002-06-23 21:57:19 +00:00
Peter Wemm
2f9267ec23 Move the "- 1" into the RQB_FFS(mask) macro itself so that
implementations can provide a base zero ffs function if they wish.
This changes
  #define RQB_FFS(mask) (ffs64(mask))
  foo = RQB_FFS(mask) - 1;
to
  #define RQB_FFS(mask) (ffs64(mask) - 1)
  foo = RQB_FFS(mask);
On some platforms we can get the "- 1" for free, eg: those that use the
C code for ffs64().

Reviewed by:	jake (in principle)
2002-06-20 06:21:20 +00:00
Doug Rabson
99bd783419 Move the definition of ElfN_Hashelt to common headers. The only platform
which has a different definition for this is alpha.
2002-05-30 08:32:18 +00:00
Benno Rice
60ead00ef8 - Move macros that represent where syscall args are kept in a trapframe from
trap.c to frame.h
- Use the macros in vm_machdep.c:cpu_fork() to set up the trap frame of the
  new thread.
2002-05-28 12:24:29 +00:00
Benno Rice
37d87c9ff8 Move the kcopy() function from trap.c to machdep.c. Add a prototype. 2002-05-28 07:36:36 +00:00
Benno Rice
31c82d0332 Get the correct memory regions from OpenFirmware. We were getting the
"available" ranges, not the "physical" ranges.  Clean up some of the
bootstrap code in the process.

Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-05-27 11:18:12 +00:00
Jake Burkholder
d2ac231616 Make the run queue parameters machine dependent. Optimize 64 bit
architectures by using a 64 bit word for the bit array which keeps
track of non-empty queues.

Reviewed by:	peter
2002-05-25 01:12:23 +00:00
Benno Rice
4ca98df6b2 Add the PSL_VEC flag for AltiVec (no, it's not here yet =)) 2002-05-19 04:03:11 +00:00
Benno Rice
96269f7e26 - Rename the _C_LABEL macro to CNAME.
- Rename the _ASM_LABEL macro to ASMNAME.
- Add the HIDENAME macro which is used in libc's syscall stuff.
2002-05-17 01:44:55 +00:00
David E. O'Brien
ae8f9dd13f An exact copy of i386/include/float.h will work here. 2002-05-15 20:54:35 +00:00
Poul-Henning Kamp
6380601f64 Move MI stuff out of MD param.h files.
It can all still be overridden in the MD files should need suddenly arise.
2002-05-14 20:35:29 +00:00
Poul-Henning Kamp
4c51ae2155 Remove the unused definitions of ctod() and dotc(). 2002-05-14 20:01:34 +00:00
Benno Rice
eeaa897915 FPU support.
Obtained from:	NetBSD (portions)
2002-05-13 07:44:48 +00:00
Benno Rice
a51eb7c321 Increase the size of the kstack. 2002-05-10 05:16:40 +00:00