kernel/debug: Initialize the frame buffer console much earlier, if possible.

Previously it was not initialized until "post-VM", but there are
a number of ways VM initialization can go wrong that it would
be nice to know about without needing a serial port.

On arches which map the whole physical memory into the kernel
address space (x86_64, at least), we can get the bluescreen facility
initialized using KERNEL_PMAP_BASE. On other architectures, we
just fail to init then, and do the usual setup later on.

A slight bit of extra code cleanup in blue_screen_init_early:
we now just call module->info.std_ops() rather than a
frame-buffer-console specific method.
This commit is contained in:
Augustin Cavalier
2024-11-19 21:35:31 -05:00
parent 4550b3c025
commit f72d1684e5
5 changed files with 51 additions and 13 deletions
@@ -34,6 +34,7 @@ bool frame_buffer_console_available(void);
status_t frame_buffer_update(addr_t baseAddress, int32 width, int32 height,
int32 depth, int32 bytesPerRow);
status_t frame_buffer_console_init(struct kernel_args* args);
status_t frame_buffer_console_init_post_vm(struct kernel_args* args);
status_t frame_buffer_console_init_post_modules(struct kernel_args* args);
status_t _user_frame_buffer_update(addr_t baseAddress, int32 width,