summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2018-12-04Add processor IDs for several OCTEON II and III SoCs.Visa Hankala
2018-12-03Do not process the top 32 bits of the 64 bit interrupt mask registerVisa Hankala
on the O2. The CRIME interrupt controller only has 32 interrupt sources. From miod@
2018-12-03Remove the unused interrupt type (edge/level) from the mace interruptVisa Hankala
handler registration. The code is inherited from isa(4), but on the O2, although some interrupt sources on CRIME are edge-triggered, all the MACE interrupts are level-triggered. From miod@
2018-11-23Add the pvclock(4) guest driver for paravirtual clocksReyk Floeter
This improves timekeeping on KVM guests as it runs much better than the virtualized acpihpet or acpitimer timecounters and the invtsc is not always available. Many thanks to Janne Johansson, landry@, and benno@ for testing amd64/i386. OK mlarkin@ phessler@
2018-11-20Fix typos in memprobe address check. Diff from Andrew Daugherity.YASUOKA Masahiko
2018-11-15one more typo noticed while pasting miod a reply;Jason McIntyre
2018-11-15fix typos in comments; from miodJason McIntyre
2018-11-12Fix grammar in commentPhilip Guenther
2018-11-11Add END() macro to set symbol size like every other archPhilip Guenther
ok deraadt@
2018-11-08Remove cardbus and pcmcia debug options that we don't enable on otherMark Kettenis
platforms. From miod@
2018-11-07Document `machine gop [mode]' commandkn
Feedback and OK jmc
2018-11-05Fix kernel build without serial consolekn
OK mpi
2018-10-31Bring over gapdummy.c changes from amd64/amr64/armv7/i386.Mark Kettenis
ok deraadt@, mortimer@, visa@
2018-10-30The way we currently generate gap.o using a linker script results in .rodataMark Kettenis
and .data segments that have the X (executable) flag set when using lld. This doesn't result in those sections being mapped executable in the bsd kernel, but it does result in the X flag being set on those sections in the final kernel binary, which confuses some scanning tools for (ROP) gadgets. Fix this by tweaking the generated gapdummy.c file that is used for building gap.o. It now defines the .rodata section using inline asm. This also fixes .data as it will inherit its flags from .rodata. ok deraadt@, mortimer@
2018-10-30The way we currently generate gap.o using a linker script results in .rodataMark Kettenis
and .data segments that have the X (executable) flag set when using lld. This doesn't result in those sections being mapped executable in the bsd kernel, but it does result in the X flag being set on those sections in the final kernel binary, which confuses some scanning tools for (ROP) gadgets. Fix this by tweaking the generated gapdummy.c file that is used for building gap.o. It now defines the .rodata section using inline asm. This also fixes .data as it will inherit its flags from .rodata. ok deraadt@, mortimer@
2018-10-26Use EFI memory map to determine what memory regions are availble just likeMark Kettenis
we already do on arm64. Prevents using the framebuffer on the cubox-i as regular memory for example.
2018-10-26Add acpipci(4) on amd64. For now this only calls the PCI-specific _OSCMark Kettenis
method to let the ACPI implementation know what features we support.
2018-10-26With lld the calculation of the entry point was wrong sinceChristian Weisgerber
LOADADDR(.text) is only available after the description of the text section. Instead simply use ENTRY(start) like we do on amd64. The bootloader strips the high bits from the entry point address already, so using the virtual address as the entry point address works. with/ok kettenis@
2018-10-26Correct linker emulation name for lld when building i386 kernels on amd64.Christian Weisgerber
ok kettenis@
2018-10-23Comvert a few uvm_km_alloc(9) and uvm_km_valloc(9) calls to km_alloc(9).Mark Kettenis
ok deraadt@, mlarkin@, visa@
2018-10-22More "explicitely" -> "explicitly" in various comments.Kenneth R Westerback
ok guenther@ tb@ deraadt@
2018-10-20Take the "package" into account when calculating the "smt" ID on modernMark Kettenis
AMD CPUs. Avoids knocking out too many processor threads on for example the AMD Ryzen Threadtipper 2990WX which apparently consists of 4 separate dies with 8 cores each. Note that the "package" ID really is a "die" ID here. ok sthen@
2018-10-20Sync with amd64 version.Mark Kettenis
2018-10-20Sync with amd64 version.Mark Kettenis
2018-10-20Bring over changes from aarch64 to fix building with ld.lld on amd64.Mark Kettenis
ok patrick@, naddy@
2018-10-20Add i386 relocations. Needed for 32-bit UEFI bootloader.Mark Kettenis
ok patrick@, naddy@
2018-10-16Add linker script to assis lld with building something usable that doesn'tMark Kettenis
have a PT_GNU_STACK segment and doesn't pad the bootblocks to a full page. ok naddy@, help from guenther@
2018-10-16Add gapdummy logic (already used on other archs) to allow linking with lld.Christian Weisgerber
ok jsg@ phessler@ kettenis@ deraadt@
2018-10-13Tweak linker flags and objcopy invocation to make things build with lld.Mark Kettenis
BOOTIA32.EFI works but BOOTX64.EFI unfortunately doesn't work yet. ok patrick@
2018-10-08Generate SIGBUS when we see a data abort exception because of unalignedMark Kettenis
access instead of spinning forever. Fix a weird cast in related code while I'm there. ok visa@ deraadt@
2018-10-07In vmm, handle xsetbv like xrstor: instead of trying to prevalidatePhilip Guenther
the values, just try it and handle the #GP if it faults. Problem reported by Maxime Villard (max(at)m00nbsd.net) ok mlarkin@
2018-10-05Provide an MD 64-bit byteswapping function build on 32-bit swapsChristian Weisgerber
as we do on arm and i386. Copied from arm. If there are no MD byteswapping functions, MI macros are used. These are wrapped by static inline functions to prevent multiple evaluation of their argument. If there are MD functions, they are used directly and therefore we must implicitly guarantee that they are safe from multiple evaluation. Defining an MD function to an MI macro breaks this promise. ok deraadt@
2018-10-04Use PCIDs where they and the INVPCID instruction are available.Philip Guenther
This uses one PCID for kernel threads, one for the U+K tables of normal processes, one for the matching U-K tables (when meltdown in effect), and one for temporary mappings when poking other processes. Some further tweaks are envisioned but this is good enough to provide more separation and has (finally) been stable under ports testing. lots of ports testing and valid complaints from naddy@ and sthen@ feedback from mlarkin@ and sf@
2018-10-02Unify the MD byteswapping code as much as possible across architectures.Christian Weisgerber
Use inline functions instead of GNU C statement expressions, and make them available to userland. With clues from guenther@. ok guenther@ kettenis@
2018-10-01Use inline functions instead of GNU C statement expressions for the MDChristian Weisgerber
byteswapping code. ok guenther@ kettenis@ This fixes a corner case triggered by the comms/hylafax port where htons() can't be compiled in C++ code: "Don't know how to handle indirect register inputs yet for constraint 'r'"
2018-09-30Delete the reserve_dumppages() declaration, missed in its 2010 removalPhilip Guenther
ok deraadt@
2018-09-28Add vlan and trunk to arm64's RAMDISK (amd64 parity)ccardenas
OK deraadt@ and kettenis@
2018-09-26Fix controller name.Visa Hankala
2018-09-26Increase the timeout from previous commit further. Rather than warningTheo de Raadt
we have spun out (to which there are consequences), we should spin longer. The BSP really wants the APs to finish.
2018-09-22Remap the UEFI buffer early such that we can use a write combining mappingMark Kettenis
which speeds things up considerably compared to an uncached mapping. ok deraadt@
2018-09-22Enable USB bwfm(4) on macppc RAMDISK as well, matching GENERIC.Stefan Sperling
Passes 'make release' build.
2018-09-21Enable bwfm(4) in GENERIC on macppc.Stefan Sperling
Tested by Christian Hammerschmidt.
2018-09-20grow alpha and hppa media to accomodate some recent growthTheo de Raadt
2018-09-20vmm(4): Clear the guest MWAITX/MONITORX extended CPUID feature bit,Bryan Steele
like we already do for MWAIT/MONITOR. Also match Intel here by not exposing the SVM capability to AMD guests. Allows Linux guests to boot in vmd(8) on Ryzen CPUs. ok mlarkin@
2018-09-19Free edid_buf after use so to fix possible memory leak.Claudio Jeker
With and ok jsg@
2018-09-18vmm(4): Reset host LDTR on exit for SVMMike Larkin
For SVM machines, the LDT content remains set to that of the guest VM on exit (as compared to Intel/VMX which resets the LDTR to 0). This fix ensures the LDT is reset to 0 on SVM exits. Leaving the LDT set to the guest's choice could allow a malicious process to escalate its privileges with the help of a malicious VM that they also are able to run on the machine. This was reported by Maxime Villard; thanks!
2018-09-18grow arm64 ramdiskTheo de Raadt
2018-09-14Unify and bump some of the NMBCLUSTERS defines. Some archs had it set toClaudio Jeker
4MB which is far too low especially when the platform is able to run MP. New limits are, amd64 = 256M; arm64, mips64, sparc64 = 64M; alpha, arm, hppa, i386, powerpc = 32M; m88k, sh = 8M Still rather conservative numbers but much better than before. At least some hangs of arm64 build boxes was caused by this. OK kettenis@, visa@
2018-09-14add gapdummy.c to the "clean" target like other generated filesChristian Weisgerber
ok visa@ jsg@ phessler@
2018-09-12Make pmap_protect(9) actually remove exec permission if the new permissionsMark Kettenis
include PROT_READ but not PROT_EXEC. ok patrick@