[Prev][Next][Index][Thread]

Re: How to write a Kernel



> From: "Joel M. Damaso" <jmdamaso@bhpi.com.ph>
> Subject: Re: How to write a Kernel
> 
> main()
>     {
>          printf("Hello World");
>     }
> 
> 1. In the above source I know that OSkit initialize multiboot params
>    etc to make my source an OS kernel. can anyone show me how to
>    apply the ff.?
> 
>              base_cpu_setup
>              base_cpu_init
>              base_cpu_load.

Given the above example program, you probably do not need to worry
about these functions. However, I suggest you look at multiboot_main
in oskit/kern/x86/pc/base_multiboot_main.c. This is the startup code
that is run before your main program is invoked. That startup code
does a number of grungy things to ensure that the main program sees a
nice, easy to work in, environment.

BTW: base_cpu_setup is a macro, and all it does is call base_cpu_init,
followed by base_cpu_load.

Lbs

---------------------------------------------------------------------------
Leigh B. Stoller                     Computer Science - Flux Research Group
stoller@cs.utah.edu                  University of Utah
http://www.cs.utah.edu/~stoller      Salt Lake City, Utah 84112
Voice: (813) 899-9296                FAX: (801) 585-3743
---------------------------------------------------------------------------
=================================
To subscribe or unsubscribe, send mail with "subscribe" or "unsubscribe"
to oskit-users-request@flux.cs.utah.edu.  The oskit-announce list is low
volume - if you want to subscribe, mail oskit-announce-request@flux.cs.utah.edu


Follow-Ups: