xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Castro <evil.dani@gmail.com>
To: xen-devel@lists.xensource.com
Subject: Little help with Seabios PV-Drivers for XEN
Date: Fri, 9 Mar 2012 08:35:40 +0900	[thread overview]
Message-ID: <CAP2B85-Q0BRb8j40e10CS39Mo4Z09nbiYWKw2Oo7ODGO=Wh0NQ@mail.gmail.com> (raw)

Hello All,

I have a little setback with the development of PV Drivers for Xen in SeaBIOS.
The initialization code that runs in 32 Bit is working properly.
But, when the system tries to read on the disk I use the ring macros
to get a request. The macro usage looks like this:
struct blkif_ring * shared = memalign_low(4096,4096); //return
0x000fd630 this above 16bit address space
SHARED_RING_INIT(shared);
So far I have a pointer located at 0x0009a000
Under 32bit the struct is correct and all is working according to plan.

But on 16bit operation read on disk I have
struct blkfront_info * shared_ring =
container_of(op->drive_g.info->shared)); // I get d630 I should get it
from the correct segment, but how?
RING_GET_REQUEST(shared_ring); //this returns 0xffff and should be
something 0xa010 segment SS or something like that

SeaBios has some macros that convert a pointer in 32Bit to 16Bit by
changing the segment register, yet I do not know in what segment the
ring is located, and the macros are not applied inside the procedure
of the macro, for example:
MAKE_FLATPTR(GET_SEG(SS),RING_GET_REQUEST(shared_ring));
But this will change a 16Bit pointer of segment SS to a 32 bit
segment. There is also the reverse but, again I do not know the
segment in which I should look for. Lastly the process inside the
macro does not get this benefin, and I do not know if the macro will
work with a pointer of size 16bits.

Any help will be GREATLY appreciated, I am almost done.

Thanks,

Daniel
-- 
+-=====---------------------------+
| +---------------------------------+ | This space intentionally blank
for notetaking.
| |   | Daniel Castro,                |
| |   | Consultant/Programmer.|
| |   | U Andes                         |
+-------------------------------------+

             reply	other threads:[~2012-03-08 23:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08 23:35 Daniel Castro [this message]
2012-03-08 23:59 ` Little help with Seabios PV-Drivers for XEN James Harper
2012-03-09  4:47   ` Daniel Castro
2012-04-07 11:01   ` Daniel Castro
2012-05-10 15:57     ` Konrad Rzeszutek Wilk
2012-04-06 20:34 ` Konrad Rzeszutek Wilk
2012-04-07 10:57   ` Daniel Castro

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='CAP2B85-Q0BRb8j40e10CS39Mo4Z09nbiYWKw2Oo7ODGO=Wh0NQ@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).