Commit Graph

57 Commits

Author SHA1 Message Date
yamt cc5720dc40 unexport following x86 bus_dma internal functions.
_bus_dma_alloc_bouncebuf
        _bus_dma_free_bouncebuf
        _bus_dmamap_load_buffer
2004-06-05 07:31:31 +00:00
joda c80da893ae the EST and TM2 flags in the second cpuid register were swapped
(according AP-485); while here add a few more flags
2004-05-17 15:38:17 +00:00
drochner cf8b697c65 remove license clauses 3 and 4 from my cpoyright notices 2004-03-24 17:06:57 +00:00
dbj 1ea0a01420 fix comment about spllowersoftclock 2004-03-04 19:10:10 +00:00
drochner fdeec1f029 define AMD64's CPUID_NOX bit (I'm curious where Intel puts this bit in the
ia32 extension just announced)
XXX there should be a better separation between generic and vendor
specific feature flags
2004-02-19 17:09:39 +00:00
soren 535d4588f0 Add Pentium M MSR definitions from Michael Eriksson. 2004-02-02 08:28:00 +00:00
yamt d113fe51e0 spllower: lower spl before checking pending interrupts.
otherwise, interrupts happened immediately after the check might be left
pending for a while. (until the next tick in the worse case.)
2004-01-14 11:41:27 +00:00
yamt 7246e2cc80 issue memory read barrier for BUS_DMASYNC_POSTREAD operation.
PR/21665 from Stephan Uphoff.
2004-01-14 11:31: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
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
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 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
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 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
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
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
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 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 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
lukem 457546793c change multiple include protection #define to match filename 2003-07-19 04:52:18 +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
fvdl 7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
fvdl afff857edc Add the options MPBIOS_SCANPCI and MPACPI_SCANPCI to configure PCI roots
with the MPBIOS/ACPI bus information, by walking through the buses, and
descending down every bus that hasn't been marked configured yet.
2003-05-29 20:22:28 +00:00
kleink 776138ea69 Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc's
convention for these.
2003-05-12 15:22:53 +00:00
fvdl 28644fa06f Make this include file shareable (moved here from sys/arch/i386/include) 2003-05-11 18:48:13 +00:00
fvdl def0e7acaa Moved here from sys/arch/i386/include. 2003-05-11 18:20:38 +00:00
fvdl f42f32cacc Add a global_int field to the mp_intr_map structure, for use with ACPI.
XXX should probably just use an array directly indexed by global interrupt
numbers in that case.
2003-05-11 00:05:52 +00:00
fvdl d88cf589cb A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.
2003-05-09 23:51:25 +00:00
fvdl 8aca0c88d2 Add x86_pause() inline function, containing the "pause" instruction
for i386, and nothing for amd64. Sprinkle it in various spinloops,
as recommended by Intel.
2003-05-08 01:04:34 +00:00
fvdl 799347472e Generalize bounce buffers, and use them for 32 bit PCI if needed.
Make ALLOCNOW the default iff bouncing might be needed (this has
no effect on i386 because ISA DMA devices already had to use
ALLOCNOW, and PCI isn't bounced (yet), since we don't do > 4G
at this point for i386.
2003-05-07 21:33:57 +00:00
fvdl 2cd70f0da1 Block level-triggered interrupts at the ioapic if they are deferred.
Avoids interrupt storms seen on some systems. Many thanks to
Stoned Elipot for testing.
2003-05-04 22:01:56 +00:00
fvdl df51b177d8 Install cacheinfo.h 2003-04-26 10:49:54 +00:00
fvdl 4b293b5851 Share some common cache info cpuid code between i386 and x86_64. 2003-04-25 21:54:29 +00:00
christos f1726c271b Override LDBL_MIN 2003-04-21 00:08:24 +00:00
christos a2dfb1b570 PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
2003-04-19 23:05:28 +00:00
dsl ab1f41a716 Add definitions (#defined out) to pass the result of the v3.x bios
extended disk information request to the kernel.
Binary compatible with the existing code, disabled because I don't
have a system with a bios that supports the request.
2003-04-16 19:16:42 +00:00
thorpej ffc984aa7c Use PAGE_SIZE rather than NBPG. 2003-04-02 07:53:56 +00:00
fvdl 91ef1f21bf Make the apic address unsigned, as it should be. 2003-03-04 23:27:32 +00:00
fvdl e575c4bc69 Fix some fields that did not have explicit types yet. 2003-03-04 23:20:29 +00:00