Recent

Author Topic: My kernel cannot response interrupt and screen cannot renewed.  (Read 748 times)

TYDQ

  • Full Member
  • ***
  • Posts: 132
My total problematic kernel is on https://github.com/TYDQSoft/UEFIPascalOS
I was confused when I trying to execute my kernel in UEFI and remain my problem about not refreshing my screen twice cause unknown.
The screen should be renewed once,However,the Virtual Machine testing result indicate that the screen will not to be renewed.
Does My kernel have some error in idt and gdt setting or my APIC request got error?
I know there is something wrong in my code,but I don't know where and why,it can be in my whole code.
If you have a idea about this,you should look up all of my code to find out where the error occurs.
« Last Edit: April 13, 2025, 05:43:51 pm by TYDQ »

Soner

  • Sr. Member
  • ****
  • Posts: 319
Re: My kernel cannot response interrupt and screen cannot renewed.
« Reply #1 on: April 13, 2025, 08:03:02 pm »
I am not OS developer, I can't help you with your problem but I was curious looked at kernel.pas.
You don't call any function in kernel program, look at line 200-201, maybe this is the error.
https://github.com/TYDQSoft/UEFIPascalOS/blob/main/Kernel/kernel.pas

TYDQ

  • Full Member
  • ***
  • Posts: 132
Re: My kernel cannot response interrupt and screen cannot renewed.
« Reply #2 on: April 14, 2025, 08:24:57 am »
I am not OS developer, I can't help you with your problem but I was curious looked at kernel.pas.
You don't call any function in kernel program, look at line 200-201, maybe this is the error.
https://github.com/TYDQSoft/UEFIPascalOS/blob/main/Kernel/kernel.pas
However,The program will automatically call _start function(efi_main) due to the GNU linker(ld) will call this as a start entry.
It must be have error in kernel_main and not have error in PASCALMAIN.

d2010

  • Full Member
  • ***
  • Posts: 161
Re: My kernel cannot response interrupt and screen cannot renewed.
« Reply #3 on: April 15, 2025, 03:26:34 pm »
I am not OS developer, I can't help you with your problem but I was curious looked at kernel.pas.
You don't call any function in kernel program, look at line 200-201, maybe this is the error.
https://github.com/TYDQSoft/UEFIPascalOS/blob/main/Kernel/kernel.pas
However,The program will automatically call _start function(efi_main) due to the GNU linker(ld) will call this as a start entry.
It must be have error in kernel_main and not have error in PASCALMAIN.
I do not how, but at the function inside kernel_initialize; his inside do not use
fillchar,zeromemory, .. Many times at intialized stage of application, these
function (fillchar,zeromemory, StrAlloc,) many time/s crash My app,
I replace fillchar with for clr:=00 to high()  pinteger[clr]:=000;
Yes, is more slow, but I do not how, why Pascal.Runtime need the slow solution.
Do not forge, at intialized stage-application/s, the Pascal.system.pas need intialized others
20'DLL attached *.DLL

{--}
You crash too much with memory Leaks.
C:Q1=Everyone, have a function/ for test-integrity-of -memory?
I replace theses
Code: [Select]
efi_freemem(memmap.memory_descriptor);
 efi_freemem(smemmap.memory_start);
 efi_freemem(smemmap.memory_size);
Eu multumesc ArsenieBoca, doamne ajuta-ne, doamne ajuta. Eu multumesc
 ArsenieBoca.
Code: [Select]
  if (memmap.memory_descriptor<>nil) then
  Begin   
 efi_freemem(memmap.memory_descriptor);
 memmap.memory_descriptor:=nil;
  End;

if (smemmap.memory_start<>nil) then
  Begin efi_freemem(smemmap.memory_start);
          smemmap.memory_start:=nil;
  End;
End;
« Last Edit: April 15, 2025, 03:32:50 pm by d2010 »

TYDQ

  • Full Member
  • ***
  • Posts: 132
Re: My kernel cannot response interrupt and screen cannot renewed.
« Reply #4 on: April 18, 2025, 03:23:19 am »
I am not OS developer, I can't help you with your problem but I was curious looked at kernel.pas.
You don't call any function in kernel program, look at line 200-201, maybe this is the error.
https://github.com/TYDQSoft/UEFIPascalOS/blob/main/Kernel/kernel.pas
However,The program will automatically call _start function(efi_main) due to the GNU linker(ld) will call this as a start entry.
It must be have error in kernel_main and not have error in PASCALMAIN.
I do not how, but at the function inside kernel_initialize; his inside do not use
fillchar,zeromemory, .. Many times at intialized stage of application, these
function (fillchar,zeromemory, StrAlloc,) many time/s crash My app,
I replace fillchar with for clr:=00 to high()  pinteger[clr]:=000;
Yes, is more slow, but I do not how, why Pascal.Runtime need the slow solution.
Do not forge, at intialized stage-application/s, the Pascal.system.pas need intialized others
20'DLL attached *.DLL

{--}
You crash too much with memory Leaks.
C:Q1=Everyone, have a function/ for test-integrity-of -memory?
I replace theses
Code: [Select]
efi_freemem(memmap.memory_descriptor);
 efi_freemem(smemmap.memory_start);
 efi_freemem(smemmap.memory_size);
Eu multumesc ArsenieBoca, doamne ajuta-ne, doamne ajuta. Eu multumesc
 ArsenieBoca.
Code: [Select]
  if (memmap.memory_descriptor<>nil) then
  Begin   
 efi_freemem(memmap.memory_descriptor);
 memmap.memory_descriptor:=nil;
  End;

if (smemmap.memory_start<>nil) then
  Begin efi_freemem(smemmap.memory_start);
          smemmap.memory_start:=nil;
  End;
End;
You should DIY Your FillChar,ZeroMemory due to its bare metal UEFI environment.

TYDQ

  • Full Member
  • ***
  • Posts: 132
Re: My kernel cannot response interrupt and screen cannot renewed.
« Reply #5 on: April 18, 2025, 04:23:48 pm »
This problem is solved by hacking tricks.Thank everyone who help me solve my problem.

 

TinyPortal © 2005-2018