IRC channel logs

2020-04-23.log

back to list of logs

<damo22>almuhs: i plan to add ACPICA code to gnumach and have a full parser in there
<almuhs>then, do I wait you?
<damo22>i cant do it today i have to work
<almuhs>until you will have finished your ACPICA work
<almuhs>I'm not refering wait today
<damo22>perhaps look at the acpica code and you can find the functions you need
<almuhs>but, where is acpica code? in Linux?
<damo22> https://github.com/acpica/acpica is upstream but there is a script generate/linux/gen-repo.sh
<damo22>it generates the nicely formatted linux version
<damo22>i think we should start with that
<almuhs>ok
<damo22>you could write a userspace program that calls acpica functions to test
<almuhs>my idea was start refactoring my code. But, in fact, ACPICA is a more serious implementation
<damo22>the only reason i want to use it is because the PCI interrupt mappings are buried in the ASL
<damo22>so we need the parser
<almuhs>It's true
<almuhs>then It's better as this way
<damo22>the code is BSD licenced so it should not be a problem to include in gnumach
<almuhs>yes
<almuhs>do we have to map any structure?
<damo22>i was planning to add some glue that would allow the initial table to be mapped i havent looked into it yet
<almuhs>Samuel have just explained me how to set a temporary mapping using paging https://lists.gnu.org/archive/html/bug-hurd/2020-04/msg00075.html
<almuhs>as this way, we avoid the strange shifting addressing
<almuhs>with a cleaner code
<damo22>ok, i must go to work now
<almuhs>ok
<almuhs>notice me about your work with ACPICA
<almuhs>when you have any advance
<damo22>sure
<almuhs>thanks
<damo22>the code is portable you should be able to test your implementation in userspace
<almuhs>but I need any special requirement to compile It in Hurd?
<damo22>you would need to write a wrapper to map the table possibly
<damo22>idk
<almuhs>ok
<damo22>but might be worth doing if you have to wait for me
<almuhs>what?
<damo22>i mean if you are waiting for gnumach to have acpica, you might want to write something in userspace that can be moved into gnumach later
<damo22>acpica just gives you the tables
<damo22>and a few functions as api
<almuhs>then, after this, we have to parse It
<damo22>yeah, try to familiarise yourself with the api
<almuhs>where is the api docs?
<damo22>in the code
<almuhs>ok
<almuhs>this? https://github.com/acpica/acpica/tree/master/documents
<damo22>on top of every function is a description
<almuhs>ok
<damo22>i think the code is easier to work with
<almuhs>does the code is in the sources directory?
<damo22>or read the linux kernel for inspiration on how it parses the tables
<almuhs>**is the code in the sources directory?
<damo22>yes
<damo22>drivers/acpi/
<almuhs>in my code I have a manual parser, so I know the "travel" to find the tables and how to extract APIC structures. Maybe this can be a helpful
<damo22>yes
<damo22>try to work out the equivalent code to call in acpica
<damo22>it will save time later
<almuhs>ok
<almuhs>where is drivers/acpi ? I don't found It in acpica repository
<damo22>drivers/acpi is in the linux kernel if you want to know how linux does it
<almuhs>oh, ok
<damo22>see ya
***Server sets mode: +nt
***Server sets mode: +nt
<gnu_srs1>Is a call to write (3, "", 1) expected to fail with a SIGPIPE: Broken pipe?
<youpi>gnu_srs1: if the reader closed its side, yes
<almuhs>hi. I've just installed acpica in Debian GNU/Linux. Now I have to learn how to use It
<almuhs>using ACPICA command line, "sudo acpidump -n APIC" return APIC table
<almuhs>but, how to do acpica from C?
<almuhs>**how to use
<almuhs>I found docs: https://acpica.org/sites/acpica/files/acpica-reference_18.pdf
<almuhs> https://acpica.org/sites/acpica/files/asl_tutorial_v20190625.pdf
<almuhs>damo22: read page 124 (8.2.9) in acpica-reference_18.pdf . I think that this are the function which we need to find ACPI tables?
<almuhs>AcpiGetTable() and AcpiGetTableByIndex()
<almuhs>but I don't know what is the library name. what #include must I to add in the code?