Refactor boot_info.h and related files for improved abstraction and consistency. Updated function signatures to use generic types, replaced UEFI-specific types with kernel types, and enhanced documentation for clarity. Adjusted kernel entry point and service wrappers to align with new structure.

This commit is contained in:
2026-02-27 19:53:40 +00:00
parent 13a281fa4f
commit a3edb854f4
10 changed files with 181 additions and 103 deletions

38
kernel_types.h Normal file
View File

@@ -0,0 +1,38 @@
/*
* kernel_types.h Common fixed-width and utility types for the kernel.
*
* This header deliberately avoids pulling in any firmware- or
* platform-specific headers (such as UEFI's <efi.h>). All core kernel
* code should include this instead of <efi.h>.
*/
#ifndef KERNEL_TYPES_H
#define KERNEL_TYPES_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
typedef uint8_t UINT8;
typedef uint16_t UINT16;
typedef uint32_t UINT32;
typedef uint64_t UINT64;
typedef size_t UINTN;
#ifndef BOOLEAN
typedef bool BOOLEAN;
#endif
typedef uint16_t CHAR16;
#ifndef TRUE
#define TRUE ((BOOLEAN)true)
#endif
#ifndef FALSE
#define FALSE ((BOOLEAN)false)
#endif
#endif /* KERNEL_TYPES_H */