This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: IPU_UNICACHE_CONFIG access in Linux

Part Number: AM5728

Dear Champs,

Is it possible to access IPU_UNICACHE_CFG register from DSP while Linux is working on A15 core?

When my customer tried to access IPU_UNICACHE_CFG registers in C66x DSP using below,

HW_WR_REG8(0x4a005500, 0x03);

HW_WR_REG8(0x4a005520, 0x01);

HW_WR_REG8(0x4a005540, 0x02);

 

    HW_WR_REG32(0x55080928, 0x20000000);

    HW_WR_REG32(0x5508092c, 0x20004000);

    HW_WR_REG32(0x55080930, 0x20008000);

    HW_WR_REG32(0x55080934, 0x2000c000);

 

    HW_WR_REG32(0x550809a8, 0x55020000);

    HW_WR_REG32(0x550809ac, 0x55024000);

    HW_WR_REG32(0x550809b0, 0x55028000);

    HW_WR_REG32(0x550809b4, 0x5502c000);

they faced kernel error as below.

[ 4169.107628] ------------[ cut here ]------------

[ 4169.112281] WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x330/0x380

[ 4169.121450] 44000000.ocp:L3 Standard Error: MASTER DSP1_MDMA TARGET IPU2 (Read): At Address: 0x00080928 : Data Access in User mode during Functional access

[ 4169.135414] Modules linked in: rpmsg_proto kisan_usb_notifier xr21v1414 cmemk(O) xhci_plat_hcd xhci_hcd usbcore dwc3 udc_core usb_common pru_rproc omap_aes_driver omap_sham omap_wdt phy_omap_usb2 dwc3_omap extcon_palmas omap_des des_generic crypto_engine omap_crypto rtc_ds1307 omap_remoteproc virtio_rpmsg_bus remoteproc [last unloaded: cdc_acm]

[ 4169.166077] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O      4.19.94-svn1142 #9

[ 4169.174198] Hardware name: Generic DRA74X (Flattened Device Tree)

[ 4169.180314] Backtrace:

[ 4169.182781] [<c020ca24>] (dump_backtrace) from [<c020cd5c>] (show_stack+0x18/0x1c)

[ 4169.190384]  r7:c0bc4f8c r6:600f0193 r5:00000000 r4:c104e65c

[ 4169.196070] [<c020cd44>] (show_stack) from [<c0981224>] (dump_stack+0x9c/0xb0)

[ 4169.203324] [<c0981188>] (dump_stack) from [<c022e100>] (__warn+0xdc/0xf8)

[ 4169.210226]  r7:c0bc4f8c r6:00000009 r5:00000000 r4:c1001cbc

[ 4169.215908] [<c022e024>] (__warn) from [<c022dd38>] (warn_slowpath_fmt+0x50/0x6c)

[ 4169.223421]  r9:dc9c99c0 r8:dd881158 r7:c0bc4eac r6:c0bc5280 r5:c0bc4f5c r4:c1004c48

[ 4169.231197] [<c022dcec>] (warn_slowpath_fmt) from [<c057dae0>] (l3_interrupt_handler+0x330/0x380)

[ 4169.240102]  r3:dc9d4d80 r2:c0bc4f5c

[ 4169.243689]  r5:00000002 r4:80080001

[ 4169.247281] [<c057d7b0>] (l3_interrupt_handler) from [<c02895ec>] (__handle_irq_event_percpu+0x68/0x140)

[ 4169.256800]  r10:c1050278 r9:dc9d5e00 r8:00000017 r7:c1001de8 r6:00000000 r5:dc9d5e68

[ 4169.264659]  r4:dc9db200

[ 4169.267203] [<c0289584>] (__handle_irq_event_percpu) from [<c02896f8>] (handle_irq_event_percpu+0x34/0x88)

[ 4169.276895]  r10:c0ec5430 r9:c1000000 r8:dc80c000 r7:00000001 r6:dc9d5e00 r5:dc9d5e68

[ 4169.284754]  r4:c1004c48

[ 4169.287298] [<c02896c4>] (handle_irq_event_percpu) from [<c028978c>] (handle_irq_event+0x40/0x64)

[ 4169.296204]  r6:c100a814 r5:dc9d5e68 r4:dc9d5e00

[ 4169.300842] [<c028974c>] (handle_irq_event) from [<c028d4dc>] (handle_fasteoi_irq+0xc0/0x168)

