THIS IMPLEMENTATION IN C IS NO LONGER DEVELOPED OR MAINTAINED AND IS BEING SUPERSEDED BY AN UPCOMING ZIG PORT.
Famex rests upon a number of different standards, all of which are listed below
-
ISO/IEC 9899:2024 (C23) (https://www.iso.org/standard/82075.html)
-
GNU C Extensions (https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html)
-
POSIX.1-2024 (EEE Std 1003.1™-2024 and The Open Group Standard Base Specifications, Issue 8) (https://pubs.opengroup.org/onlinepubs/9799919799/)
-
ELF-64 Object File Format (Version 1.5, Draft 2)
-
UEFI Spec (Release 2.11) (https://uefi.org/sites/default/files/resources/UEFI_Spec_Final_2.11.pdf)
-
ACPI Spec (Release 6.6) (https://uefi.org/sites/default/files/resources/ACPI_Spec_6.6.pdf)
-
IA-PC HPET Spec (https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/software-developers-hpet-spec-1-0a.pdf)
-
MC146818A CMOS Real Time Clock (RTC) with RAM
-
Intel 64 and IA-32 SDM (https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html)
-
AMD64 APM (https://docs.amd.com/v/u/en-US/40332-PUB_4.08)
-
AMD64 System V ABI (https://gitlab.com/x86-psABIs/x86-64-ABI)
Famex relies on these software libraries.
- Linux data structures implementations: Maple Tree, RBTree, XArray
- X86-CPUID-DB (https://gitlab.com/x86-cpuid.org/x86-cpuid-db)
- Limine Bootloader (https://github.com/limine-bootloader/limine)
- ACPI Component Architecture (https://github.com/acpica/acpica)
- AI was not used for code generation.
- No AI output was copied verbatim.
- AI chatbots were used to explain concepts and generate some build scripts.
- AI chatbots were used as code logic checkers, an additional check above the linter.
DEBUG_SPINLOCK - Used to check spinlocks are held DEBUG_SPINLOCK_RECURSE - Used to check if held spinlocks are trying to be locked again DEBUG_IRQ - Used to check IRQ is off and on where needed DEBUG_PRINT_LOC - Print panic messages with function, line, and file appended DEBUG_CHECKS - Conditions that should be true in execution
We do not use inline or static functions in headers, period. All functions must have their bodies in c source files. The reasons are as follows.
- Inline/static functions cannot be accessed by default by ASM code.
- The bodies of these inline functions may require additional resources from other headers. Forward declarations and additional struct definitions may be required, increasing the possibility of recursive include loops. Also, the increased resources each header requires increases compilation/parsing times.
- It is easier to read the function bodies in one place than having them split between headers and source.
- LTO solves the problem that inline/static header functions were originally designed to solve.