Yes, 0x3100008 works, but 0x3110008 crashes. I have been wondering if this is due to the difference between using the DMA driver (“/dev/ttyTHS#”) versus the regular non-DMA driver (“/dev/ttyS#”).
Here is a kernel OOPS from reading the UART controller register at 0x3110008 (there is no error with read of 0x3110008):
[ 171.690648] CPU3: SError detected, daif=1c0, spsr=0x800000c5, mpidr=80000101, esr=bf40c000
[ 171.690662] CPU5: SError detected, daif=1c0, spsr=0x800000c5, mpidr=80000103, esr=bf40c000
[ 171.690675] CPU0: SError detected, daif=1c0, spsr=0x800000c5, mpidr=80000100, esr=bf40c000
[ 171.690724] CPU4: SError detected, daif=140, spsr=0x40000145, mpidr=80000102, esr=bf40c000
[ 171.690798] CPU2: SError detected, daif=1c0, spsr=0x800000c5, mpidr=80000001, esr=be000000
[ 171.690829] CPU1: SError detected, daif=1c0, spsr=0x800000c5, mpidr=80000000, esr=be000000
[ 171.690837] **************************************
[ 171.690851] CPU5 Machine check error in AXI2APB@0x2390000:
[ 171.690868] Raw FIFO Entry: 0
[ 171.690873] ADDR: 0x43110008
[ 171.690878] STAT: 0x1868241
[ 171.690883] --------------------------------------
[ 171.690889] Decoded FIFO Entry: 0
[ 171.690894] Direction: READ
[ 171.690899] Bridge ID: 0x1
[ 171.690906] Error Type: 0x12 -- Timeout error
[ 171.690910] Length: 0
[ 171.690920] Protection: 0x2 -- Unprivileged, Non-Secure, Data Access
[ 171.690927] Source ID: 0x1 -- CCPLEX
[ 171.690936] AXI_ID: 0x6 -- A57 Core 2
[ 171.690942] Cache: 0x0 -- Strongly Ordered
[ 171.690947] Burst: 0x1
[ 171.691033] <b> Address: 0x3110008 -- /serial@3110000 + 0x8</b>
[ 171.691038] **************************************
[ 171.691957] ROC:IOB Machine Check Error:
[ 171.691977] Address Type = Secure DRAM
[ 171.692086] Address = 0x0 (Unknown Device)
[ 171.692545] Bad mode in Error handler detected, code 0xbf40c000 -- SError
[ 171.692559] Internal error: Oops - bad mode: 0 [#1] PREEMPT SMP
[ 171.692598] Modules linked in: fuse bcmdhd pci_tegra bluedroid_pm
[ 171.692620] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.4.38-tegra #1
[ 171.692625] Hardware name: quill (DT)
[ 171.692634] task: ffffffc1ececbe80 ti: ffffffc1ecee4000 task.ti: ffffffc1ecee4000
[ 171.692676] PC is at t18x_a57_enter_state+0x48/0xc4
[ 171.692687] LR is at t18x_a57_enter_state+0x20/0xc4
[ 171.692695] pc : [<ffffffc0009116b4>] lr : [<ffffffc00091168c>] pstate: 800000c5
[ 171.692700] sp : ffffffc1ecee7ec0
[ 171.692712] x29: ffffffc1ecee7ec0 x28: ffffffc1ecee4000
[ 171.692724] x27: ffffffc000b37f00 x26: 0000002807bf735e
[ 171.692734] x25: ffffffc0013a1000 x24: 0000000000000000
[ 171.692745] x23: ffffffc00132bfc8 x22: ffffffc00132bfe0
[ 171.692754] x21: ffffffc0013a17c8 x20: ffffffc00146a630
[ 171.692763] x19: 0000000000000000 x18: 0000000000000000
[ 171.692773] x17: 0000007fa4bfc988 x16: ffffffc0001d6f9c
[ 171.692783] x15: 00000000b504f333 x14: 0000000000005abd
[ 171.692792] x13: 00000000b504f333 x12: 0000000000000000
[ 171.692802] x11: 0000000000000400 x10: 00000000000008a0
[ 171.692812] x9 : 00000000ffff82df x8 : ffffffc1ececc780
[ 171.692821] x7 : 00000027f8f8a580 x6 : 000000000000bf12
[ 171.692830] x5 : 0000000000000000 x4 : 00ffffffffffffff
[ 171.692839] x3 : 000000003b9aca00 x2 : 0000000000f42710
[ 171.692848] x1 : 0000000000000000 x0 : 0000000000000000
[ 171.692850]
[ 171.692860] Process swapper/5 (pid: 0, stack limit = 0xffffffc1ecee4020)
[ 171.692865] Call trace:
[ 171.692879] [<ffffffc0009116b4>] t18x_a57_enter_state+0x48/0xc4
[ 171.692906] [<ffffffc0007d8194>] cpuidle_enter_state+0x88/0x2dc
[ 171.692917] [<ffffffc0007d8420>] cpuidle_enter+0x18/0x20
[ 171.692940] [<ffffffc0000e7a74>] call_cpuidle+0x28/0x50
[ 171.692952] [<ffffffc0000e7c18>] cpu_startup_entry+0x17c/0x340
[ 171.692970] [<ffffffc00008ede8>] secondary_start_kernel+0x12c/0x164
[ 171.692979] [<000000008008192c>] 0x8008192c
[ 171.692994] ---[ end trace 2f8504c7d2596ade ]---
[ 171.698314] Kernel panic - not syncing: Attempted to kill the idle task!
[ 171.698327] CPU0: stopping
[ 171.698340] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 4.4.38-tegra #1
[ 171.698344] Hardware name: quill (DT)
[ 171.698347] Call trace:
[ 171.698366] [<ffffffc000089854>] dump_backtrace+0x0/0x100
[ 171.698378] [<ffffffc000089a1c>] show_stack+0x14/0x1c
[ 171.698392] [<ffffffc0003136f8>] dump_stack+0x98/0xc0
[ 171.698401] [<ffffffc00008f40c>] handle_IPI+0x300/0x30c
[ 171.698409] [<ffffffc00008161c>] gic_handle_irq+0x9c/0xb4
[ 171.698417] [<ffffffc000084740>] el1_irq+0x80/0xf8
[ 171.698427] [<ffffffc0007d8420>] cpuidle_enter+0x18/0x20
[ 171.698435] [<ffffffc0000e7a74>] call_cpuidle+0x28/0x50
[ 171.698441] [<ffffffc0000e7c18>] cpu_startup_entry+0x17c/0x340
[ 171.698455] [<ffffffc000b279fc>] rest_init+0x84/0x8c
[ 171.698470] [<ffffffc0010cd97c>] start_kernel+0x39c/0x3b0
[ 171.698475] [<0000000080b2e000>] 0x80b2e000
[ 171.698481] CPU4: stopping
[ 171.698491] CPU: 4 PID: 0 Comm: swapper/4 Tainted: G D 4.4.38-tegra #1
[ 171.698495] Hardware name: quill (DT)
[ 171.698497] Call trace:
[ 171.698511] [<ffffffc000089854>] dump_backtrace+0x0/0x100
[ 171.698521] [<ffffffc000089a1c>] show_stack+0x14/0x1c
[ 171.698530] [<ffffffc0003136f8>] dump_stack+0x98/0xc0
[ 171.698537] [<ffffffc00008f40c>] handle_IPI+0x300/0x30c
[ 171.698543] [<ffffffc00008161c>] gic_handle_irq+0x9c/0xb4
[ 171.698550] [<ffffffc000084740>] el1_irq+0x80/0xf8
[ 171.698558] [<ffffffc0007d8420>] cpuidle_enter+0x18/0x20
[ 171.698565] [<ffffffc0000e7a74>] call_cpuidle+0x28/0x50
[ 171.698571] [<ffffffc0000e7c18>] cpu_startup_entry+0x17c/0x340
[ 171.698578] [<ffffffc00008ede8>] secondary_start_kernel+0x12c/0x164
[ 171.698583] [<000000008008192c>] 0x8008192c
[ 171.698611] CPU2: stopping
[ 171.698645] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D 4.4.38-tegra #1
[ 171.698654] Hardware name: quill (DT)
[ 171.698665] Call trace:
[ 171.698810] [<ffffffc000089854>] dump_backtrace+0x0/0x100
[ 171.698836] [<ffffffc000089a1c>] show_stack+0x14/0x1c
[ 171.698859] [<ffffffc0003136f8>] dump_stack+0x98/0xc0
[ 171.698880] [<ffffffc00008f40c>] handle_IPI+0x300/0x30c
[ 171.698898] [<ffffffc00008161c>] gic_handle_irq+0x9c/0xb4
[ 171.698916] [<ffffffc000084740>] el1_irq+0x80/0xf8
[ 171.698943] [<ffffffc0007d8420>] cpuidle_enter+0x18/0x20
[ 171.698967] [<ffffffc0000e7a74>] call_cpuidle+0x28/0x50
[ 171.699003] [<ffffffc0000e7c18>] cpu_startup_entry+0x17c/0x340
[ 171.699023] [<ffffffc00008ede8>] secondary_start_kernel+0x12c/0x164
[ 171.699038] [<000000008008192c>] 0x8008192c
[ 171.699060] CPU1: stopping
[ 171.699085] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 4.4.38-tegra #1
[ 171.699096] Hardware name: quill (DT)
[ 171.699105] Call trace:
[ 171.699136] [<ffffffc000089854>] dump_backtrace+0x0/0x100
[ 171.699158] [<ffffffc000089a1c>] show_stack+0x14/0x1c
[ 171.699175] [<ffffffc0003136f8>] dump_stack+0x98/0xc0
[ 171.699195] [<ffffffc00008f40c>] handle_IPI+0x300/0x30c
[ 171.699210] [<ffffffc00008161c>] gic_handle_irq+0x9c/0xb4
[ 171.699326] [<ffffffc000084740>] el1_irq+0x80/0xf8
[ 171.699345] [<ffffffc0007d8420>] cpuidle_enter+0x18/0x20
[ 171.699361] [<ffffffc0000e7a74>] call_cpuidle+0x28/0x50
[ 171.699377] [<ffffffc0000e7c18>] cpu_startup_entry+0x17c/0x340
[ 171.699394] [<ffffffc00008ede8>] secondary_start_kernel+0x12c/0x164
[ 171.699407] [<000000008008192c>] 0x8008192c
[ 172.320081] CPU3: stopping
[ 172.322800] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G D 4.4.38-tegra #1
[ 172.330454] Hardware name: quill (DT)
[ 172.334118] Call trace:
[ 172.336577] [<ffffffc000089854>] dump_backtrace+0x0/0x100
[ 172.341980] [<ffffffc000089a1c>] show_stack+0x14/0x1c
[ 172.347034] [<ffffffc0003136f8>] dump_stack+0x98/0xc0
[ 172.352087] [<ffffffc00008f40c>] handle_IPI+0x300/0x30c
[ 172.357313] [<ffffffc00008161c>] gic_handle_irq+0x9c/0xb4
[ 172.362712] [<ffffffc000084740>] el1_irq+0x80/0xf8
[ 172.367509] [<ffffffc0000a8e28>] irq_exit+0x84/0xdc
[ 172.372391] [<ffffffc0000f45e4>] __handle_domain_irq+0x6c/0xb4
[ 172.378222] [<ffffffc0000815dc>] gic_handle_irq+0x5c/0xb4
[ 172.383620] [<ffffffc000084740>] el1_irq+0x80/0xf8
[ 172.388416] [<ffffffc0007d8420>] cpuidle_enter+0x18/0x20
[ 172.393729] [<ffffffc0000e7a74>] call_cpuidle+0x28/0x50
[ 172.398953] [<ffffffc0000e7c18>] cpu_startup_entry+0x17c/0x340
[ 172.404787] [<ffffffc00008ede8>] secondary_start_kernel+0x12c/0x164
[ 172.411050] [<000000008008192c>] 0x8008192c
[ 172.438750] Rebooting in 5 seconds..[0000.271] I> Welcome to MB2(TBoot-BPMP)(version: 01.00.160913-t186-M-00.00-mobile-2c57a56c)
This controller identifies in the device tree of my R28.1 dev board as:
compatible = "nvidia,tegra186-hsuart";
...
serial1 = "/serial@3110000";
…this is pure DMA/ttyTHS driver.
The controller which allows reading 0x8 offset byte:
compatible = "nvidia,tegra20-uart", "nvidia,tegra186-hsuart";
...
stdout-path = "/serial@3100000";
...
serial0 = "/serial@3100000";
…this is used as serial console and is in the non-DMA driver.
Can someone suggest if the DMA-capable driver may cause some sort of failure when trying to directly read the controller base address plus 0x8 offset? Versus working in the non-DMA version? My thought is that reading the controller registers should be uniform and repeatable across all serial UARTs which are powered up and set up via the device tree…but in this case this is not working.