summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2019-08-04Fix a typo I noticed reviewing the smbios code cleanup diff.kmos
(stirng -> string) ok kettenis@ who pointed out I should fix the new arm64 smbiosvar.h too
2019-08-04Ensure that a posted write completes when re-enabling interruptsVisa Hankala
or sending an IPI.
2019-08-04Add support for X-Gene/eMAG variant.Mark Kettenis
2019-08-04Cleanup the bios(4)/smbios(4) code a bit. Fix some KNF issues, reduceMark Kettenis
differences between the i386 and amd64 versions of the code and switch to using the standard C integer exact width integer types. ok deraadt@
2019-08-04crank version, following fchmod changeTheo de Raadt
2019-08-04Unmap tables once we're done with them.Mark Kettenis
2019-08-04Implement smbios support on arm64.Mark Kettenis
ok deraadt@, jsg@
2019-08-04Remove the old, unfinished octeon bootloader.Visa Hankala
2019-08-04Revise the way how the octeon bootloader is built. The originalVisa Hankala
approach was not right, and there is still room for improvement. OK deraadt@
2019-08-03permit maxusers to grow up to 128Theo de Raadt
2019-08-03There are some pretty big arm64 machines so crank maxusers to 80.Theo de Raadt
2019-08-03Add F_WRITE support to the block layer (not yet used)Theo de Raadt
ok kettenis
2019-08-03In the bootblocks, after discovering and opening /bsd.upgrade, fchmod -xTheo de Raadt
so the file cannot be re-executed upon the next boot. This provides a stronger one-shot-upgrade model than the upgrade script's rm /bsd.upgrade. Now various forms of upgrade failure will reboot into /bsd, which is probably more recoverable. Performing fchmod -x depends on (1) use of MI boot.c (not alpha/macppc/sparc64/sgi/octeon) and (2) "can write blocks" functionality in the IO layer. Most architectures have this support now. Two diagnostics "fchmod a-x %s: failed" and "/bsd.upgrade is not u+x" will remain in the tree while refinements happen for some of the laggard architectures. based upon a discussion florian tested in snapshots for more than a week without any complaints
2019-08-03If the CPU frequency is available during TSC init, make it availableJoshua Stein
for lapic timer init to avoid calibrating against the 8254 clock. Some newer machines are shipping with the 8254 clock gated for power saving, so it may not be usable. ok mlarkin discussed with deraadt
2019-08-03Recognize Applied Micro as an Implementor and X-Gene as a PartNum forMark Kettenis
processor identification purposes. Use the name instead of the ID as the sentinel in the various tables since X-Gene has PartNum zero. Note that this means Ampere eMAG gets recognized as Applied Micro X-Gene r3p2. That makes sense as the CPU started its life as X-Gene 3. Apparently future Ampere parts will use the new Ampere Implementer ID. ok jsg@
2019-08-02Add support for additional ITS page sizes and make sure we allocateMark Kettenis
enough memory for the device table to cover the entire DeviceID space. ok patrick@
2019-08-02Avoid repeated invocation of curcpu().Visa Hankala
2019-08-02Call refreshcreds() from ast() on mips64. This ensures that credentialsVisa Hankala
get updated when handling an AST after an interrupt. OK deraadt@
2019-08-02per-process itimers: itimerval -> itimerspeccheloha
Loongson runs at 128hz. 128 doesn't divide evenly into a million, but it does divide evenly into a billion. So if we do the per-process itimer bookkeeping with itimerspec structs we can have error-free virtual itimers on loongson just as we do on most other platforms. This change doesn't fix the virtual itimer error alpha, as 1024 does not divide evenly into a billion. But this doesn't make the situation any worse, either. ok deraadt@
2019-08-01Fix fd leak that broke disk_close().Visa Hankala
2019-07-31Fix kmem access on octeon. Currently, mem_layout lists segments thatVisa Hankala
were free after the kernel was loaded. The memory occupied by the kernel image is not included. To let libkvm access the image through /dev/kmem, return true from is_memory_range() if the physical address is within the kernel.
2019-07-30Fix mapping of MSI sideband data when there are SMMU's present.Mark Kettenis
2019-07-30Seems the Amppere eMAG has a silicon big where the number of writable bitsMark Kettenis
of the ICC_PMR_EL1 registers varies with the value being written. Change the value we write to probe the number of writable bits to a value that yields the desired result. Suggested by drahn@ ok patrick@
2019-07-30Make sure the virtual addresses that are used for EFI runtime servicesMark Kettenis
fit into the 39-bit address space that we currently use for the runtime mappings. ok patrick@
2019-07-30Previous version accidentally enabled VMM_DEBUG, so turn that off.Mike Larkin
noticed by tb@
2019-07-29Support disk write in efiboot for armv7 and arm64.YASUOKA Masahiko
ok patrick deraadt
2019-07-29Support disk write in efiboot. Requested by deraadt.YASUOKA Masahiko
2019-07-28vmm(4): join some short lines of codeMike Larkin
KNF, no code change.
2019-07-28Link octeon bootloader to the build.Visa Hankala
OK deraadt@
2019-07-28Add a dedicated ramdisk entry for the octeon bootloader to reduceVisa Hankala
the size of the "boot" file. OK deraadt@
2019-07-28With the DWC2 reset in place, dwctwo(4) should be safe to useVisa Hankala
in the bootloader.
2019-07-28Put DWC2 controller into reset mode on (pseudo-)shutdown to makeVisa Hankala
kernel handover safer.
2019-07-28Fix trimming of newline.Visa Hankala
2019-07-26Recognize PCI busses that don't support INTx and refuse to map legacy onMark Kettenis
such busses.
2019-07-26emove duplicate definitions of LAPIC_ID_MASK and LAPIC_ID_SHIFT.Kevin Lo
"yes please" guenther@
2019-07-25Enable sharing of root complex when appropriate.Mark Kettenis
2019-07-25Add support for virtual root complexes used for Static Direct I/O.Mark Kettenis
2019-07-25Add SDIO hypervisor calls.Mark Kettenis
2019-07-24Avoid strlcpy() and printing of bios date if fixstring() returns NULL.Jonathan Gray
jan@ has a machine where the smbios date is ten space characters which results in fixstring() returning NULL causing a NULL derefence. Reported, tested by and ok jan@
2019-07-22Disable caches and MMU before jumping to the kernel entry point. NeededMark Kettenis
because UEFI on 32-bit ARM is supposed to leave them enabled and U-boot was changed (starting with release 2019.04) to follow the spec here. However the OpenBSD/armv7 kernel expects to be booted with caches and MMU turned off. Note that there are still issues on boards that enable the non-architected L2 cache. UEFI demands that such caches are not turned on, but U-Boot does turn them on and this makes our kernel fail to boot. With help from jsg@ ok jsg@
2019-07-20Get rid of `ddb_is_active' instead use `db_active'.Martin Pieuchot
From Christian Ludwig <christian_ludwig at genua dot de> ok visa@
2019-07-20Increment `db_active' before entering db_trap() like other archs do.Martin Pieuchot
ok visa@
2019-07-19i8254_delay(): simplify tick computationcheloha
Back in the mid-90s these optimizations probably made sense, but these days the compiler will produce even better code if we just explicitly use 64-bit math and do the obvious thing. joerg@netbsd.org even popped in on tech@ to agree. ok guenther@
2019-07-19ttysleep(): drop unused timeout parametercheloha
All callers sleep indefinitely. With help from visa@. ok visa@, ratchov@, kn@
2019-07-17Disable for now.Visa Hankala
2019-07-17Adjust search of symbol table pointers to match with the bootloader.Visa Hankala
2019-07-17Add a bootloader for octeon.Visa Hankala
The firmware on OCTEON machines usually does not provide an interface for accessing devices, which has made it tricky to implement an OpenBSD bootloader. To solve this device access problem, this new loader has been built on top of a small kernel. The kernel provides all the necessary devices drivers, while most of the usual bootloader logic is in a userspace program in a ramdisk. The loader program is accompanied by a special device, octboot(4). The main purpose of this device is to implement a mechanism for loading and launching kernels. The mechanism has been inspired by Linux' kexec(2) system call. The bootloader will be enabled later when it is ready for general use. Discussed with deraadt@
2019-07-17vmm/vmd: Fix migration with pvclockpd
Implement VMM_IOC_READVMPARAMS and VMM_IOC_WRITEVMPARAMS ioctls to read and write pvclock state. reads ok mlarkin@
2019-07-15Fix a direct map bug that affected machines with > 1023GB physicalMike Larkin
memory (or, more precisely, those machines that had physical memory regions extending past physical address 1023GB). ok kettenis
2019-07-15store smbios date string in globally visible var for drmJonathan Gray
ok mlarkin@ kettenis@