Commit Graph

272 Commits

Author SHA1 Message Date
mike
20cacce16c o Stop abusing MD headers with non-MD types.
o Hide nonstandard functions and types in <netinet/in.h> when
  _POSIX_SOURCE is defined.
o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>.
o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new
  __FBSDID() macro.
o Fix some miscellaneous issues in <arpa/inet.h>.
o Correct final argument for the inet_ntop() function (POSIX.1-200x).
o Get rid of the namespace pollution from <sys/types.h> in
  <arpa/inet.h>.

Reviewed by:		fenner
Partially submitted by:	bde
2001-12-01 03:43:01 +00:00
jhb
3e963ab7ce The interrupt nesting level is per-thread not per-CPU on FreeBSD. 2001-11-14 01:00:40 +00:00
mp
e640ae1a60 Don't enable FP in the kernel. It is not needed when -msoft-float is used.
Reminded by:	benno
2001-11-13 00:44:21 +00:00
mp
ba5cfb0dbe Clean up the trap handling code and make it consistent with the other platforms.
Submitted by:	jhb
2001-11-05 00:49:03 +00:00
mp
e8fdcea403 Add enable_fpu/save_fpu for handling the floating point registers in the PCB.
Obtained from:	NetBSD
2001-11-05 00:45:33 +00:00
mike
3df91ed4db o Add new header <sys/stdint.h>.
o Make <stdint.h> a symbolic link to <sys/stdint.h>.
o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99.
o Remove <sys/inttypes.h>.
o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h
  to reflect new location of integer types in <sys/stdint.h>.
o Remove previously symbolicly linked <inttypes.h>, instead create a
  new file.
o Add MD headers <machine/_inttypes.h> from NetBSD.
o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and
  include <machine/_inttypes.h> in <inttypes.h>, to fill in the
  remaining requirements for <inttypes.h>.
o Add additional integer types in <machine/ansi.h> and
  <machine/limits.h> which are included via <sys/stdint.h>.

Partially obtain from:	NetBSD
Tested on:		alpha, i386
Discussed on:		freebsd-standards@bostonradio.org
Reviewed by:		bde, fenner, obrien, wollman
2001-11-02 18:05:43 +00:00
mike
47a3c1f5da Remove funky right justification.
Pointed out by:	bde
2001-10-23 00:42:15 +00:00
des
f4cecd8fd8 Move procfs_* from procfs_machdep.c into sys_process.c, and rename them to
proc_* in the process; procfs_machdep.c is no longer needed.

Run-tested on i386, build-tested on Alpha, untested on other platforms.
2001-10-21 23:57:24 +00:00
des
68ea04e864 [partially forced commit due to pilot error in earlier commit attempt]
{set,fill}_{,fp,db}regs() fixup:

 - Add dummy {set,fill}_dbregs() on architectures that don't have them.

 - KSEfy the powerpc versions (struct proc -> struct thread).

 - Some architectures had the prototypes in md_var.h, some in reg.h, and
   some in both; for consistency, move them to reg.h on all platforms.

These functions aren't really MD (the implementation is MD, but the interface
is MI), so they should move to an MI header, but I haven't figured out which
one yet.

Run-tested on i386, build-tested on Alpha, untested on other platforms.
2001-10-21 22:16:48 +00:00
mp
b83678939d Fix includes based on recent changes to lock.h, mutex.h and ktr.h. 2001-10-19 22:45:46 +00:00
obrien
e4ab2c9a0f Try two on the preprocessing logic.
Reviewed by:	ru
2001-10-19 20:01:01 +00:00
mp
70a9a913c6 Cleanup of the stdarg code.
Submitted by:	ru
2001-10-19 16:15:46 +00:00
mp
c9f98c9686 Add support for the gcc-2.95 stdarg implementation. 2001-10-18 19:11:12 +00:00
obrien
2b9b303646 My attempts at minimizing the number of #def's got me in trouble. 2001-10-18 16:07:21 +00:00
obrien
1d7ce16d9a Add support for "__gnuc_va_list". Some overly "smart" libraries assume
the existence of the __gnuc_va_list type[*] because our compiler is GCC.

