* access to hardware registers using KGDB on ARM
@ 2013-04-24 13:29 Андрей Скворцов
0 siblings, 0 replies; only message in thread
From: Андрей Скворцов @ 2013-04-24 13:29 UTC (permalink / raw)
To: kernelnewbies
Hello everyone,
I have arm SoC AM3517 (Cortex-A8) running linux 2.6.32. I am trying to
access hardware registers using kgdb. I can connect to the board via
RS232, can read variables in kernel space, control processes using
breakpoints, but I can't read hardware register.
For example, I am trying to read UART3 registers. Information about
UART3 is saved in structure:
static struct plat_serial8250_port serial_platform_data2[] = {
{
.mapbase = OMAP_UART3_BASE,
.irq = 74,
.iotype = UPIO_MEM,
.regshift = 2,
...
}
}
mapbase is a physical address. According to the Technical Reference
Manual is should be 0x49020000.
I checked this field using kgdb:
(gdb) p/x serial_platform_data2[0].mapbase
$34 = 0x49020000
This structure has the field membase. As I understand, it contains
virtual address of the mapbase physical address. This field is
initialized on UART init via function ioremap().
I checked this field as well:
(gdb) p/x serial_platform_data2[0].membase
$35 = 0xfb020000
Now I am trying to read register MCR_REG, that has offset 0x10 from the
base address.
(gdb) x serial_platform_data2[0].membase+0x10
0xfb020010: Cannot access memory at address 0xfb020010
(gdb) x serial_platform_data2[0].mapbase+0x10
0x49020010: Cannot access memory at address 0x49020010
As I understand, the membase address should work. Right?
Why has access failed? Is it kgdb limitation?
--
Best regards,
Andrey Skvortsov
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-24 13:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-24 13:29 access to hardware registers using KGDB on ARM Андрей Скворцов
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).