Commit Graph

7776 Commits

Author SHA1 Message Date
dyoung 41d64046d4 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:25:08 +00:00
xtraeme 4ac581c0f9 Add back the CPU_TMLR_* definitions for binary sysctl compatibility
with NetBSD pre-2.0, and use them in the longrun driver again.

Requested by cube@.
2008-02-27 20:18:56 +00:00
xtraeme f402cadf9a Remove CTL_MACHDEP_NAMES, it's not used anywhere.
Ok by martin@.
2008-02-27 18:26:15 +00:00
xtraeme e4a52ebb2b - Fixup the machdep.tm_longrun_* sysctl nodes creation.
- The CTL_TMLR_ static definitions for CTL_MACHDEP are not needed anymore.
2008-02-27 17:39:37 +00:00
xtraeme c524510b66 Split off the Transmeta Crusoe Longrun code into its own file, that
way identcpu.c and machdep.c are not cluttered with foreign code.

The driver is built by default as before, but the sysctl subtree will
only be created if longrun is detected and not always as the old code
did. This matches what the FreeBSD code does.

Ok by christos@.
2008-02-26 18:24:28 +00:00
dsl 5546b33571 Set p->p_trace_enabled in fork and whenever the controlling falgs change
instead of doing it in syscall_intern().
Note that syscall_intern() must still be called when the flags change
since many ports use a different copy of the syscall entry code when
tracing is enabled.
2008-02-24 18:30:07 +00:00
sborrill 2463fb7b22 Only attempt to output up to MAXBANNER banner lines 2008-02-23 17:49:29 +00:00
ad bc9a63754d #define __HAVE_ATOMIC_AS_MEMBAR, indicating that:
- atomic_cas_ni() does an implicit membar_exit()
- all other atomic operations do an implicit membar_sync()

While this might seem kind of arbitrary it's the basis for some important
optimizations.
2008-02-21 16:31:13 +00:00
drochner bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
dyoung b993124acc Adapt the code for write-protecting the Interrupt Descriptor Table,
which wasn't such a good idea, to protect physical page 0, instead.
2008-02-18 06:26:42 +00:00
bouyer 2720c9d6a3 Install xenio.h and xenio3.h in /usr/include/xen, for the benefit
of xentools3.

XXX ignore those in Makefile.ioctl-c, they don't compile properly outside
of the Xen context and the ioctls from xenio.h conflicts with
soundcard.h
2008-02-17 16:23:12 +00:00
joerg 4d4af868ab Garbage collect the remaining parts of COMPAT_OLDBOOT. The boot loader
support has been removed at least 4 years ago and NetBSD 1.3 is ancient.
2008-02-12 18:22:39 +00:00
joerg 11cd27a036 Don't sleep for 0.5s before powering down the machine with ACPI. 2008-02-12 17:52:18 +00:00
mlelstv 7d949cc4cd Can't do math on void * 2008-02-11 13:51:35 +00:00
ad 7210c1fef8 Align cc_microtime and struct cpu_info to 64b. 2008-02-10 14:37:41 +00:00
jmmv 4c23a29a80 Add 'options MODULAR'. Does not seem to conflict with anything else
(aka ALL builds fine).
2008-02-09 19:34:58 +00:00
christos c7312b8578 The probe function hijacks 2 idt vectors and then restores them back. There
is no reason to permanently allocate idtvec[0x2d], which could be used
by compat_svr4 as the system call gate.
2008-02-08 18:10:40 +00:00
dsl c2a8c787c3 Remove the 'args' parameter to 'trace_exit()' it is no longer used.
Instead of passing the (un)real system call code and syscall table pointer,
just pass the number of arguments - which is what ktrace really wants.
Ride forthcoming 4.99.53
2008-02-06 22:12:39 +00:00
dsl adc04d4847 Load 'default keycode' into correct byte so that 'boot on timeout' works.
Fixes PR/37960.
While here save another byte.
2008-02-06 21:17:55 +00:00
yamt 065ed4f58b remove an unused label. (.Lin4_entry) 2008-02-05 10:02:51 +00:00
tnn 54554bfd6e Update comments. 2008-02-01 09:39:20 +00:00
sborrill 00eb6ae835 Add EPIA_HACK so that boot loaders work on EDEN 5000 processors.
This worked in NetBSD 3, but broke by NetBSD 4.

