summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2023-07-05They may have fixed the cache coherency problems in the JH7110, but it isMark Kettenis
still criplled as the SD/MMC controllers only do 32-bit DMA. ok jsing@
2023-07-05Suspend from suspend_taskq in apmioctl.Tobias Heider
ok kettenis@
2023-07-05remove unused armv7 max_processes globalJonathan Gray
ok miod@
2023-07-04amd64: cpu_info: rearrange members, keep ci_mds_tmp 32-byte alignedScott Soule Cheloha
ci_mds_tmp needs to be 32-byte aligned, otherwise we trip a CTASSERT in amd64/cpu.c and break kernel compilation. However, ci_mds_tmp's 32-byte alignment is at risk: the size of schedstate_percpu is about to change. Move ci_curproc and ci_schedstate up just after ci_mds_buf. This puts ci_mds_tmp at page offset 64 with no structs ahead of it in cpu_info. With this arrangement it should remain 32-byte aligned without much effort. With input from guenther@. ok guenther@
2023-07-04enable dwqe(4)Mark Kettenis
2023-07-04Add a bunch of clocks for GMAC0 and GMAC1 on the JH7110 SoC.Mark Kettenis
Based on an initial diff from jsing@ ok jsing@
2023-07-03Enable mouse.tp.mtbuttons for apldcmsTobias Heider
ok bru@
2023-07-02Add button mappings for two- and three-finger clicks on clickpads.Ulf Brosziewski
Based on a proposal of tobhe@. ok tobhe@
2023-07-02all platforms, kernel: remove __HAVE_CLOCKINTR symbolScott Soule Cheloha
Every platform made the clockintr switch at least six months ago. The __HAVE_CLOCKINTR symbol is now redundant. Remove it. Prompted by claudio@. Link: https://marc.info/?l=openbsd-tech&m=168826181015032&w=2 "makes sense" mlarkin@
2023-07-01Add driver for QC cpu Power States.Dale Rahn
ok kettenis@ patrick@
2023-07-01Add support for JH7110 to stftemp(4).Joel Sing
This adds temperature sensor support for the Starfive VisionFive 2. ok kettenis@
2023-06-27Add qctsens(4), a driver for the Temperature Sensor found on Qualcomm SoCs.Patrick Wildt
The driver not only provides the temperature readings for the cores, cluster and memory in hw.sensors, but also allows the thermal zone code to act on temperature changes. ok drahn@
2023-06-27amd64: MCOUNT_EXIT: restore interrupts, don't unconditionally reenable themScott Soule Cheloha
This bug can cause all sorts of problems, but in particular it was most easily reproduced as a double fault in the syscall return path on this CPU model: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz Tons of help from guenther@ in narrowing down the root cause. Fix tweaked by guenther@. Additional input from deraadt@ and kettenis@. ok guenther@
2023-06-24Add initial support for StarFive VisionFive V2 to stfclock(4).Joel Sing
This adds initial support for the syscrg and pll clocks on the StarFive VisionFive V2 JH7110 SoC. ok kettenis@
2023-06-22Instead of tsleep on lbolt do a tsleep with a 1 second timeout.Claudio Jeker
Result is the same and gets rid of a lbolt use. OK miod@
2023-06-18Remove spurious comment.Mark Kettenis
ok patrick@
2023-06-18Add fchmod() entry in luna88k bootloader.Kenji Aoyama
Now 'chmod a-x /bsd.upgrade' works in order to prevent re-upgrade, like other architectures. Tested by me on LUNA-88K2.
2023-06-18Fix SCSI CMD_WRITE_EXT command length to 10 bytes.Kenji Aoyama
This is needed to work libsa's ufs_fchmod() on luna88k. Tested by me on LUNA-88K2.
2023-06-17Flush the ITS after we disestablish an MSI. Fixes an issue seen on AmpereMark Kettenis
eMAG with an AMD GPU with an HD audio function where azalia(4) doesn't fully attach. ok patrick@
2023-06-17On arm64, the frame pointer points at the stack address where the frameMark Kettenis
pointer of the previous frame has been stored. The code in db_stack_trace_print() got that wrong for the initial frame. While there, remove a bogus comment and some unused #defines about the layout of stack frames. ok patrick@
2023-06-15all platforms, main(): call clockqueue_init() just before sched_init_cpu()Scott Soule Cheloha
Move the clockqueue_init() call out of clockintr_cpu_init() and up just before the sched_init_cpu() call for a given CPU. This will allow sched_init_cpu() to allocate clockintr handles for a given CPU's scheduler in a later patch. Link: https://marc.info/?l=openbsd-tech&m=168661507607622&w=2 ok kettenis@, claudio@
2023-06-11Disable PAC with the architected algorithm for now, but leave it enabledMark Kettenis
when the hardware uses an implementation defined algorithm. There are issues with PAC on the x13s (but not on the windows dev kit) which uses the architected algorithm as it uses a core designed by ARM. This leaves PAC enabled on Apple hardware. ok deraadt@
2023-06-10Implement support for pointer authentication (PAC) in userland. With PACMark Kettenis
it is possible to "sign" pointers with a hidden key. The signature is placed in unused bits of the pointer and can be checked later. This can be used to provide "tail CFI" that is similar to what retguard provides. Debuggers need to be aware of the fact that pointers can be signed. For this purpose a new PT_PACMASK ptrace(2) request is introduced that returns as mask that indicates the bits used for the signature. Separate masks are provided for code and data pointers even though the masks are identical in the current implementation. These masks are also written into a special note section in the core dump. ok patrick@
2023-06-10Add qcpas(4), a driver for the Peripheral Authentication Service found onPatrick Wildt
Qualcomm SoCs. The immediate task for this driver is to provide firmware to the auxiliary cores and to bring them up. This is accomplished by parsing the ELF files and providing the data in certain memory regions, and telling qcscm(4) to check and execute the firmware on the auxiliary cores. With the cores up we can now talk to the firmware. The glink-edge subnode indicates that we can talk to it using the GLINK protocol over shared memory provided by qcsmem(4). This interface is essentially a channel multiplexer, with each channel identified through an ASCII string. One of those channels connects to a PMIC router, which allows us to talk to the battery manager service that contains information about the charging and battery states. ok drahn@ kettenis@
2023-06-07upon resume, fpureset() was being called prematurely (before cpu_init,Theo de Raadt
which does not matter today, but will matter a lot in near future). But actually it isn't needed at all, cpu_init() does it again. So remove the call. ok guenther
2023-06-03Remove declarations of unused local variables, an unused functionKenneth R Westerback
(get_long) and add missing {} in devsw[1] initialization. Most from 2011 NetBSD commit by tsutui. No functional change. Build tested and ok kn@
2023-06-02Missed a trailing space.Kenneth R Westerback
2023-06-01Expunge a bunch of eye searing trailing whitespace.Kenneth R Westerback
2023-05-31Remove declarations for unused search_label() local variablesKenneth R Westerback
error, i, p and poff. Fewer complaints from gcc -Wall. The same was done to the NetBSD version in 2011 by tsutui. Remove two more recent load_disklabel() comments implying that search_label() checks MBR partitions. It doesn't and never has despite the enticing names/types of the above unused variables. No functional change.
2023-05-30spellingJonathan Gray
ok jmc@ guenther@ tb@
2023-05-29some hackery to make arm64 ramdisk compile againTheo de Raadt
2023-05-29recognise Cortex-A520 (Hayes), Cortex-A720 (Hunter), Cortex-X4 (Hunter-ELP)Jonathan Gray
2023-05-27Implement battery charge control.Mark Kettenis
ok patrick@, tobhe@
2023-05-25Work around sparc64 WITNESS kernel failing to load by moving large witnessKurt Miller
data structures from bss to be allocated in witness_initialize(). Tested on sparc64, amd64, arm64, i386, octeon. okay miod@
2023-05-23Add qcaoss(4), a driver for the Always On Subsystem found on Qualcomm SoCs.Patrick Wildt
This subsystem typically provides an interface for clocks and regulators not controlled via RPMH. We will use it to switch the load state of the ADSP co-processor. Surprisingly, or maybe not, the interface uses ASCII text that kind of looks like JSON. ok kettenis@
2023-05-22The fp_ex_[st]w struct savefpu members were inherited from NetBSD wherePhilip Guenther
they're used in the 32bit-compat support, which we dropped years ago. Bye bye! ok deraadt@
2023-05-21Typo in comment. 'parititon' -> 'partition'.Kenneth R Westerback
2023-05-19Add qcsmptp(4), a driver to share 32-bit values between (co-)processors.Patrick Wildt
The inbound path is typically used as interrupt controller, e.g. to handle handover and ready interrupts when a remoteproc boots. The outbound path seems to be used to stop cores, but we don't do that yet. ok kettenis@
2023-05-19Have mainbus attach nodes under /reserved-memory, so that qcsmem(4) showsPatrick Wildt
up. ok kettenis@ drahn@
2023-05-19Add qcsmem(4), a driver for the shared memory table on Qualcomm SoCsPatrick Wildt
used to establish data communication channels with co-processors. ok kettenis@ drahn@
2023-05-17Add qcmtx(4), a driver for the hardware spinlock on Qualcomm SoCs thatPatrick Wildt
is used to synchronize access to the shared memory table between the application cores we run on and the co-processors next to us. ok kettenis@ drahn@
2023-05-17Add qcipcc(4), a driver for the inter-processor mailbox interface usedPatrick Wildt
to inform (and get informed) of changes to shared memory state. ok kettenis@
2023-05-17Tolerate difference in some of the features advertised by theMark Kettenis
ID_AA64PFR0_EL1 register across cores. The CSV2/CSV3 features are handled on a per-core basis so it is fine if they are different. And we only support 64-bit userland so it is fine if the EL0/EL1/EL2/EL3 fields are different too. This prevents us from printing a warning on the Rockchip RK3588 SoC which combines Cortex-A55 with Cortex-A76 that implement a sightly different feature set. ok deraadt@, mlarkin@
2023-05-15Pass the ESR as the trapno value; this might help in determining the detailedMark Kettenis
cause of a signal. ok bluhm@, guenther@, deraadt@
2023-05-12add axppmic support to RAMDISK,SASANO Takayoshi
to support ethernet on OrangePi One Plus (Allwinner H6). ok kettenis@
2023-05-12Fall back on loading the kernel from the EFI system partition if we'reMark Kettenis
booting from a disk without a BSD disklabel. ok kn@, caspar@
2023-05-09Apparently there is no need to set the PS2 field.Mark Kettenis
ok patrick@
2023-05-02Sometimes the touchpad doesn't attach. Try to solve this issue beMark Kettenis
reloading the firmware. ok tobhe@
2023-04-30Fix typo in MRDISKTYPE.Kenneth R Westerback
'rdroot' (size 10,240 blocks) is not the same as 'rdboot' (size 2,048 blocks). Noticed by deraadt@
2023-04-30Remove the EFI RTC implementation on amd64. Since all amd64 systems weMark Kettenis
know have a MC146818A compatible RTC this code isn't actually used. But there are systems that have a buggy EFI implementation that blows up when we call the GetTime runtime service to check whether the RTC functionality is implemented. ok mlarkin@, dlg@