[Prev][Next][Index][Thread]
Re: How to write a Kernel Q3:
Hi jammi,
I think your sequence is correct.I could boot the kernel
made like this.Anyway whether base_cpu-setup will work or not I am not
sure.
supreeth.
On Thu, 11 Mar 1999, Joel M. Damaso wrote:
> thanks :-)
>
> source:
>
> #include <oskit/machine/base_cpu.h>
> #include <oskit/x86/base_gdt.h>
> #include <oskit/x86/seg.h>
> #include <oskit/x86/base_tss.h>
> #include <oskit/x86/base_idt.h>
> #include <oskit/x86/trap.h>
> #include <oskit/x86/base_trap.h>
>
> extern struct x86_desc base_gdt [GDTSZ];
> extern struct x86_tss base_tss ;
> extern struct x86_desc base_idt [IDTSZ]; /*IDTSZ = 256*/
>
> extern struct cpu_info base_cpuid ; /* cpu info filled by base_cpu_init*/
> extern struct gate_init_entry base_trap_inittab [];
>
>
>
> main()
> {
> /*base_cpu_setup(void);*/ /* Can I have this rather than all init below?
> */
> base_gdt_init(); /* init the default oskit GDTs*/
> base_gdt_load(); /* load proper values of gdt*/
> base_idt_load(); /* point all traps, hard & soft to our
> table*/
> base_trap_init();
> base_tss_init();
> base_tss_load();
>
>
> printf("Hello World\n");
> }
>
> In the above code I just simple like to initialize all the oskit base structure. Are
> there anyhting that I missed? Please modify the code for me.
=================================
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
References: