Commit Graph

453 Commits

Author SHA1 Message Date
marcel
35cc982506 Make this compile under option SMP. 2001-10-20 03:33:07 +00:00
dfr
7ebbe27eff Make a start at an unaligned trap handler. Only integer loads and stores
are handled so far.
2001-10-19 22:23:51 +00:00
dfr
242c14f742 Translate various userland traps into SIGBUS (instead of just panicing). 2001-10-19 20:46:12 +00:00
ru
b514c94182 Try two on the preprocessing logic.
Reviewed by:	obrien
2001-10-19 20:06:23 +00:00
jhb
d0bdf2ae5d Remove unneeded sys/mutex.h includes. 2001-10-19 19:23:32 +00:00
obrien
975b6d2e75 Blah, fix braino where ru had to remind me of proper preprocessor syntax.
Bad fingers, no cookie.
2001-10-19 19:17:11 +00:00
dfr
220747715a Rework pmap so that it separates the PTE structure from the pv_entry
structure. This makes it possible to pre-allocate PTEs for the kernel,
which is necessary for a reliable implementation of pmap_kenter(). This
also avoids wasting space (about 48 bytes per page) for kernel mappings
and user mappings of memory-mapped devices.

This also fixes a bug with the previous version where the implementation
required the pv_entry structure to be physically contiguous but did not
enforce this (the structure size was not a power of two). This meant
that the pv_entry free list was quickly corrupted as soon as the system
was even mildly loaded.
2001-10-19 09:47:02 +00:00
dfr
acb4f4cc33 Shift the code which packs and unpacks instruction bundles out of DDB
since it is useful for various emulations duties (e.g. unaligned trap
handling).
2001-10-18 16:20:04 +00:00
marcel
8542877fb0 Fix typos in previous commit:
o  s/sys_narg/sy_narg/
o  s/SYS_MPSAFE/SYF_MPSAFE/
2001-10-18 05:21:52 +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
jhb
d51a15e1db - Small cleanups to the Giant handling in trap().
- Only release Giant in trap() if we locked it, otherwise we could release
  Giant in a kernel trap if we didn't get it for a page fault and the
  previous frame had grabbed the lock.
- Only get Giant for !MP safe syscalls.
2001-10-17 22:04:45 +00:00
mjacob
e666e03e1a Make SCSI changer and SES devices standard in generic kernels.
Reviewed by:	ken@kdm.org
2001-10-16 22:22:58 +00:00
dfr
19a85de402 Size the number of pv_entries we use to bootstrap the pv_entry allocator
based on the size of physical memory. This should eliminate the tweaking
needed for larger memory configurations.
2001-10-16 08:03:16 +00:00
marcel
1dc835d4bd When compiling with SKI support, create the fake memory regions
when either the memory descriptor in the bootinfo is NULL or
the descriptor count is 0.
2001-10-15 07:58:27 +00:00
dfr
ac1e1976ef Only the first eight arguments can possibly be in stacked registers. 2001-10-13 08:06:20 +00:00
dfr
66ae82dae0 Pass the correct trapframe pointer to fork_exit - sp is trapframe-16. 2001-10-12 11:50:09 +00:00
dfr
46f68d627c If the faulting instruction is a cmpxchg, then isr.w and isr.r will both
be set. We need to check isr.w before isr.r so that we can correctly
handle a cmpxchg to a copy-on-write page.

This fixes the hang-after-fork problem for dynamically linked programs.
2001-10-12 11:49:11 +00:00
dfr
e18643f7d6 Implement MCOUNT hook for assembler. Probably doesn't work right. 2001-10-11 13:35:31 +00:00
dfr
0d5aa1a03b Implement mcount trampoline (untested). 2001-10-11 13:31:55 +00:00
dfr
f16813dcd5 * Change the calling convention for execve so that it conforms to normal
C calling conventions. This allows crt1.c to be written nearly without
  any inline assembler.
