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
Opinions on ACPICA or LAI?
Re: Opinions on ACPICA or LAI?
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.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?
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
Re: Opinions on ACPICA or LAI?
ACPI does look like a beast, but I am in no rush to get my OS done .PeterX wrote:I would probably go for writing my own and then notice it might be a bit more than I can handle
Functions and structures use different styles, i.e. my structures look likePeterX wrote:What coding conventions are different in/with LAI?
Code: Select all
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;
Re: Opinions on ACPICA or LAI?
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:ACPI does look like a beast, but I am in no rush to get my OS done .PeterX wrote:I would probably go for writing my own and then notice it might be a bit more than I can handle
You mean LAI uses uint8_t etc.? That's not a big problem, I think. Or is it?nexos wrote:Functions and structures use different styles, i.e. my structures look likePeterX wrote:What coding conventions are different in/with LAI?While LAI uses Linux style namesCode: Select all
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;
Greetings
Peter
Re: Opinions on ACPICA or LAI?
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.
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
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader