X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fbinary.c;h=e96da76d80346704a2dc627cd1db416670615bae;hb=c7c5c4dbeb7b298675856eebb36084c92e989d98;hp=dae3cfaa8cf4c66138f1d50af58bf0e02913efba;hpb=9d3800f60f2212432e550a4e003ae65b498a4d36;p=tpg%2Facess2.git diff --git a/Kernel/binary.c b/Kernel/binary.c index dae3cfaa..e96da76d 100644 --- a/Kernel/binary.c +++ b/Kernel/binary.c @@ -9,9 +9,10 @@ // === CONSTANTS === #define BIN_LOWEST MM_USER_MIN // 1MiB #define BIN_GRANUALITY 0x10000 // 64KiB +//! \todo Move 0xBC000000 to mm_virt.h #define BIN_HIGHEST (0xBC000000-BIN_GRANUALITY) // Just below the kernel #define KLIB_LOWEST MM_MODULE_MIN -#define KLIB_GRANUALITY 0x8000 // 32KiB +#define KLIB_GRANUALITY 0x10000 // 32KiB #define KLIB_HIGHEST (MM_MODULE_MAX-KLIB_GRANUALITY) // === TYPES === @@ -322,6 +323,8 @@ Uint Binary_MapIn(tBinary *binary) MM_SetFlags( addr, MM_PFLAG_COW, -1 ); } + //Log("Mapped '%s' to 0x%x", binary->TruePath, base); + //LOG("*0x%x = 0x%x\n", binary->Pages[0].Virtual, *(Uint*)binary->Pages[0].Virtual); return base; @@ -725,7 +728,7 @@ Uint Binary_Relocate(void *Base) } Warning("[BIN ] 0x%x is an unknown file type. (0x%x 0x%x 0x%x 0x%x)", - Base, ident&0xFF, ident>>8, ident>>16, ident>>24); + Base, ident&0xFF, (ident>>8)&0xFF, (ident>>16)&0xFF, (ident>>24)&0xFF); return 0; }