[*] __gnuc_va_list is defined in the GCC ginclude/stdarg.h replacement
headerwhich we don't use.
2001-10-18 00:27:39 +00:00
benno
2fe7725b13 Flesh out cpu_fork() and cpu_set_fork_handler(). This is a work in progress. 2001-10-15 12:24:43 +00:00
benno
3194e2622f - Correct the type of the argument to delay() so as to not conflict with
sys/boot/common/bootstrap.h.
- Add a prototype for fork_trampoline().
2001-10-15 12:23:10 +00:00
mp
25981ae2e3 Fix typo. 2001-10-15 01:04:49 +00:00
mp
aeada36d17 Save WIP. Partial rewrite of cpu_switch() and savectx(). This makes it closer
to working but still needs some work to properly switch the full context
(such as saving the fpu registers, switch stacks, etc.).  Also, remove some
dead code that was mixed in.
2001-10-15 00:37:45 +00:00
benno
15061f8ef3 Implement pmap_mapdev. 2001-10-14 08:38:16 +00:00
mp
92a19152d3 Add memory disk support to allow the boot process to proceed a bit further. 2001-10-12 20:02:50 +00:00
mp
4f67e60c0d Modify a virtual address check to allow use of the openfirmware callback
used by the PowerPC simulator (PSIM).
2001-10-12 19:55:04 +00:00
mp
6751812d0b Add standard calls to device_add_child() and root_bus_configure(). 2001-10-12 19:53:22 +00:00
ps
db0d5cd641 Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loader
tunable.

Reviewed by:	peter
MFC after:	2 weeks
2001-10-10 23:06:54 +00:00
mp
03c9a58b56 Add a call to init_param() to initialize some necessary variables. 2001-10-08 00:44:21 +00:00
des
29c5c858fc Dissociate ptrace from procfs.
Until now, the ptrace syscall was implemented as a wrapper that called
various functions in procfs depending on which ptrace operation was
requested.  Most of these functions were themselves wrappers around
procfs_{read,write}_{,db,fp}regs(), with only some extra error checks,
which weren't necessary in the ptrace case anyway.

This commit moves procfs_rwmem() from procfs_mem.c into sys_process.c
(renaming it to proc_rwmem() in the process), and implements ptrace()
directly in terms of procfs_{read,write}_{,db,fp}regs() instead of
having it fake up a struct uio and then call procfs_do{,db,fp}regs().

It also moves the prototypes for procfs_{read,write}_{,db,fp}regs()
and proc_rwmem() from proc.h to ptrace.h, and marks all procfs files
except procfs_machdep.c as "optional procfs" instead of "standard".
2001-10-07 20:08:42 +00:00
mjacob
37494cc800 Fix problem where a user buffer outside of the area being tested
will be corrupted.

PR:		29194
Obtained from:	Tor.Egge@fast.no
MFC after:	2 weeks
2001-10-02 18:34:20 +00:00
mp
a740a15ed8 Catch up to recent removal of curpcb from globals.h. 2001-09-24 02:58:49 +00:00
mp
af0dee993d Add missing include file. 2001-09-20 15:32:56 +00:00
mp
6121d3f17e Don't include NFS headers.
Reported by:	dfr
2001-09-20 15:31:58 +00:00
peter
19afa3df70 Replicate a change from alpha/genassym.c to other arches. This should
fix nfs-related build breakage.
2001-09-20 02:49:59 +00:00
mp
34c8082463 Use BATL/BATU macros instead of hardcoded hex constants. 2001-09-20 00:48:30 +00:00
mp
a2e5cb9c1e Update PowerPC MD code to compile and do initial bootstrap based on
recent changes (KSE and VM requiring physmem to be setup).

