1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-11-20 11:16:10 -05:00
kernel/arch/memory.c
Braiden Vasco 7b040360c8 Align code
2017-11-04 03:45:32 +00:00

22 lines
564 B
C

#include "memory.h"
#include "kprintf.h"
// Defined in linker script
extern char _memory_offset;
extern char _memory_phys_base;
extern char _memory_virt_base;
const unsigned int memory_offset = (unsigned int)&_memory_offset;
const unsigned int memory_phys_base = (unsigned int)&_memory_phys_base;
const unsigned int memory_virt_base = (unsigned int)&_memory_virt_base;
void print_memory_info()
{
kprintf(
"0x%x (phys base) + 0x%x (offset) = 0x%x (virt base)\n",
memory_phys_base,
memory_offset,
memory_virt_base
);
}