Commit Graph

197 Commits

Author SHA1 Message Date
sekiya d91bd456e7 pci_device_foreach(), pci_device_foreach_min(), pci_bridge_foreach(), and
pci_bridge_hook don't actually have any dependancies on PCIBIOS-specific code,
and they can be used to fixup PCI bus numbering in the absence of the BIOS.

To that end, decouple them from PCIBIOS.
2005-06-20 11:04:15 +00:00
dyoung a37289db57 Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.

To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/.  That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such.  I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
2005-06-12 19:46:15 +00:00
blymn 646a1d4749 Fix a couple of sloppy casts
Convert u_int to uint
2005-06-01 13:11:47 +00:00
christos e73f21e6cb Sprinkle const. 2005-05-29 21:37:02 +00:00
christos 2056c915d2 avoid variable shadowing. 2005-05-29 21:34:23 +00:00
fvdl 631e44f47d Move linux_trap.c from sys/arch/i386/i386 to sys/arch/x86/x86, and share
it. Remove the amd64 linux_trap.c (which was just a stub with a printf
anyway).
2005-05-15 22:20:23 +00:00
augustss 32b8953874 Print a warning if no console keyboard was found in consinit(). 2005-05-06 14:03:55 +00:00
augustss 6c154e88fd Move declaration of error variable to avoid 'unused' warning. 2005-05-06 00:10:00 +00:00
kochi 42773dd406 Merge changes for ACPI-CA 20050408. 2005-05-02 14:54:46 +00:00
augustss af3503e371 Attach a USB keyboard as console keyboard if pckbc_cnattach() failed or
if there is no pckbc configured.  Previously only the latter cuased the
USB keyboard to be used.
This should make it more likely to get the USB keyboard as the console
on legacy free machines using the GENERIC config file.
2005-04-29 20:11:01 +00:00
yamt 1d12c53188 add files which i forgot to add with arch/x86/x86/bus_dma.c rev.1.21. 2005-04-16 08:53:09 +00:00
yamt fb4a1ff192 tweak x86 bus_dma code so that it can be used by xen port.
- distinguish paddr_t and bus_addr_t.
  for xen, use bus_addr_t in the sense of machine address.
- move _X86_BUS_DMA_PRIVATE part of bus.h into bus_private.h.
- remove special handling of xen_shm.  we can always grab
  machine address from pte.
2005-04-16 07:53:35 +00:00
yamt f141fad5f8 make multi inclusion protection macros consistent. 2005-04-16 07:45:59 +00:00
kleink b2cb7fcd8a Push back the descriptions of NaN formats, and descriptions of the
distinction between signalling NaNs and quiet NaNs back into the
machine-dependent headers; treat the implementation of __nanf in the
same spirit.

IEEE 754 leaves the distinction between signalling NaNs and quiet NANs
to the implementation, and unlike our headers used to suggest they're
not identical in the interpretation of the fraction's MSb; in due
course, make those of hppa, mips, sh3, and sh5 reflect reality.
2005-04-15 22:39:10 +00:00
yamt 6b2d8b66a4 merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
2005-04-01 11:59:21 +00:00
matt a6db24a485 Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create).  dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
2005-03-09 19:04:43 +00:00
he ca40af413b Probe and print the Intel Extended Feature Bits, as documented
in the CPUID instruction description in the "Intel Extended Memory 64
Technology Software Developer's Guide, Volume 1 of 2" available at
ftp://download.intel.com/technology/64bitextensions/30083402.pdf

This presently consists of the SYSCALL/SYSRET and the EM64T features.
CPUs with the EM64T feature available should be able to run amd64 code.

Reviewed by fvdl
2005-02-21 15:10:51 +00:00
jdolecek d58eded060 g/c obsolete comment for _bus_dmamap_load_buffer() 2005-02-19 21:40:21 +00:00
drochner 342b8a4cf8 Recognize an obscure cpu feature flag bit "xTPR"
which indicates that Task Priority Messages might
be disabled. Not relevant for the kernel for now
(related to interrupt distribution on the APIC bus
afaict), but present on one of my boxes.
Being here, also recognise the future "Vanderpool"
extension.
2005-02-10 20:52:52 +00:00
fvdl 6bdba8ddcd The bootinfo_wedge structure must be packed, or the 32bit alignments
used by the bootloader don't match the amd64 kernel.
2005-02-04 22:03:53 +00:00
fvdl 4880e83638 If there are no ioapics, don't bother to put things in ioapic mode.
However, always do this otherwise, regardless of the revision.
Remove incorrect comment.
2005-01-13 23:40:01 +00:00
fvdl ae8c299425 * Wrap IPI sending in splclock(), since an interrupt at IPL_CLOCK or lower
may cause IPIs.
* Make broadcast IPIs go through x86_ipi() as well, so that they wait for
  the APIC to be ready too.

