Network support in real mode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Jabus
Member
Member
Posts: 39
Joined: Sun Jan 07, 2007 7:54 am

Network support in real mode

Post by Jabus »

Hi,

I'm working on the latest version of my bootloader and I wanted to support downloading kernels and modules from another computer on the network. My bootloader operates in real mode and the problem I'm having at the moment is finding, if there is one, the BIOS interrupt that allows you to send packets. I have searched Ralf Brown's and can't find what I'm after. Do I have to switch to protected mode and detect and initiate the network interface card just to do this or is there a way to do it in real mode?
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Re: Network support in real mode

Post by Alboin »

Here is a description of Solaris' boot loading methods.

4.4.3 describes their current system. They use a diskette based method, which runs a 'Device Configuration Assistant', consequently loading the appropriate network card drivers.
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Network support in real mode

Post by Brendan »

Hi,
Jabus wrote: I'm working on the latest version of my bootloader and I wanted to support downloading kernels and modules from another computer on the network. My bootloader operates in real mode and the problem I'm having at the moment is finding, if there is one, the BIOS interrupt that allows you to send packets. I have searched Ralf Brown's and can't find what I'm after. Do I have to switch to protected mode and detect and initiate the network interface card just to do this or is there a way to do it in real mode?
Have you considered netboot/PXE?

Netboot/PXE may have several advantages:
  • - the network card and/or BIOS provides a device-independent API for you to use, so that you don't need to write lots of network card drivers that are only used during boot. Note: this API doesn't exist unless you boot with Netboot/PXE, and neither does any other API that provides network services.
    - it would mean you don't need to use an additional boot device (e.g. a boot floppy, a boot CD, etc) to get boot started
    - the boot loader is no longer limited to 512 bytes (you can safely have a 480 KB boot loader if you want).
    - it's an extremely nice thing for an OS developer to have (insanely fast and easy way to test your OS on all computers on your LAN, once it's setup).
There's also a few disadvantages:
  • - you'd need a different boot loader (e.g. one boot loader for netboot/PXE and another one for floppy).
    - the client machines will need to support PXE. AFAIK most new computers with built-in network cards do support PXE. For older computers either buy a network card that supports PXE (they're not too expensive) or use etherboot.
    - you'd need a server (to provide DHCP and TFTP) for clients to boot from.
Anyway, I just thought it might be worth mentioning...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Jabus
Member
Member
Posts: 39
Joined: Sun Jan 07, 2007 7:54 am

Re: Network support in real mode

Post by Jabus »

I think i'd rather have just the one bootloader which I can develop more and more of when I take breaks from working on my Kernel.
Here is a description of Solaris' boot loading methods.

4.4.3 describes their current system. They use a diskette based method, which runs a 'Device Configuration Assistant', consequently loading the appropriate network card drivers.
Thanks for the link. I've started going down their approach by detecting the different network cards available and then loading an appropriate driver.
Post Reply