<commit_before>#include <kcommon.h>
#include <lox-internal.h>
#include <io.h>

#include "gdt.h"
#include "idt.h"
#include "irq.h"
#include "string.h"
#include "timer.h"
#include "vga.h"
#include "keyboard.h"

void lox_output_string_vga(char* msg) {
    vga_writestring(msg);
}

void lox_output_char_vga(char c) {
    vga_putchar(c);
}

void (*lox_output_string_provider)(char*) = lox_output_string_vga;
void (*lox_output_char_provider)(char) = lox_output_char_vga;

used noreturn void kernel_main(void) {
    vga_init();

    puts("Raptor kernel\n");

    uint32_t ebx, unused;
    get_cpuid(0, &ebx, 0, 0);
    if (ebx == 0x756e6547) {
        puts("Intel\n");
    } else if (ebx == 0x68747541) {
        puts("AMD\n");
    }

    gdt_init();
    puts("GDT Initialized\n");
    idt_init();
    puts("IDT Initialized\n");
    isr_init();
    puts("ISRs Initialized\n");
    irq_init();
    puts("IRQs Initialized\n");
    timer_init(50);
    puts("PIT Initialized\n");
    keyboard_init();
    puts("Keyboard Initialized\n");

    puts("Entering idle state\n");

    for (;;) {
        int_enable();
        asm("hlt");
    }
}
<commit_msg>Fix simple little detect.<commit_after>#include <kcommon.h>
#include <lox-internal.h>
#include <io.h>

#include "gdt.h"
#include "idt.h"
#include "irq.h"
#include "timer.h"
#include "vga.h"
#include "keyboard.h"

void lox_output_string_vga(char* msg) {
    vga_writestring(msg);
}

void lox_output_char_vga(char c) {
    vga_putchar(c);
}

void (*lox_output_string_provider)(char*) = lox_output_string_vga;
void (*lox_output_char_provider)(char) = lox_output_char_vga;

used noreturn void kernel_main(void) {
    vga_init();

    puts("Raptor kernel\n");

    uint32_t ebx;
    get_cpuid(0, 0, &ebx, 0, 0);
    if (ebx == 0x756e6547) {
        puts("Intel\n");
    } else if (ebx == 0x68747541) {
        puts("AMD\n");
    }

    gdt_init();
    puts("GDT Initialized\n");
    idt_init();
    puts("IDT Initialized\n");
    isr_init();
    puts("ISRs Initialized\n");
    irq_init();
    puts("IRQs Initialized\n");
    timer_init(50);
    puts("PIT Initialized\n");
    keyboard_init();
    puts("Keyboard Initialized\n");

    puts("Entering idle state\n");

    for (;;) {
        int_enable();
        asm("hlt");
    }
}

{'fraction_non_alphanumeric': 0.16982796647551832, 'fraction_numerical': 0.021614468460520512, 'mean_word_length': 3.395348837209302, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3792291', 'n_tokens_mistral': 953, 'n_tokens_neox': 943, 'n_words': 163}