| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
than the APIC ID of the boot CPU prior to SI_SUB_SMP. This resulted in
some storage controllers not being able to enumerate attached devices when
using MSI/MSI-X interrupts. This only affects <= 7.x, so it is a direct
commit to 7.3 rather than an MFC.
Approved by: re (kib)
Notes:
svn path=/releng/7.3/; revision=204013
|
|
|
|
|
|
|
|
|
| |
Handle a race between pmap_kextract() and pmap_promote_pde().
Approved by: re (kib)
Notes:
svn path=/stable/7/; revision=203208
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimize the cache flushing done when changing caching attributes of pages
by doing nothing for CPUs that support self-snooping and using CLFLUSH
instead of a full cache invalidate when possible.
- On i386 take care of possible mappings of the page by sf buffer by
utilizing the mapping for clflush, otherwise map the page transiently.
Amd64 uses the direct map.
- Do not use CLFLUSH on Intel CPUs due to problems with flushing the local
APIC range by default. This can be further controlled via the
hw.clflush_disable loader tunable. A setting of 1 disables the
use of CLFLUSH. A setting of 0 allows CLFLUSH to be used for Intel
CPUs when CPUID_SS is not present.
Approved by: re (kib)
Notes:
svn path=/stable/7/; revision=203047
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimize the inner loop of pmap_copy().
Correct a rare use-after-free error in pmap_copy(). This error was
introduced in amd64 revision 1.540 and i386 revision 1.547. However, it
had no harmful effects until after a recent change, r189698, on amd64.
(In other words, the error is harmless in RELENG_7.)
The error is triggered by the failure to allocate a pv entry for the one
and only mapping in a page table page. I am addressing the error by
changing pmap_copy() to abort if either pv entry allocation or page
table page allocation fails. This is appropriate because the creation of
mappings by pmap_copy() is optional. They are a (possible) optimization,
and not a requirement.
Correct a nearby whitespace error in the i386 pmap_copy().
Notes:
svn path=/stable/7/; revision=202837
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
vnode interlock to protect the knote fields. The locking assumes
that shared vnode lock is held, thus we get exclusive access to knote
either by exclusive vnode lock protection, or by shared vnode lock +
vnode interlock.
Unlike the change in HEAD, this does not remove kl_locked() and replace it
with kl_assert_locked() and kl_assert_unlocked(). Instead, the kl_locked
can now be set to NULL in which case no assertion checks are performed on
the lock. The vfs kqfilter code uses this mode to disable assertion checks.
This preserves the existing ABI for knlist_init().
Add convenience function knlist_init_mtx to reduce number of arguments
for typical knlist initialization.
Reviewed by: kib
Notes:
svn path=/stable/7/; revision=202814
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a facility for associating optional descriptions with active interrupt
handlers. This is primarily intended as a way to allow devices that use
multiple interrupts (e.g. MSI) to meaningfully distinguish the various
interrupt handlers.
- Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate
a description with an active interrupt handler setup by BUS_SETUP_INTR.
It has a default method (bus_generic_describe_intr()) which simply passes
the request up to the parent device.
- Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports
printf(9) style formatting using var args.
- Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of
an interrupt handler and copy the name passed to intr_event_add_handler()
into that buffer instead of just saving the pointer to the name.
- Add a new intr_event_describe_handler() which appends a description string
to an interrupt handler's name.
- Implement support for interrupt descriptions on amd64, i386, and sparc64 by
having the nexus(4) driver supply a custom bus_describe_intr method that
invokes a new intr_describe() MD routine which in turn looks up the
associated interrupt event and invokes intr_event_describe_handler().
Notes:
svn path=/stable/7/; revision=202763
|
|
|
|
|
|
|
|
|
|
| |
Define architectural load bases for PIE binaries.
MFC r198203:
Change the load base to below 2GB for sparc64/sun4v.
Notes:
svn path=/stable/7/; revision=202642
|
|
|
|
|
|
|
|
| |
Simplify pmap_init(). Additionally, correct a harmless misbehavior on
i386.
Notes:
svn path=/stable/7/; revision=202599
|
|
|
|
|
|
|
|
| |
Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms.
# This is the resolution of removing it from DEFAULTS...
Notes:
svn path=/stable/7/; revision=202547
|
|
|
|
|
|
|
| |
Add vlan(4) to all GENERIC kernels.
Notes:
svn path=/stable/7/; revision=202135
|
|
|
|
| |
Notes:
svn path=/stable/7/; revision=201536
|
|
|
|
|
|
|
|
| |
Add INCLUDE_CONFIG_FILE, and a note in comments about how to also
include the comments with CONFIGARGS
Notes:
svn path=/stable/7/; revision=201164
|
|
|
|
|
|
|
| |
Add AT_EXECPATH ELF auxinfo entry type.
Notes:
svn path=/stable/7/; revision=200861
|
|
|
|
|
|
|
|
|
|
| |
AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.
MFC r186225:
Remove two remnant uses of AT_DEBUG.
Notes:
svn path=/stable/7/; revision=200858
|
|
|
|
|
|
|
| |
Remove comment claiming that building acpi into the kernel is deprecated.
Notes:
svn path=/stable/7/; revision=200842
|
|
|
|
|
|
|
| |
This also has changes from r197070 (earlier partial MFC).
Notes:
svn path=/stable/7/; revision=200773
|
|
|
|
| |
Notes:
svn path=/stable/7/; revision=200766
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to fix breakage caused by r200064.
I do this MFC instead of just fixing r200064 to reduce difference from
head and make things easier for future MFCs.
Original change is by jkim.
Pointy hat to: avg
Notes:
svn path=/stable/7/; revision=200742
|
|
|
|
| |
Notes:
svn path=/stable/7/; revision=200714
|
|
|
|
| |
Notes:
svn path=/stable/7/; revision=200712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cleanup ALIGNED_POINTER:
o add to platforms where it was missing (arm, i386, powerpc, sparc64, sun4v)
o define as "1" on amd64 and i386 where there is no restriction
o make the type returned consistent with ALIGN
o remove _ALIGNED_POINTER
o make associated comments consistent
Reviewed by: bde, imp, marcel
Approved by: sam (MFC to stable/7)
Notes:
svn path=/stable/7/; revision=200625
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lindev(4) [1] is supposed to be a collection of linux-specific pseudo
devices that we also support, just not by default (thus only LINT or
module builds by default).
While currently there is only "/dev/full" [2], we are planning to see more
in the future. We may decide to change the module/dependency logic in the
future should the list grow too long.
This is not part of linux.ko as also non-linux binaries like kFreeBSD
userland or ports can make use of this as well.
Suggested by: rwatson [1] (name)
Submitted by: ed [2]
Discussed with: markm, ed, rwatson, kib (weeks ago)
Reviewed by: rwatson, brueffer (prev. version)
PR: kern/68961
Notes:
svn path=/stable/7/; revision=200479
|
|
|
|
|
|
|
| |
exactly on page boundary or less.
Notes:
svn path=/stable/7/; revision=200289
|
|
|
|
| |
Notes:
svn path=/stable/7/; revision=200263
|
|
|
|
| |
Notes:
svn path=/stable/7/; revision=200261
|
|
|
|
|
|
|
|
|
|
| |
Remove obselete PECOFF image activator support.
Discussed with: secteam, kib
Approved by: re (kensmith)
Notes:
svn path=/stable/7/; revision=199901
|
|
|
|
|
|
|
|
| |
Fix cpu model for PODP5V83. It is P24T, not P54T.
Also remove redundant 'Overdrive' word.
Notes:
svn path=/stable/7/; revision=199520
|
|
|
|
|
|
|
|
| |
Move the USB wireless drivers down into their own section next to the USB
ethernet drivers.
Notes:
svn path=/stable/7/; revision=199397
|
|
|
|
|
|
|
|
|
| |
Opteron rev E family of processor expose a bug where acq memory barriers
can be broken, resulting in random breakages.
Printout a warning message if affected family and model are found.
Notes:
svn path=/stable/7/; revision=198979
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix some problems with effective mmap() offsets > 32 bits. This was
partially fixed on amd64 earlier. Rather than forcing linux_mmap_common()
to use a 32-bit offset, have it accept a 64-bit file offset. This offset
is then passed to the real mmap() call. Rather than inventing a structure
to hold the normal linux_mmap args that has a 64-bit offset, just pass
each of the arguments individually to linux_mmap_common() since that more
closes matches the existing style of various kern_foo() functions.
Notes:
svn path=/stable/7/; revision=198926
|
|
|
|
| |
Notes:
svn path=/stable/7/; revision=198770
|
|
|
|
| |
Notes:
svn path=/stable/7/; revision=198762
|
|
|
|
|
|
|
|
| |
When superpages are enabled, add the 2 or 4MB page size to the array of
supported page sizes.
Notes:
svn path=/stable/7/; revision=198743
|
|
|
|
|
|
|
| |
Add a new sysctl for reporting all of the supported page sizes.
Notes:
svn path=/stable/7/; revision=198742
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well:
- Add a routine to walk a list of ACPI subtables such as those used in the
APIC and SRAT tables in the MI acpi(4) driver.
- Move the routines for mapping and unmapping an ACPI table as well as
mapping the RSDT or XSDT and searching for a table with a given signature
out into acpica_machdep.c for both amd64 and i386.
Notes:
svn path=/stable/7/; revision=198618
|
|
|
|
|
|
|
|
| |
Implement simple machine check support for amd64 and i386. It is disabled
by default but can be enabled via the 'hw.mca.enabled' tunable.
Notes:
svn path=/stable/7/; revision=198589
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per their definition, atomic instructions used in conjuction with
memory barriers should also ensure that the compiler doesn't reorder paths
where they are used. GCC, however, does that aggressively, even in
presence of volatile operands. The most reliable way GCC offers for avoid
instructions reordering is clobbering "memory".
Not all our memory barriers, right now, clobber memory for GCC-like
compilers.
Fix these cases.
Notes:
svn path=/stable/7/; revision=197986
|
|
|
|
|
|
|
|
|
|
|
| |
- Split the logic to parse an SMAP entry out into a separate function on
amd64 similar to i386. This fixes a bug on amd64 where overlapping
entries would not cause the SMAP parsing to stop.
- Change the SMAP parsing code to do a sorted insertion into physmap[]
instead of an append to support systems with out-of-order SMAP entries.
Notes:
svn path=/stable/7/; revision=197485
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to
a device pager (OBJT_DEVICE) object in that it uses fictitious pages to
provide aliases to other memory addresses. The primary difference is that
it uses an sglist(9) to determine the physical addresses for a given offset
into the object instead of invoking the d_mmap() method in a device driver.
Notes:
svn path=/stable/7/; revision=197197
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure FreeBSD binaries without .note.ABI-tag section work
correctly and do not match a colliding Debian GNU/kFreeBSD
brandinfo statements.
For this mark the Debian GNU/kFreeBSD brandinfo that it must have
an .note.ABI-tag section and ignore the old EI_OSABI brandinfo
when comparing a possibly colliding set of options.
Due to SYSINIT we add the brandinfo in a non-deterministic order,
so native FreeBSD is not always first. We may want to consider
to force native FreeBSD to come first as well.
The only way a problem could currently be noticed is when running an
i386 binary without the .note.ABI-tag on amd64 and the Debian GNU/kFreeBSD
brandinfo was matched first, as the fallback to ld-elf32.so.1 does
not exist in that case.
Reported and tested by: ticso
In collaboration with: kib
Notes:
svn path=/stable/7/; revision=196924
|
|
|
|
|
|
|
|
| |
Move (read|write)_cyrix_reg() inlines from specialreg.h to cpufunc.h.
specialreg.h now consists solely of register-related macros.
Notes:
svn path=/stable/7/; revision=196853
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
195385, 195649, 195660, 195749, and 195774:
Add support to the virtual memory system for configuring machine-
dependent memory attributes:
- Refactor contigmalloc() into two functions: a simple front-end that deals
with the malloc tag and calls a new back-end, kmem_alloc_contig(), that
allocates the pages and maps them.
- Use kmem_alloc_contig() to implement the UMA back-end allocator for
jumbo frame zones.
- Use kmem_alloc_contig() to allocate the top-level page tables for PAE.
- Introduce vm_memattr_t to as a type to hold memory attributes.
- Introduce vm_object_set_memattr() for setting the default memory
attributes that will be given to an object's pages.
- Introduce and use pmap_page_{get,set}_memattr() for getting and
setting a page's machine-dependent memory attributes. Add full
support for these functions on amd64 and i386 and stubs for them on
the other architectures. The function pmap_page_set_memattr() is also
responsible for any other machine-dependent aspects of changing a
page's memory attributes, such as flushing the cache or updating the
direct map. The uses include kmem_alloc_contig(), vm_page_alloc(),
and the device pager:
kmem_alloc_contig() can now be used to allocate kernel memory with
non-default memory attributes on amd64 and i386.
vm_page_alloc() and the device pager will set the memory attributes
for the real or fictitious page according to the object's default
memory attributes.
- Update the various pmap functions on amd64 and i386 that map pages to
incorporate each page's memory attributes in the mapping.
Reviewed by: alc
Notes:
svn path=/stable/7/; revision=196838
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
181151, 181284, 181356, 181456, 189454, 194209, 195416, 195836, 196318,
196705, and 196707:
Various fixes and enhancements to the amd64 and i386 pmaps to support PAT.
- Extend pmap_demote_pde() to include the ability to instantiate a new page
table page where none existed before.
- Enhance pmap_change_attr() to fully support large (2/4MB) pages by
breaking demoting them to 4KB page mappings when needed.
- Enhance pmap_change_attr() to avoid page demotions, cache mode changes,
and cache and TLB invalidation when some or all of the specified range
is already mapped with the specified cache mode.
- Enhance pmap_change_attr() to adjust the direct map automatically when
changing the cache mode of a kernel virtual address range.
- Fix pmap_object_init_pt() to not assume that the pages of a OBJT_DEVICE
object are always physically contiguous.
- Correct a critical accounting error in pmap_demote_pde().
Reviewed by: alc
Notes:
svn path=/stable/7/; revision=196781
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjust the handling of the local APIC PMC interrupt vector:
- Provide lapic_disable_pmc(), lapic_enable_pmc(), and lapic_reenable_pmc()
routines in the local APIC code that the hwpmc(4) driver can use to
manage the local APIC PMC interrupt vector.
- Do not enable the local APIC PMC interrupt vector by default when
HWPMC_HOOKS is enabled. Instead, the hwpmc(4) driver explicitly
enables the interrupt when it is succesfully initialized and disables
the interrupt when it is unloaded. This avoids enabling the interrupt
on unsupported CPUs which may result in spurious NMIs.
Notes:
svn path=/stable/7/; revision=196616
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix handling of .note.ABI-tag section for GNU systems [1].
Handle GNU/Linux according to LSB Core Specification 4.0,
Chapter 11. Object Format, 11.8. ABI note tag.
Also check the first word of desc, not only name, according to
glibc abi-tags specification to distinguish between Linux and
kFreeBSD.
Add explicit handling for Debian GNU/kFreeBSD, which runs
on our kernels as well [2].
In {amd64,i386}/trap.c, when checking osrel of the current process,
also check the ABI to not change the signal behaviour for Linux
binary processes, now that we save an osrel version for all three
from the lists above in struct proc [2] (slightly different to HEAD).
These changes make it possible to run FreeBSD, Debian GNU/kFreeBSD
and Linux binaries on the same machine again for at least i386 and
amd64, and no longer break kFreeBSD which was detected as GNU(/Linux).
PR: kern/135468
Submitted by: dchagin [1] (initial patch)
Suggested by: kib [2]
Tested by: Petr Salinger (Petr.Salinger seznam.cz) for kFreeBSD
Reviewed by: kib
Notes:
svn path=/stable/7/; revision=196602
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Various members of struct ipc_perm use appropriate types instead of
unsigned short.
- The shm_segsz member of struct shmid_ds is now a size_t instead of an
int which should allow for complete support of SYSV SHM regions >= 2GB.
- The shm_nattch member of struct shmid_ds is now an int instead of a
short.
- The existing versions of the __semctl(), msgctl(), and shmctl() system
calls have been renamed to freebsd7_*() and implement the old ABI. New
versions of these system calls provide the new ABI. The new system
calls also use newer symbol versions in libc so old and new binaries
will both work under new kernels.
- Specific to 7.x: the kern_msgctl(), kern_semctl(), and kern_shmctl()
functions now use ABI shims that transparently "rename" the functions
to kern_new_*() for all new modules. Existing compat functions under
the old names remain to provide compatibility for older kernel modules.
Notes:
svn path=/stable/7/; revision=196006
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable POSIX semaphores on all non-embedded architectures by default.
More applications (including Firefox) seem to depend on this nowadays,
so not having this enabled by default is a bad idea.
Proposed by: miwi
Patch by: Florian Smeets <flo kasimir com>
Approved by: re (kib)
Notes:
svn path=/stable/7/; revision=195706
|
|
|
|
|
|
|
|
|
|
| |
Unlock the largest standard CPUID on Intel CPUs for both amd64 and i386.
On i386, we extend it to cover Core, Core 2, and Core i7 processors,
not just Pentium 4 family, and move it to better place. On amd64, all
supported Intel CPUs should have this MSR.
Notes:
svn path=/stable/7/; revision=195687
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add basic VIA Nano processor support for amd64 and i386.
r186797 - Add Centaur/IDT/VIA vendor ID for Nano family.
r187101 - Allow VIA Nano processors to boot FreeBSD/amd64.
r187117 - Replace more cpu_vendor with cpu_vendor_id.
r187118 - Add basic i386 support for VIA Nano processors.
r187157 - Enable MSI support for VIA Nano processors on i386.
r187594 - Replace more cpu_vendor with cpu_vendor_id.
r187597 - Include a missing header file.
r187598 - VIA Nano processor has P-state invariant TSC.
r187633 - Add more VIA bridges to agp_via.c.
Notes:
svn path=/stable/7/; revision=195667
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add line width calculations for 15/16 and 24/32 bit modes in case
the "Get Scan Line Length" function fails, as it does in Parallels
(in Version 2.2, Build 2112 at least).
PR: i386/127367
Obtained from: DragonFly
Submitted by: Pedro Giffuni
Notes:
svn path=/stable/7/; revision=195529
|