Commit Graph

14 Commits

Author SHA1 Message Date
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +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 c08a75d828 Correct a few maximum values. 2003-05-25 19:29:35 +00:00
fvdl 59f5ef76ed ACPI support. Wakeup code still to be done. 2003-05-11 21:39:00 +00:00
fvdl 31024872ed Reselect the ioapic register for each read or write. 2003-05-11 15:46:57 +00:00
thorpej 2a90e2a9c9 Remove redundant bounds_check_with_label() prototype. 2003-05-10 16:12:02 +00:00
fvdl 9ad6da9936 Move x86_pause() out of ifdef _KERNEL. 2003-05-08 10:27:43 +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 9756b6a911 Follow i386, and mask deferred level-triggered interrupts at the ioapic. 2003-05-04 23:46:41 +00:00
yamt 4b800ec987 set symbol to be a function using .type directive in IDTVEC macro
so that ddb backtrace can pick them up after recent ksyms changes.

suggested by Matt Thomas on tech-kern.
ok'ed by Frank van der Linden.
2003-05-02 18:05:46 +00:00
scw 8c5c893bf7 Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
2003-04-29 17:06:03 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
fvdl a4d65735ea Fix *LONGMAX values. 2003-04-27 22:33:49 +00:00
fvdl 81918bf8b4 Rename the x86_64 port to amd64, as this is the actual name used for
the processor family now. x86_64 is kept as the MACHINE_ARCH value,
since it's already widely used (by e.g. the toolchain, etc), and
by other operating systems.
2003-04-26 18:39:25 +00:00