* Initialise cpu_model[] so that the hw.model sysctl works properly.
2001-10-11 12:31:50 +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
dfr
adca9bb8ab Add a definition for the ia64's special PLT_RESERVE entry in the _DYNAMIC
section.
2001-10-10 09:00:27 +00:00
dfr
ffdeb5e0d7 Clarify a comment.
Requested by: jhb
2001-10-09 19:50:29 +00:00
dfr
14cba3ae53 Don't include isavar.h - we don't need it. 2001-10-09 10:24:37 +00:00
dfr
cbcbd1952c Add a minimalist kernel config which can run inside SKI. 2001-10-09 10:14:06 +00:00
dfr
53b8dff6c7 Make printtrap() more informative. 2001-10-08 20:21:04 +00:00
dfr
0dc299a882 Implement inline versions of ntohl etc. 2001-10-07 21:09:35 +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
dfr
aadf7f2191 * Use srlz.i to serialise changes to psr.ic
* Don't enable psr.i at the same time as psr.dt and psr.ic

These changes improve stability considerably.
2001-10-07 18:40:01 +00:00
dfr
006ac09328 Remove bogus include. 2001-10-07 14:20:01 +00:00
dfr
9c40c48b35 Move console probes until after we set boothowto so that 'boot -h' works. 2001-10-06 16:06:48 +00:00
dfr
9aa18339c5 Assume round-to-nearest mode for floating point. 2001-10-06 15:57:22 +00:00
dfr
db02c4b19d Delete legacy pcib code - we can't possibly work without acpi on ia64. 2001-10-06 10:09:57 +00:00
marcel
1cf975d017 o Change ia64_memory_address to explicitly take a u_int64_t
o  Add memcpy_fromio, memcpy_io, memcpy_toio, memset_io,
   memsetw and memsetw_io. I'm not sure this is the right
   place for it, though.