[ 4169.309401]  r7:00000001 r6:c100a814 r5:dc9d5e68 r4:dc9d5e00

[ 4169.315084] [<c028d41c>] (handle_fasteoi_irq) from [<c02887e8>] (generic_handle_irq+0x2c/0x3c)

[ 4169.323729]  r7:00000001 r6:00000000 r5:00000000 r4:c0ec5bfc

[ 4169.329412] [<c02887bc>] (generic_handle_irq) from [<c0288e4c>] (__handle_domain_irq+0x64/0xbc)

[ 4169.338147] [<c0288de8>] (__handle_domain_irq) from [<c057afe0>] (gic_handle_irq+0x44/0x80)

[ 4169.346531]  r9:c1000000 r8:fa213000 r7:c1001eb0 r6:fa212000 r5:fa21200c r4:c1005104

[ 4169.354308] [<c057af9c>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x8c)

[ 4169.361819] Exception stack(0xc1001eb0 to 0xc1001ef8)

[ 4169.366889] 1ea0:                                     00000000 000aa0f8 dbd8950c c0222254

[ 4169.375098] 1ec0: ffffe000 c1004c7c c1004cc4 00000001 00000000 00000000 c0ec5430 c1001f0c

[ 4169.383307] 1ee0: c1001eec c1001f00 c0221ee8 c0208e94 a00f0013 ffffffff

[ 4169.389947]  r9:c1000000 r8:00000000 r7:c1001ee4 r6:ffffffff r5:a00f0013 r4:c0208e94

[ 4169.397724] [<c0208e6c>] (arch_cpu_idle) from [<c099b49c>] (default_idle_call+0x30/0x34)

[ 4169.405852] [<c099b46c>] (default_idle_call) from [<c025a9a8>] (do_idle+0x204/0x2ac)

[ 4169.413628] [<c025a7a4>] (do_idle) from [<c025ad3c>] (cpu_startup_entry+0x20/0x24)

[ 4169.421228]  r10:c0e4ba38 r9:c1051d80 r8:ffffffff r7:c1051d80 r6:00000000 r5:00000002

[ 4169.429086]  r4:000000c7

[ 4169.431630] [<c025ad1c>] (cpu_startup_entry) from [<c0995524>] (rest_init+0xd0/0xd4)

[ 4169.439408] [<c0995454>] (rest_init) from [<c0e00dfc>] (start_kernel+0x448/0x470)

[ 4169.446918]  r5:00000000 r4:c1051dd8

[ 4169.450507] [<c0e009b4>] (start_kernel) from [<00000000>] (  (null))

[ 4169.456884] ---[ end trace d3887c278523c1b1 ]---

Thanks and Best Regards,

