summaryrefslogtreecommitdiffstats
path: root/sys/arch/powerpc64
AgeCommit message (Collapse)AuthorFilesLines
2021-03-11spellingjsg3-5/+5
2021-02-23timecounting: use C99-style initialization for all timecounter structscheloha1-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@
2021-02-04Add uhidpp(4), a driver for Logitech HID++ devices. Currently limited toanton1-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@
2021-01-28Again allow COPTS= to come from the environment again, and don't lose thederaadt1-4/+4
SMALL_KERNEL specific variations. ok espie jsg
2021-01-23OPAL implements firmware calls that abstract communicating with the BMC overkettenis7-5/+484
IPMI. Use these calls to add support for impi(4) on PowerNV systems. ok dlg@
2021-01-23introduce ujoy(4), a restricted subset of uhid(4) for gamecontrollers.thfr2-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@
2021-01-09Enable support for floating-point exceptions. We always run in "precise"kettenis8-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@
2021-01-07Fix typo in comment.kettenis1-2/+2
2020-12-30Enter power-saving mode on POWER9 (ISA v3)gkoehler9-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@
2020-12-23Use IPL_VM for the pmap pool like we do on amd64.kettenis1-2/+2
2020-12-23Handle a few more userland traps that would lead to a kernel panic.kettenis1-2/+19
2020-12-22Use SIGILL for the Facility Unavailable Interrupt in usermode.gkoehler1-1/+6
ok kettenis@
2020-12-22Clear FSCR register. This gives us a sane default state where all facilitieskettenis2-2/+11
are disabled by default on all CPUs.
2020-12-20Fix typo.kettenis1-2/+2
2020-12-20The TCE table needs to be aligned on a boundary that is a multiple of itskettenis1-2/+2
size. Fixes booting on machines that have memory banks higher up in physical address space which needs a larger TCE table.
2020-12-09Use daddr_t and not daddr32_t in boot media.krw1-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@
2020-11-16Enable mcx(4)kettenis2-2/+4
2020-11-15Make sure we perform address translation to all elements of a DMA mapping.kettenis1-2/+2
2020-11-15Hardwire bus_space_read_raw_N() and bus_space_write_raw_N() tokettenis1-7/+7
generic_space_read_N() and generic_space_write_N() as they should not do any byte swapping.
2020-11-08In case of failure, call sigexit() from trapsignal instead of sensig().mpi1-3/+5
Simplify MD code and reduce the amount of recursion into the signal code which helps when dealing with locks. ok cheloha@, deraadt@
2020-10-31Add support for passing a bootmac command line argument to RAMDISK.patrick2-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@
2020-10-30No need to print that we're the console device; wsdisplay(4) will do thatkettenis1-4/+1
for us.
2020-10-30Add a comment that explains why the major/minor of the device is setkettenis1-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.
2020-10-30Allow astfb(4) to become the console. At this point this is a "late" switchkettenis1-2/+17
and early kernel boot messages will appear on opalcons(4) until astfb(4) attaches.
2020-10-30Add code to determine the console devie node.kettenis2-2/+83
2020-10-27add the nearly full list of usb devices.deraadt1-12/+120
2020-10-27Enable radeondrm(4).kettenis1-1/+4
2020-10-27Add limited emulation of unaligned access in the kernel. The radeondrm(4)kettenis1-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@
2020-10-27Flush cache before mapping a page as uncached. The CPU gets really upsetkettenis1-1/+18
without this. The machine reboots and the core we were running on will be deconfigured.
2020-10-26Include I2C stuff.kettenis1-1/+4
2020-10-26Fix typo.kettenis1-3/+3
2020-10-25Implement a workaround for PCI devices that can't address the full 64-bitkettenis1-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.
2020-10-24Add forward declaration of struct trapframe.kettenis1-1/+2
2020-10-24/dev/drm*kettenis1-2/+3
2020-10-24Prefer 32-bit MSI even if the hardware supports 64-bit MSI to workkettenis1-5/+10
around buggy Radeon cards that advertise 64-bit MSI but only implement 40 bits.
2020-10-22Add retguard to OPAL functions in powerpc64 locore.mortimer2-10/+14
ok deraadt@ kettenis@
2020-10-22Use the DBZ instruction to zero memory a cache line at a time.kettenis1-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@
2020-10-22uvm_grow() doesn't need KERNEL_LOCK anymore, and onfault never did.deraadt1-5/+7
minor refactorings to narrow KERNEL_LOCK just around uvm_fault() ok kettenis
2020-10-21Add retguard macros to powerpc64 locore functions.mortimer1-4/+16
ok deraadt@ kettenis@
2020-10-19Only use OPAL_CONSOLE_FLUSH if the firmware implements it. Should helpkettenis2-3/+30
on POWER8 machines with older versions of OPAL.
2020-10-18Implement pmap_proc_iflush().kettenis1-2/+21
2020-10-18Handle trace interrupts from userland.kettenis1-1/+6
2020-10-18Remove leftover debugging output for EXC_PGM traps.kettenis1-4/+7
2020-10-17Avoid potential infinite loop in pmap_vp_destroy().kettenis1-18/+14
2020-10-17use the full 64-bit cookies, rather than just 32 bitsderaadt1-3/+3
spotted by gkoehler, ok mortimer
2020-10-16Add retguard asm macros for ppc64.mortimer1-1/+39
ok deraadt@
2020-10-10Handle spurious interrupts.kettenis1-2/+12
ok patrick@, deraadt@
2020-10-10Add OPAL_PCI_MAP_PE_DMA_WINDOW.kettenis2-2/+6
2020-10-09Unbreak the powerpc64 kernel build.kettenis3-3/+6
2020-10-08use access_type as the PROT_* variable for uvm_fault() consistantlyderaadt1-10/+10
ok kettenis