From Stephan Uphoff.
2005-01-13 00:08:22 +00:00
fvdl a5e7e03043 Use fixed mode, not lopri, for delivering IO interrupts. Suggested by
Peter O'Kane. Fixes interrupt problems on some Xeon systems.
2004-12-21 11:33:04 +00:00
nathanw bb630a5378 Add PSL_T to PSL_USER; it's fine for a program to want to trap itself. 2004-11-30 22:41:57 +00:00
ws 739e2052fd We just checked that the parent is the root, not current.
So we better determine the bus number of this parent node.
Now, MPACPI on my Opteron board finally correctly determines its
PCI/AGP busses even without the help of the AMD64 Address Map
support implemented in my local tree.
2004-11-29 00:07:22 +00:00
yamt e558aadcb2 remove __lockbarrier, which i forgot to remove in the previous. 2004-11-25 04:50:48 +00:00
yamt 6e71418936 use __insn_barrier rather than homegrown equivalents. 2004-10-31 10:39:34 +00:00
xtraeme 0ef90c1bfc Fix typo: labe -> label. 2004-10-26 01:09:25 +00:00
yamt c0ebe301d7 don't reference kernel_lock directly. 2004-10-23 21:27:33 +00:00
yamt d82d2638a7 __cpu_simple_lock: loop without locking cache or asserting LOCK#. 2004-10-23 21:25:22 +00:00
yamt fa29ea9740 to determine if an interrupt needs to grab the kernel lock or not,
check interrupt's own ipl rather than cpu's current ipl.
2004-10-23 21:24:05 +00:00
thorpej f9403749b7 Use the new BTINFO_BOOTWEDGE bootinfo to discover the booted disk and
wedge.
2004-10-23 17:20:59 +00:00
thorpej 0798da74ba Add support for passing booted wedge information to the kernel. 2004-10-23 17:20:04 +00:00
thorpej 42b8fac3b8 Move boot device detection code from i386 and amd64 ports to x86_autoconf.c.
Rename i386_alldisks and x86_64_alldisks to x86_alldisks, adjust other
references to compensate.
2004-10-20 04:20:05 +00:00
drochner 46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
fvdl e8af4bc978 Keep ioapic in the correct order in the global linked list that stores
them. Fixes cases where the ACPI SCI int has to be guessed, because there
are multiple ioapics in the system.
2004-08-23 17:24:23 +00:00
wennmach 1b35cf3d9a o Split copyright into mycroft and UCB parts
o remove advertising clause from UCB part
2004-08-20 14:12:52 +00:00
briggs 4634c8ef35 Get correct cache information for earlier VIA C3 models.
Mostly from PR kern/26689 submitted by Michael van Elst.
2004-08-17 15:27:46 +00:00
briggs bd2376263b VIA C3 cache info. 2004-08-08 05:16:16 +00:00
drochner a5a5473c25 remove now unnecessary "pci_enumerate_bus" definitions 2004-07-29 16:55:25 +00:00
mycroft a8f51b14b9 b -> B 2004-07-04 00:21:55 +00:00
mycroft f98a477f22 Ahem. Parts of this are *clearly* derived from the old i386/isa/intr.c, so
put back the copyright from there.
2004-07-02 16:05:57 +00:00
yamt 38cdafcad1 {i8254,lapic}_initclocks: try to be more precise using fixtick. 2004-07-01 13:00:39 +00:00
kochi d23b9803c9 fix a duplicate member in designated initializers, which was a bug
introduced in rev 1.5.
pointed out by Andreas Gustafsson.
2004-06-30 14:46:07 +00:00
fvdl 029ca90566 Updaing ci_ilevel and testing ci_ipending must be done with all interrupts
off, or priority inversion can occur, which can lead to IPI deadlocks.
Leaves interrupts off for a bit longer, sadly, but with no noticeable
effects on the systems I tested on.

From YAMAMOTO Takashi.
2004-06-28 09:13:11 +00:00
thorpej 67e828e7d8 Remove the "ID" component of the x86 bus_dma flags, since these are no
longer "ISA DMA" specific flags.
2004-06-20 18:04:08 +00:00
yamt ff7fa9e50e remove XXX comments which are no longer true. 2004-06-12 17:22:04 +00:00
yamt 941f338d94 ANSIfy. 2004-06-12 17:18:13 +00:00
yamt 4af17d9901 simplify x86 bus_dma implementation.
(rather than passing &lastaddr and &seg around,
use and update bus_dmamap_t directly.)
2004-06-12 17:16:44 +00:00
yamt e25482312e - introduce _bus_dmamap_load_paddr, which takes (paddr, size) and
add the range to the map, and use it for _bus_dmamap_load_{buffer,mbuf}.
- _bus_dmamap_load_mbuf: in the case of M_EXT_PAGES, deal with vm_pages
  directly rather than doing pmap_extract on given kva.

as a side effect, do a segment coalescing and boundary checks for mbufs.

ok'ed by Frank van der Linden and Jason Thorpe on tech-kern@.
2004-06-12 17:14:55 +00:00