[SeaBIOS] Help using a macro in 16bit code
Daniel Castro
evil.dani at gmail.com
Wed Mar 7 07:19:39 CET 2012
Hello All,
I am working in the PV-Drivers for xen.
I am trying to use a macro that will return a pointer inside a
structure defined by a macro, using a macro.
For example I create the front ring that will contain the disk read
requests with a macro like this:
struct blkif_ring * shared = memalign_low(4096,4096); //return
0x000fd630 this above 16bit 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
My problem is I do not know which macro to use to set the malloc in a
place (segment) I can locate later in 16bit code.
And since I am using macros when I try to use MAKE_FLATPTR and GET_SEG
they make compilation error.
Sorry for such silly questions.
Daniel
--
+-=====---------------------------+
| +---------------------------------+ | This space intentionally blank
for notetaking.
| | | Daniel Castro, |
| | | Consultant/Programmer.|
| | | U Andes |
+-------------------------------------+
More information about the SeaBIOS
mailing list