Commit Graph

110 Commits

Author SHA1 Message Date
fvdl
6cdccae32c Remove leftover debugging printf. 2003-11-13 23:00:54 +00:00
fvdl
1eb5f3a2f2 intr_find_pcibridge returns 0 or error, not < 0. 2003-11-06 23:04:03 +00:00
jdolecek
467746e275 avoid strong words; use 'screw' instead 2003-11-01 17:00:49 +00:00
fvdl
ab3d5bdcea Catch up with the new acpica code. 2003-10-31 20:56:55 +00:00
fvdl
7d342b5852 * keep track of PCI buses that aren't known by firmware, but are found
by NetBSD
* use this info in in intr_find_mpmapping
* get rid of the last argument to intr_find_mpmapping, it was redundant
2003-10-30 21:19:54 +00:00
mycroft
e24c0c7dfc Move a panic() to a different location, and eliminate a bogus initializer. 2003-10-29 03:40:56 +00:00
mycroft
f6f24ead9c In _bus_dma_uiomove():
* Don't punt after the first iov in the UIO_SYSSPACE case.  Not that this ever
  happens in practice right now.
* If we get through the loop, error==0 by definition, so just return 0.
* Eliminate bogus initializer.
2003-10-28 22:49:51 +00:00
kleink
91af1eaa96 #define __HAVE_LONG_DOUBLE on platforms which implement a distinct
`long double' type.
2003-10-28 00:55:28 +00:00
junyoung
8f1ba94956 Nuke __P(). 2003-10-27 13:43:48 +00:00
lukem
b81744894f appease gcc's uninitialised variable detection 2003-10-27 03:51:35 +00:00
kleink
964d6747b5 Err, rename some members added in previous to make them reflect their
semantics better.
2003-10-27 01:11:46 +00:00
kleink
b37192f049 For convenient use in libc, add unions of the C floating types and their
corresponding structure definitions.
2003-10-26 21:46:46 +00:00
kleink
95971b8759 Correct the position of the QUIETNAN bit. 2003-10-26 20:59:51 +00:00
kleink
a3fabb9e7f Use <sys/ieee754.h> where applicable. 2003-10-26 20:55:30 +00:00
yamt
bc075cd173 use ffs() rather than handcrafted one for ipi bit search. 2003-10-26 11:30:42 +00:00
yamt
9be92e2eef issue PAUSE in the debug version of __cpu_simple_lock as well. 2003-10-26 11:28:21 +00:00
yamt
ab51be8e72 define SPINLOCK_SPIN_HOOK to let LK_SPIN lockmgr locks call x86_pause. 2003-10-26 11:15:16 +00:00
kleink
a1fdc1db7a Reflect the explicit integer bit here as well. 2003-10-25 21:31:25 +00:00
christos
e5d9888ff1 Fix uninitialized variable warning 2003-10-25 18:39:40 +00:00
kleink
56062be225 Make ieee_ext match reality, and add a note about its ABI-specific
tail padding.
2003-10-23 23:28:29 +00:00
kleink
422697679e * Move the definitions for types other than single-precision and double-
precision back to machine-dependent headers.  C99 has no strict
  requirement which, if any, extended-precision type `long double' must
  match, and even between 80-bit formats there are differences in
  implementation (m68k vs. x86).
