[kernel] Move log buffer to its own memory section

In prep for the coming change to keep log entries as a true ring buffer,
move the log buffer from bss into its own memory section.

Related changes in this commit:
- New vm_area_ring, which maps a set of pages twice to allow easy linear
  reading of data from a ring buffer when it wraps around the end.
- logger_init() went away, and the logger ctor is called from
  mem::initialize()
- Instead of an event object, the logger just has a bare wait_queue
- util::counted::from template type changed slightly to allow easy
  conversion from an intptr_t as well as a pointer
- Previously added debugcon_logger code removed - this will be added in
  a separate file in a followup commit
This commit is contained in:
Justin C. Miller
2023-02-07 19:12:40 -08:00
parent 118ee73ff1
commit ada660deeb
10 changed files with 91 additions and 73 deletions

View File

@@ -36,9 +36,8 @@ kernel_main(bootproto::args *args)
panic::install(args->panic_handler, args->symbol_table);
}
logger_init();
cpu_data *cpu = bsp_early_init();
mem::initialize(*args);
kassert(args->magic == bootproto::args_magic,
"Bad kernel args magic number");
@@ -51,7 +50,6 @@ kernel_main(bootproto::args *args)
disable_legacy_pic();
mem::initialize(*args);
bsp_late_init();