KERNEL: Cleanup

Removing quite a few unnecessary parts.
This commit is contained in:
2022-09-01 17:02:04 +02:00
parent a70ae5ca31
commit 9893a0bd17
15 changed files with 26 additions and 274 deletions

View File

@ -1,6 +1,6 @@
#include "superVisorTerminal.h"
void startSuperVisorTerminal(BootInfo* bootinfo){
void startSuperVisorTerminal(){
while (true){
printf("SUPERVISOR:>$ " );
@ -38,22 +38,11 @@ void startSuperVisorTerminal(BootInfo* bootinfo){
{
// Show memory layout
printf("========= Memory ==========\n");
printf("Not Available!\n");
printf("Kernel MemoryMap:\n");
//printf("kernel: 0x%x - 0x%x\n", &kernel_begin , &kernel_end);
printf("Frames used: 0x%x blocks of 4 KiB\n", 0);
const int bytesInGiB = 1073741824;
int64_t bytesLeft = (bootinfo->memory->TotalMemory % bytesInGiB) / bytesInGiB;
int64_t effectiveNumberOfGib = bootinfo->memory->TotalMemory / bytesInGiB;
int64_t GiBs = effectiveNumberOfGib + bytesLeft;
printf("Available Memory: %d bytes, %d GiB\n", bootinfo->memory->TotalMemory, GiBs );
printf("Reserved Memory: %d bytes\n", bootinfo->memory->ReservedMemory);
//printf("\n\n");
//PrintPhysicalMemoryAllocation( );
printf("Frames used: -- \n");
printf("Available Memory:-- \n");
printf("Reserved Memory: -- bytes\n");
}
else if(strncmp("TEST", command, characterCount) == 0)
{

View File

@ -4,6 +4,5 @@
#include "../Drivers/PIT/pit.h"
#include "../Drivers/PS-2/keyboard.h"
#include "../Memory/PhysicalMemoryManager.h"
#include "../bootinfo.h"
void startSuperVisorTerminal(BootInfo * );
void startSuperVisorTerminal();