mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
Add 64 bit support to vchiq:
* update fields to the appropriate fixed bit-size variants (everywhere [cf. e.g., ref:sizes and ref:sizes2])
* refer to event semaphores (that go into the very 32 bit VC) by offset instead of pointers [ref:sems]
* dsb() is dsb(sy) in arm64 (vchiq_{core.c,core.h,kmod.c}) [ref:dsb]
* comment out some unneeded code in parse_rx_slots around VCHIQ_MSG_BULK_RX (cf. [ref:deadcode])
* adapt remote_event_signal to arm64 caching behaviours (vchiq_kmod.c)
* refactor synchronization around remote_event_signal, forcing a wmb to be on the safe side; thereby make it look more like what linux does [ref:sync] (vchiq_{core,kmod}.c); and make a comment in vchiq_core.c true (wasn't before)
* add a few more syncs to be on the safe side (vchiq_2835_arm.c)
* use arm64 dcache invalidation mechanisms (vchiq_2835_arm.c)
* explicitly invalidate pages on arm64 post bulk-read (vchiq_2835_arm.c)
* support bulk transfers on rpi-4 (aka "long address space" transfers), by hard-coding their vc offset (0) and different bit-shift [ref:longbulk] (vchiq_2835_arm.c)
* refactor a loop-of-constant-test (vchiq_2835_arm.c)
* use the correct (hard-coded) cache-line size on arm64
* rework the handling of chipset "features" to account for the extra behaviours with 64 bit chipsets. (vchiq_kmod.c)
* add sysctl-s (log, arm_log) to control debug (vchiq_kmod.c)
* add example kernel config (GENERIC-VCHIQ)
Fixes:
* Rework error handling in create_pagelist, avoiding a potential panic when
freeing memory that had been dmamem_alloc, a potential null dereference,
and a leak when having problems pinning pages (vchiq_2835_arm.c)
* fix a confusion about the behaviour cv_wait_sig that lead to
uninterruptible looping (vchiq_bsd.c)
* implement detection of fatal signals (vchiq_bsd.c)
* fix a confusion with the name of a variable introduced by #a0b8746
that could lead to a panic when closing the cdev file (vchiq_arm.c)
* release user connection when destructing cdevpriv and avoid user processes
sharing connection data, which lead to stalls and data corruption. (vchiq_arm.c)
Update bcm2835_audio to work on 64bit systems:
* update VC audio fields (vc_vchi_audioserv_defs.h, bcm2835_audio.c)
* repurpose the hitherto unused callback field to help push a 64 bit pointer in (bcm2835_audio.c)
* increase (hopefully) the robustness of the code that shifts data to VC (bcm2835_audio.c)
* add a sysctl to control the amount of debugging info output by bcm2835_audio.c
Tested on zero, zero2 and 4+ with ping, functional, bulk and control vchiq_test-s, and omxplayer
[ref:dsb]: 35b7ebda57
[ref:sems]: 24a4262afb
[ref:sizes]: e64568b8ea
[ref:sizes2]: f9bee6dd24
[ref:deadcode]: 14f4d72fb7
[ref:sync]: 51c0712650
[ref:longbulk]: 37f6f19a83
Differential Revision: https://reviews.freebsd.org/D37878
Submitted by: Marco Devesas Campos <devesas.campos@gmail.com>
40 lines
578 B
Text
40 lines
578 B
Text
#
|
|
# Broadcom SoC support
|
|
#
|
|
|
|
# SoC support
|
|
options SOC_BRCM_BCM2837
|
|
options SOC_BRCM_BCM2838
|
|
options SOC_BRCM_NS2
|
|
|
|
# I2C
|
|
device bcm2835_bsc # Broadcom BCM283x I2C bus
|
|
|
|
# SPI
|
|
device bcm2835_spi # Broadcom BCM283x SPI bus
|
|
|
|
# Serial (COM) ports
|
|
device uart_mu # RPI3 aux port
|
|
device pl011
|
|
|
|
# Ethernet NICs
|
|
device genet # Broadcom on RPi4
|
|
|
|
# USB support
|
|
device dwcotg
|
|
|
|
# USB ethernet support
|
|
device muge
|
|
device smsc
|
|
|
|
# MMC/SD/SDIO Card slot support
|
|
device sdhci
|
|
|
|
options FDT
|
|
device acpi
|
|
|
|
# Sound support
|
|
device vchiq
|
|
|
|
# DTBs
|
|
makeoptions MODULES_EXTRA+="dtb/rpi"
|