@@ -14,6 +14,7 @@ This is the first part of the kernel ran when the kernel actually starts executi
1414#include "../int/interrupts.h"
1515#include "log.h"
1616#include "../lib/io.h"
17+ #include "hwi.h"
1718void tirq0 (void ) {
1819 /* Reduced to 10 for faster boot */
1920 klog ("running IRQ0 (timer) test.\n" );
@@ -27,26 +28,6 @@ void tirq0(void) {
2728 klog ("10 ticks elapsed\n" );
2829}
2930
30- void cpuident () {
31- char brand [49 ];
32- uint32_t * b = (uint32_t * )brand ;
33- for (uint32_t i = 0 ; i < 3 ; i ++ ) {
34- uint32_t eax , ebx , ecx , edx ;
35- asm volatile (
36- "cpuid"
37- : "=a" (eax ), "=b" (ebx ), "=c" (ecx ), "=d" (edx )
38- : "a" (0x80000002 + i )
39- );
40- b [i * 4 + 0 ] = eax ;
41- b [i * 4 + 1 ] = ebx ;
42- b [i * 4 + 2 ] = ecx ;
43- b [i * 4 + 3 ] = edx ;
44- }
45- brand [48 ] = '\0' ;
46- klog ("cpu: " );
47- tty_puts (brand );
48- tty_putc ('\n' );
49- }
5031
5132static inline uint32_t syscall3 (uint32_t num , uint32_t arg1 , uint32_t arg2 , uint32_t arg3 ) {
5233 uint32_t ret ;
@@ -61,6 +42,7 @@ static inline uint32_t syscall3(uint32_t num, uint32_t arg1, uint32_t arg2, uint
6142
6243void kmain (unsigned char * vbe ){
6344 tty_init (vbe );
45+ tty_putc ('\n' );
6446 klog (" - system44 v" );
6547 puts (infoKernelVersion );
6648 puts (" (" );
@@ -69,9 +51,17 @@ void kmain(unsigned char *vbe){
6951 pitsetfreq (1000 );
7052 int_init ();
7153 asm volatile ("sti" );
54+ klog ("cpu: " );
7255 cpuident ();
7356 mmp ();
7457 pmm_init ();
7558 kfs_mount ();
59+ fbcstr (190 ,240 ,"STATUS UPDATE" , 0xFFFFFFF , FONT_BASIC8X8 );
60+ fbcstr (190 ,260 ,"MACHINE ID: V1" , 0xFFFFFF , FONT_BASIC8X8 );
61+ fbcstr (190 ,270 ,"LOCATION: APPROACHING HELL" , 0xFFFFFF , FONT_BASIC8X8 );
62+ fbcstr (190 ,280 ,"CURRENT OBJECTIVE: FIND A WEAPON" , 0xFFFFFF , FONT_BASIC8X8 );
63+ fbcstr (190 ,300 ,"MANKIND IS DEAD" , 0xFF0000 , FONT_BASIC8X8 );
64+ fbcstr (190 ,310 ,"BLOOD IS FUEL" , 0xFF0000 , FONT_BASIC8X8 );
65+ fbcstr (190 ,320 ,"HELL IS FULL" , 0xFF0000 , FONT_BASIC8X8 );
7666 sh ();
7767}
0 commit comments