From 1cd47da742565a5ffce234e505f85c16a1ca69f5 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 15 Nov 2025 15:00:16 -0500 Subject: kern/amd64: cpu: Write boot message on startup Signed-off-by: Ian Moffett --- sys/arch/amd64/cpu/boot.S | 12 ++++++++++++ sys/arch/amd64/io/uart.S | 1 + 2 files changed, 13 insertions(+) (limited to 'sys/arch') diff --git a/sys/arch/amd64/cpu/boot.S b/sys/arch/amd64/cpu/boot.S index 3ce82e6..a6961be 100644 --- a/sys/arch/amd64/cpu/boot.S +++ b/sys/arch/amd64/cpu/boot.S @@ -29,6 +29,7 @@ .globl _start .extern uart_init + .extern uart_write .extern gdt_load .extern GDTR _start: @@ -41,9 +42,20 @@ _start: lea GDTR(%rip), %rdi /* Our GDTR */ call gdt_load /* Load our GDT */ + lea bootmsg(%rip), %rdi + movq bootmsg_len, %rsi + call uart_write 1: cli hlt jmp 1b + .section .rodata +bootmsg: + .ascii "[ preparing since 2025 ]\n" + .ascii "[ 00:00 delta @ crev : 89 seconds]\n" + .ascii "** booting rv7 ...\n" + .byte 0x00 +bootmsg_len: .quad . - bootmsg + /* vim: ft=gas : */ diff --git a/sys/arch/amd64/io/uart.S b/sys/arch/amd64/io/uart.S index fee06c4..8e190ed 100644 --- a/sys/arch/amd64/io/uart.S +++ b/sys/arch/amd64/io/uart.S @@ -65,6 +65,7 @@ uart_init: pop %r12 retq + .globl uart_write uart_write: /* * void uart_write(const char *s, size_t len); -- cgit v1.2.3