2001-10-06 09:31:43 +00:00
dfr
3908c08eda Add BOOTP support. 2001-10-05 19:03:01 +00:00
dfr
1b40dafbcc Fix some dependency violations (don't know why gas didn't catch this). 2001-10-05 19:02:21 +00:00
dfr
628e798360 Use physical addresses, not virtual addresses when calling PHYS_TO_VM_PAGE. 2001-10-05 19:00:03 +00:00
dfr
9e6ea50a9e Eliminate some alpha craziness. 2001-10-05 18:59:02 +00:00
dfr
603bf5b632 In in_cksumdata, len must be a signed type. 2001-10-05 18:58:22 +00:00
dfr
c307754b5d Low-level code for programming the I/O SAPIC. 2001-10-05 10:35:42 +00:00
dfr
8d0fc6ad69 Wire up most of the interrupt handling infrastructure. Not sure it works
right yet but its enough for the ATA probe to work. The SCSI probes which
follow are broken though.
2001-10-05 10:30:09 +00:00
dfr
9a18cc66ce Fix typo which meant that we never actually found the ACPI 2.0 table. 2001-10-05 10:29:03 +00:00
dfr
ef3435232b Disable interrupts when we are in DDB. 2001-10-05 08:23:08 +00:00
dfr
17d5b062c9 Add ia64_get_lid(). 2001-10-05 08:20:41 +00:00
dfr
618109d59e Don't pretend the argument to clockattach is a device - it isn't. 2001-10-04 15:28:27 +00:00
dfr
874825c3ca * Don't pretend the object passed to clockattach is a device - it isn't.
* Declare itc_frequency properly.
2001-10-04 15:27:35 +00:00
dfr
62360262bb Use EFI (or some reasonable simulation) to read the RTC. 2001-10-04 15:26:05 +00:00
dfr
7ed4fe7528 Fake the EFI runtime call GetTime. 2001-10-04 15:24:52 +00:00
dfr
b5a44e4761 Add low-level ACPI support code and make a start on parsing the ACPI
interrupt information.
2001-10-04 08:45:19 +00:00
dfr
17f2c62587 The encoding for the bus being passed to SAL was completely wrong. 2001-10-03 08:25:58 +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
marcel
0109c69c21 Remove redundant and misplaced "options DDB" line. 2001-10-02 06:18:23 +00:00
dfr
9a54c41456 Support for SKI is now an option. 2001-09-29 11:45:33 +00:00
dfr
f531655b8e Make sio0 a console device. 2001-09-29 11:45:07 +00:00
dfr
532d5998d4 Add a couple of arguments to ia64_init. I'll use them later to improve
the method of passing bootinfo from the loader.
2001-09-29 11:44:35 +00:00
dfr
81fce8d1d7 Various changes to use the firmware on a real machine. 2001-09-29 11:43:37 +00:00
dfr
b7fde43180 * Read parameters for ptc.e instruction from PAL Code.
* Add pmap_unmapdev().
2001-09-29 11:41:23 +00:00
dfr
6eb86189c7 Fake PAL Code for SKI. 2001-09-29 11:40:32 +00:00
dfr
85a8a3eb9c Start hooking up devices. 2001-09-29 11:11:18 +00:00
dfr
1e9172f76e Add pmap_unmapdev(). 2001-09-29 11:02:06 +00:00
dfr
76491e7ff0 Fill out the firmware interfaces somewhat. 2001-09-29 11:01:24 +00:00
dfr
06473c99eb Add code to initialise firmware resources (and to fake them if we are
running in simulation).
2001-09-29 11:00:24 +00:00
dfr
fd726cdf99 Add shims for calling PAL Code in physical mode. 2001-09-29 10:59:07 +00:00
dfr
966ebb7761 Add some move definitions. 2001-09-29 10:24:09 +00:00
dfr
03d92e3339 Call cpu_boot from cpu_reset. 2001-09-29 10:23:21 +00:00
dfr
edb763f2c8 Give up on the backtrace if the calculated pc isn't in region 7. 2001-09-29 10:22:57 +00:00
dfr
b0cf8971ff Use PAGE_SHIFT instead of a hardcoded constant for log2(PAGE_SIZE). 2001-09-29 09:55:30 +00:00
dfr
d0640e1a8e * Preserve ar.rsc in ia64_change_mode.
* Convert sp to/from physical in ia64_change_mode.
* Add a shim for calling EFI procedures in virtual mode.
2001-09-29 09:54:42 +00:00
dfr
42d058c159 Change END(locorestart) to END(__start). 2001-09-29 09:53:38 +00:00
rwatson
1a997efe57 o Modify the access control checks for the ia64 /dev/mem (and friends)
to use securelevel_gt() instead of direct variable checks.

