Commit Graph

336 Commits

Author SHA1 Message Date
yamt
a36286ca6a multiple inclusion protection. 2007-03-06 12:32:46 +00:00
drochner
d880082522 clean up how cpus and ioapics are attached at the mainbus:
Seperate "cpubus" and "ioapicbus" -- while they share a common "address
space" (the apic id), the kernel doesn't use this fact. There are different
data passed to cpus and apics, which caused some ugly polymorphism. This
also saves the special "submatch" functions needed to distingush cpus
and ioapics for autoconf. (And it makes that "apid" locators wired
in the kernel configuration are honored now; this allows one to dumb down
an mp box to singleprocessor by userconfig.)
Print "apid" locators in the buses "print" function "as everyone does",
so the per-port cpu drivers don't need to do it.
Being here, constify "struct cpu_functions" and g/c the unused MP_PICMODE
flag.
2007-03-05 16:50:59 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
yamt
71380e5a2f check_pa_acc: don't bother to use KAUTH_MACHDEP_UNMANAGEDMEM
if the address is known.
no functional changes, unless listeners do some kind of logging.
2007-03-01 11:49:26 +00:00
matt
2d58947dff Add missing initializer for _tag_needs_count 2007-02-22 04:58:26 +00:00
thorpej
712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
mrg
4410329b87 add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
				  bus_addr_t min_addr,
				  bus_addr_t max_addr,
				  bus_dma_tag_t *newtag,
				  int flags)
	void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to.  this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
2007-02-21 20:41:23 +00:00
daniel
c339e55881 Add an opencrypto provider for the AES xcrypt instructions found on VIA
C5P and later cores (also known as 'ACE', which is part of the VIA PadLock
security engine). Ported from OpenBSD.

Reviewed on tech-crypto and port-i386, no objections to commiting this.
2007-02-17 00:28:23 +00:00
ad
3363855a4a Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
2007-02-16 02:53:43 +00:00
ad
087fdb9080 Count the number of CPUs at boot and stash in 'ncpu'. Eventually should
have each CPU register at attach, so we can figure out the topology for
the scheduler.
2007-02-15 20:32:47 +00:00
ad
c2c74a2fbe Don't establish an interrupt handler at IPL_VM, use IPL_TTY instead. 2007-02-15 18:18:21 +00:00
ad
9abeea588a Replace some uses of lockmgr() / simplelocks. 2007-02-15 15:40:50 +00:00
ad
5df226f2ad NSPR builds seem to choke on 'inline'. Replace it with __inline. 2007-02-10 16:19:39 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
jmcneill
d6775f8b6c On Xbox, disallow pci_conf_read/pci_conf_write calls for bus 0 device 0
functions 1 and 2.
2007-02-06 03:13:37 +00:00
ad
fb574ffdbf The TLB flush filter workaround causes TLB shootdown storms on our build
machines. Disable it for now until that problem is solved.
2007-02-05 21:05:45 +00:00
christos
b5b1a9d57c Merge the int bit with the high fraction bit. Add constants/macros
needed by gdtoa.
2007-02-02 23:07:44 +00:00
rpaulo
f8716dbbb5 Don't panic with "lazy bum". I have a machine that can boot multiuser
and run on SMP with this panic commented out.
No replies on tech-kern about this.
2007-01-26 12:44:50 +00:00
hubertf
142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00
christos
ae8983cebf PR/35430: Izumi Tsutsui: Identify amd64 CPU on NetBSD/i386 2007-01-16 15:43:44 +00:00
ad
d0a255a895 On second thought, implement x86_pause() as a regular function. The small
delay from the call is useful for spinlock backoff.
2007-01-14 14:03:00 +00:00
ad
c1e9dad747 x86_errata: correct the definition of MSR_HWCR and re-enable. Problem
noted and debugged by Murray Armfield (murray at river-styx.org).
2007-01-11 17:24:30 +00:00
jmcneill
afcfbdad8b On the Xbox, prevent scanning past the first device on bus 1. 2007-01-05 17:53:53 +00:00
jmcneill
e619988ed2 Allow xboxfb to attach and initialize the display early in the boot process. 2007-01-05 04:13:09 +00:00
jmcneill
fa9fc940ce xboxfb is a possible candidate for the console screen, from Andrew Gillham 2007-01-05 02:39:50 +00:00
ad
8ca9bfb9b5 - Don't print any specifics unless booted with -d.
- Disable for now, at least one model of CPU throws a GPF.
2007-01-02 16:57:54 +00:00
ad
e3603e4e86 Cut size of tables slighty. 2007-01-01 21:03:26 +00:00
ad
75b6baf536 Oops, issue a warning only once. 2007-01-01 21:00:13 +00:00
ad
fb7fd24980 Report on and where possible, try to work around some of the known errata
for Athlon 64 and Opteron processors. Tested briefly by cube@ and elad@.
2007-01-01 20:56:58 +00:00
ad
e96fca7884 Define ipl_t as uint8_t so that it can be packed into a word with a lock
byte. Ok yamt@.
2006-12-26 15:22:44 +00:00
elad
504c71d9fe Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
2006-12-26 10:43:43 +00:00
yamt
8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
christos
03f66b5764 Moved from i386/pci/agp_machdep.c; from Blair Sadewitz 2006-12-18 12:11:33 +00:00
ad
f48eb2511b __cpu_simple_unlock(): add a note about memory ordering and why this is
correct, contrary to Intel's documentation.
2006-12-18 07:34:42 +00:00
yamt
98cfc473c8 - pass intrframe by-pointer, not by-value.
- make i386 and xen use per-cpu interrupt stack.

