From: skvortsov.av@summatechnology.ru (Андрей Скворцов)
To: kernelnewbies@lists.kernelnewbies.org
Subject: access to hardware registers using KGDB on ARM
Date: Wed, 24 Apr 2013 17:29:02 +0400 [thread overview]
Message-ID: <5177DE1E.9030609@summatechnology.ru> (raw)
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
reply other threads:[~2013-04-24 13:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5177DE1E.9030609@summatechnology.ru \
--to=skvortsov.av@summatechnology.ru \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.