Commit Graph

470 Commits

Author SHA1 Message Date
kleink
4d6a384b1b Need <sys/ptrace.h> for declarations. 2000-06-09 14:05:04 +00:00
kleink
18495b9efa Need <sys/systm.h> for declaration of bzero(). 2000-06-08 07:30:47 +00:00
kleink
c2715f98ce Need <sys/systm.h> for declaration, and make argument declarations match. 2000-06-08 07:29:22 +00:00
kleink
78009a319f Need <netinet/in.h> for declaration. 2000-06-08 06:50:46 +00:00
kleink
149050ce7b Need <sys/systm.h> for panic() declaration. 2000-06-08 06:48:45 +00:00
kleink
186d2ccb7f Need <sys/systm.h> for declaration, and make argument declarations match. 2000-06-08 06:47:17 +00:00
tsubai
0552fd6de2 Dump fp regs into core file. 2000-06-04 12:12:13 +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
thorpej
e03e9e8086 Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1().  In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
2000-05-28 05:48:59 +00:00
sommerfeld
40339b39f9 Reduce use of curproc in several places:
- Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()
2000-05-27 00:40:29 +00:00
thorpej
a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
jhawk
8e44b27348 Rename the machine-specific stack trace printing functions
from db_stack_trace_cmd() to db_stack_trace_print(),
and add an additional argument, a function pointer for an
output routine (i.e. printf() or db_printf()).

Add db_stack_trace_cmd() in db_command.[ch], calling
db_stack_trace_print() with db_printf() as the printer.

Move count==-1 special handling from db_stack_trace_print() [nee
db_stack_trace_cmd()] to db_stack_trace_cmd() [nascent here].

Again, I'm unable to test compilation on all affected platforms,
so advance apologies for potential brokenness.
2000-05-26 03:34:24 +00:00
is
8a6db88c1d Prepare for AmigaPPC. 2000-05-25 21:10:14 +00:00
thorpej
1140468205 Use preempt(), not an open-coded equivalent (which won't be
equivalent for long).
2000-05-24 16:48:33 +00:00
tsubai
b906075964 Compile dk_* functions only when __BROKEN_DK_ESTABLISH is defined. 2000-05-23 13:25:43 +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
tsubai
c1acffff5c When call a signal handler, don't pass the kernel (local) address in r5. 2000-04-03 10:23:24 +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
kleink
230876cf26 Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
  make them type-generic, which is necessary i.e. to operate on file offsets
  without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
  integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
2000-03-26 20:42:21 +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
chs
0e4b23600f handle a NULL "done" pointer.
for the userspace versions, return EFAULT instead of EACCES
when the user address is bogus.
2000-02-19 23:29:16 +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
thorpej
fd8c03cf44 Allow arch-specific code to specify in4_cksum() like it can specify
in_cksum().
2000-02-14 21:42:50 +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
sommerfeld
aa195e816f Fix PR9240: comment above cpu_fork() out of synch with reality on most ports.
(comment change only, but was wrong for more than just i386).
2000-01-20 22:18:54 +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
tsubai
668b553d53 Need opt_compat_netbsd.h. 1999-11-22 13:26:59 +00:00
lonhyn
090c4d2e66 Program to convert back and forth between PPM and CHRP boot icon images. 1999-11-19 00:43:20 +00:00
kleink
eac5784583 Move signal management code common to all PowerPC platforms (sendsig(),
sigreturn(), sigcode) to a single place in the shared powerpc directory.
(The struct sigcontext etc. definitions were already being shared.)
1999-11-17 14:56:10 +00:00
thorpej
1946167939 Update for pmap_enter() API change. No functional difference. 1999-11-13 00:30:26 +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
jdolecek
7f589dba84 rename the MD Debugger() to cpu_Debugger()
add MI Debugger() which switches to console if wscons is used prior
to calling cpu_Debugger()
1999-10-12 17:08:56 +00:00
chs
3bfa86cbc0 fix breakage from PMAP_NEW cleanup. 1999-09-14 17:11:45 +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
tsubai
30e635f6f3 Make sure that we use only inside of available memory region
in pmap_bootstrap.
1999-08-30 07:59:19 +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
thorpej
f5a527bb4e Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
1999-06-17 18:21:21 +00:00
thorpej
beb8d06638 Generally update the comment above vunmapbuf(). 1999-05-26 22:19:33 +00:00
thorpej
a2d06a4721 Generally update the comment above the vmapbuf() implementations. 1999-05-26 22:07:36 +00:00
thorpej
c10a926030 Allow the caller to specify a stack for the child process. If NULL,
the child inherits the stack pointer from the parent (traditional
behavior).  Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).
1999-05-13 21:58:32 +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
chs
f455dd6596 add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.
1999-04-11 04:04:04 +00:00
mycroft
9c6b797796 Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
  because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
  avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot.  Also, DO NOT use
  pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
  access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
  access_type = 0.  This should probably be revisited.