xen part is reviewed by Manuel Bouyer.
2006-12-08 15:05:18 +00:00
elad
4b316db1d1 Introduce KAUTH_REQ_MACHDEP_{ALPHA,X86}_UNMANAGEDMEM to handle access
to unmanaged memory.

These are the last two securelevel references in the MD code.
2006-11-22 12:12:51 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
eeedf4b2c2 convert variable allocation to constant. 2006-11-10 18:15:12 +00:00
elad
eddfaaf54c Move i386/amd64 common code (check_pa_acc()) to x86.
I didn't know what header to put the prototype in, so it's both in
i386/mem.c and amd64/mem.c; probably can be moved later.

Tested on amd64, assumed working on i386. :)

yamt@ okay
2006-10-30 00:41:26 +00:00
hannken
a92696acd1 More __unused (NPCPPI == 0 case). 2006-10-13 10:09:36 +00:00
dogcow
64d163c11c de-__Pify, ANSIfy, and add __unused where necessary. 2006-10-12 19:28:47 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
cube
886e1e7f71 Fix thinko about CPUID(0x80000000). 2006-10-08 15:51:30 +00:00
dogcow
1d235c3fdc add initializers so gcc stops whining. 2006-10-06 03:52:53 +00:00
yamt
199c49bccb handle_wedges: fix a typo. (NOCREAD -> NOCRED) 2006-10-06 02:29:08 +00:00
martin
fab4ae4892 I can not test this right now, but the equivalent change was needed on
sparc64 to make root on raid shutdown cleanly: after using opendisk()
and querying wedges, we need to VOP_CLOSE() the resulting vnode.
2006-10-05 22:43:35 +00:00
cube
c72f004e7c Rework the way PowerNow! and Cool'n'Quiet features are detected and
displayed, to make the code much simpler and easier to follow.  Also, use
bitmask_printf() to make output consistent with other stuff.  Use
CPUID2FAMILY() where appropriate.
2006-10-04 13:18:10 +00:00
bouyer
020e3d1ae1 Add ipmi(4) driver, from OpenBSD. This requires SMBios support, so add
SMBios detection and mapping to bios32.c, also from OpenBSD (for now this
is only compiled in if ipmi(4) is configured). The sensors and watchdog are
accessible though envsys(4).
Works on i386; some work is needed on amd64 to access the BIOS. It would
eventually work on Xen if the SMBios is accessible (to be tested).
2006-10-01 18:37:54 +00:00
martin
ebaf1420c5 If using NLAPIC, we better include lapic.h. Pointed out by Kurt Schreiner
on current-users.
2006-09-29 11:18:44 +00:00
bouyer
e2d271e26c - make it possible to have ACPI without IOAPIC and/or LAPIC
- make it possible for machine-specific code to provide custom R/W routines
  in its i82093*.h headers
- always initialize sc->sc_pins[pin], even in the !ioapic_cold case.
No objections on port-i386 and port-amd64.
2006-09-28 18:01:24 +00:00