My offer of a development machine to fix this one and for all is still open!
2008-01-31 11:11:09 +00:00
ad 9cd350f0fb Crank maxusers to 64. 2008-01-30 19:58:19 +00:00
ad 10d0c9041f +UFS_EXTATTR 2008-01-30 14:24:11 +00:00
dsl 671c873837 Somehow this file won some extra tab characters, nuke them to align the code. 2008-01-25 21:40:58 +00:00
joerg 6e869e402d Refactor in_cksum/in4_cksum/in6_cksum implementations:
- All three functions are included in the kernel by default.
  They call a backend function cpu_in_cksum after possibly
  computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
  The default implementation is moderate fast on most platforms
  and provides a 32bit accumulator with 16bit addends for L32 platforms
  and a 64bit accumulator with 32bit addends for L64 platforms.
  It handles edge cases like very large mbuf chains (could happen with
  native IPv6 in the future) and provides a good base for new native
  implementations.
- Modify i386 and amd64 assembly to use the new interface.

This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
2008-01-25 21:12:10 +00:00
ad 501eb05cc2 - Prevent LOCKDEBUG from complaining if we do rw_tryenter() on a lock
that we already own.
- Add an assembly stub for rw_tryenter().
2008-01-25 19:02:31 +00:00
ad ac0f434359 Make sparse dumps the default. 2008-01-24 15:31:23 +00:00
joerg 84d9249277 Initialise the Local Vector Table of the primary LAPIC directly after
enabling it. Explicitly initialise LINT0 as ExtInt and LINT1 as NMI,
the platform default. Mask the NMIs on the application processors and
mask the ExtInt if a IOAPIC was found.

With this patch, "disable ioapic" is supposed to work and it will allow
enabling the local APIC on all systems that have one to gain e.g. the
better clock interrupt.
2008-01-23 20:02:15 +00:00
bouyer 98a8e8b486 Merge the bouyer-xeni386 branch. This brings in PAE support to NetBSD xeni386
(domU only). PAE support is enabled by 'options PAE', see the new XEN3PAE_DOMU
and INSTALL_XEN3PAE_DOMU kernel config files.

