From: Daniel Castro <evil.dani@gmail.com>
To: xen-devel@lists.xensource.com
Subject: C Macros and Xen RING Macros Questions
Date: Fri, 6 Apr 2012 19:20:13 +0900 [thread overview]
Message-ID: <CAP2B859xAsT7jPckxOzDranK88hM-o2DYHkFW_bCYqxJU-3UVQ@mail.gmail.com> (raw)
hello All,
I am still working on the PV Drivers for SeaBIOS using upstream qemu.
And, I have two questions.
1.
Here is the location of all relevant data structs:
blkfront_info:0x000fd620 shared_ring:0x0009a000 private_ring:0x0009b000
DEBUG Read op private ring at 0x0009b000-0x000ab000, idx 63478
Here is my problem, when I do:
ring_req =
GLOBALFLAT2GLOBAL(RING_GET_REQUEST(GET_GLOBALFLAT(bi->private),GLOBALFLAT2GLOBAL(GET_GLOBALFLAT(bi->private)->req_prod_pvt)));
//please ignore the MACROS for now, or read further down.
I get:
After RING_GET_REQUEST operation ring request is at 0xe18ea40f id:0
But I have the feeling that the request should be between
0x0009b000-0x000ab000. Right?
2.
As you can see in the above code I use some SeaBIOS macros to access
32Bit addresses in 16Bit code. My second questions is: How the memory
access macros affect the RING macros? Do I need to rewrite the ring
macros to use the memory macros inside, for example:
/* How big is this ring? */
#define RING_SIZE(_r) \
((_r)->nr_ents)
Should be instead:
/* How big is this ring? */
#define RING_SIZE(_r) \
(GET_GLOBAL((_r)->nr_ents))
SeaBIOS macros need to be around ALL memory accesses.
This is a short message for something that might be to complex to
explain briefly, so please ask any questions that you deem necessary
to understand. Right now, I am developing the first stage of boot when
the BIOS requests address 7c00 to get the Boot sector. Once I get this
working we should have a working prototype for PV-drivers in seabios.
Thank you all for your interest,
Daniel
--
+-=====---------------------------+
| +---------------------------------+ | This space intentionally blank
for notetaking.
| | | Daniel Castro, |
| | | Consultant/Programmer.|
| | | U Andes |
+-------------------------------------+
next reply other threads:[~2012-04-06 10:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-06 10:20 Daniel Castro [this message]
2012-04-06 19:54 ` C Macros and Xen RING Macros Questions Konrad Rzeszutek Wilk
2012-04-07 11:16 ` Daniel Castro
2012-04-07 12:39 ` Ian Campbell
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=CAP2B859xAsT7jPckxOzDranK88hM-o2DYHkFW_bCYqxJU-3UVQ@mail.gmail.com \
--to=evil.dani@gmail.com \
--cc=xen-devel@lists.xensource.com \
/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 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).