aboutsummaryrefslogtreecommitdiff
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* AST: reworkKonstantin Belousov2022-08-022-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Make most AST handlers dynamically registered. This allows to have subsystem-specific handler source located in the subsystem files, instead of making subr_trap.c aware of it. For instance, signal delivery code on return to userspace is now moved to kern_sig.c. Also, it allows to have some handlers designated as the cleanup (kclear) type, which are called both at AST and on thread/process exit. For instance, ast(), exit1(), and NFS server no longer need to be aware about UFS softdep processing. The dynamic registration also allows third-party modules to register AST handlers if needed. There is one caveat with loadable modules: the code does not make any effort to ensure that the module is not unloaded before all threads processed through AST handler in it. In fact, this is already present behavior for hwpmc.ko and ufs.ko. I do not think it is worth the efforts and the runtime overhead to try to fix it. Reviewed by: markj Tested by: emaste (arm64), pho Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D35888
* pmap_mapdev: Consistently use vm_paddr_t for the first argument.John Baldwin2022-07-282-2/+2
| | | | | | | | | | | The devmap variants used vm_offset_t for some reason, and a few places explicitly cast bus addresses to vm_offset_t. (Probably those casts along with similar casts for vm_size_t should just be removed and instead permit the compiler to DTRT.) Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D35961
* Rework how shared page related data is storedKornel Dulęba2022-07-181-1/+1
| | | | | | | | | | | | | Store the shared page address in struct vmspace. Also instead of storing absolute addresses of various shared page segments save their offsets with respect to the shared page address. This will be more useful when the shared page address is randomized. Approved by: mw(mentor) Sponsored by: Stormshield Obtained from: Semihalf Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D35393
* Introduce the PROC_SIGCODE() macroKornel Dulęba2022-07-181-1/+1
| | | | | | | | | | | | | | | Use a getter macro instead of fetching the sigcode address directly from a sysent of a given process. It assumes that the sigcode is stored in the shared page, which is true in all cases, except for a.out binaries. This will be later useful when the shared page address randomization is introduced. No functional change intended. Approved by: mw(mentor) Sponsored by: Stormshield Obtained from: Semihalf Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D35392
* ddb: use _FLAGS command macros where appropriateMitchell Horne2022-07-051-1/+1
| | | | | | | | | | | | Some command definitions were forced to use DB_FUNC in order to specify their required flags, CS_OWN or CS_MORE. Use the new macros to simplify these. Reviewed by: markj, jhb MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35582
* freescale: Fix a typo in a source code commentGordon Bergling2022-07-031-1/+1
| | | | | | - s/transistions/transitions/ MFC after: 3 days
* elfnote: place note in a PT_NOTE program headerRoger Pau Monné2022-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tools (firecraker loader) only check for notes in PT_NOTE program headers, so make sure the notes added using the ELFNOTE macro end up in such header. Output from readelf -Wl for and amd64 kernel after the change: Elf file type is EXEC (Executable file) Entry point 0xffffffff8038a000 There are 11 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0xffffffff80200040 0x0000000000200040 0x000268 0x000268 R 0x8 INTERP 0x0002a8 0xffffffff802002a8 0x00000000002002a8 0x00000d 0x00000d R 0x1 [Requesting program interpreter: /red/herring] LOAD 0x000000 0xffffffff80200000 0x0000000000200000 0x189e28 0x189e28 R 0x200000 LOAD 0x18a000 0xffffffff8038a000 0x000000000038a000 0xe447e8 0xe447e8 R E 0x200000 LOAD 0xfce7f0 0xffffffff811ce7f0 0x00000000011ce7f0 0x6b955c 0x6b955c R 0x200000 LOAD 0x1800000 0xffffffff81a00000 0x0000000001a00000 0x000140 0x000140 RW 0x200000 LOAD 0x1801000 0xffffffff81a01000 0x0000000001a01000 0x1c8480 0x5ff000 RW 0x200000 DYNAMIC 0x1800000 0xffffffff81a00000 0x0000000001a00000 0x000140 0x000140 RW 0x8 GNU_RELRO 0x1800000 0xffffffff81a00000 0x0000000001a00000 0x000140 0x000140 R 0x1 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0 NOTE 0x1687ae0 0xffffffff81887ae0 0x0000000001887ae0 0x0001c0 0x0001c0 R 0x4 Section to Segment mapping: Segment Sections... [...] 10 .note.gnu.build-id .note.Xen Reported by: cperciva Fixes: 1a9cdd373a6a ('xen: add PV/PVH kernel entry point') Fixes: 93ee134a24fa ('Integrate support for xen in to i386 common code.') Sponsored by: Citrix Systems R&D Reviewed by: emaste Differential revision: https://reviews.freebsd.org/D35611
* busdma: Protect ARM busdma bounce page counters using the bounce page lock.Hans Petter Selasky2022-06-251-4/+7
| | | | | | | | | | | | | | | In bus_dmamap_unload() on ARM, the counters for free_bpages and reserved_bpages appear to be vulnerable to unprotected read-modify-write operations that result in accounting that looks like a page leak. This was noticed on a 2GB quad core i.MX6 system that has more than one device attached via FTDI based USB serial connection. Submitted by: John Hein <jcfyecrayz@liamekaens.com> Differential Revision: https://reviews.freebsd.org/D35553 PR: 264836 MFC after: 3 days Sponsored by: NVIDIA Networking
* if_dwc: recognize additional rgmii phy-modesMitchell Horne2022-06-231-26/+29
| | | | | | | | | | | | | | | | | | | Per the reports, some Allwinner device trees now list the desired phy-mode as "rgmii-id". The manual string comparison fails to detect this, and we end up falling back to MII mode. Instead, select the clock name using the sc->phy_mode variable, which is set in the main attach function. The logic to actually handle rgmii-id mode delays will be added to the relevant PHY driver. PR: 261355, 264673 Reported by: Maren <marentoy@protonmail.com> Reported by: Arie Bikker <src-2016@bikker.homeunix.net> Reviewed by: manu MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35500
* am335x: Fix a typo in a source code commentGordon Bergling2022-06-041-1/+1
| | | | | | - s/continous/continuous/ MFC after: 3 days
* tegra: Fix a typo in a source code commentGordon Bergling2022-06-041-1/+1
| | | | | | - s/Disble/Disable/ MFC after: 3 days
* Fix an indentation bug in the bcm pci driverAndrew Turner2022-05-231-1/+1
| | | | Sponsored by: The FreeBSD Foundation
* Use the error given in the bcm PCI driverAndrew Turner2022-05-231-3/+3
| | | | | | | When given an error return it and not just ENXIO as it may contain information usefule to debug an error. Sponsored by: The FreeBSD Foundation
* Error is not a bool in bcm2838_pci, check for != 0Andrew Turner2022-05-231-7/+7
| | | | | | Fix for style an check if error != 0 in the bcm2838 pci driver. Sponsored by: The FreeBSD Foundation
* Fix the style of bcm_pcib_msi_attach a littleAndrew Turner2022-05-231-2/+2
| | | | | | Move the definition of error to the top of the function. Sponsored by: The FreeBSD Foundation
* Add fdt to name of a fdt specific functionAndrew Turner2022-05-231-1/+1
| | | | | | | Rename pci_host_generic_attach to pci_host_generic_fdt_attach to be consistant with the acpi attachment. Sponsored by: The FreeBSD Foundation
* Retire sv_transtrapDmitry Chagin2022-05-201-1/+0
| | | | | | Call translate_traps directly from sendsig(). MFC after: 2 weeks
* kerneldump: remove physical from dump routinesMitchell Horne2022-05-131-2/+2
| | | | | | | | | It is unused, especially now that the underlying d_dumper methods do not accept the argument. Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35174
* arm xilinx: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-096-14/+6
|
* arm ti: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-0946-156/+66
|
* arm/arm64 qualcomm: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-092-6/+2
|
* arm/arm64 nvidia: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-0923-64/+30
|
* arm mv: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-0928-98/+43
|
* arm/arm64 freescale: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-0937-118/+42
|
* arm/arm64 broadcom: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-0923-75/+32
|
* arm annapurna: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-095-26/+14
|
* arm altera: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-093-10/+3
|
* arm allwinner: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-0946-156/+68
|
* arm/arm: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-099-42/+21
|
* Remove unused etherswitch_devclass.John Baldwin2022-05-091-1/+1
|
* Remove unused gpioc_devclass.John Baldwin2022-05-092-5/+2
|
* Remove unused ofwgpiobus_devclass.John Baldwin2022-05-092-6/+6
|
* Remove unused spibus_devclass and ofw_spibus_devclass.John Baldwin2022-05-094-4/+4
|
* Remove unused uart_devclass.John Baldwin2022-05-061-2/+1
|
* Remove pcm_devclass from DRIVER_MODULE invocations.John Baldwin2022-05-065-5/+5
|
* Remove unused ofw_iicbus_devclass.John Baldwin2022-05-062-2/+2
|
* Remove unused iicbus_devclass.John Baldwin2022-05-065-5/+5
|
* Remove unused fbd_devclass.John Baldwin2022-05-061-2/+1
|
* Remove unused ahci_devclass.John Baldwin2022-05-063-4/+3
|
* Remove unused miibus_devclass and miibus_fdt_devclass.John Baldwin2022-05-063-3/+3
|
* am335x_pwm_config_ecap: Use devclass_find to lookup devclass.John Baldwin2022-05-051-1/+1
| | | | Differential Revision: https://reviews.freebsd.org/D35082
* busdma_bounce: Add free_bounce_pages helper function.John Baldwin2022-04-211-5/+1
| | | | | | | | | Deduplicate code to iterate over the bpages list in a bus_dmamap_t freeing bounce pages during bus_dmamap_unload. Reviewed by: imp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D34967
* arm ti_mbox_attach: Write sysconfig to TI_MBOX_SYSCONFIG to request reset.John Baldwin2022-04-181-0/+1
| | | | | | | | | | | | | | | This variable was flagged as a set but unused warning as its value was read from a register and then modified to set a bit (TI_MBOX_SYSCONFIG_SOFTRST). After the variable is modified, the code then loops waiting for the SOFTRST bit to go clear in the TI_MBOX_SYSCONFIG register. Presumably merely reading from the register does not request a reset as other places in the driver read this register, so most likely the updated value of sysconfig setting the reset bit is supposed to be written to the register to request a reset before the polling loop that waits for the reset to finish. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D34856
* machine/in_cksum.h: don't include sys/cdefs.hBrooks Davis2022-04-181-2/+0
| | | | | | | | All consumers already do it and it was required on amd64 and i386 until recently (1c1bf5bd7c1e479a7889839b941f53e689aa2569). Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D34932
* as3722_gpio_pin_setflags: Use computed mode instead of hardcoded PUSHPULL.John Baldwin2022-04-181-1/+1
| | | | | Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D34855
* arm freescale: Remove unused variables.John Baldwin2022-04-134-13/+1
|
* arm sp804: Remove unused variables.John Baldwin2022-04-131-4/+1
|
* arm vybrid: #if 0 variables only used under #if 0.John Baldwin2022-04-132-2/+4
|
* arm: Use __diagused for variables only used in KASSERT().John Baldwin2022-04-134-6/+6
|
* bcm2835_systimer: Remove unused variable.John Baldwin2022-04-131-3/+0
|