[syslinux] comboot+PXE stack
H. Peter Anvin
hpa at zytor.com
Tue Nov 30 11:28:49 PST 2004
Pawel Oleksik wrote:
>
>>In addition, and I forgot this: real-mode utilities can only access the
>>bottom 1 MB of memory, which is not where your COM32 program runs. You
>>have, however, a "bounce buffer" in low memory, guaranteed to be at
>
> Thanks God (and you, Peter, of course) that com32 can be used!
> But on the other hand, it seems to me that Murali's menu system is
> prepared to work with com16. How can I combine it with com32?
>
> If I had any other problems I'll ask on the list again.
>
One of my goals with the new libcom32 is to port Murali's menu system.
Unfortunately I haven't gotten there yet.
If you're in a *com16* program, you can just invoke the interrupt vector
directly, like this:
asm volatile("int $0x22" : "=a" (eax) : "a" (0x0009), "b" (0x0071));
You don't need to set ES because it is already set to your segment.
However, to copy data which is not in your segment, you need a special
copy routine, like this:
static inline void memcpy_fromseg(void *ptr, uint16_t seg, uint16_t off,
size_t len)
{
uint32_t esi = (uint32_t)ptr;
uint32_t edi = off;
uint32_t ecx = len;
asm volatile("movw %0,%%fs ; cld ; fs ; rep ; movsb"
: "+S" (esi), "+D" (edi), "+c" (ecx)
: "abd" (seg)
: "memory");
}
More information about the Syslinux
mailing list