* calling UNDI API
@ 2004-06-21 15:02 lode leroy
2004-06-21 15:22 ` Tobias Wollgam
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: lode leroy @ 2004-06-21 15:02 UTC (permalink / raw)
To: grub-devel
Hi,
does anyone have code to call UNDI functions from withing GRUB?
I can obtain the physical address of a function "entry16point" or
"entry32point"
which are supposedly callable from real mode and/or protected mode,
but I do not know how to use them (successfully)
I'm looking into the sources from NILO and etherboot, but there's
too much stuff to learn... (I'm not sufficiently familiar with x86 protected
mode used in grub2...)
-- lode
u_int16_t (*entry16point)(u_int16_t func, void *param);
/* 16bit stack segment API entry */
/* point. This will be seg:off in */
/* real mode and sel:off in 16:16 */
/* protected mode. */
u_int16_t (*entry32point)(u_int16_t func, void *param);
/* 32bit stack segment API entry */
/* point. This will be sel:off. */
/* In real mode, sel == 0 */
_________________________________________________________________
Online een nieuwe taal leren? http://www.msn.be/msnacademy
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: calling UNDI API
2004-06-21 15:02 calling UNDI API lode leroy
@ 2004-06-21 15:22 ` Tobias Wollgam
2004-06-22 3:06 ` Feng Shuo
2004-06-27 12:16 ` Marco Gerards
2 siblings, 0 replies; 12+ messages in thread
From: Tobias Wollgam @ 2004-06-21 15:22 UTC (permalink / raw)
To: The development of GRUB 2
> Hi,
>
> does anyone have code to call UNDI functions from withing GRUB?
Ask Feng Shuo <fengshuo@ict.ac.cn>. He has integrated the etherboot
driver into grub legacy. I think it could be a good way to start here,
with integrating etherboot drivers first and the etherboot undi driver
second.
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: calling UNDI API
2004-06-21 15:02 calling UNDI API lode leroy
2004-06-21 15:22 ` Tobias Wollgam
@ 2004-06-22 3:06 ` Feng Shuo
2004-06-27 12:16 ` Marco Gerards
2 siblings, 0 replies; 12+ messages in thread
From: Feng Shuo @ 2004-06-22 3:06 UTC (permalink / raw)
To: 'The development of GRUB 2'; +Cc: bug-grub
I do some work on grub, but it doesn't work now :-(
I will release a special patch containing the unfinished UNDI drivers for
GRUB-0.95. Hope somebody can fix it and let it work :-)
BTW. I think the UNDI driver may be not our first choice ---- so many cards
are buggy implemented :-(
-----Original Message-----
From: grub-devel-bounces+fengshuo=ict.ac.cn@gnu.org
[mailto:grub-devel-bounces+fengshuo=ict.ac.cn@gnu.org] On Behalf Of lode
leroy
Sent: Monday, June 21, 2004 11:02 PM
To: grub-devel@gnu.org
Subject: calling UNDI API
Hi,
does anyone have code to call UNDI functions from withing GRUB?
I can obtain the physical address of a function "entry16point" or
"entry32point"
which are supposedly callable from real mode and/or protected mode,
but I do not know how to use them (successfully)
I'm looking into the sources from NILO and etherboot, but there's
too much stuff to learn... (I'm not sufficiently familiar with x86 protected
mode used in grub2...)
-- lode
u_int16_t (*entry16point)(u_int16_t func, void *param);
/* 16bit stack segment API entry */
/* point. This will be seg:off in */
/* real mode and sel:off in 16:16 */
/* protected mode. */
u_int16_t (*entry32point)(u_int16_t func, void *param);
/* 32bit stack segment API entry */
/* point. This will be sel:off. */
/* In real mode, sel == 0 */
_________________________________________________________________
Online een nieuwe taal leren? http://www.msn.be/msnacademy
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: calling UNDI API
2004-06-21 15:02 calling UNDI API lode leroy
2004-06-21 15:22 ` Tobias Wollgam
2004-06-22 3:06 ` Feng Shuo
@ 2004-06-27 12:16 ` Marco Gerards
2004-06-28 9:25 ` Yoshinori K. Okuji
2 siblings, 1 reply; 12+ messages in thread
From: Marco Gerards @ 2004-06-27 12:16 UTC (permalink / raw)
To: The development of GRUB 2
"lode leroy" <lode_leroy@hotmail.com> writes:
> does anyone have code to call UNDI functions from withing GRUB?
Can you please explain what this is and why you need it?
Thanks,
Marco
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: calling UNDI API
2004-06-27 12:16 ` Marco Gerards
@ 2004-06-28 9:25 ` Yoshinori K. Okuji
2004-06-28 16:49 ` Marco Gerards
2004-06-29 11:29 ` Marco Gerards
0 siblings, 2 replies; 12+ messages in thread
From: Yoshinori K. Okuji @ 2004-06-28 9:25 UTC (permalink / raw)
To: The development of GRUB 2
On Sunday 27 June 2004 14:16, Marco Gerards wrote:
> "lode leroy" <lode_leroy@hotmail.com> writes:
> > does anyone have code to call UNDI functions from withing GRUB?
>
> Can you please explain what this is and why you need it?
UNDI is a part of PXE, and it provides a raw ethernet interface. If we
can UNDI from GRUB, it fits into our framework, since it works in a
similar way as etherboot drivers.
Okuji
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: calling UNDI API
2004-06-28 9:25 ` Yoshinori K. Okuji
@ 2004-06-28 16:49 ` Marco Gerards
2004-06-29 11:29 ` Marco Gerards
1 sibling, 0 replies; 12+ messages in thread
From: Marco Gerards @ 2004-06-28 16:49 UTC (permalink / raw)
To: The development of GRUB 2
"Yoshinori K. Okuji" <okuji@enbug.org> writes:
> On Sunday 27 June 2004 14:16, Marco Gerards wrote:
>> "lode leroy" <lode_leroy@hotmail.com> writes:
>> > does anyone have code to call UNDI functions from withing GRUB?
>>
>> Can you please explain what this is and why you need it?
>
> UNDI is a part of PXE, and it provides a raw ethernet interface. If we
> can UNDI from GRUB, it fits into our framework, since it works in a
> similar way as etherboot drivers.
This sounds really cool. Lode, do you want to work on this?
I can do the same for the PPC port, open firmware has such features as
well.
Thanks,
Marco
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: calling UNDI API
2004-06-28 9:25 ` Yoshinori K. Okuji
2004-06-28 16:49 ` Marco Gerards
@ 2004-06-29 11:29 ` Marco Gerards
2004-06-29 14:59 ` chaac
2004-07-01 11:32 ` Yoshinori K. Okuji
1 sibling, 2 replies; 12+ messages in thread
From: Marco Gerards @ 2004-06-29 11:29 UTC (permalink / raw)
To: The development of GRUB 2
"Yoshinori K. Okuji" <okuji@enbug.org> writes:
> On Sunday 27 June 2004 14:16, Marco Gerards wrote:
>> "lode leroy" <lode_leroy@hotmail.com> writes:
>> > does anyone have code to call UNDI functions from withing GRUB?
>>
>> Can you please explain what this is and why you need it?
>
> UNDI is a part of PXE, and it provides a raw ethernet interface. If we
> can UNDI from GRUB, it fits into our framework, since it works in a
> similar way as etherboot drivers.
What is the best way to implement network support? We can access the
raw interfaces using UNDI. I think the same is possible (in such a
way) when using Open Firmware.
How will we support the other cards? By using etherboot (or whatever
it was used in GRUB Legacy)? What I would prefer is to have our own
TCP/IP stack that is platform independent.
--
Marco
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: calling UNDI API
2004-06-29 11:29 ` Marco Gerards
@ 2004-06-29 14:59 ` chaac
2004-07-01 11:32 ` Yoshinori K. Okuji
1 sibling, 0 replies; 12+ messages in thread
From: chaac @ 2004-06-29 14:59 UTC (permalink / raw)
To: The development of GRUB 2
Marco Gerards wrote:
> How will we support the other cards? By using etherboot (or whatever
> it was used in GRUB Legacy)? What I would prefer is to have our own
> TCP/IP stack that is platform independent.
There are many TCP/IP implementations that are free to use. I don't
recommend to build one from scratch if it isn't really necessary.
I don't know how they collide with GRUB's license but here is link to
one of them, even in "local" server:
http://savannah.nongnu.org/projects/lwip/
This one is mainly for embedded systems, but has also x86 port.
Thanks,
Vesa Jääskeläinen
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: calling UNDI API
2004-06-29 11:29 ` Marco Gerards
2004-06-29 14:59 ` chaac
@ 2004-07-01 11:32 ` Yoshinori K. Okuji
2004-07-01 13:36 ` Marco Gerards
1 sibling, 1 reply; 12+ messages in thread
From: Yoshinori K. Okuji @ 2004-07-01 11:32 UTC (permalink / raw)
To: The development of GRUB 2
On Tuesday 29 June 2004 13:29, Marco Gerards wrote:
> What is the best way to implement network support? We can access the
> raw interfaces using UNDI. I think the same is possible (in such a
> way) when using Open Firmware.
If you look at the header file include/grub/net.h, you can see what I
had in my mind. Basically, network devices should provide a generic
interface to network protocols.
> How will we support the other cards? By using etherboot (or whatever
> it was used in GRUB Legacy)? What I would prefer is to have our own
> TCP/IP stack that is platform independent.
In GRUB Legacy, we use our own implementation for network protocols. The
source code is derived from etherboot, but we have modified it to adapt
it to the GRUB semantics. So, in principle, we only use the ethernet
drivers in etherboot.
For network drivers, there are some candidates: Etherboot, OSKit, and
drivers in Linux, FreeBSD, NetBSD and OpenBSD. If we want to steal
drivers from operating systems, this is not easy, because this requires
support for interruptions by hardware. GRUB doesn't assume that
hardware interrupts occur during normal execution, since this makes the
implementation very complex, due to the switch between real mode and
protected mode on i386. So I prefer the polling approach to the
interruption-based approach. For this, Etherboot fits gracefully.
If my understanding is correct, Etherboot is now being ported to other
architectures, although it was only for i386 like GRUB Legacy. This
looks very interesting to us.
BTW, do you really need TCP in GRUB? I know some people want to use TCP
protocols for netboot, such as HTTP and FTP. But I feel this is
overkill. If you need only UDP, it's quite easy to implement. You can
just copy the code from GRUB Legacy with a few modifications for
portability.
Okuji
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: calling UNDI API
2004-07-01 11:32 ` Yoshinori K. Okuji
@ 2004-07-01 13:36 ` Marco Gerards
2004-07-01 18:44 ` Johan Rydberg
2004-07-02 1:39 ` Feng Shuo
0 siblings, 2 replies; 12+ messages in thread
From: Marco Gerards @ 2004-07-01 13:36 UTC (permalink / raw)
To: The development of GRUB 2
"Yoshinori K. Okuji" <okuji@enbug.org> writes:
> If you look at the header file include/grub/net.h, you can see what I
> had in my mind. Basically, network devices should provide a generic
> interface to network protocols.
Ok.
>> How will we support the other cards? By using etherboot (or whatever
>> it was used in GRUB Legacy)? What I would prefer is to have our own
>> TCP/IP stack that is platform independent.
> GRUB doesn't assume that hardware interrupts occur during normal
> execution, since this makes the implementation very complex, due to
> the switch between real mode and protected mode on i386. So I prefer
> the polling approach to the interruption-based approach. For this,
> Etherboot fits gracefully.
Ok, I agree.
> If my understanding is correct, Etherboot is now being ported to other
> architectures, although it was only for i386 like GRUB Legacy. This
> looks very interesting to us.
i did not know that. Interesting indeed.
> BTW, do you really need TCP in GRUB? I know some people want to use TCP
> protocols for netboot, such as HTTP and FTP. But I feel this is
> overkill. If you need only UDP, it's quite easy to implement. You can
> just copy the code from GRUB Legacy with a few modifications for
> portability.
No, I just said TCP/IP because I am used to it and it is the name of
the protocol, I did not mean TCP specifically. But I know a lot of
people would like TCP support. It is at least an option that should
be left open, IMHO.
Thanks,
Marco
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: calling UNDI API
2004-07-01 13:36 ` Marco Gerards
@ 2004-07-01 18:44 ` Johan Rydberg
2004-07-02 1:39 ` Feng Shuo
1 sibling, 0 replies; 12+ messages in thread
From: Johan Rydberg @ 2004-07-01 18:44 UTC (permalink / raw)
To: The development of GRUB 2
Marco Gerards <metgerards@student.han.nl> wrote:
: > GRUB doesn't assume that hardware interrupts occur during normal
: > execution, since this makes the implementation very complex, due to
: > the switch between real mode and protected mode on i386. So I prefer
: > the polling approach to the interruption-based approach. For this,
: > Etherboot fits gracefully.
:
: Ok, I agree.
Isn't GRUB executing in protected mode, except when it escapes into
real mode to do BIOS calls? I can not see how it would be difficult
to use interrupts in such context. Or does the BIOS depend on
interrupst?
: > BTW, do you really need TCP in GRUB? I know some people want to use TCP
: > protocols for netboot, such as HTTP and FTP. But I feel this is
: > overkill. If you need only UDP, it's quite easy to implement. You can
: > just copy the code from GRUB Legacy with a few modifications for
: > portability.
:
: No, I just said TCP/IP because I am used to it and it is the name of
: the protocol, I did not mean TCP specifically. But I know a lot of
: people would like TCP support. It is at least an option that should
: be left open, IMHO.
The problem is that TCP is rather interrupt driven by nature. For
example, it uses a lot of timers for packet re-sending and similar
stuff.
Maybe it is possible to use lwIP, which is released under a modified
BSD license. See http://savannah.nongnu.org/projects/lwip/
~j
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: calling UNDI API
2004-07-01 13:36 ` Marco Gerards
2004-07-01 18:44 ` Johan Rydberg
@ 2004-07-02 1:39 ` Feng Shuo
1 sibling, 0 replies; 12+ messages in thread
From: Feng Shuo @ 2004-07-02 1:39 UTC (permalink / raw)
To: 'The development of GRUB 2'
The interrupt handle is different between GRUB and Etherboot. I don't know
the detail, but this makes some Etherboot drivers not work properly in GRUB
(even with my diskless patch). For instance, the new pcnet32 driver hang in
GRUB, for it will raise an interrupt to initialize the card ---- the UNDI
driver has the similar problem :-(
In grub2, I think, we must make a decision on which framework to use before
we do anything, so that we may change the grub2 base code or architecture to
support the frame work better.
-----Original Message-----
From: grub-devel-bounces+fengshuo=ict.ac.cn@gnu.org
[mailto:grub-devel-bounces+fengshuo=ict.ac.cn@gnu.org] On Behalf Of Marco
Gerards
Sent: Thursday, July 01, 2004 9:36 PM
To: The development of GRUB 2
Subject: Re: calling UNDI API
"Yoshinori K. Okuji" <okuji@enbug.org> writes:
> If you look at the header file include/grub/net.h, you can see what I
> had in my mind. Basically, network devices should provide a generic
> interface to network protocols.
Ok.
>> How will we support the other cards? By using etherboot (or whatever
>> it was used in GRUB Legacy)? What I would prefer is to have our own
>> TCP/IP stack that is platform independent.
> GRUB doesn't assume that hardware interrupts occur during normal
> execution, since this makes the implementation very complex, due to
> the switch between real mode and protected mode on i386. So I prefer
> the polling approach to the interruption-based approach. For this,
> Etherboot fits gracefully.
Ok, I agree.
> If my understanding is correct, Etherboot is now being ported to other
> architectures, although it was only for i386 like GRUB Legacy. This
> looks very interesting to us.
i did not know that. Interesting indeed.
> BTW, do you really need TCP in GRUB? I know some people want to use TCP
> protocols for netboot, such as HTTP and FTP. But I feel this is
> overkill. If you need only UDP, it's quite easy to implement. You can
> just copy the code from GRUB Legacy with a few modifications for
> portability.
No, I just said TCP/IP because I am used to it and it is the name of
the protocol, I did not mean TCP specifically. But I know a lot of
people would like TCP support. It is at least an option that should
be left open, IMHO.
Thanks,
Marco
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2004-07-02 1:41 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-21 15:02 calling UNDI API lode leroy
2004-06-21 15:22 ` Tobias Wollgam
2004-06-22 3:06 ` Feng Shuo
2004-06-27 12:16 ` Marco Gerards
2004-06-28 9:25 ` Yoshinori K. Okuji
2004-06-28 16:49 ` Marco Gerards
2004-06-29 11:29 ` Marco Gerards
2004-06-29 14:59 ` chaac
2004-07-01 11:32 ` Yoshinori K. Okuji
2004-07-01 13:36 ` Marco Gerards
2004-07-01 18:44 ` Johan Rydberg
2004-07-02 1:39 ` Feng Shuo
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.