Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | OPAL implements firmware calls that abstract communicating with the BMC over | 2021-01-23 | 2 | -1/+179 | |
| | | | | | | IPMI. Use these calls to add support for impi(4) on PowerNV systems. ok dlg@ | ||||
* | Enter power-saving mode on POWER9 (ISA v3) | 2020-12-30 | 1 | -7/+94 | |
| | | | | | | | | | | | | | | | | | | | 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@ | ||||
* | Fix typo. | 2020-12-20 | 1 | -2/+2 | |
| | |||||
* | The TCE table needs to be aligned on a boundary that is a multiple of its | 2020-12-20 | 1 | -2/+2 | |
| | | | | | size. Fixes booting on machines that have memory banks higher up in physical address space which needs a larger TCE table. | ||||
* | Make sure we perform address translation to all elements of a DMA mapping. | 2020-11-15 | 1 | -2/+2 | |
| | |||||
* | No need to print that we're the console device; wsdisplay(4) will do that | 2020-10-30 | 1 | -4/+1 | |
| | | | | for us. | ||||
* | Add a comment that explains why the major/minor of the device is set | 2020-10-30 | 1 | -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" switch | 2020-10-30 | 1 | -2/+17 | |
| | | | | | and early kernel boot messages will appear on opalcons(4) until astfb(4) attaches. | ||||
* | Implement a workaround for PCI devices that can't address the full 64-bit | 2020-10-25 | 1 | -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. | ||||
* | Prefer 32-bit MSI even if the hardware supports 64-bit MSI to work | 2020-10-24 | 1 | -5/+10 | |
| | | | | | around buggy Radeon cards that advertise 64-bit MSI but only implement 40 bits. | ||||
* | Handle spurious interrupts. | 2020-10-10 | 1 | -2/+12 | |
| | | | | ok patrick@, deraadt@ | ||||
* | Add astfb(4), a driver for the framebuffer of the Aspeed BMC found on | 2020-10-01 | 1 | -0/+236 | |
| | | | | many POWER8 and POWER9 systems. | ||||
* | correct size argument to free(9) | 2020-10-01 | 1 | -2/+2 | |
| | | | | ok kettenis@ | ||||
* | Do the NULL -> cpu_info_primary conversion in the interrupt controller | 2020-09-26 | 2 | -2/+8 | |
| | | | | | | drivers instead of the "midlayer". I had missed a couple of places in the midlayer and instead of fixing this in several places it is better to do it in the functions that get invoked in the end. | ||||
* | Use an IPI, so hw.setperf affects all cores in the mp kernel. | 2020-09-23 | 1 | -1/+7 | |
| | | | | | | | | | | Before, apm -A was speeding up only one core of my POWER9. Now, apm -A speeds up all cores, so my parallel builds are faster. I copy the idea from amd64 and i386: mp_setperf() sends an IPI to all cpus; the interrupt handler calls ul_setperf(). ok deraadt@ kettenis@ | ||||
* | Correctly pass the "struct cpu_info" pointer along when establishing | 2020-09-21 | 5 | -16/+15 | |
| | | | | | | | | interrupts. This fixes IPIs on machines with certain (newer?) OPAL firmware. It also allows implementing pci_intr_establish_cpu(9), which is needed for distributing interrupt handlers across CPUs. tested by gkoehler@ | ||||
* | Sprinkle some more eieio(); seems to avoid triggering the KASSERT(new > old). | 2020-09-03 | 1 | -3/+5 | |
| | |||||
* | vfs_shutdown() is neccessary to ensure buffer cache drain before reexec() | 2020-09-02 | 1 | -1/+4 | |
| | | | | ok kettenis visa | ||||
* | Implement address translation for bus_space_mmap(9). | 2020-09-01 | 1 | -1/+25 | |
| | |||||
* | Store the device tree node in the pcitag_t. | 2020-09-01 | 1 | -3/+34 | |
| | |||||
* | Reorganize the interrupt handler code to avoid a potential bogus KASSERT, | 2020-08-30 | 1 | -10/+12 | |
| | | | | | | handle the priority levels better and guarantee ordering of restoring the priority level after running an interrupt handler and checking for a new interrupt. | ||||
* | Mark certain sections with debug information as "allocated" such that they | 2020-08-29 | 1 | -2/+14 | |
| | | | | | | | get picked up by ddb. This makes the "pp" and "show struct" commands that depends on CTF work. ok gkoehler@ | ||||
* | Declare hw_{prod,serial,uuid,vendor,ver} in <sys/systm.h>. | 2020-08-26 | 1 | -4/+1 | |
| | | | | OK deraadt@, mpi@ | ||||
* | Add xicp(4), a driver for the interrupt control presenter hardware found | 2020-08-23 | 1 | -0/+283 | |
| | | | | on POWER8 CPUs. | ||||
* | Add missing conversion from IPL to CPU priority. | 2020-08-23 | 1 | -2/+2 | |
| | |||||
* | Attempt to support IODA2 bridges such as the one found on POWER8 chips. | 2020-08-23 | 1 | -3/+4 | |
| | | | | | These lack an "ibm,opal-available-m64-ranges" property, but it seems we can assume a 0-15 range. At least this is what Linux does. | ||||
* | Don't grab the kernel lock for mpsafe interrupts. | 2020-07-22 | 1 | -3/+14 | |
| | |||||
* | Implement IPIs. | 2020-07-22 | 2 | -26/+55 | |
| | |||||
* | Attach secondary CPUs early like we now do on arm64. | 2020-07-21 | 1 | -4/+4 | |
| | |||||
* | Add missing KERNEL_LOCK() and KERNEL_UNLOCK() calls. | 2020-07-21 | 1 | -1/+3 | |
| | |||||
* | Load kernel as an initrd such that we have symbols in ddb. | 2020-07-18 | 1 | -4/+29 | |
| | |||||
* | Pass boothowto and bootduid parameters to the booted kernel via the | 2020-07-18 | 1 | -2/+23 | |
| | | | | | | device tree. Make sure the RB_GOODRANDOM flag only gets set if we read a non-stale /etc/random.seed and we actually filled an .openbsd.randomdata segment. | ||||
* | Add a pseudo-driver to "kexec" an OpenBSD/powerpc64 kernel. Heavily | 2020-07-16 | 2 | -0/+230 | |
| | | | | | based on the octboot driver that we use for octeon. To be used in the bootloader kernel. | ||||
* | Reset firmware state upon reboot. | 2020-07-16 | 1 | -2/+16 | |
| | |||||
* | Use SENSOR_ENERGY as the type of energy sensors. | 2020-07-15 | 1 | -2/+2 | |
| | |||||
* | Make INTx interupts work. | 2020-07-14 | 1 | -2/+20 | |
| | |||||
* | Add xics(4), a driver for the OPAL virtual ICS. | 2020-07-14 | 1 | -0/+81 | |
| | |||||
* | Add hw.cpuspeed and hw.setperf | 2020-07-10 | 1 | -1/+94 | |
| | | | | | | | | | Get the list of Pstates from OPAL, and use special registers to request a Pstate or check the current Pstate. The turbo Pstates are higher than the cpu's nominal speed, but the OCC's firmware should throttle down the cpu if it would overheat. ok kettenis@ | ||||
* | Add opalsens(4), a driver for sensors provided by the OPAL firmware. | 2020-07-07 | 2 | -1/+148 | |
| | |||||
* | We need to set the bypass bit for "raw" DMA memory as well. | 2020-07-05 | 1 | -1/+23 | |
| | |||||
* | Use IPL_TTY, at least for now, as the only consumer of OPAL interrupts | 2020-07-02 | 1 | -2/+2 | |
| | | | | is opalcons(4). | ||||
* | Use the right bus space tag when enabling MSI-X interrupts. Makes them | 2020-06-29 | 1 | -2/+2 | |
| | | | | actually work. | ||||
* | Attach event counter. | 2020-06-29 | 1 | -1/+4 | |
| | |||||
* | Accept input. | 2020-06-26 | 1 | -1/+59 | |
| | |||||
* | Handle OPAL interrupts. | 2020-06-26 | 1 | -2/+116 | |
| | |||||
* | Add support for level-triggered interrupts and unmask established interropts. | 2020-06-26 | 1 | -6/+25 | |
| | |||||
* | avoid uninitialised pointer use | 2020-06-26 | 1 | -2/+2 | |
| | | | | found with scan-build, ok kettenis@ | ||||
* | Add opalcons(4), a driver for the OPAL console. | 2020-06-22 | 2 | -1/+296 | |
| | |||||
* | Fix calculation of the year. | 2020-06-19 | 1 | -2/+2 | |
| | |||||
* | Remove debug code. | 2020-06-14 | 1 | -6/+1 | |
| |