Commit Graph

46662 Commits

Author SHA1 Message Date
drochner 98da2f9c50 fix some unaligned PCI config space accesses in suspend/resume functions 2008-01-15 00:24:47 +00:00
xtraeme 1a8fd528b1 Missing __KERNEL_RCSID(). 2008-01-14 20:20:31 +00:00
joerg 31a2e1f6f0 Allocate 64KB as low memory for the BIOS to write to. Copy the interrupt
table and the BIOS data area before each POST. Allows the Dell of Martin
Husemann to use VGA_POST.
2008-01-14 19:28:13 +00:00
dyoung 47e8740d49 KASSERT() that reads/writes from/to PCI configuration space are
aligned on 32-bit boundaries.
2008-01-14 18:44:17 +00:00
joerg 1726e7b607 Ensure that non-primary CPUs save the FPU state on suspend. 2008-01-14 15:23:56 +00:00
martin b99d735fcb Fix register name typo/copy&pasto - %g6 is not %o6/%sp.
From OpenBSD.
2008-01-14 15:08:21 +00:00
mrg a33e9e3b3f implement bus_dmamem_mmap() for sparc64. this is copied from the x86
code and then a single line adjusted to make it look identical to the
openbsd sparc64 version, who provided inspiration for this.

NOTE: not really tested yet with a real device, but, it can't really
be worse than panic() in a device mmap()...
2008-01-14 00:43:54 +00:00
skrll 193f2ba372 Update a comment. 2008-01-13 13:42:58 +00:00
yamt 04db6c4347 pmap_extract_ma: fix a missing pmap_unmap_ptes. 2008-01-13 11:34:18 +00:00
chris a87adf7279 When manipulating the interrupt status for atomic ops use cpsr_c rather
than cpsr_all, this avoids updating unnecessary fields in the cpsr.

As a side effect, the inline versions no longer clobber the condition
codes.
2008-01-13 11:19:05 +00:00
bouyer 4308d7e8b5 Revert tmpstk size to 512 bytes, it was bumped to 1024 by mistake when
bouyer-xeni386 was merged.
2008-01-13 11:03:04 +00:00
yamt 1fc0c47f67 add functions to update pm_stats and use them in some places.
for pmap_kernel(), use atomic ops to update stats because pmap_map_ptes
doesn't lock the pmap.
2008-01-13 07:26:32 +00:00
yamt 0c8275031f add pmap_pte_cas. 2008-01-13 07:05:42 +00:00
chris d21493ad1e Take a micro-optimization from FreeBSD/arm.
When switching from SVC32->UND32 to read/write R13_und we don't need to clear
the mode bits as:
PSR_SVC32_MODE | PSR_UND32_MODE = PSR_UND32_MODE

While reading the code I also noted that interrupts are enabled for most of
the function as pmap_switch returns with interrupts in the state they are on
entry.  This appears to be different to what the code after pmap_switch
expects, in that the behaviour suggests they should be disabled.

Because of this I've made the writing of R13_und explicitly disable.
interupts as part of the mode switch.

This also means that the IRQenableALL call is now redundant as the
interrupts are already enabled.

XXX: it's not clear if arm_fpe_core_changecontext should be called with
interrupts disabled.

Remove unused items: IRQdisableALL, IRQenableALL & Lcpufuncs.

Tested on cats. lmbench shows no performance change.
2008-01-13 02:43:53 +00:00
skrll b440b92fa2 Add and fix a couple of comments. 2008-01-12 20:57:26 +00:00
skrll cf47b9b0c7 Push a switchframe in dumpsys and cpu_switchto, but as dumpsys calls
other funcs a switchframe needs to be a multiple of 8 bytes. Stash sp as
well in the switchframe to bump it to 24bytes.

Setup the switchframe appropriately in cpu_lwp_fork.

Remove savectx - nothing uses it.

All of this make gdb's life much easier when dealing with crash dumps and
live kernels.

Reviewd by chris.
2008-01-12 20:50:23 +00:00
ad ee652e42b1 - Split crashdump code out into its own file.
- Remove NO_SPARSE_DUMP.
- Minor KNF, sprinkle static.
2008-01-12 20:03:41 +00:00
bouyer c45f69b0fd Xen doesn't need NKPTP_MIN/NKPTP_MAX any more. 2008-01-12 18:16:20 +00:00
ad eb24572347 Fix some problems with TLB shootdown and (hopefully) make it faster. This
had the potential to cause problems prior to 4.99.48 because it called into
the VM system without kernel_lock held.

XXX1 pmap_update() should be waiting for shootdown jobs to complete. It's
not clear how to do that because the shootdowns happen at IPL_VM.
2008-01-12 16:45:29 +00:00
tsutsui a07f7c8069 Misc cleanup:
- KNF, ANSIfy, remove __P()
- use __func__ to print function names
- use __arraycount()
- include "ioconf.h" for struct cfdriver
- u_intNN_t -> uintNN_t
- wrap long lines
etc.
2008-01-12 09:54:21 +00:00
yamt b46466b4df revert a whitespace change which is against KNF. 2008-01-12 09:10:24 +00:00
bouyer 26315d042c Merge the bouyer-xeni386 branch to head, at tag bouyer-xeni386-merge1 (the
branch is still active and will see i386PAE support developement).
Sumary of changes:
- switch xeni386 to the x86/x86/pmap.c, and the xen/x86/x86_xpmap.c
  pmap bootstrap.
- merge back most of xen/i386/ to i386/i386
- change the build to reduce diffs between i386 and amd64 in file locations
- remove include files that were identical to the i386/amd64 counterparts,
  the build will find them via the xen-ma/machine link.
2008-01-11 20:00:13 +00:00
he 4b2e779458 Include <sys/simplelock.h> to pull in appropriate definitions. 2008-01-11 14:03:47 +00:00
tsutsui 7ae8e79ff0 - add options COMPAT_40
- adjust comments
2008-01-11 11:45:24 +00:00
tsutsui 8dcb4a7ea6 Always account idepth for cpu_intr_p(), which is now
mandatory for sys/kern/vfs_bio.c:biodone().

Comments from Andrew Doran, and fixes mutex errors on sun3.
2008-01-11 10:21:26 +00:00
tsutsui 8c58569757 WARNSfy 2008-01-11 09:26:26 +00:00
mrg 626bd12a5c enable PCI_NETBSD_CONFIGURE for ofppc.
the call to pci_configure_bus(9) and it's supporting code is
copied verbatim from the prep port.

this allows us to completely remove the really gross pegasos
specific pegasospci_indirect_attach_hook() that set various
pci command regs, since all those devices (mostly work now,
see below) and additionally PCI plugin cards work now too.

it also makes the pegasos onboard vr(4) ethernet work with
disk boot (it previously only worked with netboot.)

in the generic macppc ofw pci conf hook and for pegasos,
don't configure the viaide(4) device, and don't configure
memory space on the fwohci(4) device.


with this, and my other recent ofppc/ppc changes the pegasos
port is mostly functional.  the marvell gige is not working,
and my 512mb appears as only about 256mb, but otherwise
this port is almost done!
2008-01-11 05:18:58 +00:00
mrg 5206bb3800 several changes to make boot device work for disks, at least
on my pegasos:

- don't chop off the 2nd part of the OFW address, it makes it
  match pcib (ISA bridge - dev 12 fn 0) instead of viaide (dev 12
  fn 1).
- now that it's available, provide an "addr2" that has the
  second address present.
- for pci devices match against device and function, not just
  function.
- remove the special case and actually broken check in the
  "pciide" section, and use the now generic "addr2" and check
  against the drive and channel number if provided.
- support "viaide" and "slide" in here, as well as "pciide".
  (is there a good way to say "any ide adapter"?)
2008-01-11 05:11:18 +00:00
skrll 1086712904 #options<space><tab> 2008-01-10 21:22:49 +00:00
skrll ae654e4721 Various improvements to the hppa kernel for gdb.
- add the useful space and control registers to struct reg
	- update process_{read,write}_regs accordingly
	- use MID_HPPA in core dumps.
	- dump the fp regs into cores.
	- add single stepping support from OpenBSD.
2008-01-10 21:08:40 +00:00
ad e8532b7138 - Fix a memory order problem with non-interlocked mutex release.
- Give kernel_lock its own cache line.
2008-01-10 20:14:10 +00:00
tsutsui fba7c262a8 Move todr_attach(9) calls from each MD attachment to MI intersil7170_attach(). 2008-01-10 16:04:57 +00:00
tsutsui 05517e38f5 - move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
  MD attachments
2008-01-10 15:31:26 +00:00
tsutsui db09bcc34f Move todr_attach(9) calls from each MD attachment to MI mc146818_attach(). 2008-01-10 15:17:39 +00:00
tsutsui c86aec7cca Cycles per second values read from the CP0 counter should be doubled
on calculating CPU frequency in CPU_MIPS_DOUBLE_COUNT case,
which is always assumed on this port.
2008-01-10 14:57:34 +00:00
tsutsui df9b6a3215 The MIPS3 CP0 counter is not cleared at compare-match and
it always counts upto UINT32_MAX, so no need to handle
wrapped around case with ci_cycles_per_hz value.
2008-01-10 14:29:08 +00:00
skrll 2f713e866e As we're reusing buf we need to clear b_oflags so the buf isn't marked as
BO_DONE.

Disklabels can be found again
2008-01-10 12:44:50 +00:00
tls bc6d48ecfe Add sparse kernel core dump ("minidump") support for i386, written by Jed
Davis for Coyote Point.  Though this does not modify the kernel core
format (it uses multiple memory segments, a feature previously unused on
i386) it is nonetheless disabled by default.  Sysctl machdep.sparse_dump=1
to turn this feature on.

Dumps of even busy, large-memory systems are generally a few tens of
megabytes.
2008-01-10 11:10:35 +00:00
dyoung 3e5bb8f3c8 Produce tags for arch/i386/acpi/*.[ch], arch/i386/pnpbios/*.[ch]. 2008-01-10 07:35:09 +00:00
dyoung a826619d34 Make the 'tags' target produce some useful tags. 2008-01-10 07:34:02 +00:00
bouyer 0b075efe67 Move a CLI() after .Lspllower_resume; because on Xen .Lspllower_resume
may be called from Xdoreti via iret, so with interrupts enabled.
2008-01-09 23:45:34 +00:00
garbled 63cf0079d4 ofwoea_batinit should be a nop when PPC_OEA is not defined 2008-01-09 21:32:38 +00:00
garbled cf3691bced Mac doesn't need the special hack for the bridge mode prototype anymore. 2008-01-09 21:23:18 +00:00
garbled ade34db359 When compiling in bridge mode, add a prototype for pmap_setup_segment0_map() 2008-01-09 21:21:45 +00:00
garbled acc486b147 fix a bad cast when compiling in bridge mode 2008-01-09 21:12:34 +00:00
garbled 0cdee0226b Make this compile when compiling in bridge mode w/o ALTIVEC 2008-01-09 21:09:21 +00:00
wiz 35023be713 Fix typo in macro name and comments. 2008-01-09 20:38:34 +00:00
garbled 0d31ffa76d Remove alloc.h too, no longer needed. 2008-01-09 19:39:07 +00:00
garbled 3d12616d63 Change the note section for ofwboot to be what the ppc 1275 spec says it
should be, also add a section for IBM LPARs.
2008-01-09 19:36:40 +00:00
garbled dc535894e1 Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270.  Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
2008-01-09 19:34:44 +00:00