summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2019-05-09Eliminate 'make clean' stops with 'rmdir: .: Invalid argument'.Kenji Aoyama
2019-05-08Enable ucrcom(4) on all architectures that have uslcom(4).Mark Kettenis
ok deraadt@
2019-05-08Print the current ASID in hex instead of decimal, to match the formatVisa Hankala
with the ASID format on TLB entry lines.
2019-05-08Fix kernel compile with DEBUG_AGINTC.ccardenas
ok phessler, deraadt
2019-05-06Fix thinko in previous. The .bss clearing was overzealous and overwroteVisa Hankala
a part of the free memory list, terminating it prematurely.
2019-05-06Enforce store/load order when setting or clearing AST flag on mips64Visa Hankala
Make sure that any preceding stores become visible to other CPUs before setting the AST flag in need_resched() and signotify(). This should prevent a very unlikely case with inter-CPU ASTs where the receiving CPU uses stale state. When clearing the AST flag in ast(), ensure that the clearing store is performed before any other memory accesses in the AST handler. Otherwise, there is a slight risk of losing an AST request that gets posted while the handler is running. OK guenther@
2019-05-06Issue write-write barrier before sending IPI on mips64Visa Hankala
The barrier ensures that any lockless state changes become visible to other CPUs before the IPI is sent. Otherwise, a receiving CPU might still observe an old state when it processes the interrupt. OK guenther@
2019-05-06Fix unintentional delay of ASTs on MP mips64Visa Hankala
Make the interrupt and trap return paths check for ASTs with interrupts disabled. If there is no pending request, interrupts are kept disabled until return to userspace. This fixes delayed processing of an AST request that arrives from another CPU after the AST flag has been checked but before the CPU has finished the return path. The IPI that follows the setting of the AST flag forces kernel re-entry and recheck of AST. Noticed by guenther@
2019-05-06Whitespace removalMike Larkin
Pointed out by Jerome Pinot
2019-05-06Whitespace removalMike Larkin
Pointed out by Jerome Pinot
2019-05-06Whitespace removalMike Larkin
Pointed out by Jerome Pinot
2019-05-06Whitespace removalMike Larkin
Pointed out by Jerome Pinot
2019-05-06Whitespace removalMike Larkin
Pointed out by Jerome Pinot
2019-05-06Whitespace and extra semicolon removal.Mike Larkin
Pointed out by Jerome Pinot
2019-05-05Getting too tight. Surrender a littleTheo de Raadt
2019-05-05Add support for the EFI Random Number Generator Protocol and use it to XORMark Kettenis
random data into the buffer that we feed the kernel. ok deraadt@, mlarkin@
2019-05-05Use the .bss for the bootstrap stack of mips_init(). This way the memoryVisa Hankala
region is properly allocated by the firmware. Move the .bss clearing to locore.S because the section has to be ready when the stack is taken into use. This additionally makes the C environment more consistent at the start of mips_init().
2019-05-05Call cpu_unidle() from need_resched() on mips64 like mostVisa Hankala
other architectures.
2019-05-05Turn need_resched() and signotify() into proper functions on mips64.Visa Hankala
2019-05-04let users try mcx(4)Theo de Raadt
2019-05-04Remove some junk that we don't use.Mark Kettenis
ok patrick@
2019-05-04Improve the interaction between efifb(4), inteldrm(4) and radeondrm(4)Mark Kettenis
when we have a serial console by introducing the notion of a "primary" graphics device. The primary graphics device is the one set up and used by firmware (BIOS, UEFI). The goal is to make sure that wsdisplay0 and drm0 reliably attach to the primary graphics device such that X works out of the box even if you have multiple cards or if you are using a serial console. This also fixes the situation where inteldrm(4) or radeondrm(4) would take over the console on UEFI systems even if the kernel was booted with a serial console. ok jsg@
2019-05-02Add a print function to mainbus(4) such that it prints unconfigured devicesMark Kettenis
just like we do for simplebus(4). ok patrick@, visa@
2019-05-02Fix vmm_support.S compilation error with gcc 8.3Mike Larkin
ok deraadt
2019-04-30Enable mvmdio(4) and mvneta(4) on arm64 as well. These are partPatrick Wildt
of the Armada 3720 SoC as used on the Turris Mox.
2019-04-30Add mvuart(4) to support the Armada 3720's serial console.Patrick Wildt
ok kettenis@
2019-04-26Guard against repeated inclusion of <mips64/pte.h>. This fixes drm buildVisa Hankala
on loongson.
2019-04-25disable -Oz compile for SMALL_KERNEL w/ comment whyTheo de Raadt
2019-04-25Add movstrSI12_i4 for linking -Os/-Oz kernels. Sadly however itTheo de Raadt
fails and locks early in boot.
2019-04-25Add a check to tftp_open() that we are actually opening a TFTP device.Christian Weisgerber
When reading a file from a non-TFTP device, clear the bootmac variable to prevent the kernel from going into netboot mode. This allows loading a kernel from a disk device after having booted efiboot from PXE. style tweak and ok kettenis@
2019-04-24Style tweaks:Philip Guenther
- use NULL for pointer comparisons and assignments. - in level comparisons, use PTP_LEVELS instead of magic constants - eliminate some superfluous variables in pmap_free_ptp() ok mlarkin@
2019-04-23Add support for ccp(4) at acpi(4).Mark Kettenis
ok deraadt@
2019-04-23Call exit(2) if sigreturn(2) fails on mips64. This is what otherVisa Hankala
architectures do. Noticed by deraadt@
2019-04-23Add a driver for OCTEON two-wire serial interface.Visa Hankala
Not enabled yet because of a conflict with octrtc(4).
2019-04-23Remove file name and line number output from witness(4)Visa Hankala
Reduce code clutter by removing the file name and line number output from witness(4). Typically it is easy enough to locate offending locks using the stack traces that are shown in lock order conflict reports. Tricky cases can be tracked using sysctl kern.witness.locktrace=1 . This patch additionally removes the witness(4) wrapper for mutexes. Now each mutex implementation has to invoke the WITNESS_*() macros in order to utilize the checker. Discussed with and OK dlg@, OK mpi@
2019-04-23Copy cache-control bits from U+K to U-K entry in pmap_enter_special()Philip Guenther
in a generic way, correcting the handling of the LAPIC page. ok mlarkin@
2019-04-22vmm(4): flush guest TLB entries if guest disables paging. While thisMike Larkin
behaviour is not mandatory, the SDM says a CPU "may" do this. Better to be safe than sorry. A similar treatment will be needed for SVM, and for the cases where the host CPU does not have VPIDs/ASIDs. Those will be committed separately. Original diff from Guillaume Pagnoux, thanks!
2019-04-22Not all systems supporting DVFS expose a regulator to set the voltage.Mark Kettenis
On such systems we should skip setting the voltage and just change the clock frequency. An example of such a system is the HiKey970 where firmware running on a microcontroller will transparently adjust the voltage. ok patrick@
2019-04-22vmm(4): remove a debug printf that was causing lock issues (it was beingMike Larkin
called from an IPI routine).
2019-04-20Revert enabling VMM_DEBUG which slipped through the previous commit.kn
Fixes panic on `vmctl start foo'. OK tedu deraadt
2019-04-20When copying the EFI-stored kernel to the correct operating location,Theo de Raadt
use memmove. We don't know whether EFI allocated overlapping memory.
2019-04-20libsa's memcpy() is actually memmove(). make a proper memmove(), and giveTheo de Raadt
memcpy() correct behaviour. This also brings the bcopy() macro into line.
2019-04-19Work around a limitation of clang integrated assembler on mips64.Visa Hankala
The assembler does not handle undeclared local symbols properly and generates R_MIPS_CALL16 relocations where it should generate local GOT references. For now, get along with the problem by declaring local symbols where necessary. OK kettenis@ guenther@
2019-04-18vmm(4): whitespace fixMike Larkin
2019-04-16When entering kernel pages uncached we need to make sure to flush thePatrick Wildt
caches. If the physical page was previously used by userland it is likely that this page is still in the cache and writing to the newly mapped page could result in unexpected behaviour. ok kettenis@
2019-04-16Prevent attaching drivers to devices for which we attached a driver early.Mark Kettenis
ok patrick@, dlg@, visa@
2019-04-14Instead of using COPTS=-Oz (and similar) in make environment to forceTheo de Raadt
tightly-built ramdisk kernels, set the option in per-arch Makefile.inc based upon SMALL_KERNEL
2019-04-14Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 toJonathan Gray
linux 4.19.34. Adds support for more Intel hardware: Broxton/Apollo Lake (was is_preliminary in 4.4) Amber Lake (another Kaby Lake refresh) Gemini Lake Coffee Lake Whiskey Lake Cannon Lake (though no hardware with Intel graphics ever shipped) Ice Lake (alpha support, hardware not released) This does not add support for new radeon hardware on the AMD side as newer radeons have a different kernel driver (amdgpu). Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for helping and a bunch of other developers for testing.
2019-04-10KNF per naddy@ians
2019-04-10Add (uint32_t) cast on marks[] to avoid warning in gcc3.Kenji Aoyama
"Yes, fix that" deraadt@