OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 9:46 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Opinions on ACPICA or LAI?
PostPosted: Mon Oct 12, 2020 6:52 am 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
Hello,
I know I want my OS to support ACPI. I personally think ACPI is a complicated standard, but something as widespread as the PC needs something complicated to control the system. I have started reading the ACPI spec, and know I have a question: How should I handle ACPI? To me, there are 3 options:
Use ACPICA. I would get the largest amount of features, the ability to have full ACPI support out of the box, and more. But it is big and bloated, and I want to understand all the code in my OS :) .
Use LAI. I would get all I really need, not quite full ACPI support, but enough. However, LAI uses different coding conventions then me, and that would create inconstancy. Plus I wouldn't get everything.
Write my own. The most complicated solution, but I would be able to control what things I have support for. I would right all the code, meaning I would understand how it works.
Currently, I am leaning towards writing my own as a learning experience.
What do you think is the best option?
Thanks,
nexos

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Top
 Profile  
 
 Post subject: Re: Opinions on ACPICA or LAI?
PostPosted: Thu Oct 15, 2020 11:42 am 
Offline
Member
Member

Joined: Fri Nov 22, 2019 5:46 am
Posts: 590
nexos wrote:
Hello,
I know I want my OS to support ACPI. I personally think ACPI is a complicated standard, but something as widespread as the PC needs something complicated to control the system. I have started reading the ACPI spec, and know I have a question: How should I handle ACPI? To me, there are 3 options:
Use ACPICA. I would get the largest amount of features, the ability to have full ACPI support out of the box, and more. But it is big and bloated, and I want to understand all the code in my OS :) .
Use LAI. I would get all I really need, not quite full ACPI support, but enough. However, LAI uses different coding conventions then me, and that would create inconstancy. Plus I wouldn't get everything.
Write my own. The most complicated solution, but I would be able to control what things I have support for. I would right all the code, meaning I would understand how it works.
Currently, I am leaning towards writing my own as a learning experience.
What do you think is the best option?

I would probably go for writing my own and then notice it might be a bit more than I can handle ;) But I probably would write my own nontheless.
But I think here our opinions aren't a good advice. You have to decide that yourself.

What coding conventions are different in/with LAI?

Greetings
Peter


Top
 Profile  
 
 Post subject: Re: Opinions on ACPICA or LAI?
PostPosted: Thu Oct 15, 2020 3:31 pm 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
PeterX wrote:
I would probably go for writing my own and then notice it might be a bit more than I can handle ;)

ACPI does look like a beast, but I am in no rush to get my OS done :D .
PeterX wrote:
What coding conventions are different in/with LAI?

Functions and structures use different styles, i.e. my structures look like
Code:
typedef struct tagACPI_RSDP
{
    BYTE sig[8];
    BYTE checksum;
    BYTE oemId[6];
    BYTE rev;
    DWORD rsdtAddr;
    DWORD len;
    QWORD xsdtAddr;
    BYTE extChecksum;
    BYTE resvd[3];
}__attribute__((packed)) ACPI_RSDP;


While LAI uses Linux style names

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Top
 Profile  
 
 Post subject: Re: Opinions on ACPICA or LAI?
PostPosted: Fri Oct 16, 2020 9:08 am 
Offline
Member
Member

Joined: Fri Nov 22, 2019 5:46 am
Posts: 590
nexos wrote:
PeterX wrote:
I would probably go for writing my own and then notice it might be a bit more than I can handle ;)

ACPI does look like a beast, but I am in no rush to get my OS done :D .

Yes, similar with me and my OS. BTW that was not critics of you but critics of me. (I'm currently trying to write a linker and start noticing, that with bzt's kind GNU-EFI text I don't need that.)

nexos wrote:
PeterX wrote:
What coding conventions are different in/with LAI?

Functions and structures use different styles, i.e. my structures look like
Code:
typedef struct tagACPI_RSDP
{
    BYTE sig[8];
    BYTE checksum;
    BYTE oemId[6];
    BYTE rev;
    DWORD rsdtAddr;
    DWORD len;
    QWORD xsdtAddr;
    BYTE extChecksum;
    BYTE resvd[3];
}__attribute__((packed)) ACPI_RSDP;


While LAI uses Linux style names

You mean LAI uses uint8_t etc.? That's not a big problem, I think. Or is it?

Greetings
Peter


Top
 Profile  
 
 Post subject: Re: Opinions on ACPICA or LAI?
PostPosted: Fri Oct 16, 2020 2:09 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1134
I would never implement ACPICA myself, because why would I want to add some bloat code that is 100 times the size of my kernel.
LAI sounds like a great alternative, it is light-weight and simple enough to understand.
Anyways, I plan on writing my own implementation.

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot] and 119 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group