summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2017-10-16Utilize scatter/gather DMA with the newer MMC controller.Visa Hankala
2017-10-14locore0: remove an unused variableMike Larkin
ok deraadt
2017-10-14reduce the amount of includes in arch/amd64Jonathan Gray
ok mpi@ deraadt@
2017-10-13ansify function prototypes (to match db_stack_trace_print() in the same file)Jasper Lievisse Adriaanse
2017-10-13Use gap.o on arm64. After the recent llvm/lld 5.0.0 update the linkerJonathan Gray
script can be used. ok kettenis@
2017-10-13I was one bit off in the "is canonical" test for FS.base (TCB pointer) values,Philip Guenther
so it was still possible to fault the kernel. Problem observed by Maxime Villard ok deraadt@ bluhm@
2017-10-11input files should not be .o; from Scott ChelohaTheo de Raadt
2017-10-11Add bwfm(4), a driver for Broadcom FullMAC WiFi controllers. ThePatrick Wildt
FullMAC, in comparison to SoftMAC, does most WiFi handling in the firmware that's running on the controller. This means we have to work around the net80211 stack while still implementing all the WiFi interfaces to userland. This driver is still in early development. So far it can connect to open WiFis over the USB bus. SDIO and PCIe support, for devices like the Raspberry Pi 3 or the Macbooks, is not yet implemented. Also mbufs on the transmit path leak and are not yet freed. ok stsp@
2017-10-11Try to make CPU cache size values more correct, especially on OCTEON IIVisa Hankala
and III. The logic does not look nice, but the parameters do not follow the standard config register layout anyway. Remove unnecessary default values, and assume that the Config1 and Config2 registers are available on every CPU. Tested on CN5020, CN6120, CN7130 and CN7360.
2017-10-11Make the tc alpha blinkenlichten start by default.Martin Pieuchot
Restores the balance of serenity and peace of mind of the last real alpha user, to some extent. From miod@
2017-10-11Add "machine gop" command to support changing graphic output mode.YASUOKA Masahiko
The selected mode is used by efifb(4). original diff from Klemens Nanni, tested by Andrew Daugherity
2017-10-10remove a unused variableMike Larkin
ok tom, kettenis, deraadt
2017-10-08Enable rkiic(4) and rkpmic(4) for Rockchip RK3288 boards.Mark Kettenis
ok patrick@, jsg@
2017-10-06Recalibrate TSC timecounter with HPET and PM timerMike Belopuhov
If frequency of an invariant (non-stop) time stamp counter is measured using an independent working timecounter that has a known frequency, we can assume that the measured TSC frequency is as good as the resolution of the timecounter that we use to perform the measurement. This lets us switch from this high quality but expensive source to the cheaper TSC without sacrificing precision on a wide range of modern CPUs. From Adam Steen <adam@adamsteen.com.au> with tweaks from reyk@ and myself. Tested by brynet@, sthen@ and others, OK mlarkin, sthen
2017-10-06vmm: handle 32 bit guest w/PAE when guest enables PAE first then paging,Mike Larkin
as 32 bit linux guests do. ok pd@
2017-10-06Revert previous video mode when setting GOP SetMode is failed. ThisYASUOKA Masahiko
prevents the video output problem on ThinkPad X121e and so on. diff from Klemens Nanni, test by Andrew Daugherity
2017-10-05vmm: add functions to decode %rflags and IA32_MISC_ENABLE MSR.Mike Larkin
Debug builds only.
2017-10-05Check the state value within the assert statement, do not set it.Alexander Bluhm
found with grep 'KASSERT.* = '; OK kettenis@
2017-10-05restore a block of code erroneously removed in r1.162 that causes aMike Larkin
warning during linux guest bootup relating to fpu save state size.
2017-10-05fix some spacing issues, wrong comments, and DPRINTFs that were in theMike Larkin
wrong place, no functional change.
2017-10-05change DPRINTF format specifier from %lld to %llx for easier readabilityMike Larkin
2017-10-05Clean up some no longer needed includes left over from the locore/locore0 split.Mike Larkin
ok tom, mpi, deraadt
2017-10-04Due to changes in LLD where sections are sorted in a different way,Patrick Wildt
the .got section was put into the randomdata segment. This caused the bootloader to overwrite parts of the .got and leads to broken pointers. Explicitly put the .got section into the .data segment. ok kettenis@
2017-10-04as a result of previous change, vftype and ftype always have the sameTheo de Raadt
value so simplify.
2017-10-04Follow the pattern set by copy*/pcb_onfault: when xrstor faults, returnPhilip Guenther
from the trap to a 'resume' address to effectively make xrstor_user() return an error indication, then do the FPU cleanup and trap generation from there where we can get access to the original, userspace trapframe. The original fix tried to handle the trap while on the wrong trapframe, leaking kernel addresses and possibly leading to double faults. Problem pointed out by abluhm@ ok deraadt@ mikeb@
2017-10-03Nested xrstor handled leaks a kernel address into sigval, but potentialTheo de Raadt
user address is unavailable so use 0 instead, since the typical cases are coredump or handing to a SIGBUS handler which cannot recover. Issue observed by bluhm ok bluhm, mlarkin, guenther said "Foo!"
2017-10-03The xrstor instruction will fault if the provided xstate data, whichPhilip Guenther
is under userspace control via sigreturn, fails various consistency checks. Rather than trying to replicate the CPU's hardwired checks in C code, handle it like iretq: check in trap() whether a fault is from the problem instruction and handle it there. CPU behavior and the potential issue pointed out on Linux kernel-hardening ok mikeb@ deraadt@
2017-10-01set MAXSSIZ to the same value as on all other architectures (32MB)Christian Weisgerber
ok deraadt@
2017-09-29When fault indicates PGEX_W, only tell uvm we need a writeable page..Theo de Raadt
don't request R+W. Issue observed by jsing in a go test of some sort. ok mlarkin
2017-09-28When option DDB_STRUCTINFO was removed from the kernel, too much fromPatrick Wildt
the kernel makefiles was removed which lead to C files not being re- compiled when a dependency changed. This can lead to panics in odd places and generally a broken system. ok deraadt@
2017-09-27amd64 needs FS.base values (the TCB pointer) to be validated, as noncanonicalPhilip Guenther
addresses will cause a fault on load by the kernel. Problem observed by Maxime Villard ok kettenis@ deraadt@
2017-09-23Fix controller locking so that it covers the DMA map and bounce buffer.Visa Hankala
Those are shared by SD/MMC buses.
2017-09-22Do not bounce if possible.Visa Hankala
2017-09-22Allocate a bounce buffer once during init and reuse it for DMA commands.Visa Hankala
This makes the system a bit harder to corner when paging to SD/MMC. In addition, limit the maximum DMA segment size to MAXPHYS.
2017-09-22Remove unused code.Mark Kettenis
2017-09-21Ensure proper order of register accesses by readback after write.Visa Hankala
This fixes spurious interrupts seen on CN7360.
2017-09-21Enable dwxe(4) on armv7 as well for use on the Allwinner H3 SoC.Patrick Wildt
Prompted by jsg@
2017-09-21Add dwxe(4), a driver the Synopsis DesignWare Ethernet controller usedPatrick Wildt
on the Allwinner A64, H3 and H5 SoCs. This makes the onboard ethernet usable on the popular Pine A64 and NanoPi Neo2. The skeleton used for this driver is taken from tsec(4). ok kettenis@
2017-09-20Raise match priority such that imxocotp(4) wins over syscon(4).Mark Kettenis
ok patrick@
2017-09-19Enable syscon(4).Patrick Wildt
2017-09-17Do not print "cpuX launched" any longer. This reduces dmesg spamVisa Hankala
on multicore systems.
2017-09-16Make sure that `fsr' is always initialized. Non-DEBUG kernelsVisa Hankala
have not been affected. From miod@
2017-09-16The copyin(9) family of functions should return EFAULT for all memoryPhilip Guenther
protection issues. So make amd64 do that instead of passing through uvm_fault()'s return value, which lead to other possible errors (particularly EACCES) being returned to userspace. Clean up a vestige on arm64 too. ok bluhn@ deraadt@
2017-09-15wrap a long lineMike Larkin
2017-09-12Remove option DDB_STRUCTINFO. Now that ddb(4) is CTF aware, similarMartin Pieuchot
functionnalities are available in GENERIC. ok jasper@, deraadt@, guenther@, dlg@
2017-09-12rename setredzone to setguardpage.David Gwynne
a redzone means something else on amd64, so im renaming this to avoid confusion.
2017-09-12add a guard page on the end of each threads kernel stack.David Gwynne
this protects the process control block. it also makes the kernel fault hard when the guard page gets hit by the stack, allowing debugging of the problem set of function calls at the time the problem occurs. without this, a big stack can overwrite the pcb, which makes the thread generate a fault when it is switched back onto a cpu, which is way too late. discussed with guenther@ ok deraadt@
2017-09-11Sync alpha/mips64/powerpc mutex implementations.Martin Pieuchot
No functionnal change. ok visa@
2017-09-11Avoid using an uninitialised variable. Found by the clang static analyser.Jonathan Gray
ok ians@
2017-09-11Don't test if an array is NULL. Fixes the build with clang which raisedJonathan Gray
a -Wtautological-pointer-compare warning. ok ians@