summaryrefslogtreecommitdiffstats
path: root/sys/arch/powerpc64 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spellingjsg2021-03-113-5/+5
|
* timecounting: use C99-style initialization for all timecounter structscheloha2021-02-231-2/+8
| | | | | | | | | | | | | | | | | | The timecounter struct is large and I think it may change in the future. Changing it later will be easier if we use C99-style initialization for all timecounter structs. It also makes reading the code a bit easier. For reasons I cannot explain, switching to C99-style initialization sometimes changes the hash of the resulting object file, even though the resulting struct should be the same. So there is a binary change here, but only sometimes. No behavior should change in either case. I can't compile-test this everywhere but I have been staring at the diff for days now and I'm relatively confident this will not break compilation. Fingers crossed. ok gnezdo@
* Add uhidpp(4), a driver for Logitech HID++ devices. Currently limited toanton2021-02-041-1/+2
| | | | | | | | | exposing battery sensors for HID++ 2.0 devices. Most of the code is derived from the hid-logitech-hidpp Linux driver. Thanks to Ville Valkonen <weezeldinga at gmail dot com> for testing. ok mglocker@
* Again allow COPTS= to come from the environment again, and don't lose thederaadt2021-01-281-4/+4
| | | | | SMALL_KERNEL specific variations. ok espie jsg
* OPAL implements firmware calls that abstract communicating with the BMC overkettenis2021-01-237-5/+484
| | | | | | IPMI. Use these calls to add support for impi(4) on PowerNV systems. ok dlg@
* introduce ujoy(4), a restricted subset of uhid(4) for gamecontrollers.thfr2021-01-232-2/+5
| | | | | | | | This includes ujoy_hid_is_collection() to work around limitations of hid_is_collection() until this can be combined without fallout. input, testing with 8bitdo controller, and ok brynet@ PS4 controller testing, fix for hid_is_collection, and ok mglocker@
* Enable support for floating-point exceptions. We always run in "precise"kettenis2021-01-098-31/+68
| | | | | | | | | | | | mode. On modern processors (POWER8 and later) there is no performance penalty for this as long as exceptions are disabled in the FPSCR (which is the default). This way we don't have to implement an architecture-dependent system call to set the mode, as it can only be done by the kernel. With help from gkoehler@ ok gkoehler@
* Fix typo in comment.kettenis2021-01-071-2/+2
|
* Enter power-saving mode on POWER9 (ISA v3)gkoehler2020-12-309-18/+264
| | | | | | | | | | | | | | | | | | | When opal(4) attaches, look in the device tree for a psscr value. In cpu_idle_cycle(), use this psscr value and the stop instruction to wait for the next interrupt. In mp kernels, cpu_unidle() now sends an interrupt. In "sysctl hw.sensors", the power and temperature sensors from opalsens(4) may show lower values. The cpu may exit stop at the system reset vector after losing user registers. If so, restore some registers. For now, ignore deeper stop states that would lose hypervisor registers. Our mp kernel uses only the first hardware thread of each core. Take the extra threads from the firmware and stop them forever; this may switch the core from SMT4 to single-thread mode and increase performance. partly by kettenis@, ok kettenis@
* Use IPL_VM for the pmap pool like we do on amd64.kettenis2020-12-231-2/+2
|
* Handle a few more userland traps that would lead to a kernel panic.kettenis2020-12-231-2/+19
|
* Use SIGILL for the Facility Unavailable Interrupt in usermode.gkoehler2020-12-221-1/+6
| | | | ok kettenis@
* Clear FSCR register. This gives us a sane default state where all facilitieskettenis2020-12-222-2/+11
| | | | are disabled by default on all CPUs.
* Fix typo.kettenis2020-12-201-2/+2
|
* The TCE table needs to be aligned on a boundary that is a multiple of itskettenis2020-12-201-2/+2
| | | | | size. Fixes booting on machines that have memory banks higher up in physical address space which needs a larger TCE table.
* Use daddr_t and not daddr32_t in boot media.krw2020-12-091-2/+2
| | | | | | | | | | At a minimum, amd64/i386 should now boot from 4TB GPT formatted disks. More daddr32_t terminations with extreme prejudice to follow. Tested by various, in snaps for a few days. ok deraadt@
* Enable mcx(4)kettenis2020-11-162-2/+4
|
* Make sure we perform address translation to all elements of a DMA mapping.kettenis2020-11-151-2/+2
|
* Hardwire bus_space_read_raw_N() and bus_space_write_raw_N() tokettenis2020-11-151-7/+7
| | | | | generic_space_read_N() and generic_space_write_N() as they should not do any byte swapping.
* In case of failure, call sigexit() from trapsignal instead of sensig().mpi2020-11-081-3/+5
| | | | | | | Simplify MD code and reduce the amount of recursion into the signal code which helps when dealing with locks. ok cheloha@, deraadt@
* Add support for passing a bootmac command line argument to RAMDISK.patrick2020-10-312-3/+69
| | | | | | | | | The bootmac passed is supposed to be the MAC address of the NIC that we have booted from. This allows bsd.rd to realize it should run an unattended install via network. This is needed for adding powerpc64 to bluhm's regression tests. ok kettenis@
* No need to print that we're the console device; wsdisplay(4) will do thatkettenis2020-10-301-4/+1
| | | | for us.
* Add a comment that explains why the major/minor of the device is setkettenis2020-10-301-8/+12
| | | | | unconditionally now that astfb(4) can be used as the console as well. Only print that we're the console if we actually are.
* Allow astfb(4) to become the console. At this point this is a "late" switchkettenis2020-10-301-2/+17
| | | | | and early kernel boot messages will appear on opalcons(4) until astfb(4) attaches.
* Add code to determine the console devie node.kettenis2020-10-302-2/+83
|
* add the nearly full list of usb devices.deraadt2020-10-271-12/+120
|
* Enable radeondrm(4).kettenis2020-10-271-1/+4
|
* Add limited emulation of unaligned access in the kernel. The radeondrm(4)kettenis2020-10-271-1/+56
| | | | | | | | | and amdgpu(4) drivers do unaligned access to uncached memory because the Linux DRM code doesn't mark pointers to device memory (VRAM) as volatile. I'm still investigating a better solution but this gets things going such that we can also look at the userland side of this issue. discussed with deraadt@
* Flush cache before mapping a page as uncached. The CPU gets really upsetkettenis2020-10-271-1/+18
| | | | | without this. The machine reboots and the core we were running on will be deconfigured.
* Include I2C stuff.kettenis2020-10-261-1/+4
|
* Fix typo.kettenis2020-10-261-3/+3
|
* Implement a workaround for PCI devices that can't address the full 64-bitkettenis2020-10-251-7/+173
| | | | | PCI address space. Needed for radeondrm(4) and amdgpu(4) since Radeon GPUs only implement 36, 40 or 44 bits of address space.
* Add forward declaration of struct trapframe.kettenis2020-10-241-1/+2
|
* /dev/drm*kettenis2020-10-241-2/+3
|
* Prefer 32-bit MSI even if the hardware supports 64-bit MSI to workkettenis2020-10-241-5/+10
| | | | | around buggy Radeon cards that advertise 64-bit MSI but only implement 40 bits.
* Add retguard to OPAL functions in powerpc64 locore.mortimer2020-10-222-10/+14
| | | | ok deraadt@ kettenis@
* Use the DBZ instruction to zero memory a cache line at a time.kettenis2020-10-221-2/+4
| | | | | | | This is what we already do on powerpc and seems to be what everybody does for 64-bit POWER systems. ok deraadt@, patrick@
* uvm_grow() doesn't need KERNEL_LOCK anymore, and onfault never did.deraadt2020-10-221-5/+7
| | | | | minor refactorings to narrow KERNEL_LOCK just around uvm_fault() ok kettenis
* Add retguard macros to powerpc64 locore functions.mortimer2020-10-211-4/+16
| | | | ok deraadt@ kettenis@
* Only use OPAL_CONSOLE_FLUSH if the firmware implements it. Should helpkettenis2020-10-192-3/+30
| | | | on POWER8 machines with older versions of OPAL.
* Implement pmap_proc_iflush().kettenis2020-10-181-2/+21
|
* Handle trace interrupts from userland.kettenis2020-10-181-1/+6
|
* Remove leftover debugging output for EXC_PGM traps.kettenis2020-10-181-4/+7
|
* Avoid potential infinite loop in pmap_vp_destroy().kettenis2020-10-171-18/+14
|
* use the full 64-bit cookies, rather than just 32 bitsderaadt2020-10-171-3/+3
| | | | spotted by gkoehler, ok mortimer
* Add retguard asm macros for ppc64.mortimer2020-10-161-1/+39
| | | | ok deraadt@
* Handle spurious interrupts.kettenis2020-10-101-2/+12
| | | | ok patrick@, deraadt@
* Add OPAL_PCI_MAP_PE_DMA_WINDOW.kettenis2020-10-102-2/+6
|
* Unbreak the powerpc64 kernel build.kettenis2020-10-093-3/+6
|
* use access_type as the PROT_* variable for uvm_fault() consistantlyderaadt2020-10-081-10/+10
| | | | ok kettenis