Commit Graph

741 Commits

Author SHA1 Message Date
ad
8c49cfa7b6 Make pmap_extract() lockless. Reviewed by chs@ who reports a ~1% reduction
in system time during a kernel build on a quad core amd64 system.
2008-06-16 10:31:03 +00:00
bjs
8355d28637 "functin" -> "function" (no "functional" change, har har) 2008-06-13 09:53:46 +00:00
joerg
3498d844d7 Explicitly recognize the PNP ID of PCI-X bridges. This is normally
redundant as DSDTs should provide _CID for it.
2008-06-06 20:34:24 +00:00
cegger
c96e6fabc0 make this build for xen 2008-06-06 05:45:16 +00:00
ad
d1b2ddc725 pmap_remove_all() for x86. Also, always defer freeing ptps to pmap_update().
There may be a better way to do this, but for now this is simple and avoids
potential bugs.

Proposed on tech-kern and discussed with chs@.
2008-06-05 21:09:12 +00:00
ad
7671b6093f Revert unintentional change. 2008-06-04 13:08:30 +00:00
ad
06c343ac94 vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both. 2008-06-04 12:41:40 +00:00
joerg
8473aea40f Add back break to fix PCI bridge traversal as reported by various users. 2008-06-04 12:14:02 +00:00
jmcneill
b131a63ada If we boot with RB_MD1, register a NULL pmf handler for APs so we can
still suspend.
2008-06-03 23:05:01 +00:00
joerg
e0e78e766f Make the logic for _BBN overrides less aggressive. When mpacpi_get_bbn
failed and the current goal is to enumerate all PCI bus and this is the
first PCI host bridge, just assume it is bus 0 and ignore the error.
When querying the bus number, assume that the system paniced earlier if
an error happened and this is not the first/only PCI host bridge and
override the BBN as 0 in that case.
2008-06-03 20:34:15 +00:00
drochner
cbda244b46 make the kernel survive its own KASSERTs (on i386) 2008-06-02 19:18:12 +00:00
ad
d9a3afa3c3 - Don't bother using sse to copy/zero pages on demand. It turns out not
to be worth it.
- If the machine has sse, re-enable zeroing pages in the idle loop and
  use the sse instructions so that we don't blow out the cache.
2008-06-02 19:11:10 +00:00
ad
a2f00acc80 - Don't bother using sse to copy/zero pages on demand. It turns out not
to be worth it.
- If the machine has sse, re-enable zeroing pages in the idle loop and
  use the sse instructions so that we don't blow out the cache.
2008-06-02 14:41:41 +00:00
joerg
f06b336b2a When a PCI host bridge description in the DSDT has a missing _BBN or the
_BBN is 0, check if the _ADR field is also 0. If it is, assume that the
_BBN really should be 0. Otherwise, try to extract the _BBN from the
bridge itself using pchb logic and panic only, if that fails as well.
Reported and tested by Martin Husemann as interrupt issue.
2008-06-01 15:33:15 +00:00
joerg
9e53ffdca5 When building the ACPI PCI Interrupt Table, check for duplicate entries
and drop all but the first. This is the behaviour Windows seems to
implement and some BIOSes depend on that due to broken dups.

This should fix PR 37001.
2008-06-01 15:23:46 +00:00
christos
fc39241e29 don't undef __CI_TBL before we use it :-) 2008-05-30 21:53:00 +00:00
ad
48ced055d4 pci_intr_setattr(), allows PCI interrupts to be marked MPSAFE on x86, and
other platforms if the code is added.

pci_intr_map(...)
pci_intr_setattr(pc, ih, PCI_INTR_MPSAFE, 1);
pci_intr_establish(...)
2008-05-30 19:26:35 +00:00
ad
2839301d21 Add a 'known_mpsafe' argument to intr_establish(). 2008-05-30 19:03:10 +00:00
christos
6cb1513d20 - fix an amd cache entry.
- merge tables
- support phenom
from Paul Goyette
2008-05-30 18:49:03 +00:00
christos
f26920b377 PR/38722: Paul Goyette: Share cacheinfo information 2008-05-30 14:42:42 +00:00
ad
0a34921e9f fillw is dead. 2008-05-30 11:03:29 +00:00
joerg
f608e44ab1 Add a function to extract the primary bus number of PCI host bridges,
as far as specific code for this already existed.
2008-05-30 09:49:07 +00:00
ad
0c8e56007e Remove X86_MAXPROCS. There is still a 32-cpu limit, but it's now using
the MI constants.
2008-05-28 11:50:01 +00:00
chs
736ec52d87 remove unused macros. 2008-05-25 16:01:29 +00:00
chris
2b534265d6 Check for erratum 261 on AMD Family 10h Stepping 3 processors.
Also output any detected errata at verbose, rather than debug, level so
they can be seen with dmesg, and at least have a clue if a BIOS update
would fix the errata.
2008-05-25 15:52:07 +00:00
chris
a868834e61 Add detection of errata for AMD Family 10h steppings A and 2. Covering
errata:
254: Internal Resource Livelock Involving Cached TLB Reload
261: Processor May Stall Entering Stop-Grant Due to Pending Data
     Cache Scrub
