ScrapExplorer - kernel.c

Home / arch / arm / arm_barebones / kernel Lines: 2 | Size: 495 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1/* AArch64 kernel 2 * Licence: GNU General Public License v3.0 3 * By: 0x4248 4*/ 5 6#include <stdint.h> 7#include <stddef.h> 8#include <stdbool.h> 9 10#include "power.h" 11 12volatile uint8_t *uart = (uint8_t *)0x09000000; 13 14void putchar(char c) 15{ 16 *uart = c; 17} 18 19void printk(const char *s) 20{ 21 while (*s != '\0') 22 { 23 putchar(*s); 24 s++; 25 } 26} 27 28 29 30/** 31 * kmain - main kernel function 32*/ 33void kmain(void) 34{ 35 printk("Welcome to this simple aarch64 OS!\n"); 36 kernel_call_poweroff(); 37} 38
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.