[init] Go back to boot modules having inline data

In order to pass along arguments like the framebuffer, it's far simpler
to have that data stored along with the modules than mapping new pages
for every structure. Also now optionally pass a module's data to a
driver as init starts it.
This commit is contained in:
Justin C. Miller
2023-02-10 01:01:01 -08:00
parent 0eddb002f0
commit ea587076ed
14 changed files with 132 additions and 200 deletions

View File

@@ -167,15 +167,15 @@ load_module(
fs::file &disk,
const wchar_t *name,
const wchar_t *path,
bootproto::module_type type,
uint16_t subtype)
bootproto::module_type type)
{
status_line status(L"Loading module", name);
bootproto::module *mod = g_alloc.allocate_module();
bootproto::module *mod = g_alloc.allocate_module(sizeof(util::buffer));
mod->type = type;
mod->subtype = subtype;
mod->data = load_file(disk, path);
util::buffer *data = mod->data<util::buffer>();
*data = load_file(disk, path);
}
} // namespace loader