extern void gKernelEnd;
// === PROTOTYPES ===
-tPAddr MM_AllocPhys();
+tPAddr MM_AllocPhys(void);
tPAddr MM_AllocPhysRange(int Pages, int MaxBits);
void MM_RefPhys(tPAddr PAddr);
void MM_DerefPhys(tPAddr PAddr);
tMBoot_MMapEnt *ent;
// --- Find largest address
- Log("MBoot->MMapAddr = %08x", MBoot->MMapAddr);
MBoot->MMapAddr |= KERNEL_BASE;
ent = (void *)( MBoot->MMapAddr );
while( (Uint)ent < MBoot->MMapAddr + MBoot->MMapLength )
{
- Log(" ent->Size = %08x", ent->Size);
// Adjust for size
ent->Size += 4;
// Mark Multiboot's pages as taken
// - Structure
MM_RefPhys( (Uint)MBoot - KERNEL_BASE );
- Log("MBoot->ModuleCount = %i", MBoot->ModuleCount);
// - Module List
for(i = (MBoot->ModuleCount*sizeof(tMBoot_Module)+0xFFF)>12; i--; )
MM_RefPhys( MBoot->Modules + (i << 12) );
// - Modules
- Log("MBoot->Modules = %p", MBoot->Modules);
mods = (void*)(MBoot->Modules + KERNEL_BASE);
for(i = 0; i < MBoot->ModuleCount; i++)
{
}
/**
- * \fn tPAddr MM_AllocPhys()
+ * \fn tPAddr MM_AllocPhys(void)
* \brief Allocates a physical page from the general pool
*/
-tPAddr MM_AllocPhys()
+tPAddr MM_AllocPhys(void)
{
// int a, b, c;
int indx;