1999-03-26 23:41:25 +00:00
tsubai
82b3b0209f In copyin() and copyout(), clear the pcb_onfault variable in the EFAULT
case. (pr 7243)
1999-03-26 08:32:15 +00:00
tsubai
38a92c9752 A successful kernel page fault should just return so that signal delivery
et al. should not executed.  (pr7240)
1999-03-26 08:15:23 +00:00
mrg
d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
thorpej
63b6321834 VM_MBUF_SIZE is in terms of MCLBYTES, not CLBYTES. 1999-03-23 00:31:59 +00:00
chs
31839fe71d fix previous, I got carried away with cut+paste. 1999-03-22 08:44:37 +00:00
thorpej
a77ccfe460 Garbage-collect. 1999-03-20 01:40:25 +00:00
chs
ab7269f62a if uvm_fault() fails with KERN_RESOURCE_SHORTAGE, send a SIGKILL
and print a message about it.  this will be used to recover from
out-of-swap conditions.
1999-03-18 04:56:01 +00:00
tsubai
b4374e3ce0 Implement badaddr() and trap machine-check in badaddr. 1999-03-15 01:29:07 +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
hubertf
100778d54a RCS ID police 1999-02-15 04:25:28 +00:00
kleink
f69591d12d Use of casts as lvalues is a GNU C extension; rearrange slightly. 1999-02-10 17:03:26 +00:00
tsubai
46660b394f Make ptable really aligned to HTABSIZE. 1999-02-04 12:45:31 +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
c2bb308ef9 Use (fast!) dcbz asm instruction in pmap_zero_page(). 1999-01-12 11:03:04 +00:00
tsubai
4293e4ff3c Use the last available page(s) for msgbuf. 1999-01-12 10:26:18 +00:00
tsubai
ae67dbc85d Fix void * arithmetic. 1999-01-10 10:24:16 +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
thorpej
8458248eec copyin() and copyout() should return EFAULT if a fault occurs, not
EACCESS.
1998-11-26 21:06:21 +00:00
tsubai
35f82ac3eb Save and restore pcb_onfault in kcopy(). 1998-11-26 20:48:45 +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
tsubai
491966b273 When DSI occurs and pcb_onfault != 0, registers are incorrectly restored.
Fix this.
1998-11-21 20:18:47 +00:00
mrg
db3051d720 fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
	- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
	paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!
1998-11-19 15:38:20 +00:00
mycroft
09093330b1 Add {LONG,WORD}_BIT and {DBL,FLT}_{DIG,MAX,MIN}. 1998-11-16 04:12:29 +00:00
tsubai
dd918881b6 Restrict the length of return value within buflen. 1998-11-15 19:53:25 +00:00
thorpej
cabecee13c Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
  entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
  When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
