1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2025-04-28 17:47:27 -04:00

Remove framebuffer output

This commit is contained in:
Alex Kotov 2022-01-12 14:45:13 +05:00
parent 120c21b8dd
commit 32d7ec3fd5
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -103,31 +103,7 @@ void *stivale2_get_tag(struct stivale2_struct *stivale2_struct, uint64_t id) {
}
// The following will be our kernel's entry point.
void _start(struct stivale2_struct *stivale2_struct) {
// Let's get the terminal structure tag from the bootloader.
struct stivale2_struct_tag_terminal *term_str_tag;
term_str_tag = stivale2_get_tag(stivale2_struct, STIVALE2_STRUCT_TAG_TERMINAL_ID);
// Check if the tag was actually found.
if (term_str_tag == NULL) {
// It wasn't found, just hang...
for (;;) {
__asm__ ("hlt");
}
}
// Let's get the address of the terminal write function.
void *term_write_ptr = (void *)term_str_tag->term_write;
// Now, let's assign this pointer to a function pointer which
// matches the prototype described in the stivale2 specification for
// the stivale2_term_write function.
void (*term_write)(const char *string, size_t length) = term_write_ptr;
// We should now be able to call the above function pointer to print out
// a simple "Hello World" to screen.
term_write("Hello World", 11);
void _start(struct stivale2_struct *stivale2_struct __attribute__((unused))) {
poweroff();
}