[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user