summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2012-08-29Kill all NOPIE and NOPIE_FLAGS in i386/stand, replacing them with -fno-piePascal Stumpf
and -nopie directly. Binaries from a PIE system are identical to those from a recent snapshot. ok deraadt@
2012-08-29The low-level guts to support MTP (Multi-Threaded Processing) on theMark Kettenis
Fujitsu SPARC64-VI and SPARC64-VII CPUs. Since the two threads on each core share the TLBs of the core we cannot enter different mappings for the same virtual address. Instead we use a scratch register to store the per-cpu pointer. This is very similar to what we do on sun4v. For now we still only attach the first thread of each SPARC64-VI/VII core since we currently don't handle the VMT (Vertical Multi-Threading) of the SPARC64-VI very well.
2012-08-29Make sure the interrupt stack for the boot processor is properly aligned toMark Kettenis
a 64K boundary. This means we don't have to worry about virtual cache aliasing anymore since SPARC V9 CPUs have at most a 16K aliasing.
2012-08-29Change "struct reg" to include a few more registers. We now use the sameMark Kettenis
layout as NetBSD.
2012-08-29Handle T_IPROT traps from userland by call vm_fault() instead of doing anMark Kettenis
unconditional SIGSEGV. Fixes random SIGSEGVs during single-stepping. ok miod@
2012-08-29Get rid of all NOPIE and NOPIE_FLAGS in amd64/stand and use -fno-pie and -nopiePascal Stumpf
directly instead. This will be the approach taken by every other arch too in the near future. It is easier than relying on bsd.own.mk to set these correctly. discussed with and ok deraadt@
2012-08-29Implement pci_min_powerstate().Mark Kettenis
2012-08-29Implement pci_min_powerstate().Mark Kettenis
2012-08-28Add -nopie to LINKFLAGS on ELF architectures. Note that this needs anPascal Stumpf
updated gcc and ld to understand the new -nopie flag. ok deraadt@
2012-08-28Implement pci_min_powerstate().Mark Kettenis
2012-08-28Implement pci_min_powerstate().Mark Kettenis
2012-08-25Another missed PIC -> __PIC__ conversion.Mark Kettenis
ok deraadt@
2012-08-24ansiJonathan Gray
2012-08-24don't read past the end of an array when dumping the stack.Jonathan Gray
same problem/fix as sparc.
2012-08-24Synchronize CR4 and CPUID portions of <machine/specialreg.h> for i386 and amd64Philip Guenthe
Add display of more feature bits: DTES64 PCID DEADLINE F16C RDRAND Add display of "Structured Extended Feature Flags Parameters": FSGSBASE SMEP EREP INVPCID ok mikeb@
2012-08-23missed NOPIE_FLAGS, noticed by Brian CallahanPascal Stumpf
ok deraadt@
2012-08-23missing ${NOPIE_FLAGS}; ok pascalTheo de Raadt
2012-08-23kill nnpfs deadTheo de Raadt
2012-08-22Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccPascal Stumpf
invocations. This allows us to use the compiler builtin define __PIC__ to check for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot. ok matthew@, conceptually ok kurt@
2012-08-22Build the kernel with -fno-pie. Just getting Ms out of my tree; this will bePascal Stumpf
cleaned up later. ok deraadt@
2012-08-22use static inline instead of inline so this will be compatible withJonathan Gray
compilers defaulting to c99 inline instead of the old gnu style. ok guenther@ miod@ deraadt@
2012-08-22sigpid should be of type pid_t (only visable with DEBUG).Okan Demirmen
ok miod@ (who found others to fix as well)
2012-08-21Add NOPIE= bits for sys/arch/*/stand to ensure that bootblocks will always bePascal Stumpf
built with -fno-pie. This gets the hairiest part of PIE out of the way ... ok deraadt@
2012-08-21don't read past the end of an array when dumping the stack.Jonathan Gray
spotted by clang ok deraadt@
2012-08-21For interrupts that get established before we attach the interrupt controller,Mark Kettenis
store the type of the interrupt (level, edge). ok miod@, mpi@
2012-08-20MISs work on Oberon as well.Mark Kettenis
2012-08-18glxpcib(4) invokes pcibattach assuming pcib doesn't need more than aMiod Vallat
`struct device' as its softc. This is not the case on loongson, and the glxpcib softc gets subtly corrupted, causing a kernel panic when attempting to select the glxpcib timecounter as the current timecounter. Skirt this by not using the pcib softc fields if we are invoked from glxpcib - it is not really worth putting pcib_softc in a header for the sake of MI glxpcib code.
2012-08-17Properly initialize the IOMMU control and status register for pyro(4).Mark Kettenis
Fixes DMA problems spotted on the v445.
2012-08-17Turns out interrupts for Ebus devices are wired to the *other* PCI Expres leafMark Kettenis
on the v445 (compared to the v215/v245). Generalize the code to allow for arbitrary wirings. Makes the serial console on the v445 work.
2012-08-16we are past the point where timecounters may disappearTed Unangst
ok miod
2012-08-15use Lk for links;Jason McIntyre
2012-08-15add oce and mfii; ok deraadt dlgMike Belopuhov
2012-08-14enable mfii(4).David Gwynne
ok deraadt@
2012-08-10';;', even with a newline between the semicolons, doesn't make muchKenneth R Westerback
sense as a for() body. One semicolon is enough. From llvm via Brad.
2012-08-10simplify pckbc_xt_translation()Alexandr Shadchin
* call only for set translation on (once in /sys/dev/pckbd.c) therefore we can delete unused code. * change behavior (more standard) - return zero on success ok miod@
2012-08-08Do not depend upon an initialized variable in the common case; gives init(8)Miod Vallat
a chance to run...
2012-08-08Make this compile again.Miod Vallat
2012-08-07Handle __syscall as syscall, since these are identical on 64-bit platforms,Miod Vallat
fixing an old n32-inherited bug in the process. Spotted during guenther@'s syscall factorization work.
2012-08-07<sys/ktrace.h> is now pulled in via <sys/syscall_mi.h>, so drop it from herePhilip Guenthe
2012-08-07Don't include <sys/ktrace.h>; makes this file compile again.Mark Kettenis
2012-08-07Move the common bits of syscall invocation and return handling intoPhilip Guenthe
an MI file, <sys/syscall_mi.h>, correcting inconsistencies and the handling when copyin() of arguments fails. Tested on i386, amd64, sparc64, and alpha (thanks naddy@) Any issues with other platforms will be fixed in tree. header name from millert@; ok miod@
2012-08-03enable oce(4)Mike Belopuhov
2012-08-02remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.Okan Demirmen
ok guenther@
2012-08-01Use mtrrmask instead of hardcoded values to accommodate newer CPUsMike Belopuhov
with a large physical address size (greater than 36 bit). Fixes a major performance hit seen on newer servers where an incorrectly programmed memory region length affects the PCI device mappings. While here, make sure to invalidate the TLB after programming MSRs and fix an incorrect behavior found by deraadt@ where MTRRdefType was updated outside of the protected region. The fix was partly obtained from FreeBSD, tested by many. With and OK deraadt
2012-07-30Revert previous change, and don't set IFM_AVALID | IFM_ACTIVE in ifm_statusMiod Vallat
to appease dhcpd, as dhcpd has now been fixed to not require this. repeated prodding and special ok deraadt@
2012-07-28zap a misleading commentPhilip Guenthe
2012-07-25When reporting media state, be sure to set IFM_AVALID and IFM_ACTIVE inMiod Vallat
ifm_status, for dhclient's sake. Current dhclient interface_status() considers interfaces able to report media information but not returning IFM_AVALID as down. Note that these interfaces usually have mii(4) or have specific code reporting correct values; sparc le(4) is an exception. Found the hard way by sebastia@; joint work with krw@, ok deraadt@
2012-07-22remove a few things to make this fit again; with miodTheo de Raadt
2012-07-18Attach non-frame buffer GIO devices with ga_product being the id gathered byMiod Vallat
gio_id(), not the whole 32 bit first word. Some boards with a 8-bit only ID register use the other 24 bits, sadly.
2012-07-18Hopefully correctly recognize GIO boards with a 8-bit only ID register, whichMiod Vallat
are not frame buffers. Thanks to Martin Boehme for donating such boards!