Add support for multiboot2

This commit is contained in:
Alex
2023-05-10 21:50:11 +03:00
parent 79c6a5096d
commit f1dc3868ca
11 changed files with 343 additions and 97 deletions

View File

@ -133,6 +133,14 @@ struct BootInfo
void *FileBase;
char CommandLine[256];
__UINT64_TYPE__ Size;
struct KernelSymbolInfo
{
__UINT32_TYPE__ Num;
__UINT32_TYPE__ EntSize;
__UINT32_TYPE__ Shndx;
__UINTPTR_TYPE__ Sections;
} Symbols;
} Kernel;
struct BootloaderInfo

View File

@ -468,6 +468,8 @@ namespace Memory
uint64_t PageBitmapIndex = 0;
Bitmap PageBitmap;
void ReserveEssentials();
public:
Bitmap GetPageBitmap() { return PageBitmap; }

View File

@ -30,14 +30,16 @@ namespace SymbolResolver
};
SymbolTable SymTable[0x10000];
uintptr_t TotalEntries = 0;
int64_t TotalEntries = 0;
void *Image;
public:
size_t GetTotalEntries() { return this->TotalEntries; }
void *GetImage() { return this->Image; }
Symbols(uintptr_t ImageAddress);
~Symbols();
const char *GetSymbolFromAddress(uintptr_t Address);
void AddSymbol(uintptr_t Address, const char *Name);
void AddBySymbolInfo(uint64_t Num, uint64_t EntSize, uint64_t Shndx, uintptr_t Sections);
Symbols(uintptr_t ImageAddress);
~Symbols();
};
}