summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Trace attempts to call restricted MD syscalls.des2011-10-181-0/+4
|
* Remove unused define.kib2011-10-071-2/+0
| | | | MFC after: 1 month
* Add the 9750 SATA+SAS 6Gb/s RAID controller card driver, tws(4). Manydelphij2011-10-041-0/+1
| | | | | | | | thanks for their contiued support to FreeBSD. This is version 10.80.00.003 from codeset 10.2.1 [1] Obtained from: LSI http://kb.lsi.com/Download16574.aspx [1]
* Do not allow the kernel to access usermode pages without installedkib2011-10-031-0/+13
| | | | | | | fault handler. Panic immediately in such situation, on i386 and amd64. Reviewed by: avg, jhb MFC after: 1 week
* Add some improvements in the idle table callbacks:attilio2011-10-031-7/+36
| | | | | | | | | | | | | - Replace instances of manual assembly instruction "hlt" call with halt() function calling. - In cpu_idle_mwait() avoid races in check to sched_runnable() using the same pattern used in cpu_idle_hlt() with the 'hlt' instruction. - Add comments explaining the logic behind the pattern used in cpu_idle_hlt() and other idle callbacks. In collabouration with: jhb, mav Reviewed by: adri, kib MFC after: 3 weeks
* Auto-generated code from sys_ prefixing makesyscalls.sh changekmacy2011-09-161-42/+42
| | | | Approved by: re(bz)
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-162-5/+5
| | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
* Put amd64_syscall() prototype in md_var.h.kib2011-09-152-1/+1
| | | | | | | Requested by: jhb Reviewed by: alc, jhb Approved by: re (bz) MFC after: 2 weeks
* Microoptimize the return path for the fast syscalls on amd64. Arrangekib2011-09-151-10/+10
| | | | | | | | | | the code to have the fall-through path to follow the likely target. Do not use intermediate register to reload user %rsp. Proposed by: alc Reviewed by: alc, jhb Approved by: re (bz) MFC after: 2 weeks
* The jump target shall be after the padding, not into it.kib2011-09-111-1/+2
| | | | | | Reported by: alc Approved by: re (bz) MFC after: 2 weeks
* Fix a zyd(4) comment typo that was copy+pasted into most kernel config files.brueffer2011-09-111-1/+1
| | | | | | | PR: 160276 Submitted by: MATSUMIYA Ryo <matsumiya@mma.club.uec.ac.jp> Approved by: re (kib) MFC after: 1 week
* Perform amd64-specific microoptimizations for native syscall entrykib2011-09-113-19/+13
| | | | | | | | | | | | sequence. The effect is ~1% on the microbenchmark. In particular, do not restore registers which are preserved by the C calling sequence. Align the jump target. Avoid unneeded memory accesses by calculating some data in syscall entry trampoline. Reviewed by: jhb Approved by: re (bz) MFC after: 2 weeks
* Inline the syscallenter() and syscallret(). This reduces the time measuredkib2011-09-112-0/+4
| | | | | | | | by the syscall entry speed microbenchmarks by ~10% on amd64. Submitted by: jhb Approved by: re (bz) MFC after: 2 weeks
* Split the vm_page flags PG_WRITEABLE and PG_REFERENCED into atomickib2011-09-061-23/+23
| | | | | | | | | | | | | | | | | flags field. Updates to the atomic flags are performed using the atomic ops on the containing word, do not require any vm lock to be held, and are non-blocking. The vm_page_aflag_set(9) and vm_page_aflag_clear(9) functions are provided to modify afalgs. Document the changes to flags field to only require the page lock. Introduce vm_page_reference(9) function to provide a stable KPI and KBI for filesystems like tmpfs and zfs which need to mark a page as referenced. Reviewed by: alc, attilio Tested by: marius, flo (sparc64); andreast (powerpc, powerpc64) Approved by: re (bz)
* Enable the puc(4) driver on amd64 and i386 in GENERIC. This allowsjhb2011-08-261-4/+1
| | | | | | | | | devices supported by puc(4) to work "out of the box" since puc.ko does not work "out of the box". Reviewed by: marcel Approved by: re (kib) MFC after: 1 week
* Make NKPT a kernel option on amd64 so that it can be set to a non-defaultjhb2011-08-262-0/+9
| | | | | | | | value from kernel config files. Reviewed by: alc Approved by: re (kib) MFC after: 1 week
* In HEAD when doing no further checkes there is no reason use thebz2011-08-201-3/+2
| | | | | | | | | | temporary variable and check with if as TUNABLE_*_FETCH do not alter values unless successfully found the tunable. Reported by: jhb, bde MFC after: 3 days X-MFC with: r224516 Approved by: re (kib)
* Second-to-last commit implementing Capsicum capabilities in the FreeBSDrwatson2011-08-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel for FreeBSD 9.0: Add a new capability mask argument to fget(9) and friends, allowing system call code to declare what capabilities are required when an integer file descriptor is converted into an in-kernel struct file *. With options CAPABILITIES compiled into the kernel, this enforces capability protection; without, this change is effectively a no-op. Some cases require special handling, such as mmap(2), which must preserve information about the maximum rights at the time of mapping in the memory map so that they can later be enforced in mprotect(2) -- this is done by narrowing the rights in the existing max_protection field used for similar purposes with file permissions. In namei(9), we assert that the code is not reached from within capability mode, as we're not yet ready to enforce namespace capabilities there. This will follow in a later commit. Update two capability names: CAP_EVENT and CAP_KEVENT become CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they represent. Approved by: re (bz) Submitted by: jonathan Sponsored by: Google Inc
* - Move the PG_UNMANAGED flag from m->flags to m->oflags, renaming the flagkib2011-08-091-18/+18
| | | | | | | | | | | | | | to VPO_UNMANAGED (and also making the flag protected by the vm object lock, instead of vm page queue lock). - Mark the fake pages with both PG_FICTITIOUS (as it is now) and VPO_UNMANAGED. As a consequence, pmap code now can use use just VPO_UNMANAGED to decide whether the page is unmanaged. Reviewed by: alc Tested by: pho (x86, previous version), marius (sparc64), marcel (arm, ia64, powerpc), ray (mips) Sponsored by: The FreeBSD Foundation Approved by: re (bz)
* Change all the sample kernel configurations to usermacklem2011-08-071-1/+1
| | | | | | | | | | NFSCL, NFSD instead of NFSCLIENT, NFSSERVER since NFSCL and NFSD are now the defaults. The client change is needed for diskless configurations, so that the root mount works for fstype nfs. Reported by seanbru at yahoo-inc.com for i386/XEN. Approved by: re (hrs)
* Introduce a tunable to disable the time consuming parts of bootupbz2011-07-301-1/+12
| | | | | | | | | | | | | memtesting, which can easily save seconds to minutes of boot time. The tunable name is kept general to allow reusing the code in alternate frameworks. Requested by: many Discussed on: arch (a while a go) Obtained from: Sandvine Incorporated Reviewed by: sbruno Approved by: re (kib) MFC after: 2 weeks
* Bump MAXCPU for amd64, ia64 and XLP mips appropriately.attilio2011-07-191-1/+1
| | | | | | | | | | | | | | | | | | | From now on, default values for FreeBSD will be 64 maxiumum supported CPUs on amd64 and ia64 and 128 for XLP. All the other architectures seem already capped appropriately (with the exception of sparc64 which needs further support on jalapeno flavour). Bump __FreeBSD_version in order to reflect KBI/KPI brekage introduced during the infrastructure cleanup for supporting MAXCPU > 32. This covers cpumask_t retiral too. The switch is considered completed at the present time, so for whatever bug you may experience that is reconducible to that area, please report immediately. Requested by: marcel, jchandra Tested by: pluknet, sbruno Approved by: re (kib)
* Add the possibility to specify from kernel configs MAXCPU value.attilio2011-07-191-0/+2
| | | | | | | | | | This patch is going to help in cases like mips flavours where you want a more granular support on MAXCPU. No MFC is previewed for this patch. Tested by: pluknet Approved by: re (kib)
* - 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)
* 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-044-87/+66
| | | | | | | | | | | | | | | 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-021-1/+1
| | | | | | 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-16/+18
| | | | | | | 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-291-2/+2
| | | | | | | | | | | | | | | | | | 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-222-476/+3
| | | | | 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-3/+3
|
* 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)
* Fix vfork. Add comments.kib2011-06-181-1/+24
|
* 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
* Bring back the number of CPU to 32.attilio2011-06-071-1/+1
|
* 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
| * 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
| |
| * Update CPUID bits to reflect AMD Bulldozer and Intel Sandy Bridge features.jkim2011-05-172-28/+38
| | | | | | | | | | | | | | | | | | 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.
| * 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
* | Revert a patch that involountary sneaked in while I was MFCing.attilio2011-05-231-2/+0
| |
* | MFCattilio2011-05-231-0/+2
| |
* | MFCattilio2011-05-182-28/+38
| |
* | MFCattilio2011-05-131-0/+2
| |
OpenPOWER on IntegriCloud