mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[fb] Create fb driver
Create a new framebuffer driver. Also hackily passing frame buffer size in the list of init handles to all processes and mapping the framebuffer into all processes. Changed bootloader passing frame buffer as a module to its own struct.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include <stddef.h>
|
||||
#include <uefi/boot_services.h>
|
||||
#include <uefi/protos/simple_text_output.h>
|
||||
#include "kernel_args.h"
|
||||
#include "types.h"
|
||||
|
||||
namespace boot {
|
||||
|
||||
@@ -12,6 +14,8 @@ namespace boot {
|
||||
class console
|
||||
{
|
||||
public:
|
||||
using framebuffer = kernel::args::framebuffer;
|
||||
|
||||
console(uefi::boot_services *bs, uefi::protos::simple_text_output *out);
|
||||
|
||||
size_t print_hex(uint32_t n) const;
|
||||
@@ -20,6 +24,8 @@ public:
|
||||
size_t print_long_dec(uint64_t n) const;
|
||||
size_t printf(const wchar_t *fmt, ...) const;
|
||||
|
||||
const framebuffer & fb() const { return m_fb; };
|
||||
|
||||
static console & get() { return *s_console; }
|
||||
static size_t print(const wchar_t *fmt, ...);
|
||||
|
||||
@@ -31,6 +37,7 @@ private:
|
||||
|
||||
size_t m_rows, m_cols;
|
||||
uefi::protos::simple_text_output *m_out;
|
||||
framebuffer m_fb;
|
||||
|
||||
static console *s_console;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user