Kernel Size Awareness
Modified the linker script + Added an init function to System.pas to be called at system boot, this allows tracking of the Kernel start & end addresses, and thus, allows us to calculate the kernel size.
This commit is contained in:
1 parent
346dc4e4c9
commit
208bda92c8
3 files changed
+21
-1
No files matched your search
@@ -143,6 +143,22 @@ type
|
||||
|
||||
PText = ^Text;
|
||||
|
||||
var
|
||||
AK_START : uint32; external name 'kernel_start';
|
||||
AK_END : uint32; external name 'kernel_end';
|
||||
ASURO_KERNEL_START : uint32;
|
||||
ASURO_KERNEL_END : uint32;
|
||||
ASURO_KERNEL_SIZE : uint32;
|
||||
|
||||
procedure init();
|
||||
|
||||
implementation
|
||||
|
||||
procedure init();
|
||||
begin
|
||||
ASURO_KERNEL_START := uint32(@AK_START);
|
||||
ASURO_KERNEL_END := uint32(@AK_END);
|
||||
ASURO_KERNEL_SIZE:= ASURO_KERNEL_END - ASURO_KERNEL_START;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -125,6 +125,9 @@ var
|
||||
HM : PHashMap;
|
||||
|
||||
begin
|
||||
{ Init the base system unit }
|
||||
System.init();
|
||||
|
||||
{ Serial Init }
|
||||
serial.init();
|
||||
|
||||
|
||||
Reference in new issue
Block a user