Obtained from:	TrustedBSD Project
2001-09-26 20:24:23 +00:00
dfr
31fb58e79e Tidy up and fix a runtime warning. 2001-09-26 16:15:20 +00:00
brooks
34d1edd712 The faith(4) device is no longer a count device so don't specify a count. 2001-09-25 18:56:40 +00:00
dfr
a7a6c0736a Use b6 instead of b1 - b1 is supposed to be preserved and b6 is scratch. 2001-09-24 22:50:20 +00:00
dfr
bf258187c9 Make the Alternate {I,D} TLB vector code actually work for virtual
addresses greater than 256M (the page size for region 6 and 7).
2001-09-24 22:49:20 +00:00
dfr
2085d4eb3c Don't try to access external files from SKI unless we are actually running
in SKI.
2001-09-24 20:01:29 +00:00
dfr
a9a90c0600 Increase the number of bootstrap PVs. 2001-09-24 20:00:20 +00:00
dfr
21b38366fd Include <machine/pte.h> instead of <machine/pmap.h> 2001-09-24 19:58:15 +00:00
dfr
9bbe2e1552 We need different call stubs for static and stacked calling conventions. 2001-09-24 19:41:16 +00:00
dfr
d04bb727c3 Factor out PTE and related definitions from pmap.h - they are useful in
the loader.
2001-09-24 19:27:38 +00:00
dfr
fc598410d3 Fix a few comment typos from the last commit. 2001-09-24 17:38:58 +00:00
dfr
f08f7cc358 Add some code which can be used to change to/from physical mode when
calling various firmware functions.
2001-09-24 17:07:23 +00:00
obrien
94003d0787 + Fix misplacement of `txp'
+ Document our -CURRENT debugging bits
2001-09-24 03:23:48 +00:00
dfr
a6f6159dea Add definitions of SAL System Table. 2001-09-23 10:26:20 +00:00
dfr
46dc7c8aa3 Don't activate the ssc console unless we are running in SKI. 2001-09-22 19:52:02 +00:00
dfr
510b2f8636 Add implementations of readx() and writex(). 2001-09-22 19:51:18 +00:00
dfr
081194dc6f Add declaration of ia64_running_in_simulator(). 2001-09-22 19:50:54 +00:00
dfr
4c2efef4f7 * Turn off memory descriptor debugging - its served its purpose.
* Don't get confused when memory regions don't lie on page boundaries -
  remember our page size is typically larger than the firmware's page size.
* Add a function ia64_running_in_simulator() which is intended to detect
  whether the kernel is running in SKI or on real hardware.
2001-09-22 19:50:12 +00:00
dfr
934b85d282 Remove a redundant stop. 2001-09-22 19:46:41 +00:00
dfr
ced685c13a Fix a warning and make sure we flush the cache after writing an
instruction bundle otherwise the CPU won't see the changed bundle.
2001-09-21 10:10:15 +00:00
dfr
0b358c6489 Add ia64_fc(). 2001-09-21 10:09:27 +00:00
dfr
24ca38f02b If two @fptr relocations refer to the same symbol, use the same fptr
structure to resolve them. This is necessary to allow code to compare
function pointers.
2001-09-20 16:32:54 +00:00
dfr
02a6cf7d82 Don't clear the single-step bit after a trap - leave it up to the
debugger. The code was broken anyway - it clear every bit *except* the
single-step bit (oops).
2001-09-20 16:30:48 +00:00
dfr
c01c5c49d5 The second instruction in an MLX bundle is slot one, not slot two, even
though the actual opcode is stored in the value in slot two.
2001-09-20 16:29:30 +00:00
dfr
8c1dda681a Tidy. 2001-09-20 15:03:28 +00:00
dfr
f93278905f Don't include NFS headers. I have no idea why they were here in the first
place - NFS has no assembler in it.
2001-09-20 11:02:18 +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
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
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
dfr
915ac6e38a Add ia64_get_cpuid(). 2001-09-18 15:21:18 +00:00
dfr
60e38e9b01 Flesh out identifycpu(). 2001-09-18 13:26:30 +00:00
dfr
4f7d5730b0 Rearrange so we search for I/O port space as early as possible (i.e.
before console probing). Also fix a confusion between EFI's page size
which is fixed at 4096 and our own page size which is variable at compile
time.
2001-09-15 18:31:49 +00:00
dfr
d7abcfbcae Avoid the region used for thread0's trapframe when setting up the stack
for ia64_init. If we use this area for ia64_init's stack, it ends up
containing garbage which causes cpu_fork to die horribly later.
2001-09-15 18:23:51 +00:00
dfr
0593e3e8a0 Use the MI console code to initialise the console. 2001-09-15 15:31:59 +00:00
dfr
983e3898da Implement inx() and outx() functions for accessing I/O ports. 2001-09-15 12:30:56 +00:00
dfr
2047d2151b Add ia64_mf_a() which executes an mf.a instruction. 2001-09-15 12:30:19 +00:00
dfr
f270e439ef * Use Intel's EFI headers instead of home-grown ones.
* Use the bootinfo's memory map if present instead of hard-coding SKI's
  memory map.
* Record the location of the I/O Port Space if present in the memory map.
2001-09-15 12:29:46 +00:00
dfr
01ee11f408 Fill out some gaps in ia64 DDB support. This involves generalising DDB's
breakpoint handling slightly to cope with the fact that ia64 instructions
are not located on byte boundaries.
2001-09-15 11:06:07 +00:00
dfr
dc5f37d985 Sync the PCI NIC sections with i386. 2001-09-15 09:09:13 +00:00
dfr
7b40715e82 * Enable dynamically linked kernel. This involves adding a self-relocator
to locore to process the @fptr relocations in the dynamic executable.
* Don't initialise the timer until *after* we install the timecounter to
  avoid a race between timecounter initialisation and hardclock.
* Tidy up bootinfo somewhat including adding sanity checks for when the
  kernel is loaded without a recognisable bootinfo.
2001-09-13 12:39:15 +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
marcel
7bf6a0b91b o Fix struct ssc_time and enable the SSC call to get the RTC.
o  Print a message that the TODR is not set in sscclock_set.
2001-09-12 03:31:26 +00:00
dfr
ade9f272a1 * Make a start on a realistic definition for bootinfo.
* Switch to proc0's stack and backing store before calling ia64_init
  so that we don't rely on the loader's stack at all.
* Change kernel entry point name from locorestart to __start.
2001-09-10 13:40:00 +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
dfr
c981ef049f Add options to select between 4k, 8k and 16k page sizes on ia64. The
default is now 8k.
2001-09-07 11:03:39 +00:00
dfr
5cd3ebd8eb Typo in comment. 2001-09-07 11:01:39 +00:00
dfr
90f6eac893 * Track ref/mod information properly when a mapping changes.
* Fix a panic in pmap_remove() for a non-current pmap.
2001-09-07 11:00:21 +00:00
dfr
db9d3370ef Remove old setjmp/longjmp stubs. 2001-09-07 10:59:05 +00:00
jhb
054237d0be Call sendsig() with the proc lock held and return with it held. 2001-09-06 22:20:41 +00:00
dfr
a8e78b194e Add struct tags to avoid warnings in kernel code. 2001-09-06 18:11:16 +00:00
obrien
34ad4938d7 style(9) the structure definitions. 2001-09-05 01:36:46 +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
dfr
6315b454a5 Add a working version of setjmp/longjmp.
Obtained from: Intel's EFI toolkit.
2001-09-03 13:54:50 +00:00
peter
1752fcc466 Since we're cross compiling from x86, ignore the x86 CPUTYPE by default. 2001-09-03 07:58:32 +00:00
peter
5e41b2c07e Dont conflict with sysctl debug.mddebug 2001-09-03 04:49:19 +00:00
peter
716d54a6eb Sync with i386 / alpha. Whitespace unindent / style prep for kse. 2001-09-02 10:07:09 +00:00
peter
d280926250 Merge from i386: various cleanups including moving the map calculations
to MI code.  This gets ia64 to compile again.
2001-09-02 07:47:47 +00:00
peter
7602b1ab78 Same as i386/i386/pmap.c: clean up some style. This is irrelevant since
it is inside #if 0'ed code, but it would be a shame if this stuff got
cut/pasted elsewhere.
2001-08-31 06:25:28 +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
e031b90e2a Enable hardwiring of things like tunables from embedded enironments
that do not start from loader(8).
2001-08-27 05:11:53 +00:00
peter
5fa2d1a53c vm_page_zero_idle() is no longer MD. 2001-08-25 04:54:25 +00:00
peter
8580722a57 Strip out some #if's for old implementations of global data pointers. 2001-08-21 22:14:13 +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
358f773cec style(9) and make consistent across platforms 2001-08-16 09:29:35 +00:00
ache
2675b7e4e4 OFF_T -> OFF (more standard style) 2001-08-15 19:50:59 +00:00
ache
77b2a90ced Add OFF_T_MAX/OFF_T_MIN 2001-08-15 19:25:08 +00:00
obrien
09d3a96a2f Style changes to commonize the various platforms. 2001-08-15 04:02:41 +00:00
jhb
4a89454dcd - Close races with signals and other AST's being triggered while we are in
the process of exiting the kernel.  The ast() function now loops as long
  as the PS_ASTPENDING or PS_NEEDRESCHED flags are set.  It returns with
  preemption disabled so that any further AST's that arrive via an
  interrupt will be delayed until the low-level MD code returns to user
  mode.
- Use u_int's to store the tick counts for profiling purposes so that we
  do not need sched_lock just to read p_sticks.  This also closes a
  problem where the call to addupc_task() could screw up the arithmetic
  due to non-atomic reads of p_sticks.
- Axe need_proftick(), aston(), astoff(), astpending(), need_resched(),
  clear_resched(), and resched_wanted() in favor of direct bit operations
  on p_sflag.
- Fix up locking with sched_lock some.  In addupc_intr(), use sched_lock
  to ensure pr_addr and pr_ticks are updated atomically with setting
  PS_OWEUPC.  In ast() we clear pr_ticks atomically with clearing
  PS_OWEUPC.  We also do not grab the lock just to test a flag.
- Simplify the handling of Giant in ast() slightly.

Reviewed by:	bde (mostly)
2001-08-10 22:53:32 +00:00
peter
bb5c43c4b8 Zap 'ptrace(PT_READ_U, ...)' and 'ptrace(PT_WRITE_U, ...)' since they
are a really nasty interface that should have been killed long ago
when 'ptrace(PT_[SG]ETREGS' etc came along.  The entity that they
operate on (struct user) will not be around much longer since it
is part-per-process and part-per-thread in a post-KSE world.

gdb does not actually use this except for the obscure 'info udot'
command which does a hexdump of as much of the child's 'struct user'
as it can get.  It carries its own #defines so it doesn't break
compiles.
2001-08-08 05:25:15 +00:00
jhb
b80b9bc086 Grab Giant arond page faults. ia64 boots again in the simulator now. 2001-08-07 17:31:42 +00:00
dfr
7cf10de7aa Make this compile again. 2001-08-06 12:52:55 +00:00
dfr
c47efb9434 Remove usage of nonexistent vm_mtx. 2001-08-06 12:52:17 +00:00
jhb
f08bb448bd GC some obsolete alpha code. 2001-07-31 14:35:36 +00:00
jake
21b80f4133 Use a machine dependent type, Elf_Hashelt, for the elements of the elf
dynamic symbol table buckets and chains.  The sparc64 toolchain uses 32
bit .hash entries, unlike other 64 bits architectures (alpha), which use
64 bit entries.

Discussed with: dfr, jdp
2001-07-31 03:46:39 +00:00
peter
036aced92f Make PMAP_SHPGPERPROC tunable. One shouldn't need to recompile a kernel
for this, since it is easy to run into with large systems with lots of
shared mmap space.

Obtained from:	yahoo
2001-07-27 01:08:59 +00:00
peter
1d4cc78f8d Call the early tunable setup functions as soon as kern_envp is available.
Some things depend on hz being set not long after this.
2001-07-26 23:06:44 +00:00
bmilekic
0caeab3ccd - Do not handle the per-CPU containers in mbuf code as though the cpuids
were indices in a dense array. The cpuids are a sparse set and treat
  them as such, setting up containers only for CPUs activated during
  mb_init().

- Fix netstat(1) and systat(1) to treat the per-CPU stats area as a sparse
  map, in accordance with the above.

This allows us to properly boot with certain CPUs disactivated. However, if
we later decide to re-activate said CPUs, we will barf until we decide to
implement CPU spinon/spinoff callback hooks to allow for said CPUs' per-CPU
containers to get configured on their activation.

Reported by: mjacob
Partially (sys/ diffs) Submitted by: mjacob
2001-07-26 18:47:46 +00:00
bsd
17eb1bfcbf Add 'hwatch' and 'dhwatch' ddb commands analogous to 'watch' and
'dwatch'.  The new commands install hardware watchpoints if supported
by the architecture and if there are enough registers to cover the
desired memory area.

No objection by: audit@, hackers@

MFC after: 2 weeks
2001-07-11 03:15:25 +00:00
julian
869029d5d7 A set of changes to reduce the number of include files the kernel
takes from /usr/include. I cannot check them on alpha.. (will try beast)

Briefly looked at by: Warner Losh <imp@harmony.village.org>
2001-07-08 04:56:07 +00:00