Commit Graph

263 Commits

Author SHA1 Message Date
Doug Rabson
4ef1beb1ea 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
Doug Rabson
0fda7b2b10 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
Doug Rabson
1e59a2270d 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
Doug Rabson
fea451577e Tidy. 2001-09-20 15:03:28 +00:00
Doug Rabson
3890444abd 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 Wemm
55f25b39e9 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 Wemm
eb25edbda3 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
John Baldwin
fdca1cb1ef Whitespace fixes. 2001-09-18 21:52:15 +00:00
John Baldwin
fd54558a83 - 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
Doug Rabson
a5e2a508c7 Add ia64_get_cpuid(). 2001-09-18 15:21:18 +00:00
Doug Rabson
f0e4f240e7 Flesh out identifycpu(). 2001-09-18 13:26:30 +00:00
Doug Rabson
a1fdf50c01 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
Doug Rabson
56f6eed759 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
Doug Rabson
f544a5b837 Use the MI console code to initialise the console. 2001-09-15 15:31:59 +00:00
Doug Rabson
91a8883e5b Implement inx() and outx() functions for accessing I/O ports. 2001-09-15 12:30:56 +00:00
Doug Rabson
749520911b Add ia64_mf_a() which executes an mf.a instruction. 2001-09-15 12:30:19 +00:00
Doug Rabson
3e59bb90d6 * 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
Doug Rabson
3a0b4f259c 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
Doug Rabson
3a1c20e821 Sync the PCI NIC sections with i386. 2001-09-15 09:09:13 +00:00
Doug Rabson
0b02d706db * 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 Elischer
b40ce4165d 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 Moolenaar
68a7335b3f 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
Doug Rabson
e763b778c8 * 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 Wemm
eb30c1c0b9 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 Wemm
660c5377fd 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
Doug Rabson
d452f533f7 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
Doug Rabson
b68657dd33 Typo in comment. 2001-09-07 11:01:39 +00:00
Doug Rabson
4411cf6e7d * 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
Doug Rabson
9735f1281a Remove old setjmp/longjmp stubs. 2001-09-07 10:59:05 +00:00
John Baldwin
df53e91c18 Call sendsig() with the proc lock held and return with it held. 2001-09-06 22:20:41 +00:00
Doug Rabson
4ce0b9f86d Add struct tags to avoid warnings in kernel code. 2001-09-06 18:11:16 +00:00
David E. O'Brien
1792335469 style(9) the structure definitions. 2001-09-05 01:36:46 +00:00
Peter Wemm
b53f9c45f9 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
Doug Rabson
093a61588e Add a working version of setjmp/longjmp.
Obtained from: Intel's EFI toolkit.
2001-09-03 13:54:50 +00:00
Peter Wemm
05a806502b Since we're cross compiling from x86, ignore the x86 CPUTYPE by default. 2001-09-03 07:58:32 +00:00
Peter Wemm
d73178aea8 Dont conflict with sysctl debug.mddebug 2001-09-03 04:49:19 +00:00
Peter Wemm
02de199140 Sync with i386 / alpha. Whitespace unindent / style prep for kse. 2001-09-02 10:07:09 +00:00
Peter Wemm
494e7e3923 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 Wemm
5a4b540da0 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 Barcroft
03516cfeb0 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 Wemm
76cb0cadf1 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 Wemm
547a9e66fd vm_page_zero_idle() is no longer MD. 2001-08-25 04:54:25 +00:00
Peter Wemm
95a6562598 Strip out some #if's for old implementations of global data pointers. 2001-08-21 22:14:13 +00:00
Peter Wemm
e8ebc08f80 Make COMPAT_43 optional again. XXX we need COMPAT_FBSD3 etc for this
stuff.
2001-08-21 02:32:59 +00:00
David E. O'Brien
589278dbae style(9) and make consistent across platforms 2001-08-16 09:29:35 +00:00
Andrey A. Chernov
2a54e09dff OFF_T -> OFF (more standard style) 2001-08-15 19:50:59 +00:00
Andrey A. Chernov
a6314641a4 Add OFF_T_MAX/OFF_T_MIN 2001-08-15 19:25:08 +00:00
David E. O'Brien
059d1e91d8 Style changes to commonize the various platforms. 2001-08-15 04:02:41 +00:00
John Baldwin
688ebe120c - 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 Wemm
2aca0c28d3 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