1998-11-11 06:43:49 +00:00
tsubai
ffb3220169 Don't panic when pmap_remove_pv even if pa is not managed.
(i.e. I/O device.  framebuffer etc.)
1998-10-13 11:30:47 +00:00
sakamoto
6857706407 powerpc/bcopy.c is unnecessary. 1998-09-18 06:04:19 +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
thorpej
70e641047c In cpu_coredump(), use MID_MACHINE rather than MID_* (whatever it expands
to).
1998-09-09 11:17:24 +00:00
thorpej
8abe0d6b1c Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code.  Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).
1998-09-09 00:07:48 +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
jonathan
466e784ee1 defopt DDB. 1998-07-04 22:18:13 +00:00
thorpej
971b8956ef defopt KTRACE 1998-06-25 21:18:11 +00:00
tsubai
56076d8c0d Bugfix of MACHINE_NEW_NONCONTIG support.
PTE_I/G bits should be determined by mem array (not avail array).
1998-06-21 13:30:43 +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
970fffe99b revert. ofppc->powerpc 1998-05-29 10:04:22 +00:00
sakamoto
7e5b88f619 Revert OpenFirmware files to powerpc directory.
OpenFirmware files are used by ofppc/macppc.
1998-05-29 08:38:25 +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
drochner
bd9ed5a6fd STANDALONE->_STANDALONE (cpp definition)
closes PR kern/5481 (Erik Bertelsen <erik@q610.ebe.uni-c.dk>)
1998-05-22 12:56:35 +00:00
thorpej
6626878e7b It is no longer necessary for pmap_pinit() and pmap_release() to be
pmap interface functions, as NetBSD no longer uses statically allocated
pmaps (except for the kernel pmap, which is special-cased anyhow).
1998-05-19 19:00:11 +00:00
kleink
687ea7404c Fix some arithmetics lossage on typeless pointers. 1998-05-08 16:55:15 +00:00
kleink
aa36ad1f55 Fix some arithmetics lossage on typeless pointers. 1998-05-07 21:01:41 +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
tv
b21bfbde11 Add -Wno-main conditional on compiler being gcc 2.8 or egcs. (This adds
a HAVE_GCC28 check-variable that can now be used to add other gcc-2.8
flags in cases where they may be useful, or to remove gcc 2.7.2 "bug
workaround" flags.)
1998-04-12 23:47:41 +00:00
bouyer
9f50fca1fd Add commented out "options FFS_EI" 1998-03-18 16:34:41 +00:00
drochner
e3d8e9c72b enable compatibility for old partition ID per default 1998-03-02 17:07:53 +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
perry
1ed8ea9966 note second parm of sysarch() is now void *, + trivial KNF, etc. 1998-02-25 21:41:55 +00:00
mycroft
78875d069d ofd -> ofdisk 1998-02-24 05:49:28 +00:00
mycroft
6bab18f8f1 Catch up with changes in dev/ofw. Add mainbus. 1998-02-24 05:45:51 +00:00
mycroft
ee0b9799e7 Fix layout of powerpc_saved_state; copy in saved MSR. 1998-02-23 03:23:05 +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
d56d21012f Slight rearrangement. 1998-02-23 01:54:26 +00:00
mycroft
ab5aeaa789 Clean up #include paths.
Copy prom2boot() from kernel source.
rename _rtt() to OF_exit(), and add a _rtt() that calls it.
1998-02-22 07:42:30 +00:00
thorpej
772da350d4 Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.
1998-02-19 04:18:30 +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
thorpej
2d33c2a97c Implement OF_getproplen(). 1998-02-02 21:02:30 +00:00
thorpej
172b242837 Rearrange slightly the way the debugger exception vectors are initialized. 1998-02-02 03:01:28 +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
sakamoto
8c2e671594 Fix PR/4679:missing cast, from SUNAGAWA Keiki. 1998-01-27 05:46:59 +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
thorpej
4044eccd3f Don't use vm_pmap; use vm_map.pmap instead. 1998-01-06 08:13:08 +00:00
perry
b46484bb8a RCSID Police. 1998-01-05 20:51:25 +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
28e0cf0693 Add COMPAT_13. 1997-12-01 16:02:09 +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
fair
315f8de9c2 add pseudo-device rnd, commented out 1997-11-20 08:11:14 +00:00
lukem
6c986561ee * add commented out DDB_HISTORY_SIZE=100 if DDB exists in config file
* fix up use of 'options<SPACE><TAB>'
1997-11-17 01:57:23 +00:00
veego
df6d37534b s/NETHER/NARP/ and s/ether.h/arp.h/ for the 'new' arp system. 1997-11-13 10:37:40 +00:00
thorpej
ce4c770f88 Make sure CPP, AR, AS, and RANLIB are defined. 1997-11-12 23:11:50 +00:00
thorpej
a421995756 Define LORDER, NM, and TSORT here, like we do the rest of the tools. 1997-11-12 22:25:31 +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
christos
2975958ca6 fix chrtoblk declaration 1997-10-16 23:42:35 +00:00
explorer
80513cb5ae o Make usage of /dev/random dependant on
pseudo-device   rnd                     # /dev/random and in-kernel generator
  in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
  that this code is derived in part from Ted Tyso's linux code.
1997-10-13 00:46:08 +00:00
mycroft
5c8d588138 Nuke NOOBJ. 1997-10-11 08:44:42 +00:00
mycroft
acf0e569a5 Update all the tags goo, and use bsd.subdir.mk. 1997-10-11 08:42:02 +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
thorpej
dd3663cdfb Fix a typo. 1997-10-08 23:28:01 +00:00
thorpej
3b4ad2b60e Copyright assigned to The NetBSD Foundation. 1997-10-05 18:15:51 +00:00
christos
7f41ec0345 PR/4162: Chris Jones: make cleandir does not work properly; it does not
remove the object files and the .depend file in the kernel build directory.
1997-09-30 22:50:53 +00:00
mycroft
701aa39854 Oops; didn't delete two retval[] usages in setregs(). 1997-09-12 09:59:53 +00:00
mycroft
16a8787248 Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way.  (See tech-kern.)
1997-09-11 23:01:44 +00:00
thorpej
417cce7c06 Fix typo(?) in dlmiss handler ("store" bit erronenously set). From
Kazuki Sakamoto <sakamoto@cec.co.jp>, PR #3583.
1997-08-29 19:11:07 +00:00
drochner
bdb232d2b6 Don't use <lib/libsa/if_ether.h> anymore. This was a copy of the
old (before ARP changes) <netinet/if_ether.h>, intended for
temporary use.
1997-07-22 17:41:01 +00:00
leo
198bd713f2 Generate assym.h dependencies when making 'depend'. 1997-07-12 22:07:36 +00:00
mrg
552af779d2 bring mrg-vm-swap2 onto mainilne. 1997-06-12 15:46:19 +00:00
mrg
dc6a98e92c bring mrg-vm-swap2 onto mainilne. 1997-06-12 15:09:23 +00:00
veego
6ab737a609 Initialize machine from MACHINE and machine_arch from MACHINE_ARCH. 1997-06-08 23:59:57 +00:00
veego
de7e49a954 Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch. 1997-06-06 23:26:01 +00:00
gwr
e2a58b69f7 Add #define __VM_PMAP_HACK as a temporary measure. 1997-05-16 21:35:30 +00:00
mycroft
84bca5d679 Don't use _SUBDIRUSE outside of bsd.subdir.mk. 1997-05-07 17:28:47 +00:00
mycroft
df082e3c8d A handle of 0 means the open failed... 1997-04-28 18:46:15 +00:00
mycroft
37cb09ba66 DTRT if OF_read() returns 0 when no data is available. 1997-04-28 18:33:57 +00:00
thorpej
2c8a12761d Fix a pasto 1997-04-19 01:47:24 +00:00
thorpej
a53aafbf1a ...and again. 1997-04-19 01:40:08 +00:00
thorpej
28d3c2e2d3 Replay history.... 1997-04-19 01:39:44 +00:00
thorpej
84c938e92f oops, forgot to commit this yesterday - newvers.sh script for boot
program.
1997-04-17 20:24:17 +00:00
thorpej
d76ea6e415 STRIP -> STRIPFLAG 1997-04-17 07:46:24 +00:00
thorpej
28b6ad9af8 - Pull in new ofwmagic.S and soft_spl.c files
- firepowerbugs -> firmworksbugs
1997-04-16 23:27:05 +00:00
thorpej
61da87f25a - Use genassym.sh to facilitate cross-compiling.
- Various clean/catch-up.
1997-04-16 23:26:06 +00:00
thorpej
de6c03ee6c Update for current PowerPC code, some from Wolfgang. 1997-04-16 23:14:24 +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
d78ae3859a - Add an option (TRAP_PANICWAIT) that causes trap() to prompt for a keypress
before calling panic().
- Add const poisioning where appropriate.
1997-04-16 22:49:49 +00:00
thorpej
144eb2ce5b - Fixed reversed arguments to an asm() (from Andrew Cagney)
- Round memory segments in a saner way (from Charles Hannum)
1997-04-16 22:45:26 +00:00
thorpej
a9c6f67829 - Symbol cleanup, a'la locore.S
- Fix a 16-bit botch when disabling MMU
- Properly align save areas and temporary stacks.
1997-04-16 22:43:46 +00:00
thorpej
fdb155145e Fix some bogons in boot path parsing code. 1997-04-16 22:41:34 +00:00
thorpej
5c7a06f070 Several changes from Wolfgang Solfrank, Charles Hannum, and myself:
- Make setregs() conform to the PowerPC SVR4 ABI, plus one NetBSD
  extention (for ps_strings).
- machine == powerpc, not PowerPC.
- Set up machine vector for OpenFirmware.
- Nuke the msgbuf for now; it's not mapped correctly.
- Add missing casts in some asm() directives.
- Enable PSL_RI earlier, and do *not* disable it in fake_spl(), since it
  is needed for page faults.
- Some general cleanup.
1997-04-16 22:38:13 +00:00
thorpej
fac39bcc01 Several changes from Wolfgang Solfrank, Charles Hannum, and myself:
- Clean up symbol goop - use macros in asm.h where appropriate.
- Add, correct, and generally clean up comments.
- Properly align save areas and temporary stacks.
- Fix the 603 tlb reload code.
- Fix several bogus constants and modifiers.
- Some stylistic changes.
1997-04-16 22:18:55 +00:00
thorpej
d2798d376c Update to ipkdb register handling, from Wolfgang Solfrank. 1997-04-16 22:12:42 +00:00
thorpej
d667b1f2d0 Add hooks for berkeley packet filter. 1997-04-16 22:11:15 +00:00
thorpej
9970f1bf3c Adjust for new machine_vec-based interrupt, from Wolfgang Solfrank. 1997-04-16 22:10:39 +00:00
thorpej
6708f357b5 RCS ID and #includes cleanup. 1997-04-16 22:09:41 +00:00
thorpej
fd3f618510 "Simulated" software-spl handling, for use on OpenFirmware systems.
These are for a generalized "machine vector" designed to hide
differences between various PowerPC systems.
From Wolfgang Solfrank <ws@tools.de>
1997-04-16 21:20:35 +00:00
thorpej
a6cf9568cc Special Magick note section interpreted by OpenFirmware to set various
parameters.  Shared by kernel and OpenFirmware boot program.
1997-04-16 21:19:00 +00:00
thorpej
ac9333ee5b Use genassym.sh to facilitate cross-compiling. 1997-04-16 21:16:25 +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
thorpej
ec64b8f26a Garbage-collect 1997-04-16 20:30:16 +00:00
thorpej
1bd80ab675 New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program.  Highligts:
- Rearrange a bit so that we can sanely add boot programs for
  non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
  1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
  for NetBSD/powerpc).  (XXX Don't load symbols right now - the code
  to do it is there, but I don't particularly like how space for the
  symbol table is allocated; I will revisit this soon'ish).
1997-04-16 20:28:59 +00:00
thorpej
7a6a8eb391 Don't allocate mclrefcnt[]; it's dead and gone. 1997-03-27 21:01:48 +00:00
gwr
37b247edde Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/ 1997-03-26 22:42:13 +00:00
gwr
71e43d14ab Move findroot/setroot stuff from configure() to cpu_rootconf(). 1997-03-26 22:38:40 +00:00
is
07b064e02e New ARP system, supports IPv4 over any hardware link.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
1997-03-15 18:09:08 +00:00
mycroft
f868dff8d3 Define the `cleankernel' target consistently with other ports. 1997-03-14 23:27:29 +00:00
fvdl
115b6d92fa Define ALIGNED_POINTER 1997-02-24 23:16:53 +00:00
perry
19d153fc48 Nuke some options GENERIC residue. 1997-02-04 04:57:10 +00:00
perry
0b3a46d6b3 Nuke some GENERIC residue. 1997-02-04 04:31:55 +00:00
thorpej
739f23a219 This file is obsolete; this information is now generated by config(8). 1997-01-31 05:12:49 +00:00