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:
38
kernel_types.h
Normal file
38
kernel_types.h
Normal 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 */
|
||||
|
||||
Reference in New Issue
Block a user