[LinksOS CVS Commit]kernel/main start.cpp,1.5,1.6
Status: Inactive
Brought to you by:
terencevs
|
From: <ke...@to...> - 2003-01-14 22:57:21
|
Update of /cvsroot/linksos/kernel/main In directory router-internal.tossell.net:/tmp/cvs-serv30346/main Modified Files: start.cpp Log Message: Title: Boot display Changes: Added some new messages and a REAL LOOP! Yeah! Effects: People can have some more entertaining boots :) a=kennyt Index: start.cpp =================================================================== RCS file: /cvsroot/linksos/kernel/main/start.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** start.cpp 13 Jan 2003 04:47:11 -0000 1.5 --- start.cpp 14 Jan 2003 22:57:15 -0000 1.6 *************** *** 19,30 **** desc_table(GDT, 3) { ! {dummy:0}, ! stnd_desc(0, 0xFFFFF, (D_CODE + D_READ + D_BIG + D_BIG_LIM)), ! stnd_desc(0, 0xFFFFF, (D_DATA + D_WRITE + D_BIG + D_BIG_LIM)), }; struct { ! unsigned short limit __attribute__ ((packed)); ! union DT_entry *gdt __attribute__ ((packed)); } loadgdt = { (4096 * sizeof(union DT_entry) - 1), GDT }; --- 19,31 ---- desc_table(GDT, 3) { ! {dummy:0}, ! stnd_desc(0, 0xFFFFF, (D_CODE + D_READ + D_BIG + D_BIG_LIM)), ! stnd_desc(0, 0xFFFFF, (D_DATA + D_WRITE + D_BIG + D_BIG_LIM)), }; + struct { ! unsigned short limit __attribute__ ((packed)); ! union DT_entry *gdt __attribute__ ((packed)); } loadgdt = { (4096 * sizeof(union DT_entry) - 1), GDT }; *************** *** 36,65 **** return; } ! /*Load GDT*/ ! asm ("pushl $2; popf"); /* Zero the flags */ ! asm volatile /* Load the GDT and the kernel stack */ ! ( /* Loader has cleared ints */ ! "lgdtl (loadgdt) \n" /* Load our own GDT */ ! "movw $0x10,%%ax \n" /* Init data registers t_data */ ! "movw %%ax,%%ds \n" ! "movw %%ax,%%es \n" ! "movw %%ax,%%fs \n" ! "movw %%ax,%%gs \n" ! "ljmp $0x08,$next \n" /* Flush prefetch queue */ ! "nop\n" ! "nop\n" ! "next: \n" /* Continue here */ ! : ! : "r" (GDT) ! : "%eax" ! ); ! ! ! hal::kio::console << "LinksOS v0.0.1a kernel booted.\nI'll loop forever now.\n"; /* Do that kool kernel stuff */ ! /* Halt */ ! hal::kio::console << "Halted."; return; } --- 37,73 ---- return; } + + /* Load GDT */ + asm ("pushl $2; popf"); /* Zero the flags */ + asm volatile /* Load the GDT and the kernel stack */ + ( /* Loader has cleared ints */ + "lgdtl (loadgdt) \n" /* Load our own GDT */ + "movw $0x10,%%ax \n" /* Init data registers t_data */ + "movw %%ax,%%ds \n" + "movw %%ax,%%es \n" + "movw %%ax,%%fs \n" + "movw %%ax,%%gs \n" + "ljmp $0x08,$next \n" /* Flush prefetch queue */ + "nop\n" + "nop\n" + "next: \n" /* Continue here */ + : + : "r" (GDT) + : "%eax" + ); + + using hal::kio::console; ! /* Talk to the people */ ! console << "LinksOS v0.0.1a kernel booted.\nI'll loop forever now.\n"; ! /* Do that kool kernel stuff */ ! for ( unsigned short int i = 0; i < 500; i++ ) { ! console << "."; ! } ! console << "\nWell won't ya look at that? I'm bored after only 500 loops. G'night :)\n"; ! /* Halt */ ! console << "Halted."; return; } |