298: L2 Eviction May Occur During Processor Operation To Set
     Accessed or Dirty Bit
309: Processor Core May Execute Incorrect Instructions on
     Concurrent L2 and Northbridge Response
2008-05-25 15:19:22 +00:00
ad
d9b262b49d Mark x86_curlwp() with __attribute__ ((const)), so gcc can CSE it and know
that it does not clobber global data.
2008-05-22 13:55:51 +00:00
ad
b79cb03e74 Do the errata patchup after identifying the CPU, to avoid badly formatted
output.
2008-05-21 01:18:00 +00:00
ad
ca4aa34cf5 Be a bit less pointed with the errata warning. 2008-05-21 01:16:20 +00:00
ad
abeeffe66f aprint_debug for the lapic ESR reports during startup. 2008-05-21 01:15:16 +00:00
ad
e91baf0908 verbose -> debug for # page colours 2008-05-21 01:14:17 +00:00
ad
41fb29c26c cpuctl shows the power management features. 2008-05-21 01:13:07 +00:00
cegger
a8dd75a7ea correct comment copied from aiboost(4): envsys(4) wants uK 2008-05-20 14:45:22 +00:00
cegger
b112375268 envsys(4) expects values in mK and not the top of the range of possible temperature values.
Needed some time to figure this out after I saw negative temperature values on Griffin.
2008-05-20 13:58:32 +00:00
dogcow
49a3eaf487 due to changes in KERN_UNLOCK_ALL, now always define hold_count. 2008-05-20 09:29:33 +00:00
jmcneill
9709f2afe2 Add support for PCI_BUS_FIXUP and PCI_ADDR_FIXUP on amd64. 2008-05-18 02:06:14 +00:00
ad
bf1cf71fcd - cpu_attach: ensure that the boot processor is set up before trying to
initialize APs. We need the lapic set up and the boot processor may
  not be attached first.

- mp_cpu_start: write back and invalidate the data cache before starting the
  init IPI sequence. If a buggy BIOS has left the AP with cache disabled,
  it might not be able to participate in the cache coherency protocol.
2008-05-14 12:53:49 +00:00
ad
5d1d928fe1 Be more conservative during AP startup. Don't let the AP access the lapic
or do any setup until the boot processor has finished the init sequence,
and add a few more delays.
2008-05-13 22:39:17 +00:00
ad
62118300c8 intr_string: don't bother printing the legacy irq number when using the
ioapic. It's confusing.
2008-05-13 20:19:26 +00:00
joerg
816cef7d46 Restore the behaviour intended by rev 1.51 with the patch I actually
send out for testing. The wrong version ended up in the commit.
Original description:
Don't use the legacy interrupt when deciding how to route IOAPIC pins.
On some modern systems not all devices have the PCI interrupt line
set, typically the cardbus bridge is affected and it would result in
different interrupt vectors used for the same IOAPIC pin.
To allow this, simplify the code by checking for an existing match first
and only allocate a new entry if that doesn't exist. For the IOAPIC case
don't bother with the reserveration on the primary CPU for ISA
interrupts, just use them.
2008-05-13 14:29:17 +00:00
ad
5128f21c03 Back out 1.50 until the assumptions about NUM_LEGACY_IRQS are removed.
Until then there are not enough free interrupt sources on UP systems.
(Sorry Joerg.)
2008-05-13 12:14:06 +00:00
ad
25eae6f894 AMD and IDT/VIA strings were swapped. 2008-05-13 11:22:15 +00:00
ad
d3b40a28c7 - lapic_map: if we have an APIC MSR, ignore the supplied address and ask the
hardware where it is mapped. At least one ACPI implementation seems to lie
  about the physical address of the lapic.

- lapic_initclocks: be paranoid and issue an EOI.
2008-05-12 23:46:01 +00:00
ad
ce85d1b2a3 Some defs to describe the IA32_APIC_BASE MSR. 2008-05-12 18:36:20 +00:00
tsutsui
6f98953d90 Remove one more dup line. I should have a cup of coffee before hasty commit..
XXX maybe it's better to sort by cai_desc to sync with the Intel docs.
2008-05-12 16:41:15 +00:00
ad
a1ba1eadd5 - Make cpu_number() return MI index, otherwise the pmap cannot work on
systems with lapic IDs > X86_MAXPROCS.
- Kill cpu_info[] array and use MI cpu_lookup_byindex().
2008-05-12 14:41:07 +00:00
ad
02ce2ed48b Don't crash if more than 32 cpus. Hopefully the boot processor will be
within the first 32 attached.
2008-05-12 14:29:06 +00:00
ad
453d5d4dc1 - Complain if unable to reset the lapic ID.
- Minor clean up.
2008-05-12 14:19:33 +00:00
ad
094788ba6d cpu_hatch: hack around problem with multiple CPUs spinning in i8254_delay. 2008-05-12 11:58:10 +00:00
simonb
ce7bd7383b Only need to add some of the new cache descriptors once(!). 2008-05-12 03:58:47 +00:00