See the comments in arch/i386/include/{pte.h,pmap.h} to see how it works.
In short, we still handle it as a 2-level MMU, with the second level page
directory being 4 pages in size. pmap switching is done by switching the
L2 pages in the L3 entries, instead of loading %cr3. This is almost required
by Xen, which handle the last L2 page (the one mapping 0xc0000000 - 0xffffffff)
in a very special way. But this approach should also work for native PAE
support if ever supported (in fact, the pmap should almost suport native
PAE, what's missing is bootstrap code in locore.S).
2008-01-23 19:46:43 +00:00
jmcneill 157e8edd73 Add XBOX specific device drivers and options. 2008-01-23 00:12:03 +00:00
ichiro a7889b7caa enable 'uhmodem' 2008-01-21 22:12:00 +00:00
skrll b68a5cfc55 Slightly better version of dumpsys from ad via simonb. 2008-01-21 08:22:42 +00:00
dyoung 42bde7e9fa Attach two new devices to the AMD Elan SC520 System Controller,
elansc(4).

elanpex(4) is for PCI exception reporting.  I've already found some
kernel bugs by reading the exceptions reported.  Beware that it
will spam the console a lot while the kernel and pcictl(8) probe
non-existing addresses in PCI configuration space.

elanpar(4) protects the kernel text from writes by the CPU and by
PCI bus masters.  As you might guess, this is not compatible with
setting breakpoints using a debugger; detach the device using
'drvctl -d elanpar0' before you try to set breakpoints.  In the
future, I hope to extend elanpar(4) to provide general-purpose RAM
write-protection.
2008-01-21 08:04:51 +00:00
dyoung 9cfd7f5c79 Move the nmi_dispatch() call with respect to the #ifdef garbage so
that Xen kernels will compile again.
2008-01-21 07:38:22 +00:00
dyoung 97fd3f919c Add primitive routines to establish NMI handlers on i386.
TBD: synchronize (dis)establishment of handlers.
2008-01-21 02:56:13 +00:00
dyoung f21e6a3c1a Do not reserve ISA bus space for npx@isa unless we hook IRQ 13,
which we ought to never do.  If we have not hooked IRQ 13, we do
not need any resources in npx_softc to handle numeric coprocessor
exceptions, so let npx@isa detach.
2008-01-20 21:49:57 +00:00
bouyer 3d0b4af882 Make first argument of Xen's pmap_pte_cas() volatile, fix a warning
building pmap.c.
2008-01-20 18:41:47 +00:00
joerg 3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00
yamt ecf338e548 - rewrite P->V tracking.
- use a hash rather than SPLAY trees.
	  SPLAY tree is a wrong algorithm to use here.
	  will be revisited if it slows down anything other than
	  micro-benchmarks.
	- optimize the single mapping case (it's a common case) by
	  embedding an entry into mdpage.
	- don't keep a pmap pointer as it can be obtained from ptp.
	  (discussed on port-i386 some years ago.)
	  ideally, a single paddr_t should be enough to describe a pte.
	  but it needs some more thoughts as it can increase computational
	  costs.
- pmap_enter: simplify and fix races with pmap_sync_pv.
- don't bother to lock pm_obj[i] where i > 0, unless DIAGNOSTIC.
- kill mp_link to save space.
- add many KASSERTs.
2008-01-20 13:43:37 +00:00
skrll fb6e9dca10 Do the dumpsys/dodumpsys thing on i386...
dumpsys() now mimics cpu_switchto() (pushes a switchframe onto the stack)
for postmortem debugging.

From simonb.
2008-01-20 12:43:00 +00:00
dsl 3305a48bee Add two new versions of the mbr code that directly access a serial port.
'mbr_com0' assumes the BIOS has initialised the baud rate (etc)
'mbr_com0_9600' initialises the rate to 9600
Both have the functionality from 'mbr_ext' (ie they can boot from an
  extended partition).
As compiled, the io_address for the serial port is taken from BIOS data.
(this should keep tls@ happy!)
2008-01-19 21:01:34 +00:00
ad 718e62e993 Noisy printfs. 2008-01-18 16:28:58 +00:00
ad f5990f1bbb breakpoint: set up a stackframe so gdb doesn't get lost. 2008-01-17 15:01:05 +00:00
lukem 14c9fc8ffa Remove unnecessary references to config_time.h. 2008-01-17 01:56:02 +00:00
ad dfe83e08ca Remove options MATH_EMULATE. 2008-01-16 09:37:04 +00:00
dyoung 609d13b264 Create tags for mca, too. 2008-01-15 22:26:02 +00:00
ad da388edb64 Make it compile. 2008-01-15 18:46:23 +00:00
ad d7ea82e9f0 Fix i486 support which has been broken for the last 9 months. 2008-01-15 16:11:29 +00:00
joerg 0c3d816871 Introduce optional cpu_offline_md to execute MD actions at the end of
cpu_offline. Use this on amd64/i386 to force a FPU save. As this was
triggered by npxsave_cpu/fpusave_cpu not working for a different CPU,
remove the cpu_info argument and adjust npxsave_*/fpusave_* to use bool
for the save.

OK ad@
2008-01-15 14:50:07 +00:00