Ronald G Minnich <[EMAIL PROTECTED]> writes:

> On Tue, 7 Aug 2001, Preston L. Bannister wrote:
> 
> > I see you can boot (another) Linux from LinuxBIOS, any notion whether
> > it would be possible to boot Windows?
> 
> you can probably boot windows, but how will you handle BIOS interrupts
> from windows?

Well.  Starting with the case of dos.  Here is how I would handle it.
I would load from linuxbios a ``clasic'' bootloader that provides
BIOS services into RAM at 0xf0000.  This would then load dos or whatever
from a boot sector and start running it.

I skimmed the services the original pc provided in it's BIOS and while 
they don't abstract the hardware there isn't very much proviced, and
what is provices is simple.  We have a start with the 16bit BIOS code
from bochs that was posted earlier. 

But I would start with DOS as a target.  It has been around for quite
a while and it is well understood.  And with FreeDOS there is even a
GPL'd implementation.  

With DOS running and all devices in legacy mode it shouldn't be too
hard to start windows.  

But just to be clear.  I see this as an ELF image that linuxBIOS would
load, with a 32 bit entry point and code that would take it from there
and setup tables, and then go into 16 bit mode.

The following list is a first approximation of what BIOS services
would need to be supported 

int08(irq0)  -- Timer interrupt   
int09(irq1)  -- keyboard interrupt
int0a(irq2)  -- AT slave 8259
int0b(irq3)  -- com1
int0c(irq4)  -- com2
int0d(irq5)  -- hard drive
int0e(irq6)  -- floppy
int0f(irq7)  -- parallel
int70(irq8)  -- real time clock 
int71(irq9)  -- 
int72(irq10) --
int73(irq11) --
int74(irq12) --
int75(irq13) -- 80287 (Floating point coprocessor)
int76(irq14) --
int77(irq15) --


int10 -- video services  (to display messages)
        service(ah)
        0x00 set video mode
        0x01 define cursor shape
        0x02 set cursor pos
        0x03 get cursor pos & shape
        0x04 get light pen (obsolete)
        0x05 select display page
        0x06 scroll up
        0x07 scroll down
        0x08 read character and attribute
        0x09 write character and attribute
        0x0a write character 
        0x0b pallette
        0x0c set dot
        0x0d get dot
        0x0e print char
        0x0f get video mode
        0x10 set ega pallete registers
        0x11 character generator
        0x12 alternate select/video subsytem config
        0x13 write string
        0x1a get display combo
        0x1b return state
        0x4f vesa extensions...
        
int11 -- equipment check 
int12 -- memory size
int13 -- disk I/O
        service(ah)
        0x00 disk init
        0x01 read error code
        0x02 read
        0x03 write
        0x04 test
        0x08 get drive parameters
        0x0d drive reset
        0x15 get disk type
        0x16 get disk change status
int14 -- serial I/O (Unnecessary?) 
        service(ah)
        0x00 init
        0x01 write character
        0x02 read character
        0x03 get status
int15 -- misc services 
        service(ah)
        0x4f keyboard intercept
        0x86 event wait (udelay...)
        0x87 move block
        0x88 get extended memory size
        0x89 switch to protected mode
        0xC0 return system config parameters
        0xC1 Return Ext bios segment address
int16 -- keyboard I/O
        service(ah)
        0x00 Read character
        0x01 read status
        0x02 get shift flags
        0x03 set typematic rate (unnecessary?)
        0x04 adjust keyclick (unnecessary?)
        0x05 keyboard write
        0x10 read key extended
        0x11 check key extended
        0x13 get shift flags extended
int17 -- parallel I/O (Unnecessary?)
        service(ah)
        0x00 write char
        0x01 init
        0x02 get status
int18 -- basic (noop)
int19 -- bootstrap & reboot (Unnecessary?)
int1a -- time services
        service(ax)
        0x0000 Get System Time
        0x0100 Set Sytem Time
        0x0200 Get Real Time Clock Time
        0x0300 Set Real Time Clock Time (Unnecessary?)
        0x0400 Get Real Time Clock Date
        0x0500 Set Real Time Clock Date (Unnecessary?)
        0x0600 Set Alarm
        0x0700 Clear Alarm

        /* PCI BIOS services */
        0x1b01 PCI_BIOS_PRESENT
        0x1b02 FIND_PCI_DEVICE
        0x1b03 FIND_PCI_CLASS_CODE
        0x1b06 GENERATE_SPECIAL_CYCLE
        0x1b08 READ_CONFIG_BYTE
        0x1b09 READ_CONFIG_WORD
        0x1b0a READ_CONFIG_DWORD
        0x1b0b WRITE_CONFIG_BYTE
        0x1b0c WRITE_CONFIG_WORD
        0x1b0d WRITE_CONFIG_DWORD
        0x1b0e GET_IRQ_ROUTING_OPTIONS
        0x1b0f SET_PCI_IRQ
                

Reply via email to