From: "Andy Falanga (afalanga)" <afalanga@micron.com>
To: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Addresses in PxCLB and PxCLBU
Date: Mon, 6 Jul 2015 23:41:01 +0000 [thread overview]
Message-ID: <559B11FD.2040800@micron.com> (raw)
Hi,
I'm working with the registers in an AHCI controller. The memory
address contained in PxCLB and PxCLBU (if 64-bit addressing is
supported): what kind of address are they? Currently, when I get the
address and place it into a pointer of struct ahci_cmd_hdr and try to
dereference, my VM locks and then reboots. What am I doing incorrectly?
Basically, I have this:
void __iomem * pbase = ahci_port_base((struct ata_port*));
struct ahci_cmd_hdr *cmd_hdr = NULL;
cmd_hdr = (struct ahci_cmd_hdr*)(u64)
((u64)(*(temp + PORT_LST_ADDR_HI)) << 32 | *temp);
pr_info("cmd_hdr is %p\n", cmd_hdr);
pr_info("cmd_hdr->opts is %d\n", cmd_hdr->opts); /* opts is __le32 */
At the last line above my VM hangs and reboots. The memory address is
something like 0x0000000037900000. This address makes me think that I
simply can't dereference it but I'm quite new to this and I don't know
what I should do. I'd appreciate any help even if that's a pointer (no
pun intended) to a more appropriate forum.
Thanks,
Andy
next reply other threads:[~2015-07-06 23:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 23:41 Andy Falanga (afalanga) [this message]
2015-07-08 10:44 ` Addresses in PxCLB and PxCLBU Sergei Shtylyov
2015-07-08 14:20 ` Andy Falanga (afalanga)
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=559B11FD.2040800@micron.com \
--to=afalanga@micron.com \
--cc=linux-ide@vger.kernel.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.