Move kernel_main into the elna code
This commit is contained in:
@@ -25,6 +25,7 @@ type
|
||||
|
||||
proc write_c(value: Char); extern;
|
||||
proc write_s(value: String); extern;
|
||||
proc pmem_map_at(virtual: Pointer, physical: Pointer, level: Word, flags: Word); extern;
|
||||
|
||||
proc separator*() -> Char;
|
||||
return ','
|
||||
@@ -382,7 +383,12 @@ proc device_tree*(raw: Pointer);
|
||||
var
|
||||
raw_as_char: ^Char;
|
||||
header: fdt_header;
|
||||
raw_virtual: Pointer;
|
||||
begin
|
||||
(* Map flat device tree to the virtual memory. *)
|
||||
raw_virtual := cast(cast(raw: Word) & 4290772992u: Pointer);
|
||||
pmem_map_at(raw_virtual, raw_virtual, 0u, 2u);
|
||||
|
||||
raw_as_char := cast(raw: ^Char);
|
||||
|
||||
parse_header(raw_as_char, @header);
|
||||
@@ -390,7 +396,11 @@ begin
|
||||
|
||||
write_c('\n');
|
||||
find_memory(raw_as_char, @header);
|
||||
reserve_memory(raw_as_char, @header)
|
||||
reserve_memory(raw_as_char, @header);
|
||||
|
||||
(* Do nothing in a loop. *)
|
||||
while true do
|
||||
end
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user