generated from limine-bootloader/limine-c-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
237 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#pragma once | ||
|
||
#ifndef __KERNEL_H__ | ||
#error "This file should be included from Kernel.h" | ||
#endif | ||
|
||
#include <RuntimeLib.h> | ||
|
||
#define LOG_LEVEL_DEBUG 0 | ||
#define LOG_LEVEL_INFO 1 | ||
#define LOG_LEVEL_WARNING 2 | ||
#define LOG_LEVEL_ERROR 3 | ||
|
||
/** | ||
* @brief Logs a message. | ||
* | ||
* @param[in] _ID The Filter ID. LFID_DEFAULT for default filter. | ||
* @param[in] _LEVEL The log level. | ||
* @param[in] _Format The format string. | ||
**/ | ||
#define LOG(_ID, _LEVEL, _Format, ...) | ||
|
||
/// Default filter, used to everything that doesn't have a specific filter. | ||
DEFINE_GUID (LFID_DEFAULT, 0x8BA890B8, 0xF167, 0x4AFD, 0x86, 0x45, 0x44, 0x07, 0x43, 0xA0, 0x30, 0x6A); | ||
|
||
/// Memory filter, used to log memory related messages. | ||
DEFINE_GUID (LFID_MEMORY, 0x8BA890B8, 0xF167, 0x4AFD, 0x86, 0x45, 0x44, 0x07, 0x43, 0xA0, 0x30, 0x6B); | ||
|
||
typedef struct _LOG_FILTER { | ||
GUID ID; | ||
CHAR8 Name[64]; | ||
BOOLEAN Enabled; | ||
UINT8 Level; | ||
} LOG_FILTER; | ||
|
||
typedef struct _LOG_ENTRY { | ||
GUID FilterID; | ||
UINTN Level; | ||
CHAR8* Message; | ||
} LOG_ENTRY; | ||
|
||
typedef VOID (* LOG_CALLBACK)( | ||
LOG_ENTRY* Entry | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.