lkml.org 
[lkml]   [2003]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectfroom assembly to C in boot code
Hi all,

I forward to the lkml a mail I posted on kernelnewbies hoping someone of
you can help me.
-------------------------------------------------------------------------------------------------------------------------

Hi,

for a couple of weeks I worked on some examples about boot process. In
my previous post on kernelnewbies I post some of them.

Now I have a problem. My goal is to boot from a diskette, load the setup
code (4 sectors), load the kernel at 0x10000 and move it at 0x1000
trying to execute a main C routine that
should represent the start of the kernel. This C routine print simply
"Hello Kernel".

For my job I used the examples of Berlin Brown at
http://bama.ua.edu/~brown084/main.html because this code is a
simplified version of the linux boot process.

Attached there is my code, hoping someone of you can give a look at it
and tell me if there is something wrong (I think so).

Before the jump to 0x0100 all seems work fine. The problem happen when I switch in
protected mode and try to jump to 0x0100.

Ahhhh!!! I use bochs for my test.


PS

To build my code type:

make clean (when necessary)
make all

to write on a diskette:
make disk



[unhandled content-type:application/x-gzip]
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.039 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site