Commit Graph

316 Commits

Author SHA1 Message Date
thorpej 96ea5b9ac4 Rename clock_rtc_config() to todr_attach(). 2003-07-18 21:41:22 +00:00
thorpej 91b8f572a8 Move the prototype of clock_rtc_config() into <dev/clock_subr.h>. 2003-07-18 19:20:55 +00:00
lukem ed51729135 __KERNEL_RCSID() 2003-07-15 02:54:31 +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 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
scw 31a6b2aa80 Mask off the lowest two bits of the disassembly start address. This avoids
misaligned references caused by the SHmedia bit.
2003-05-17 09:31:33 +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
thorpej 36da248c07 Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
2003-05-10 21:10:23 +00:00
thorpej b77900c3c2 Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM.  Machine-dependent code is
responsible for initializing them before main() is called.  Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
2003-05-08 18:13:12 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
scw 44d097926f Delete an obsolete comment; ddb(9) is very definately functional on SH5. 2003-04-29 17:07:56 +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
ragge 766d04f56a Add ksyms device major. 2003-04-25 21:10:46 +00:00
scw 9143cf9a96 If the RTC time is > 50 days out, don't use it at all, on the assumption
that there is no battery backup (as is the case on the Cayman).
2003-04-20 21:26:46 +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
scw 63deb1bd73 Cast __greg_t to/from caddr_t via intptr_t. 2003-04-18 21:07:35 +00:00
scw 9957a9bbe4 Now that UBC no longer creates writable virtual aliases (for PMAP_VIVT),
we no longer need to track mappings added by pmap_kenter_pa() for the
purpose of cache-alias detection.
2003-04-18 20:02:34 +00:00
scw f97e7c222f Need to bump uvmexp.intrs when taking a h/w interrupt. 2003-04-18 19:57:11 +00:00
nathanw ff28c51cc0 Make cpu_getmcontext() run the PC through ras_lookup() so that kernel
getcontext() plus userlevel setcontext() (as used in libpthread) respects
the atomicity of RAS regions.
2003-04-11 22:02:28 +00:00
thorpej cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej 86f35f803c Use PAGE_SIZE rather than NBPG. 2003-04-02 02:45:36 +00:00
thorpej 3c0e6f55e1 We use 4k pages on the sh5; make PAGE_SIZE, PAGE_SHIFT, and PAGE_MASK
comptile-time constants.
2003-04-02 02:44:06 +00:00
scw e7e825f881 Remove some obsolete checks for __GNUC__ < 3. 2003-04-01 10:27:17 +00:00
scw 99e0368bfe Add PMAP_CACHE_VIVT, since the I$ is virtually indexed/tagged. 2003-04-01 10:25:09 +00:00
scw a7bc0a349e Some tweaks to reduce the effect of rounding errors in tmu_microtime()
and the calculation of the delay() constant.
2003-04-01 10:23:30 +00:00
scw ec17fb4b99 Fix bus_space_read_region_N() to work as advertised. 2003-03-29 22:07:14 +00:00
scw ea960960c0 We need to preserve SSR/SPC when switching ASIDs as we could be called
while handling a TLB miss (via the pmap_pte_spill() function), in which
case SSR/SPC are live.
2003-03-28 09:48:07 +00:00
scw 7fdeb41460 Fix for previous: frob SR, not SSR. 2003-03-27 20:21:27 +00:00
scw 00c69643a2 Make sure the FPU is enabled if we're about to drop to ddb due to
some catastrophic problem.
2003-03-27 17:29:17 +00:00
scw e6b13790fa SH5 needs __HAVE_FUNCTION_DESCRIPTORS defined in order for ld.elf_so
to resolve SHmedia function pointers correctly.
2003-03-26 14:46:32 +00:00
scw eefd7219fd Sign-extend the return value, as required by the ABI.
While I'm here, simplify the asm operands/constraints.
2003-03-26 12:00:41 +00:00
scw 955a468334 Add PIC support. 2003-03-24 14:26:16 +00:00
scw 2e5c2cd2ae Define just one mcount for both 32 and 64-bit ABIs; there's really no
advantage in having two slightly different versions.
Also save/restore FP register parameters.
2003-03-24 14:24:38 +00:00
scw 28db85d8f6 Relax the initial user stack alignment from 16 to 8 bytes.
Add a workaround for what appears to be a bug in binutils whereby
the entry point of an SHmedia binary can sometimes specify
SHcompact code (LSB is clear).
2003-03-24 14:21:27 +00:00
scw 5d74e4ddb2 Now that we can deal with debug exceptions, use a BRK instruction for
ddb breakpoints instead of TRAPA in order to simplify the trapa (syscall)
handler.
2003-03-19 11:37:57 +00:00
scw 2bce28091c Fix some comments.
Set up stack frames in copyin/copyout and friends (if DDB is defined) so
that ddb stack traces can trace through them.
2003-03-19 11:34:28 +00:00
scw 7c18481cf2 G/C an obsolete comment. 2003-03-19 11:31:55 +00:00
scw bfca0494bd Try to configure all children of cprc0, not just clock. 2003-03-13 14:37:36 +00:00
scw d4f824014d A bunch of things:
- Clean up the way cpu-specific tlb/cache functions are configured
    and used.
  - Add a workaround for a problem whereby cpu* at superhyway? fails
    to probe.
  - Print more info about the cpu/cache.
  - Move the RESVEC handlers back into generic sh5 code and ditch
    the panic stack hack.
  - Make the on-chip SCIF device the default console on Cayman.
  - Add experimental support for booting via a standalone bootstrap
    program (not yet committed) and using the boot parameters passed
    in by it.
  - Add a few more SH elf constants.
  - Tick a couple of items off the TODO list.
2003-03-13 13:44:16 +00:00
scw 31b3a7c37f In scif_getc(), check SCIF_SCFSR2_RDF in addition to SCIF_SCFSR2_DR to
detect waiting Rx data. This fixes an occasional console lockup when
when pasting text at the ddb prompt.
2003-03-13 13:19:01 +00:00
tshiozak 31e2cbf0b5 add some ISO C 1995 I18N functions and types:
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.
2003-03-02 22:18:11 +00:00
kent cd7d9faeaf Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it. 2003-01-28 01:07:51 +00:00
scw e212eb9e09 Fix pasto in last commit. 2003-01-22 13:46:44 +00:00
scw a4b020d99e In cpu_upcall(), validate the address of the upcall handler so as to
avoid a kernel-mode exception if restoring an invalid SPC.
2003-01-22 13:40:57 +00:00
scw 3b0144945a Fix a cpu_switchto() botch. 2003-01-22 13:38:51 +00:00
scw fe8c97c2e1 In _MCONTEXT_TO_SIGCONTEXT(), set r24 to the magic number expected
by sh5's sys___sigreturn14().
2003-01-22 13:38:11 +00:00
scw 1ec8a7e381 Add _UC_UCONTEXT_ALIGN. 2003-01-22 13:35:55 +00:00