SI.

  • Hi Sung,

    The IPU_UNICACHE_CFG and related AMMU registers can only be programmed by the respective IPU and DSP processors. They cannot be programmed from A15.

    regards

    Suman

  • Hi Suman,

    Thanks for your response. Do you mean IPU_UNICACHE_CFG is only be programmed by IPU, not DSP?

    Could you please provide details how it can be programmed by IPU while linux running on A15?

    Thanks and Best Regards,

    SI.

  • My customer tried to access IPU_UNICACHE_CFG registers from IPU as you mentioned, but still faced kernel error.

    Could you please let them know how they can access it in IPU while linux running on A15?

    They tried to access IPU_UNICACHE_CFG as below.

    #define L4_PERIPHERAL_L4CFG     0x4A000000

    #define IPU_PERIPHERAL_L4CFG    0x6A000000

     

    #define L3_IPU2_TARGET_UNICACHE_MMU_REGS    0x55080000

    #define IPU2_TARGET_UNICACHE_MMU_REGS       0x75080000

    #define IPU2_TARGET_UNICACHE_MMU_SIZE       0x10000

     

     

     

    UARTConfigInit(CSL_IPU_UART5_REGS + 0x20000000, BAUD_RATE_115200, UART_WORD_LENGTH_8, UART_STOP_BIT_1, UART_NO_PARITY, UART_16x_MODE);

    UARTConfigPuts(CSL_IPU_UART5_REGS + 0x20000000, "\n=== Start IPU #1 ===\n", -1);

     

    UARTConfigPuts(CSL_IPU_UART5_REGS + 0x20000000, "0\r\n", -1);

     

    HW_WR_REG8(0x6a005500, 0x03);

    HW_WR_REG8(0x6a005520, 0x01);

    HW_WR_REG8(0x6a005540, 0x02);

     

    UARTConfigPuts(CSL_IPU_UART5_REGS + 0x20000000, "1\r\n", -1);

     

        HW_WR_REG32(0x75080928, 0x20000000);

        HW_WR_REG32(0x7508092c, 0x20004000);

        HW_WR_REG32(0x75080930, 0x20008000);

        HW_WR_REG32(0x75080934, 0x2000c000);

     

    UARTConfigPuts(CSL_IPU_UART5_REGS + 0x20000000, "2\r\n", -1);

     

        HW_WR_REG32(0x750809a8, 0x55020000);

        HW_WR_REG32(0x750809ac, 0x55024000);

        HW_WR_REG32(0x750809b0, 0x55028000);

        HW_WR_REG32(0x750809b4, 0x5502c000);

     

    UARTConfigPuts(CSL_IPU_UART5_REGS + 0x20000000, "3\r\n", -1);

    And they got below result in the console(IPU UART)

    === Start IPU #1 ===

    0

    1

    2

    3

    They got kernel error as below.

    [10929.229979] remoteproc remoteproc0: stopped remote processor 58820000.ipu

    [10929.239069] remoteproc remoteproc0: releasing 58820000.ipu

    [10929.343040] omap-rproc 58820000.ipu: ignoring dependency for device, assuming no driver

    [10929.351175] omap-rproc 58820000.ipu: ignoring dependency for device, assuming no driver

    [10929.359244] omap-rproc 58820000.ipu: assigned reserved memory node ipu1-memory@9d000000

    [10929.367388] remoteproc remoteproc0: 58820000.ipu is available

    [10929.546858] remoteproc remoteproc0: powering up 58820000.ipu

    [10929.552568] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 3798640

    [10929.560424] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1

    [10929.572952] virtio_rpmsg_bus virtio0: rpmsg host is online

    [10929.578519] remoteproc remoteproc0: registered virtio0 (type 7)

    [10929.584527] remoteproc remoteproc0: remote processor 58820000.ipu is now up

    [10929.592582] ------------[ cut here ]------------

    [10929.597233] WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x330/0x380

    [10929.606403] 44000000.ocp:L3 Standard Error: MASTER IPU1 TARGET IPU2 (Read): At Address: 0x00080928 : Data Access in Supervisor mode during Functional access

    [10929.620454] Modules linked in: rpmsg_proto kisan_usb_notifier xr21v1414 cmemk(O) xhci_plat_hcd xhci_hcd usbcore dwc3 udc_core usb_common pru_rproc omap_aes_driver omap_wdt omap_sham phy_omap_usb2 dwc3_omap omap_des des_generic crypto_engine extcon_palmas rtc_ds1307 omap_crypto omap_remoteproc virtio_rpmsg_bus remoteproc [last unloaded: cdc_acm]

    [10929.651116] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O      4.19.94-svn1142 #9

    [10929.659237] Hardware name: Generic DRA74X (Flattened Device Tree)

    [10929.665352] Backtrace:

    [10929.667812] [<c020ca24>] (dump_backtrace) from [<c020cd5c>] (show_stack+0x18/0x1c)

    [10929.675413]  r7:c0bc4f8c r6:60030193 r5:00000000 r4:c104e65c

    [10929.681097] [<c020cd44>] (show_stack) from [<c0981224>] (dump_stack+0x9c/0xb0)

    [10929.688351] [<c0981188>] (dump_stack) from [<c022e100>] (__warn+0xdc/0xf8)

    [10929.695252]  r7:c0bc4f8c r6:00000009 r5:00000000 r4:c1001cbc

    [10929.700934] [<c022e024>] (__warn) from [<c022dd38>] (warn_slowpath_fmt+0x50/0x6c)

    [10929.708447]  r9:dc9c99c0 r8:dd881158 r7:c0bc4eac r6:c0bc531c r5:c0bc4f5c r4:c1004c48

    [10929.716222] [<c022dcec>] (warn_slowpath_fmt) from [<c057dae0>] (l3_interrupt_handler+0x330/0x380)

    [10929.725129]  r3:dc9d4d80 r2:c0bc4f5c

    [10929.728715]  r5:00000002 r4:80080001

    [10929.732308] [<c057d7b0>] (l3_interrupt_handler) from [<c02895ec>] (__handle_irq_event_percpu+0x68/0x140)

    [10929.741827]  r10:c1050278 r9:dc9d5e00 r8:00000017 r7:c1001de8 r6:00000000 r5:dc9d5e68

    [10929.749685]  r4:dc9db200

    [10929.752230] [<c0289584>] (__handle_irq_event_percpu) from [<c02896f8>] (handle_irq_event_percpu+0x34/0x88)

    [10929.761922]  r10:c0ec5430 r9:c1000000 r8:dc80c000 r7:00000001 r6:dc9d5e00 r5:dc9d5e68

    [10929.769780]  r4:c1004c48

    [10929.772323] [<c02896c4>] (handle_irq_event_percpu) from [<c028978c>] (handle_irq_event+0x40/0x64)

    [10929.781230]  r6:c100a814 r5:dc9d5e68 r4:dc9d5e00

    [10929.785867] [<c028974c>] (handle_irq_event) from [<c028d4dc>] (handle_fasteoi_irq+0xc0/0x168)

    [10929.794424]  r7:00000001 r6:c100a814 r5:dc9d5e68 r4:dc9d5e00

    [10929.800108] [<c028d41c>] (handle_fasteoi_irq) from [<c02887e8>] (generic_handle_irq+0x2c/0x3c)

    [10929.808753]  r7:00000001 r6:00000000 r5:00000000 r4:c0ec5bfc

    [10929.814436] [<c02887bc>] (generic_handle_irq) from [<c0288e4c>] (__handle_domain_irq+0x64/0xbc)

    [10929.823172] [<c0288de8>] (__handle_domain_irq) from [<c057afe0>] (gic_handle_irq+0x44/0x80)

    [10929.831557]  r9:c1000000 r8:fa213000 r7:c1001eb0 r6:fa212000 r5:fa21200c r4:c1005104

    [10929.839334] [<c057af9c>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x8c)

    [10929.846844] Exception stack(0xc1001eb0 to 0xc1001ef8)

    [10929.851913] 1ea0:                                     00000000 000c3e14 dbd8950c c0222254

    [10929.860123] 1ec0: ffffe000 c1004c7c c1004cc4 00000001 00000000 00000000 c0ec5430 c1001f0c

    [10929.868332] 1ee0: c1001eec c1001f00 c0221ee8 c0208e94 a0030013 ffffffff

    [10929.874974]  r9:c1000000 r8:00000000 r7:c1001ee4 r6:ffffffff r5:a0030013 r4:c0208e94

    [10929.882751] [<c0208e6c>] (arch_cpu_idle) from [<c099b49c>] (default_idle_call+0x30/0x34)

    [10929.890877] [<c099b46c>] (default_idle_call) from [<c025a9a8>] (do_idle+0x204/0x2ac)

    [10929.898653] [<c025a7a4>] (do_idle) from [<c025ad3c>] (cpu_startup_entry+0x20/0x24)

    [10929.906253]  r10:c0e4ba38 r9:c1051d80 r8:ffffffff r7:c1051d80 r6:00000000 r5:00000002

    [10929.914111]  r4:000000c7

    [10929.916655] [<c025ad1c>] (cpu_startup_entry) from [<c0995524>] (rest_init+0xd0/0xd4)

    [10929.924433] [<c0995454>] (rest_init) from [<c0e00dfc>] (start_kernel+0x448/0x470)

    [10929.931945]  r5:00000000 r4:c1051dd8

    [10929.935533] [<c0e009b4>] (start_kernel) from [<00000000>] (  (null))

    [10929.941910] ---[ end trace 00155f3d40a726dd ]---

    Thanks and Best Regards,

    SI.

  • Hi Sung,

    The IPU AMMU registers should be programmed from that corresponding IPU, and not from a DSP or the A15 core. There are access restrictions for these registers, so they are in general not accessible. Please use the base address 0x40000000 from IPU for your AMMU/Unicache base. The first two Small Page entries are set by default to translate (Entry #0: 0x0 -> 0x0; Entry #1: 0x40000000 -> 0x55080000, size 4K).

    The L2 MMU can be programmed from a different processor. 

    The TI SYS/BIOS provides a AMMU module and a mechanism to program the AMMU, the applications typically only need to provide the AMMU configuration through a config file. Are you not running SYS/BIOS?

    Here is an example SYS/BIOS-based config used within the IPC test executables,

    git.ti.com/gitweb

    regards

    Suman