I'm not sure how far you've gotten since saturday, but it sound to me like you are almost there. I have set up a system to boot Linux from a flash.
From your descriptions, I believe you are on the right track. Before
jumping to Linux at 0x1000 for zImages and 0x10000 for bzImages you have to have the system set up the same way a standard POST would have. That is, all of the peripherals need to be active and any machine dependant initializations need to have occured. Finally you need to put the processor into a quasi protected mode (I've heard it called unreal mode but I'm not sure if there is an official name). Basically this means you need to set up a GDT which alows access to all memory. And finally you need to jump to the Linix kernel with a far jump using the 32 bit address override. The code which linux loads ont a floppy to do just this stuff is in the file kernel/arch/i386/boot/setup.S. It has a lot of moving the kernel code which I believe you've already got. But then it does some setup stuff (and explains it better than I can) that you need.
Once you've got this stuff I think you shold be able to boot the linux image you've loaded. :)
Let me know how it goes and good luck! Gary
-----Original Message----- From: Winter Jörg [SMTP:joerg.winter@disch-gmbh.de] Sent: Saturday, February 12, 2000 12:56 AM To: openbios@elvis.informatik.uni-freiburg.de Subject: [OpenBIOS] Exception 13 ?
James: (jvh@uclink4.berkeley.edu): Thanks for the hint on loading a Kernel, but:
Now I have a verified routine that loads the kernel (block by block) from my ATA-Disk into memory (at whatever I like. Currently at 0x00010000). I´m loading a zImage at 0x00010000, the bootsect at 0x9000, the setupsectors (4) at 0x9200. It´s just like the other loaders do it ...he?
I have the code like: static void (*v)() =(void *)KERNEL_START;
I start like: v();
and the machine (the openbios) throws me an exception 13. (general Protection Fault errorcode 0).
I tried nearly any combination of stack-location, entry-adress and kerneltype ... all fails ... I now read alot about descriptors and segments and so cause I suspect the problem is somewhere there ...
But I just dont get the point. What am I doing wrong now ?? I thought the kernel would just set up and start?
I figured out that already the jump done with the v(); is the one that causes the exception, no matter if there is a kernel or just dummy code (like: jmp $).
There must be something I misunderstood completely !! Help, I´m lost ...
greetinx, J.Winter
To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message