Page 1 of 1

How to properly initialize ACPICA

Posted: Thu Jul 20, 2023 3:57 pm
by devc1
ACPICA works fine on vms, but it halts on real hardware.

Is there anything wrong with my ACPI Initialization.

https://github.com/NXTdevosc1/acpica/bl ... main.c#L48

Re: How to properly initialize ACPICA

Posted: Thu Jul 20, 2023 8:05 pm
by Octocontrabass
devc1 wrote:it halts
Where does it halt?

Re: How to properly initialize ACPICA

Posted: Fri Jul 21, 2023 5:37 am
by devc1
Wait actually it halted before, the OS still doesnt fully work on real hardware but now the problem isnt in ACPICA as I did a 10 color test because i still do not debug directly in the frame buffer through writing text.

And ACPICA seems to work fine, i need to investigate other drivers.

This is the 10 color test if you wonder:

https://ibb.co/KXV1c2j

Re: How to properly initialize ACPICA

Posted: Fri Jul 21, 2023 6:04 am
by devc1
Sorry, I thought it was ACPICA problem because it was before I unmap the 0 page and discover some bugs.
The ACPICA driver works fine, but it gives a page fault after the driver is ran so it may be the kernel or some other driver. I will see about that, I think Ill keep working on vms until I finish the drivers then after making the 3D driver and font driver i will just display logs on the screen and see whats the problem.

For now, thanks and sorry for wasting your times.

Actually I quite didn't figure out how to use acpi to see if there is an RTC and how to see PCI Routing table because i will need it in EHCI.

Re: How to properly initialize ACPICA

Posted: Sat Jul 22, 2023 5:28 pm
by thewrongchristian
devc1 wrote: For now, thanks and sorry for wasting your times.
Remember, sometimes just writing it down makes you think about it potentially different. The action of asking for help sometimes just gives you insight.

Re: How to properly initialize ACPICA

Posted: Sun Jul 23, 2023 8:18 am
by devc1
Yeah it always does. I'm feeling a bit rude in this forum because most of the time I get the answer myself just by writing a question lol.

Let's change it to this:
Actually I quite didn't figure out how to use acpi to see if there is an RTC and how to see PCI Routing table because i will need it in EHCI.

Re: How to properly initialize ACPICA

Posted: Sun Jul 23, 2023 11:37 pm
by Octocontrabass
devc1 wrote:how to use acpi to see if there is an RTC
Enumerate the ACPI namespace. An RTC device might have the PnP ID ACPI000E, PNP0B00, PNP0B01, or PNP0B02 depending on how it's meant to be accessed. If you find none of these devices, check if the FADT says you can probe for a legacy RTC.

Also, UEFI provides a runtime service for accessing the RTC.
devc1 wrote:how to see PCI Routing table
Do what the ACPI spec says to do.