Commit Graph

95 Commits

Author SHA1 Message Date
thorpej 78ea2dd367 Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
2002-12-10 05:14:24 +00:00
manu 9f6565f2bd A working fork/vfork implementation. Darwin fork differs from our fork by
two ways:
- the child gets its pid as retval[0] (userland stub will turn it into a 0),
retval[1] is 1 and it is 0 in the parent.
- in the child, the fork syscall is successful, hence we must skip the next
instruction.
2002-12-08 21:53:10 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
matt c9699a165e Add missing file. 2002-10-30 18:31:39 +00:00
simonb 63096043b3 Use "#define\t" instead of "#define ". 2002-09-22 08:30:56 +00:00
chs 481bfd199b don't install a couple headers that are of no use in userland. 2002-09-21 01:17:44 +00:00
chs 1135d1326e remove protos for non-existant functions. 2002-09-21 01:16:59 +00:00
chs b5e02d5677 implement device_register() for ofppc.
use ofcons_cnprobe().
2002-09-18 01:44:12 +00:00
chs 976b0910c4 fix the ofppc interrupt code to work at all. the previous code was
confusing an IPL number with an IRQ mask.  now we do like the x86 code.
2002-09-18 01:43:07 +00:00
chs 2df384b428 fix printf format string. 2002-09-16 02:12:30 +00:00
briggs 0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
matt 4577742ff6 Use SR 11 as USER_SR. (12 is used as an I/O BAT). 2002-07-07 19:32:49 +00:00
matt 685778b53b Peform a rototill over the powerpc-based ports.
Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop.  Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
2002-07-05 18:45:15 +00:00
thorpej dada8613e1 Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
2002-05-15 19:23:51 +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
soren 662f877587 MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
2001-11-15 18:06:11 +00:00
thorpej e727e3f180 Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly.  BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
2001-10-31 17:20:45 +00:00
thorpej ccb78392f1 Check in of work-in-progress of Firepower native device support.
We can find devices in PCI configuration space, but not much else.
2001-10-29 22:28:37 +00:00
thorpej 2d06f95095 Add/rework infrastructure that will allow us to support native
device drivers:
- Various native device entries in cdevsw/bdevsw.
- Rework the interrupt infrastructure to provide more flexibility to
  the platform-dependent back-end.  Rewrite the "ofwgen" simulated
  interrupt routines to reflect the changes.
- Clear out the BAT registers and set the fixed battable entries before
  calling the platform init routine.  The platform init routine is allowed
  to set entries in the battable.
- Don't call the platform cons_init routine until after translation is
  enabled -- we might need translation to work in order to access bus
  space.
2001-10-29 19:04:24 +00:00
thorpej d213444bc5 Need to install intr.h. 2001-10-24 15:33:17 +00:00
billc 8b2a9cd42c NEWPMAP fixes that I missed committing. 2001-10-24 06:26:10 +00:00
thorpej 506d233170 Add machine-dependent defns for libsa's loadfile(). 2001-10-23 03:02:03 +00:00
thorpej 624e16931f Begin the task of splitting up the ofppc port into common code
and platform-specific code, similar to how the Alpha port is
split up.
2001-10-22 23:01:17 +00:00
thorpej 6817ae639c Fetch the platform name earlier, so we can determine what kind of
system we're running on earlier.
2001-10-22 16:44:03 +00:00
billc b3a54fcf2e just set MACHINE and include powerpc/param.h - non-NEWPMAP ofppc kernels boot now. 2001-10-20 08:27:12 +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
tsutsui 96ca5eec53 Define VM_MAX_KERNEL_BUF and PAGER_MAP_SIZE to save KVA space. 2001-08-05 06:55:02 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
soren 945b972563 PPC machine type tags haven't been used for a while. 2001-05-03 13:11:24 +00:00
thorpej cf67ac7122 Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
2001-05-01 02:19:13 +00:00
thorpej 2b27ac7a99 Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure.  Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM.  These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg.  As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now).  Changes to other pmap
modules will follow.
2001-04-29 22:44:31 +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
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
thorpej 0d8e6faeb2 splimp -> splvm 2001-04-12 19:43:46 +00:00
thorpej 1fa7cb5b74 Use <powerpc/psl.h> 2001-01-18 15:30:42 +00:00
thorpej d85a75f583 Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
2001-01-14 02:00:37 +00:00
mycroft 3418812d3c Partial syscall cleanup, as per other ports. 2000-12-14 10:33:42 +00:00
thorpej 40460ae8eb Need to provide CACHELINESIZE in _STANDALONE environments, too. 2000-11-16 19:02:33 +00:00
thorpej 4db6fc7542 Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
thorpej 58e7a6954b Add spllock(). See spl(9) for details. 2000-08-22 19:46:26 +00:00
thorpej 23a7f255d4 Make sure we provide splsched() as described in spl(9). 2000-08-21 02:06:31 +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 e695f72a2e Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
2000-06-26 15:42:16 +00:00
tsubai 1bfa0fc6b6 Add cpu_counter(). 2000-06-11 16:32:42 +00:00
matt c9aff328d9 Make booted_device global (and booted_parition for consitency).
Eliminate it from header files and other extern definitions.
2000-06-01 00:49:49 +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