Thread:sysconfig中讨论的其它部件
您好,TI的专家,
我正在使用AM64xx EVM。 512 MB DDR上的IPC (M4 <> Linux)出现问题。 请看一下,并帮助我解决此错误。
我在测试IPC (M4F和Linux)上有案例
案例1:原始DTS和2 GB DDR,IPC工作正常。
在Linux上:
root@am64xx-evm:~# insmod ti_k3_m4_remoteproc.ko [ 32.695335] k3-m4-rproc 5000000.m4fss: assigned reserved memory node m4f-dma-memory@a4000000 [ 32.703952] k3-m4-rproc 5000000.m4fss: configured M4 for IPC-only mode [ 32.710643] remoteproc remoteproc0: 5000000.m4fss is available [ 32.716590] remoteproc remoteproc0: attaching to 5000000.m4fss [ 32.722834] k3-m4-rproc 5000000.m4fss: M4 initialized in IPC-only mode [ 32.729402] remoteproc0#vdev0buffer: assigned reserved memory node m4f-dma-memory@a4000000 [ 32.737906] remoteproc0#vdev0buffer: registered virtio0 (type 7) [ 32.744010] remoteproc remoteproc0: remote processor 5000000.m4fss is now attached root@am64xx-evm:~# insmod rpmsg_char.ko root@am64xx-evm:~# insmod virtio_rpmsg_bus.ko [ 662.071181] virtio_rpmsg_bus virtio0: rpmsg host is online [ 662.072286] virtio_rpmsg_bus virtio0: creating channel ti.ipc4.ping-pong addr 0xd root@am64xx-evm:~# [ 662.084485] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xe root@am64xx-evm:~# ./rpmsg_char_simple -r 9 -n 10 Created endpt device rpmsg-char-9-350, fd = 3 port = 1024 Exchanging 10 messages with rpmsg device ti.ipc4.ping-pong on rproc id 9 ... Sending message #0: hello there 0! Receiving message #0: hello there 0! Sending message #1: hello there 1! Receiving message #1: hello there 1! Sending message #2: hello there 2! Receiving message #2: hello there 2! Sending message #3: hello there 3! Receiving message #3: hello there 3! Sending message #4: hello there 4! Receiving message #4: hello there 4! Sending message #5: hello there 5! Receiving message #5: hello there 5! Sending message #6: hello there 6! Receiving message #6: hello there 6! Sending message #7: hello there 7! Receiving message #7: hello there 7! Sending message #8: hello there 8! Receiving message #8: hello there 8! Sending message #9: hello there 9! Receiving message #9: hello there 9! Communicated 10 messages successfully on rpmsg-char-9-350 TEST STATUS: PASSED
在M4F上:我添加了UART用于调试
OPTIONS: I18n Compiled on Aug 13 2017, 15:25:34. Port /dev/ttyUSB1, 09:05:18 Press CTRL-A Z for help on special keys [IPC RPMSG ECHO] ipc_rpmsg_echo_main Mar 23 2022 09:31:07 [IPC RPMSG ECHO] IPC Linux is ready [IPC RPMSG ECHO] Remote Core waiting for messages at end point 13 ... !!! [IPC RPMSG ECHO] Remote Core waiting for messages at end point 14 ... !!! hello there 0! hello there 1! hello there 2! hello there 3! hello there 4! hello there 5! hello there 6! hello there 7! hello there 8! hello there 9! hello there 0! hello there 1! hello there 2! hello there 3! hello there 4! hello there 5! hello there 6! hello there 7! hello there 8! hello there 9!
案例2:使用512 MB DDR的自定义配置(因为我的客户使用512 MB 作为新产品),IPC无法工作。
我为检测到主板的512 MB DDR更改了Linux和U-Boot的DTS,如下所示:
Linux DTS:
memory@80000000 {
device_type = "memory";
/* 2G RAM */
/* reg = <0x00000000 0x80000000 0x00000000 0x80000000>; */
/* 512MB RAM */
reg = <0x00000000 0x80000000 0x00000000 0x20000000>;
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
secure_ddr: optee@9e800000 {
reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
alignment = <0x1000>;
no-map;
};
#if 0
main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
compatible = "shared-dma-pool";
reg = <0x00 0xa0000000 0x00 0x100000>;
no-map;
};
main_r5fss0_core0_memory_region: r5f-memory@a0100000 {
compatible = "shared-dma-pool";
reg = <0x00 0xa0100000 0x00 0xf00000>;
no-map;
};
main_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
compatible = "shared-dma-pool";
reg = <0x00 0xa1000000 0x00 0x100000>;
no-map;
};
main_r5fss0_core1_memory_region: r5f-memory@a1100000 {
compatible = "shared-dma-pool";
reg = <0x00 0xa1100000 0x00 0xf00000>;
no-map;
};
main_r5fss1_core0_dma_memory_region: r5f-dma-memory@a2000000 {
compatible = "shared-dma-pool";
reg = <0x00 0xa2000000 0x00 0x100000>;
no-map;
};
main_r5fss1_core0_memory_region: r5f-memory@a2100000 {
compatible = "shared-dma-pool";
reg = <0x00 0xa2100000 0x00 0xf00000>;
no-map;
};
main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a3000000 {
compatible = "shared-dma-pool";
reg = <0x00 0xa3000000 0x00 0x100000>;
no-map;
};
main_r5fss1_core1_memory_region: r5f-memory@a3100000 {
compatible = "shared-dma-pool";
reg = <0x00 0xa3100000 0x00 0xf00000>;
no-map;
};
#endif
mcu_m4fss_dma_memory_region: m4f-dma-memory@94000000 {
compatible = "shared-dma-pool";
reg = <0x00 0x94000000 0x00 0x100000>;
no-map;
};
mcu_m4fss_memory_region: m4f-memory@94100000 {
compatible = "shared-dma-pool";
reg = <0x00 0x94100000 0x00 0xf00000>;
no-map;
};
/* 8 MB */
rtos_ipc_memory_region: ipc-memories@95000000 {
reg = <0x00 0x95000000 0x00 0x00800000>;
alignment = <0x1000>;
no-map;
};
};
Linux引导日志创建通道IPC时出错
U-Boot 2021.01-00001-g99f587db85-dirty (Mar 24 2022 - 13:57:20 +0700)
SoC: AM64X SR1.0
Model: Texas Instruments AM642 EVM
Board: AM64-GPEVM rev E2
DRAM: 512 MiB
MMC: mmc@fa10000: 0, mmc@fa00000: 1
In: serial@2800000
Out: serial@2800000
Err: serial@2800000
Net: eth0: ethernet@8000000
Hit any key to stop autoboot: 0
=>
=>
=>
=> setenv mtdparts mtdparts=fc40000.spi.0:512k(ospi.tiboot3),2560k(ospi.multicore),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.en;
=> run args_all
=> setenv bootargs console=${console} ${optargs} root=ubi0:rootfs rw ubi.mtd=ospi.rootfs rootfstype=ubifs rootwait=1;
=> sf probe; sf read ${loadaddr} 0xa80000 0x1400000;sf read ${fdtaddr} 0x980000 0x100000;run run_kern
SF: Detected s28hs512t with page size 256 Bytes, erase size 256 KiB, total 64 MiB
device 0 offset 0xa80000, size 0x1400000
SF: 20971520 bytes @ 0xa80000 Read: OK
device 0 offset 0x980000, size 0x100000
SF: 1048576 bytes @ 0x980000 Read: OK
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
ERROR: reserving fdt memory region failed (addr=9e800000 size=1800000)
Loading Device Tree to 000000008fff0000, end 000000008ffffe1d ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.10.65-gdcc6bedb2c (brian@brian) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2
[ 0.000000] Machine model: Texas Instruments AM642 EVM
[ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
[ 0.000000] printk: bootconsole [ns16550a0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000094000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node m4f-dma-memory@94000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000094100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node m4f-memory@94100000, compatible id shared-dma-pool
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000080000000-0x000000009fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080000000-0x0000000093ffffff]
[ 0.000000] node 0: [mem 0x0000000094000000-0x00000000957fffff]
[ 0.000000] node 0: [mem 0x0000000095800000-0x000000009e7fffff]
[ 0.000000] node 0: [mem 0x000000009e800000-0x000000009fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fffffff]
[ 0.000000] cma: Failed to reserve 512 MiB
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] psci: SMC Calling Convention v1.2
[ 0.000000] percpu: Embedded 2 pages/cpu s49880 r8192 d73000 u131072
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] CPU features: detected: GIC system register CPU interface
[ 0.000000] Built 1 zonelists, mobility grouping off. Total pages: 8184
[ 0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 mtdparts=fc40000.spi.0:512k(ospi.tiboot3),25601
[ 0.000000] Dentry cache hash table entries: 65536 (order: 3, 524288 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 2, 262144 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 452864K/524288K available (10880K kernel code, 1346K rwdata, 4288K rodata, 1856K init, 757K bss, 71424K reserved, 0K c)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[ 0.000000] GICv3: 256 SPIs implemented
[ 0.000000] GICv3: 0 Extended SPIs implemented
[ 0.000000] GICv3: Distributor has no Range Selector support
[ 0.000000] GICv3: 16 PPIs implemented
[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001840000
[ 0.000000] ITS [mem 0x01820000-0x0182ffff]
[ 0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
[ 0.000000] ITS@0x0000000001820000: allocated 1048576 Devices @83800000 (flat, esz 8, psz 64K, shr 0)
[ 0.000000] ITS: using cache flushing for cmd queue
[ 0.000000] GICv3: using LPI property table @0x000000008ff80000
[ 0.000000] GIC: using cache flushing for LPI property table
[ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x000000008ff90000
[ 0.000000] random: get_random_bytes called from start_kernel+0x31c/0x4c4 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 225.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x33e45310bc, max_idle_ns: 440795207391 ns
[ 0.000007] sched_clock: 56 bits at 225MHz, resolution 4ns, wraps every 4398046511101ns
[ 0.008592] Console: colour dummy device 80x25
[ 0.013192] Calibrating delay loop (skipped), value calculated using timer frequency.. 450.00 BogoMIPS (lpj=900000)
[ 0.023878] pid_max: default: 32768 minimum: 301
[ 0.028703] LSM: Security Framework initializing
[ 0.033525] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes, linear)
[ 0.041126] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes, linear)
[ 0.051710] rcu: Hierarchical SRCU implementation.
[ 0.057019] Platform MSI: msi-controller@1820000 domain created
[ 0.063416] PCI/MSI: /bus@f4000/interrupt-controller@1800000/msi-controller@1820000 domain created
[ 0.072726] EFI services will not be available.
[ 0.077746] smp: Bringing up secondary CPUs ...
[ 0.083212] Detected VIPT I-cache on CPU1
[ 0.083253] GICv3: CPU1: found redistributor 1 region 0:0x0000000001860000
[ 0.083269] GICv3: CPU1: using allocated LPI pending table @0x000000008ffa0000
[ 0.083339] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.083495] smp: Brought up 1 node, 2 CPUs
[ 0.112909] SMP: Total of 2 processors activated.
[ 0.117730] CPU features: detected: 32-bit EL0 Support
[ 0.123009] CPU features: detected: CRC32 instructions
[ 0.137734] CPU: All CPU(s) started at EL2
[ 0.141948] alternatives: patching kernel code
[ 0.147851] devtmpfs: initialized
[ 0.160573] KASLR disabled due to lack of seed
[ 0.165456] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.175437] futex hash table entries: 512 (order: -1, 32768 bytes, linear)
[ 0.182743] pinctrl core: initialized pinctrl subsystem
[ 0.188722] DMI not present or invalid.
[ 0.193421] NET: Registered protocol family 16
[ 0.198699] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[ 0.205986] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.213964] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.222719] thermal_sys: Registered thermal governor 'step_wise'
[ 0.222725] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.229454] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.243169] ASID allocator initialised with 65536 entries
[ 0.284531] HugeTLB registered 16.0 GiB page size, pre-allocated 0 pages
[ 0.291417] HugeTLB registered 512 MiB page size, pre-allocated 0 pages
[ 0.298182] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.307054] cryptd: max_cpu_qlen set to 1000
[ 0.315901] k3-chipinfo 43000014.chipid: Family:AM64X rev:SR1.0 JTAGID[0x0bb3802f] Detected
[ 0.325291] vsys_5v0: supplied by evm_12v0
[ 0.330199] vsys_3v3: supplied by evm_12v0
[ 0.335055] vddb_3v3_display: supplied by vsys_3v3
[ 0.341403] iommu: Default domain type: Translated
[ 0.346882] SCSI subsystem initialized
[ 0.351568] mc: Linux media interface: v0.10
[ 0.355980] videodev: Linux video capture interface: v2.00
[ 0.361734] pps_core: LinuxPPS API ver. 1 registered
[ 0.366817] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.376172] PTP clock support registered
[ 0.380224] EDAC MC: Ver: 3.0.0
[ 0.384382] omap-mailbox 29020000.mailbox: omap mailbox rev 0x66fc9100
[ 0.391363] omap-mailbox 29040000.mailbox: omap mailbox rev 0x66fc9100
[ 0.398212] omap-mailbox 29060000.mailbox: omap mailbox rev 0x66fc9100
[ 0.405808] FPGA manager framework
[ 0.409447] Advanced Linux Sound Architecture Driver Initialized.
[ 0.417105] clocksource: Switched to clocksource arch_sys_counter
[ 0.423935] VFS: Disk quotas dquot_6.6.0
[ 0.428098] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes)
[ 0.443052] NET: Registered protocol family 2
[ 0.447710] IP idents hash table entries: 8192 (order: 0, 65536 bytes, linear)
[ 0.456123] tcp_listen_portaddr_hash hash table entries: 4096 (order: 0, 65536 bytes, linear)
[ 0.465053] TCP established hash table entries: 8192 (order: 0, 65536 bytes, linear)
[ 0.473072] TCP bind hash table entries: 8192 (order: 1, 131072 bytes, linear)
[ 0.480635] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.487338] UDP hash table entries: 2048 (order: 0, 65536 bytes, linear)
[ 0.494306] UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes, linear)
[ 0.501886] NET: Registered protocol family 1
[ 0.507022] RPC: Registered named UNIX socket transport module.
[ 0.513123] RPC: Registered udp transport module.
[ 0.517970] RPC: Registered tcp transport module.
[ 0.522786] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.529395] PCI: CLS 0 bytes, default 64
[ 0.534311] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.548189] Initialise system trusted keyrings
[ 0.553142] workingset: timestamp_bits=46 max_order=13 bucket_order=0
[ 0.566017] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.572764] NFS: Registering the id_resolver key type
[ 0.577997] Key type id_resolver registered
[ 0.582276] Key type id_legacy registered
[ 0.586463] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.593318] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 0.601252] 9p: Installing v9fs 9p2000 file system support
[ 0.662213] Key type asymmetric registered
[ 0.666434] Asymmetric key parser 'x509' registered
[ 0.671485] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[ 0.679055] io scheduler mq-deadline registered
[ 0.683689] io scheduler kyber registered
[ 0.690932] pinctrl-single f4000.pinctrl: 180 pins, size 720
[ 0.698196] pinctrl-single a40000.timesync-router: 512 pins, size 2048
[ 0.716715] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[ 0.743682] brd: module loaded
[ 0.756028] loop: module loaded
[ 0.760142] megasas: 07.714.04.00-rc1
[ 0.767701] libphy: Fixed MDIO Bus: probed
[ 0.773820] tun: Universal TUN/TAP device driver, 1.6
[ 0.779930] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[ 0.786360] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.792480] sky2: driver version 1.30
[ 0.797759] VFIO - User Level meta-driver version: 0.3
[ 0.804267] i2c /dev entries driver
[ 0.809324] sdhci: Secure Digital Host Controller Interface driver
[ 0.815660] sdhci: Copyright(c) Pierre Ossman
[ 0.820924] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.828381] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.835054] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[ 0.843298] optee: probing for conduit method.
[ 0.847938] optee: revision 3.12 (3d47a131)
[ 0.848656] optee: initialized driver
[ 0.859721] NET: Registered protocol family 17
[ 0.864494] 9pnet: Installing 9P2000 support
[ 0.868941] Key type dns_resolver registered
[ 0.873607] Loading compiled-in X.509 certificates
[ 0.896914] ti-sci 44043000.dmsc: ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')
[ 0.945533] random: fast init done
[ 0.954479] omap-gpmc 3b000000.memory-controller: GPMC revision 6.0
[ 0.960943] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[ 0.969720] omap_i2c 20000000.i2c: bus 0 rev0.12 at 100 kHz
[ 0.977836] pca953x 1-0022: supply vcc not found, using dummy regulator
[ 0.984790] pca953x 1-0022: using AI
[ 1.039078] Console: switching to mono frame buffer device 12x2
[ 1.074016] ssd1307fb 1-003c: fb0: Solomon SSD1307 framebuffer device registered, using 192 bytes of video memory
[ 1.084766] omap_i2c 20010000.i2c: bus 1 rev0.12 at 400 kHz
[ 1.091947] omap_i2c 20020000.i2c: bus 2 rev0.12 at 100 kHz
[ 1.099117] omap_i2c 20030000.i2c: bus 3 rev0.12 at 100 kHz
[ 1.105446] ti-sci-intr bus@f4000:bus@4000000:interrupt-controller1: Interrupt Router 5 domain created
[ 1.115380] ti-sci-intr bus@f4000:interrupt-controller0: Interrupt Router 3 domain created
[ 1.124423] ti-sci-inta 48000000.interrupt-controller: Interrupt Aggregator domain 28 created
[ 1.146374] j721e-pcie f102000.pcie: host bridge /bus@f4000/pcie@f102000 ranges:
[ 1.154016] j721e-pcie f102000.pcie: IO 0x0068001000..0x0068010fff -> 0x0068001000
[ 1.162316] j721e-pcie f102000.pcie: MEM 0x0068011000..0x006fffffff -> 0x0068011000
[ 1.170616] j721e-pcie f102000.pcie: IB MEM 0x0000000000..0x0fffffffff -> 0x0000000000
[ 2.191384] j721e-pcie f102000.pcie: PCI host bridge to bus 0000:00
[ 2.197838] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 2.203461] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] (bus address [0x68001000-0x68010fff])
[ 2.213166] pci_bus 0000:00: root bus resource [mem 0x68011000-0x6fffffff]
[ 2.220250] pci 0000:00:00.0: [104c:b010] type 01 class 0x060400
[ 2.226415] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0xfffffffff 64bit pref]
[ 2.233981] pci 0000:00:00.0: supports D1
[ 2.238089] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 2.247397] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 2.250363] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 2.263891] pci 0000:00:00.0: BAR 0: no space for [mem size 0x1000000000 64bit pref]
[ 2.271821] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x1000000000 64bit pref]
[ 2.280105] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 2.285797] pcieport 0000:00:00.0: PME: Signaling with IRQ 44
[ 2.292577] ti-bcdma 485c0100.dma-controller: Number of rings: 68
[ 2.300433] ti-bcdma 485c0100.dma-controller: Channels: 24 (bchan: 12, tchan: 6, rchan: 6)
[ 2.311071] ti-pktdma 485c0000.dma-controller: Number of rings: 288
[ 2.326548] ti-pktdma 485c0000.dma-controller: Channels: 44 (tchan: 29, rchan: 15)
[ 2.338385] printk: console [ttyS2] disabled
[ 2.342866] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 16, base_baud = 3000000) is a 8250
[ 2.351647] printk: console [ttyS2] enabled
[ 2.351647] printk: console [ttyS2] enabled
[ 2.360099] printk: bootconsole [ns16550a0] disabled
[ 2.360099] printk: bootconsole [ns16550a0] disabled
[ 2.374896] spi-nor spi0.0: s28hs512t (65536 Kbytes)
[ 2.379942] 10 cmdlinepart partitions found on MTD device fc40000.spi.0
[ 2.386572] Creating 10 MTD partitions on "fc40000.spi.0":
[ 2.392060] 0x000000000000-0x000000080000 : "ospi.tiboot3"
[ 2.399202] 0x000000080000-0x000000300000 : "ospi.multicore"
[ 2.406319] 0x000000300000-0x000000500000 : "ospi.tispl"
[ 2.413078] 0x000000500000-0x000000900000 : "ospi.u-boot"
[ 2.419941] 0x000000900000-0x000000940000 : "ospi.env"
[ 2.426446] 0x000000940000-0x000000980000 : "ospi.env.backup"
[ 2.433658] 0x000000980000-0x0000009c0000 : "ospi.dtb"
[ 2.440268] 0x000000a80000-0x000001e80000 : "ospi.kernel"
[ 2.447225] 0x000001e80000-0x000003fc0000 : "ospi.rootfs"
[ 2.454082] 0x000003fc0000-0x000004000000 : "ospi.phypattern"
[ 2.517122] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[ 2.524728] libphy: 8000f00.mdio: probed
[ 2.531054] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83867
[ 2.539316] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA00903, cpsw version 0x6BA80903 Ports: 3 quirks:000002
[ 2.552642] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 16
[ 2.559419] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.4
[ 2.566574] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
[ 2.573254] pps pps0: new PPS source ptp0
[ 2.577728] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:1
[ 2.590974] am65-cpts 39000000.cpts: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:0
[ 2.602799] mmc1: CQHCI version 5.10
[ 2.602987] gpio-mux mux-controller: 2-way mux-controller registered
[ 2.622243] vdd_mmc1: supplied by vsys_3v3
[ 2.628048] libphy: mdio_mux: probed
[ 2.640533] mmc0: CQHCI version 5.10
[ 2.640954] debugfs: Directory 'pd:114' with parent 'pm_genpd' already present!
[ 2.651578] mmc1: SDHCI controller on fa10000.mmc [fa10000.mmc] using ADMA 64-bit
[ 2.653439] ubi0: attaching mtd8
[ 2.671862] ubi0: scanning is finished
[ 2.677076] ubi0: attached mtd8 (name "ospi.rootfs", size 33 MiB)
[ 2.683465] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 262016 bytes
[ 2.689760] mmc0: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit
[ 2.690365] ubi0: min./max. I/O unit sizes: 16/256, sub-page size 16
[ 2.704299] ubi0: VID header offset: 64 (aligned 64), data offset: 128
[ 2.711018] ubi0: good PEBs: 133, bad PEBs: 0, corrupted PEBs: 0
[ 2.717062] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[ 2.724311] ubi0: max/mean erase counter: 6/1, WL threshold: 4096, image sequence number: 34526582
[ 2.733386] ubi0: available PEBs: 0, total reserved PEBs: 133, PEBs reserved for bad PEB handling: 0
[ 2.742608] ubi0: background thread "ubi_bgt0d" started, PID 133
[ 2.749311] ALSA device list:
[ 2.752295] No soundcards found.
[ 2.756702] UBIFS (ubi0:0): Mounting in unauthenticated mode
[ 2.762740] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 139
[ 2.773365] UBIFS (ubi0:0): recovery needed
[ 2.793087] mmc1: Command Queue Engine enabled
[ 2.797633] mmc1: new HS400 MMC card at address 0001
[ 2.803870] mmcblk1: mmc1:0001 S0J56X 14.8 GiB
[ 2.808896] mmcblk1boot0: mmc1:0001 S0J56X partition 1 31.5 MiB
[ 2.815166] mmcblk1boot1: mmc1:0001 S0J56X partition 2 31.5 MiB
[ 2.821509] mmcblk1rpmb: mmc1:0001 S0J56X partition 3 4.00 MiB, chardev (237:0)
[ 2.937492] mmc0: new ultra high speed SDR104 SDHC card at address aaaa
[ 2.945024] mmcblk0: mmc0:aaaa SC16G 14.8 GiB
[ 2.954895] mmcblk0: p1 p2
[ 3.121452] random: crng init done
[ 4.963071] UBIFS (ubi0:0): recovery completed
[ 4.967765] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 4.975188] UBIFS (ubi0:0): LEB size: 262016 bytes (255 KiB), min./max. I/O unit sizes: 16 bytes/256 bytes
[ 4.984882] UBIFS (ubi0:0): FS size: 31179904 bytes (29 MiB, 119 LEBs), journal size 4978304 bytes (4 MiB, 19 LEBs)
[ 4.995322] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[ 5.001173] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID 31731E1A-8FD3-44DB-815C-31114F64156A, small LPT model
[ 5.985801] VFS: Mounted root (ubifs filesystem) on device 0:19.
[ 5.992279] devtmpfs: mounted
[ 5.996227] Freeing unused kernel memory: 1856K
[ 6.000853] Run /sbin/init as init process
INIT: version 2.96 booting
/etc/init.d/rc: /etc/rcS.d/S05modutils.sh: line 21: depmod: not found
hwclock: can't open '/dev/misc/rtc': No such file or directory
Wed Jan 12 11:47:46 UTC 2022
hwclock: can't open '/dev/misc/rtc': No such file or directory
INIT: Entering runlevel: 5
Configuring network interfaces... [ 7.834987] TI DP83867 8000f00.mdio:00: attached PHY driver [TI DP83867] (mii_bus:phy_addr=8000f00.mdio:)
[ 7.848236] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending discover
[ 11.958696] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
udhcpc: sending discover
udhcpc: sending select for 192.168.1.8
udhcpc: lease of 192.168.1.8 obtained, lease time 86400
/etc/udhcpc.d/50default: Adding DNS 123.26.26.26
/etc/udhcpc.d/50default: Adding DNS 123.23.23.23
done.
Starting OpenBSD Secure Shell server: sshd
done.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org am64xx-evm /dev/ttyS2
Arago 2020.09 am64xx-evm /dev/ttyS2
am64xx-evm login: root
root@am64xx-evm:~# ls
a0_checker_apps dts.image3 image rpmsg_char.ko ti_k3_m4_remoteproc.ko
bsww gmsl1.ko iperf rpmsg_char_simple virtio_rpmsg_bus.ko
dmlw gmsl1_i2c_bus.ko libdmlas.so rpmsg_client_sample.ko vsomeip_zDML3.json
dts.image gmsl2.ko libgcc_s.so.1 rpmsg_kdrv_switch.ko
dts.image1 gmsl2_i2c_bus.ko libnl-genl-3.so.200 run-bsw.sh
dts.image2 htop libstdc++.so.6 run-dml.sh
root@am64xx-evm:~# insmod ti_k3_m4_remoteproc.ko
[ 128.581565] k3-m4-rproc 5000000.m4fss: assigned reserved memory node m4f-dma-memory@94000000
[ 128.590166] k3-m4-rproc 5000000.m4fss: configured M4 for IPC-only mode
[ 128.596854] remoteproc remoteproc0: 5000000.m4fss is available
[ 128.602877] remoteproc remoteproc0: attaching to 5000000.m4fss
[ 128.609123] k3-m4-rproc 5000000.m4fss: M4 initialized in IPC-only mode
[ 128.615672] remoteproc0#vdev0buffer: assigned reserved memory node m4f-dma-memory@94000000
[ 128.624171] remoteproc0#vdev0buffer: registered virtio0 (type 7)
[ 128.630270] remoteproc remoteproc0: remote processor 5000000.m4fss is now attached
root@am64xx-evm:~# insmod rpmsg_char.ko
root@am64xx-evm:~# insmod virtio_rpmsg_bus.ko
[ 139.834817] virtio_rpmsg_bus virtio0: rpmsg host is online
root@am64xx-evm:~#
MCU M4F上的代码:
我更改了linker.cmd中的内存以匹配Linux DTS。
内存
{
M4F_VECS:原点= 0x0万,长度= 0x0.02万
M4F_IRAM:原点= 0x0.02万,长度= 0x0002FE00
M4F_DRAM:原点= 0x3万,长度= 0x1万
/*当使用多核应用程序时,即多个R5F/M4F处于活动状态时,请确保
*此内存不与R5F重叠
*/
/*当M4内核使用Linux */进行早期引导时,必须将资源表放在DDR_0的起始位置
DDR_0 :源站= 0x9410万,长度= 0x1000
USER_SHM_MEM :原点= 0x9500万,长度= 0x80
LOG_SHM_MEM :原点= 0x9500万 + 0x80,长度= 0x0.4万 - 0x80
IPC_VRING_MEM :原点= 0x9500.4万,长度= 0x0000C000
}
和M4上的IPC日志:
OPTIONS: I18n Compiled on Aug 13 2017, 15:25:34. Port /dev/ttyUSB1 Press CTRL-A Z for help on special keys [IPC RPMSG ECHO] ipc_rpmsg_echo_main Mar 24 2022 14:44:09
谢谢!
Brian