* On arm, consider __VFP_FP__.
2003-10-23 23:26:06 +00:00
kleink
5d1a2f48d2 Use a common <machine/math.h> for amd64 and i386. 2003-10-22 11:54:23 +00:00
fvdl
eee926f0a9 Only declare intr_scan_bus if NIOAPIC > 0. 2003-10-22 01:53:49 +00:00
fvdl
e74e8c0c71 Correctly walk up the PCI bus tree to find an interrupt match with
a swizzled pin.
2003-10-21 23:25:48 +00:00
fvdl
80cec054e5 If a bus has not been configured by MPBIOS/ACPI, and the attach hook
for it is called, mark it as configured.
2003-10-21 23:22:52 +00:00
fvdl
6a6db3cbd9 Add hooks and structures to allow the MP table intr mapping code a
better shot at finding a mapping. For PCI interrupts, if a bus
has no mappings, try its parent, with the swizzled pin, and the
bridge's device number.
2003-10-16 22:56:29 +00:00
tron
676596e33a Fix build problem when MPACPI is used without ioapic as proposed by
Quentin Garnier on current-users@NetBSD.org.
2003-10-10 20:16:54 +00:00
fvdl
0a79ef3086 Allow probing of CPUs only by ACPI, so that MPBIOS can still do interrupt
mapping should ACPI have a quirk. From Christos. One change by me: make
sure that lapic_boot_init doesn't get called twice, otherwise the
cpu_info entry for the CPU with id 0 gets zapped.
2003-10-09 16:25:16 +00:00
bouyer
83af294c93 pciide_machdep.c depends on pciide_common, not pciide.
Pointed out and fix tested by Marc Recht.
2003-10-08 17:29:59 +00:00
lukem
1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
fvdl
a7a118bf66 Backout previous for now, it breaks second CPU spinup. It'll be back later. 2003-10-07 21:47:57 +00:00
fvdl
9771ccbb32 Changes from Christos to fall back to MPBIOS for interrupt probing
if MPACPI fails, so that MPACPI can be used to only probe CPUs
if needed.
2003-10-07 18:10:36 +00:00
nathanw
4d59420344 Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.h
so that they can be used in a namespace-friendly way.
2003-09-26 22:45:41 +00:00
skd
3736d609a5 Fix for ioapic irq routing. This fixes kern/22728.
Approved by fvdl.
2003-09-18 19:31:19 +00:00
fvdl
5a759ef06c Move the bulk of pci_intr_string into a seperate intr_string function. Use
that new function to print the pciide compat interrupt in pciide_machdep.c.
Share pciide_machdep.c between amd64 and i386.
2003-09-06 17:44:36 +00:00
fvdl
40b81ea5a1 If possible, put the device name of the APIC used into the interrupt string,
not "apic N". This makes it easier to match vmstat output with dmesg output.
2003-09-06 14:55:50 +00:00
fvdl
631d339e09 When establishing the ACPI SCI, make sure it's always active low (as well
as level-triggered). Do this by changing the MP config entry that was
set up for the interrupt. Do not change anything if there was an ACPI
interrupt source override, assume that this contains the correct
information already.
2003-09-06 14:38:41 +00:00
fvdl
ce2fedd6fb Compile in the !MPACPI && NIOAPIC case. 2003-09-02 20:10:30 +00:00
itojun
ffb2df7cd0 variable 'sc' needed in MPACPI case (what should we do about NIOAPIC?) 2003-08-27 11:38:54 +00:00
fvdl
c43b35423e Pass pointers to frames from assembly, do not use the 'frame on stack
as argument passed by value' trick, as gcc 3.3.x makes (valid) assumptions
about the stack that will not be true. Costs 2 instructions per trap/syscall
on i386, 4 per interrupt for MP. One instruction per trap/syscall on amd64,
2 per interrupt for MP. I expect gcc 3.3.1 to make up for this by better
optimization (it'd better..)

While here, make amd64 compile again by using subr_mbr_disk.c
2003-08-20 21:48:35 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
mrg
5d4f9678cd give >32 bit constants an "LL" prefix to appease gcc3.3 2003-07-28 10:29:00 +00:00
simonb
ea8d25e941 Use local APIC id to determine boot CPU.
Fixes PR kern/20690 from Jaromir Dolecek.  Fix from fvdl.
2003-07-22 12:10:20 +00:00
lukem
457546793c change multiple include protection #define to match filename 2003-07-19 04:52:18 +00:00
lukem
52c38f7f74 add __KERNEL_RCSID() 2003-07-14 22:32:39 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
martin
864f19482a #ifdef _KERNEL_OPT police 2003-06-23 14:59:21 +00:00
martin
d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
thorpej
452a8fdae2 Rename IPL_IMP -> IPL_VM. 2003-06-16 20:00:56 +00:00