summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* - Remove the eintrcnt/eintrnames usage and introduce the concept ofattilio2011-07-183-13/+5
| | | | | | | | | | | | | | | | sintrcnt/sintrnames which are symbols containing the size of the 2 tables. - For amd64/i386 remove the storage of intr* stuff from assembly files. This area can be widely improved by applying the same to other architectures and likely finding an unified approach among them and move the whole code to be MI. More work in this area is expected to happen fairly soon. No MFC is previewed for this patch. Tested by: pluknet Reviewed by: jhb Approved by: re (kib)
* Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.ed2011-07-171-2/+2
| | | | | | | | | Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls to support wide characters. I created a patch to add ABI compatibility for the old calls, but I didn't get any feedback to that. It seems now people are upgrading from 8 to 9 they experience this issue, so add it anyway.
* Don't include mptable_pci.c in Xen kernels. It is only meant for systemsjhb2011-07-171-30/+0
| | | | | | that truly have an MPTable. The MPTable code in Xen is really a Xen specific CPU enumerator and probably shouldn't be using the mptable name at all.
* Fix build with NEW_PCIB defined.jhb2011-07-161-0/+7
|
* Delete duplicate tags entry I introduced in -r223901.mckusick2011-07-151-2/+1
| | | | Submitted-by: John Baldwin
* Update tags build scriptmckusick2011-07-101-1/+1
|
* Correct cpu_monitor() and cpu_mwait() for amd64. These instructions takejkim2011-07-051-5/+7
| | | | | | %rcx as "extensions" in long mode. If any unused bit is set in %rcx, these instructions cause general protection fault. Fix style nits and synchronize i386 with amd64.
* With retirement of cpumask_t and usage of cpuset_t for representing aattilio2011-07-045-152/+125
| | | | | | | | | | | | | | | mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient. Remove them and replace their usage with custom pc_cpuid magic (as, atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))). This change is not targeted for MFC because of struct pcpu members removal and dependency by cpumask_t retirement. MD review by: marcel, marius, alc Tested by: pluknet MD testing by: marcel, marius, gonzo, andreast
* When iterating over a paging queue, explicitly check for PG_MARKER, insteadalc2011-07-022-2/+2
| | | | | | of relying on zeroed memory being interpreted as an empty PV list. Reviewed by: kib
* Add some checks to ensure that Capsicum is behaving correctly, and add somejonathan2011-06-301-12/+14
| | | | | | | more explicit comments about what's going on and what future maintainers need to do when e.g. adding a new operation to a sys_machdep.c. Approved by: mentor(rwatson), re(bz)
* Add a new option, OBJPR_NOTMAPPED, to vm_object_page_remove(). Passing thisalc2011-06-292-4/+4
| | | | | | | | | | | | | | | | | | option to vm_object_page_remove() asserts that the specified range of pages is not mapped, or more precisely that none of these pages have any managed mappings. Thus, vm_object_page_remove() need not call pmap_remove_all() on the pages. This change not only saves time by eliminating pointless calls to pmap_remove_all(), but it also eliminates an inconsistency in the use of pmap_remove_all() versus related functions, like pmap_remove_write(). It eliminates harmless but pointless calls to pmap_remove_all() that were being performed on PG_UNMANAGED pages. Update all of the existing assertions on pmap_remove_all() to reflect this change. Reviewed by: kib
* We may split today's CAPABILITIES into CAPABILITY_MODE (which hasjonathan2011-06-291-2/+2
| | | | | | | | | | | | | to do with global namespaces) and CAPABILITIES (which has to do with constraining file descriptors). Just in case, and because it's a better name anyway, let's move CAPABILITIES out of the way. Also, change opt_capabilities.h to opt_capsicum.h; for now, this will only hold CAPABILITY_MODE, but it will probably also hold the new CAPABILITIES (implying constrained file descriptors) in the future. Approved by: rwatson Sponsored by: Google UK Ltd
* Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h tojhb2011-06-223-750/+4
| | | | | the x86 tree. The $PIR code is still only enabled on i386 and not amd64. While here, make the qpi(4) driver on conditional on 'device pci'.
* Oops, missed these in 223424.jhb2011-06-221-0/+1
| | | | Reported by: jkim
* Use uintXX_t instead of u_intXX_t.jhb2011-06-221-5/+5
|
* Add a helper routine to conditionally modify the start address of ajhb2011-06-221-22/+32
| | | | | | | | | | | | | | | | resource allocation from an x86 Host-PCI bridge driver so that it can be reused by the ACPI Host-PCI bridge driver (and eventually the MPTable Host-PCI bridge driver) instead of duplicating the same logic. Note that this means that hw.acpi.host_mem_start is now replaced with the hw.pci.host_mem_start tunable that was already used in the non-ACPI case. This also removes hw.acpi.host_mem_start on ia64 where it was not applicable (the implementation was very x86-specific). While here, adjust the logic to apply the new start address on any "wildcard" allocation even if that allocation comes from a subset of the allowable address range. Reviewed by: imp (1)
* Enable USB 3.0 support by default in i386 and amd64 GENERIC kernels.hselasky2011-06-141-0/+1
| | | | | Discussed with: joel @ and thompsa @ MFC after: 7 days
* Enable sound support by default on i386 and amd64.joel2011-06-111-0/+8
| | | | | | | | | | | | | | | | | The generic sound driver has been added, along with enough device-specific drivers to support the most common audio chipsets. We've discussed enabling it from time to time over the years and we've received numerous requests from users, so we decided that shipping 9.0 with working audio by default would be the best thing to do. Bug reports should be sent to the multimedia@ mailing list, as usual. Approved by: mav No objection: re
* Implement BUS_ADJUST_RESOURCE() for the x86 drivers that sit between thejhb2011-06-101-0/+1
| | | | Host-PCI bridge drivers and nexus.
* remove code for dynamic offlining/onlining of CPUs on x86avg2011-06-083-169/+10
| | | | | | | | | | | | | | | | | | | | | | | The code has definitely been broken for SCHED_ULE, which is a default scheduler. It may have been broken for SCHED_4BSD in more subtle ways, e.g. with manually configured CPU affinities and for interrupt devilery purposes. We still provide a way to disable individual CPUs or all hyperthreading "twin" CPUs before SMP startup. See the UPDATING entry for details. Interaction between building CPU topology and disabling CPUs still remains fuzzy: topology is first built using all availble CPUs and then the disabled CPUs should be "subtracted" from it. That doesn't work well if the resulting topology becomes non-uniform. This work is done in cooperation with Attilio Rao who in addition to reviewing also provided parts of code. PR: kern/145385 Discussed with: gcooper, ambrisko, mdf, sbruno Reviewed by: attilio Tested by: pho, pluknet X-MFC after: never
* MFCattilio2011-06-061-2/+5
|\
| * don't use cpuid level 4 in x86 cpu topology detection if it's not supportedavg2011-06-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | This regression was introduced in r213323. There are probably no Intel cpus that support amd64 mode, but do not support cpuid level 4, but it's better to keep i386 and amd64 versions of this code in sync. Discovered by: pho Tested by: pho MFC after: 2 weeks
| * On multi-core, multi-threaded PPC systems, it is important that the threadsnwhitehorn2011-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | be brought up in the order they are enumerated in the device tree (in particular, that thread 0 on each core be brought up first). The SLIST through which we loop to start the CPUs has all of its entries added with SLIST_INSERT_HEAD(), which means it is in reverse order of enumeration and so AP startup would always fail in such situations (causing a machine check or RTAS failure). Fix this by changing the SLIST into an STAILQ, and inserting new CPUs at the end. Reviewed by: jhb
| * Bring back r222275. runfw(4) will statically link in rt2870.fw.uukevlo2011-05-251-1/+0
| | | | | | | | | | | | to the kernel, though I have MODULES_OVERRIDE="" in GENERIC. Spotted by: thompsa
| * run(4) needs firmware loaded to workkevlo2011-05-251-0/+1
| |
| * Merge part of r221322 from largeSMP project:attilio2011-05-181-43/+27
| | | | | | | | | | | | | | Sync XEN support with i386 about the usage of ipi_send_cpu() Tested by: pluknet MFC after: 2 weeks
| * Update CPUID bits to reflect AMD Bulldozer and Intel Sandy Bridge features.jkim2011-05-172-28/+37
| | | | | | | | | | | | | | | | | | Note AMD dropped SSE5 extensions in order to avoid ISA overlap with Intel AVX instructions. The SSE5 bit was recycled as XOP extended instruction bit, CVT16 was deprecated in favor of F16C (half-precision float conversion instructions for AVX), and the remaining FMA4 (4-operand FMA instructions) gained a separate CPUID bit. Replace non-existent references with today's CPUID specifications.
| * Remove an unused typedef.attilio2011-05-171-1/+0
| | | | | | | | Tested by: sbruno, pluknet
* | MFCattilio2011-05-311-1/+1
| |
* | - Fix a misusage of cpuset_t objectsattilio2011-05-242-3/+3
| | | | | | | | | | | | - Fix a typo Reported by: pluknet
* | Add a "safety belt" check for lsb setting.attilio2011-05-222-0/+2
| | | | | | | | | | | | | | I don't think it is really necessary because the cpumask is known to be != 0, but it is just in case. Requested by: kib
* | Reintroduce the lazypmap infrastructure and convert it to usingattilio2011-05-208-3/+242
| | | | | | | | | | | | cpuset_t. Requested by: alc
* | MFCattilio2011-05-182-28/+37
| |
* | MFCattilio2011-05-151-0/+6
|\ \ | |/
| * Add I2C bus driver for the AMD Geode LX series CS5536 Companionbrix2011-05-151-0/+6
| | | | | | | | | | | | Device. Reviewed by: jhb (newbus bits only), adrian
| * Move the ZERO_REGION_SIZE to a machine-dependent file, as on manymdf2011-05-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | architectures (i386, for example) the virtual memory space may be constrained enough that 2MB is a large chunk. Use 64K for arches other than amd64 and ia64, with special handling for sparc64 due to differing hardware. Also commit the comment changes to kmem_init_zero_region() that I missed due to not saving the file. (Darn the unfamiliar development environment). Arch maintainers, please feel free to adjust ZERO_REGION_SIZE as you see fit. Requested by: alc MFC after: 1 week MFC with: r221853
| * Refactor Xen PV code to use new event timers subsystem. That uses one-shotmav2011-05-133-104/+112
| | | | | | | | | | | | | | | | | | | | | | Xen timer and time counter to provide one-shot and periodic time events. On my tests this reduces idle interruts rate down to about 30Hz, and accor- ding to Xen VM Manager reduces host CPU load by three times comparing to the previous periodic 100Hz clock. Also now, when needed, it is possible to increase HZ rate without useless CPU burning during idle periods. Now only ia64 and some ARMs left not migrated to the new event timers.
* | MFCattilio2011-05-131-0/+2
| |
* | MFCattilio2011-05-133-104/+112
| |
* | MFCattilio2011-05-121-0/+1
|\ \ | |/
| * Add SC_PIXEL_MODE to GENERIC for amd64 and i386.jkim2011-05-101-0/+1
| | | | | | | | Requested by: many
| * Implement boot-time TSC synchronization test for SMP. This test is executedjkim2011-05-091-1/+0
| | | | | | | | | | | | | | when the user has indicated that the system has synchronized TSCs or it has P-state invariant TSCs. For the former case, we may clear the tunable if it fails the test to prevent accidental foot-shooting. For the latter case, we may set it if it passes the test to notify the user that it may be usable.
* | MFCattilio2011-05-091-1/+0
| |
* | MFCattilio2011-05-071-2/+2
|\ \ | |/
| * Don't use MWAIT for short sleeps under XEN, as it was before r212541.mav2011-05-071-2/+2
| | | | | | | | This fixes panic during boot in PV mode on Xen 3.2.
| * prepare code that does topology detection for amd cpus for bulldozeravg2011-05-062-2/+27
| | | | | | | | | | | | | | | | | | This also introduces a new detection path for family 10h and newer pre-bulldozer cpus, pre-10h hardware should not be affected. Tested by: Gary Jennejohn <gljennjohn@googlemail.com> (with pre-10h hardware) MFC after: 2 weeks
| * Enable the new PCI-PCI bridge driver on amd64 and i386 by default. It canjhb2011-05-031-0/+2
| | | | | | | | be disabled via 'nooptions NEW_PCIB'.
| * Reimplement how PCI-PCI bridges manage their I/O windows. Previously thejhb2011-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver would verify that requests for child devices were confined to any existing I/O windows, but the driver relied on the firmware to initialize the windows and would never grow the windows for new requests. Now the driver actively manages the I/O windows. This is implemented by allocating a bus resource for each I/O window from the parent PCI bus and suballocating that resource to child devices. The suballocations are managed by creating an rman for each I/O window. The suballocated resources are mapped by passing the bus_activate_resource() call up to the parent PCI bus. Windows are grown when needed by using bus_adjust_resource() to adjust the resource allocated from the parent PCI bus. If the adjust request succeeds, the window is adjusted and the suballocation request for the child device is retried. When growing a window, the rman_first_free_region() and rman_last_free_region() routines are used to determine if the front or end of the existing I/O window is free. From using that, the smallest ranges that need to be added to either the front or back of the window are computed. The driver will first try to grow the window in whichever direction requires the smallest growth first followed by the other direction if that fails. Subtractive bridges will first attempt to satisfy requests for child resources from I/O windows (including attempts to grow the windows). If that fails, the request is passed up to the parent PCI bus directly however. The PCI-PCI bridge driver will try to use firmware-assigned ranges for child BARs first and only allocate a "fresh" range if that specific range cannot be accommodated in the I/O window. This allows systems where the firmware assigns resources during boot but later wipes the I/O windows (some ACPI BIOSen are known to do this) to "rediscover" the original I/O window ranges. The ACPI Host-PCI bridge driver has been adjusted to correctly honor hw.acpi.host_mem_start and the I/O port equivalent when a PCI-PCI bridge makes a wildcard request for an I/O window range. The new PCI-PCI bridge driver is only enabled if the NEW_PCIB kernel option is enabled. This is a transition aide to allow platforms that do not yet support bus_activate_resource() and bus_adjust_resource() in their Host-PCI bridge drivers (and possibly other drivers as needed) to use the old driver for now. Once all platforms support the new driver, the kernel option and old driver will be removed. PR: kern/143874 kern/149306 Tested by: mav
* | MFCattilio2011-05-062-2/+27
| |
* | Commit the support for removing cpumask_t and replacing it directly withattilio2011-05-0510-232/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno
OpenPOWER on IntegriCloud