Reviewed by:	benno, jhb, julian
2001-09-20 00:47:17 +00:00
peter
85182a8d78 Cleanup and split of nfs client and server code.
This builds on the top of several repo-copies.
2001-09-18 23:32:09 +00:00
jhb
8b42ca6665 GC obsolete cruft from this file. 2001-09-18 21:53:25 +00:00
jhb
814bb9623f Whitespace fixes. 2001-09-18 21:52:15 +00:00
jhb
0fc343f1d8 - If we ever do the per-cpu KTR stuff, the index won't be volatile as it
will be private to each CPU.
- Re-style(9) the globaldata structures.  There really needs to be a MI
  struct pcpu that has a MD struct mdpcpu member at some point.
2001-09-18 21:46:26 +00:00
jhb
681e830ed0 - Fix a missed idleproc -> idlethread conversion.
- Remove redundany fpucurproc (fpucurthread already existed)
2001-09-18 21:37:09 +00:00
julian
5596676e6c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
peter
96b9a12bd2 Rip some well duplicated code out of cpu_wait() and cpu_exit() and move
it to the MI area.  KSE touched cpu_wait() which had the same change
replicated five ways for each platform.  Now it can just do it once.
The only MD parts seemed to be dealing with fpu state cleanup and things
like vm86 cleanup on x86.  The rest was identical.

XXX: ia64 and powerpc did not have cpu_throw(), so I've put a functional
stub in place.

Reviewed by:	jake, tmm, dillon
2001-09-10 04:28:58 +00:00
peter
b3b3a6b1c9 Missing part of dillon's coredump commit. cpu_coredump() was still
passing IO_NODELOCKED to vn_rdwr(), this would cause operations on the
unlocked core vnode and softupdates nastiness if an a.out binary cored.
2001-09-08 22:18:58 +00:00
obrien
34ad4938d7 style(9) the structure definitions. 2001-09-05 01:36:46 +00:00
peter
16c92cf0c3 Zap #if 0'ed map init code that got moved to the MI area.
Convert the powerpc tree to use the common code.
2001-09-04 08:42:35 +00:00
peter
119d201aab Nuke #if 0'ed "setredzone()" stub. We never used it, and probably
never will.  I've implemented an optional redzone as part of the KSE
upage breakup.
2001-09-04 08:36:46 +00:00
jhb
8f95e37de3 Axe stale mp_fixme(). 2001-09-01 00:49:29 +00:00
peter
71ad1033ae Similar to changes on i386/alpha/etc pmap.c; converge on a similar
look/feel on pmap_new_proc() with some cosmetic style changes.
2001-08-31 06:42:45 +00:00
mike
a45063618a o Remove some GCCisms in src/powerpc/include/endian.h.
o Unify <machine/endian.h>'s across all architectures.
o Make bswapXX() functions use a different spelling of u_int16_t and
  friends to reduce namespace pollution.  The bswapXX() functions
  don't actually exist, but we'll probably import these at some
  point.  Atleast one driver (if_de) depends on bswapXX() for big
  endian cases.
o Deprecate byteorder(3) prototypes from <sys/types.h>, these are
  now prototyped indirectly in <arpa/inet.h>.
o Deprecate in_addr_t and in_port_t typedefs in <sys/types.h>, these
  are now typedef'd in <arpa/inet.h>.
o Change byteorder(3) prototypes to use standards compliant uint32_t
  (spelled __uint32_t to reduce namespace pollution).
o Document new preferred headers and standards compliance.

Discussed with:	bde
PR:		29946
Reviewed by:	bmilekic
2001-08-30 00:04:19 +00:00
peter
5fa2d1a53c vm_page_zero_idle() is no longer MD. 2001-08-25 04:54:25 +00:00
peter
4694b279a2 Make COMPAT_43 optional again. XXX we need COMPAT_FBSD3 etc for this
stuff.
2001-08-21 02:32:59 +00:00
obrien
7797d96f52 Minor style(9)'ing 2001-08-16 10:13:34 +00:00