Interesting links
https://github.com/embear-engineering/u-boot/tree/elc-2024-from-hardware-to-linux
https://github.com/nghiaphamsg/BBB-linux-device-driver
https://blog.csdn.net/ZZZZZ1113/article/details/131142606?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2-131142606-blog-117647308.235%5Ev38%5Epc_relevant_sort_base3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-2-131142606-blog-117647308.235%5Ev38%5Epc_relevant_sort_base3
https://blog.csdn.net/hexiaolong2009/article/details/102596772?spm=1001.2101.3001.6650.18&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-18-102596772-blog-102641233.235%5Ev38%5Epc_relevant_sort_base3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-18-102596772-blog-102641233.235%5Ev38%5Epc_relevant_sort_base3
https://blog.csdn.net/dragon101788/article/details/99673427
https://stackoverflow.com/questions/73137100/asynchronus-dma-mem2mem-copy-doesnt-transfer-data
https://www.kernel.org/doc/html/v4.18/driver-api/dmaengine/provider.html
TISDK
https://www.ti.com/tool/PROCESSOR-SDK-AM335X#downloads
https://software-dl.ti.com/processor-sdk-linux/esd/AM335X/08_02_00_24/exports/docs/linux/Overview/Processor_SDK_Linux_Getting_Started_Guide.html#welcome-to-the-linux-getting-started-guide
https://software-dl.ti.com/processor-sdk-linux/esd/AM335X/08_02_00_24/exports/docs/linux/Overview/Processor_SDK_Linux_create_SD_card.html
techincal pdfs
https://github.com/tpn/pdfs
edma_test.c from TI
https://blog.csdn.net/qq_40788950/article/details/79168342
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/516527/edma_test-c-compilation-error?tisearch=e2e-sitesearch&keymatch=edma_test.c#
http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/psp/LinuxPSP/AM335x_04_06/index.html
https://wiki.dreamrunner.org/public_html/Embedded-System/DM816x/EDMANotes.html
# dmesg | grep -i dma
[ 0.116019] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.183026] edma 49000000.edma: eDMA3 CC HW configuration (cccfg: 0x03224445):
[ 0.183039] edma 49000000.edma: num_region: 4
[ 0.183046] edma 49000000.edma: num_channels: 64
[ 0.183052] edma 49000000.edma: num_qchannels: 8
[ 0.183058] edma 49000000.edma: num_slots: 256
[ 0.183065] edma 49000000.edma: num_tc: 3
[ 0.183071] edma 49000000.edma: chmap_exist: yes
[ 0.187300] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.187324] edma 49000000.edma: ecc->num_channels 64, ecc->num_qchannels 8, ecc->num_region 4, ecc->num_slots 256, info->slavecnt 0
[ 1.374764] ti-dma-crossbar 44e10f90.dma-router: Mapping XBAR event0 to DMA25
[ 1.374787] edma 49000000.edma: EER0 00000000
[ 1.374800] edma 49000000.edma: Got eDMA channel 25 for virt channel 23 (HW trigger)
[ 1.374852] ti-dma-crossbar 44e10f90.dma-router: Mapping XBAR event0 to DMA24
[ 1.374861] edma 49000000.edma: EER0 00000000
[ 1.374868] edma 49000000.edma: Got eDMA channel 24 for virt channel 22 (HW trigger)
[ 1.402007] omap_hsmmc 47810000.mmc: RX DMA channel request failed
[ 1.487593] edma 49000000.edma: vchan (ptrval): txd (ptrval)[2]: submitted
[ 1.487611] edma 49000000.edma: first transfer starting on channel 25
[ 1.487620] edma 49000000.edma: ER0 00000000
[ 1.487627] edma 49000000.edma: EER0 02000000
[ 1.490313] edma 49000000.edma: EER0 00000000
[ 1.490323] edma 49000000.edma: Transfer completed on channel 25
[ 1.490723] edma 49000000.edma: vchan (ptrval): txd (ptrval)[3]: submitted
[ 1.490732] edma 49000000.edma: first transfer starting on channel 25
[ 1.490739] edma 49000000.edma: ER0 00000000
[ 1.490746] edma 49000000.edma: EER0 02000000
[ 1.492706] edma 49000000.edma: EER0 00000000
[ 1.492714] edma 49000000.edma: Transfer completed on channel 25
[ 1.492795] edma 49000000.edma: vchan (ptrval): txd (ptrval)[4]: submitted
[ 1.492805] edma 49000000.edma: first transfer starting on channel 25
[ 1.492811] edma 49000000.edma: ER0 00000000
[ 1.492818] edma 49000000.edma: EER0 02000000
[ 1.495459] edma 49000000.edma: EER0 00000000
[ 1.495467] edma 49000000.edma: Transfer completed on channel 25
[ 1.503595] edma 49000000.edma: vchan (ptrval): txd (ptrval)[5]: submitted
[ 1.503604] edma 49000000.edma: first transfer starting on channel 25
[ 1.503610] edma 49000000.edma: ER0 00000000
[ 1.503617] edma 49000000.edma: EER0 02000000
[ 1.508338] edma 49000000.edma: EER0 00000000
[ 1.508345] edma 49000000.edma: Transfer completed on channel 25
[ 1.529106] edma 49000000.edma: vchan (ptrval): txd (ptrval)[6]: submitted
[ 1.529148] edma 49000000.edma: first transfer starting on channel 25
[ 1.529157] edma 49000000.edma: ER0 00000000
[ 1.529165] edma 49000000.edma: EER0 02000000
[ 1.539824] edma 49000000.edma: EER0 00000000
[ 1.539833] edma 49000000.edma: Transfer completed on channel 25
[ 1.737542] edma 49000000.edma: vchan (ptrval): txd (ptrval)[7]: submitted
[ 1.737585] edma 49000000.edma: first transfer starting on channel 25
[ 1.737595] edma 49000000.edma: ER0 00000000
[ 1.737602] edma 49000000.edma: EER0 02000000
[ 1.739967] edma 49000000.edma: EER0 00000000
[ 1.739979] edma 49000000.edma: Transfer completed on channel 25
[ 1.740334] edma 49000000.edma: vchan (ptrval): txd (ptrval)[8]: submitted
[ 1.740360] edma 49000000.edma: first transfer starting on channel 25
exploring /sys/class
drwxr-xr-x 62 root root 0 Dec 20 2022 dma
lrwxrwxrwx 1 root root 0 Oct 18 03:28 driver -> ../../../../../bus/platform/drivers/cppi41-dma-engine
-rw-r--r-- 1 root root 4096 Oct 18 03:28 driver_override
-r--r--r-- 1 root root 4096 Oct 18 03:29 modalias
lrwxrwxrwx 1 root root 0 Oct 18 03:29 of_node -> ../../../../../firmware/devicetree/base/ocp/usb@47400000/dma-controller@47402000
drwxr-xr-x 2 root root 0 Oct 18 03:29 power
lrwxrwxrwx 1 root root 0 Dec 20 2022 subsystem -> ../../../../../bus/platform
-rw-r--r-- 1 root root 4096 Dec 20 2022 uevent
# cd /sys/bus/platform/devices/47400000.dma-controller/dma
# ls
dma2chan0 dma2chan18 dma2chan27 dma2chan36 dma2chan45 dma2chan54
dma2chan1 dma2chan19 dma2chan28 dma2chan37 dma2chan46 dma2chan55
dma2chan10 dma2chan2 dma2chan29 dma2chan38 dma2chan47 dma2chan56
dma2chan11 dma2chan20 dma2chan3 dma2chan39 dma2chan48 dma2chan57
dma2chan12 dma2chan21 dma2chan30 dma2chan4 dma2chan49 dma2chan58
dma2chan13 dma2chan22 dma2chan31 dma2chan40 dma2chan5 dma2chan59
dma2chan14 dma2chan23 dma2chan32 dma2chan41 dma2chan50 dma2chan6
dma2chan15 dma2chan24 dma2chan33 dma2chan42 dma2chan51 dma2chan7
dma2chan16 dma2chan25 dma2chan34 dma2chan43 dma2chan52 dma2chan8
dma2chan17 dma2chan26 dma2chan35 dma2chan44 dma2chan53 dma2chan
#cd /sys/bus/platform/devices/49000000.edma/dma
# ls -l
total 0
drwxr-xr-x 66 root root 0 Dec 20 2022 dma
lrwxrwxrwx 1 root root 0 Oct 18 03:14 driver -> ../../../../bus/platform/drivers/edma
-rw-r--r-- 1 root root 4096 Oct 18 03:14 driver_override
-r--r--r-- 1 root root 4096 Oct 18 03:14 modalias
lrwxrwxrwx 1 root root 0 Oct 18 03:14 of_node -> ../../../../firmware/devicetree/base/ocp/edma@49000000
drwxr-xr-x 2 root root 0 Oct 18 03:14 power
lrwxrwxrwx 1 root root 0 Dec 20 2022 subsystem -> ../../../../bus/platform
-rw-r--r-- 1 root root 4096 Dec 20 2022 uevent
# cd dma/
# ls
dma0chan0 dma0chan19 dma0chan29 dma0chan39 dma0chan49 dma0chan59
dma0chan1 dma0chan2 dma0chan3 dma0chan4 dma0chan5 dma0chan6
dma0chan10 dma0chan20 dma0chan30 dma0chan40 dma0chan50 dma0chan60
dma0chan11 dma0chan21 dma0chan31 dma0chan41 dma0chan51 dma0chan61
dma0chan12 dma0chan22 dma0chan32 dma0chan42 dma0chan52 dma0chan7
dma0chan13 dma0chan23 dma0chan33 dma0chan43 dma0chan53 dma0chan8
dma0chan14 dma0chan24 dma0chan34 dma0chan44 dma0chan54 dma0chan9
dma0chan15 dma0chan25 dma0chan35 dma0chan45 dma0chan55 dma1chan0
dma0chan16 dma0chan26 dma0chan36 dma0chan46 dma0chan56 dma1chan1
dma0chan17 dma0chan27 dma0chan37 dma0chan47 dma0chan57
dma0chan18 dma0chan28 dma0chan38 dma0chan48 dma0chan58
#
Communications Port Programming Interface (cppi)
http://trac.gateworks.com/wiki/linux/encryption
crypto test using cryptodev which uses hw accelerated modules, e.g. omap_sham.ko and omap_aes.ko
#openssl speed -evp sha1 -engine devcrypto -elapsed
#openssl speed -evp aes-256-cbc -engine devcrypto -elapsed
for omap_sham.ko we can check hw interrupts,
# cat /proc/interrupts | grep -i sham
26: 9700 INTC 109 Level 53100000.sham
from device tree am33xx.dtsi, we have sham device tree, where we can see its using dma 36
sham: sham@53100000 {
compatible = "ti,omap4-sham";
ti,hwmods = "sham";
reg = <0x53100000 0x200>;
interrupts = <109>;
dmas = <&edma 36 0>;
dma-names = "rx";
};
and after issuing
#openssl speed -evp sha1 -engine devcrypto -elapsed
we can check same channel being used from dmesg logs,
[ 3399.895710] edma 49000000.edma: vchan 02efea47: txd e3f3b0a0[25eb]: submitted
[ 3399.895720] edma 49000000.edma: first transfer starting on channel 36
[ 3399.895728] edma 49000000.edma: ER1 00000000
[ 3399.895735] edma 49000000.edma: EER1 00000010
[ 3399.895835] edma 49000000.edma: EER1 00000000
[ 3399.895845] edma 49000000.edma: Transfer completed on channel 36
# cat /proc/interrupts | grep -i sham
26: 102586 INTC 109 Level 53100000.sham
#
Now we can say dma is being used with dma apis and slave channel is given.
--------------------------------------------------------------------
system call implementation
https://www.linuxbnb.net/home/adding-a-system-call-to-linux-arm-architecture/
https://developer.arm.com/documentation/den0013/d/Exception-Handling/Other-exception-handlers/SVC-exception-handling?lang=en#BABEDHCA
https://armasm.com/docs/getting-to-hello-world/exiting/
https://syscalls.w3challs.com/?arch=arm_strong
syscalll table: https://elixir.bootlin.com/linux/latest/source/arch/arm64/kernel/entry.S#L519
for 32 bit: https://elixir.bootlin.com/linux/latest/source/arch/arm64/kernel/entry.S#L535
for 64 bit: https://elixir.bootlin.com/linux/latest/source/arch/arm64/kernel/entry.S#L525
Good blog on strong and weak symbols
https://leondong1993.github.io/2017/08/strong_weak_symbol/
Arm exception/interrupt vector table:
https://developer.arm.com/documentation/100933/0100/AArch64-exception-vector-table
https://krinkinmu.github.io/2021/01/10/aarch64-interrupt-handling.html
uboot loading kernel:
https://krinkinmu.github.io/
https://krinkinmu.github.io/2023/08/21/how-u-boot-loads-linux-kernel.html
https://www.kernel.org/doc/html/v5.10/arm64/booting.html
virtio blk
https://brennan.io/2020/03/22/sos-block-device/
device and driver match
https://blog.csdn.net/tiantianhaoxinqing__/article/details/126026766
armv8 and virtualization
https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/APU-Virtualization
http://events17.linuxfoundation.org/sites/events/files/slides/To%20EL2%20and%20Beyond_0.pdf
https://github.com/david942j/kvm-kernel-example
https://david942j.blogspot.com/2018/10/note-learning-kvm-implement-your-own.html
Great analysis on different kernel frameworks:
https://www.cnblogs.com/LoyenWang
Comments
Post a Comment