#define CX(addr,reg) addr(,reg,4)
#define CX(addr,reg) addr(,reg,4)
movl KSIZE(%ebp), %ecx // Set ecx to kernbootstruct ksize
addl $(NBPG-1), %ecx // Add NBPG-1 to ecx
andl $(-NBPG), %ecx // Truncate ecx to a page aligned addr
movl KSIZE(%ebp), %ecx // Set ecx to kernbootstruct ksize
addl $(NBPG-1), %ecx // Add NBPG-1 to ecx
andl $(-NBPG), %ecx // Truncate ecx to a page aligned addr
movl %esp, (PA(EXT(KernelRelocOffset)))(%esp)
// Store relocation offset
movl %edi, KADDR(%ebp) // Relocate kaddr in kernbootstruct
movl %esp, (PA(EXT(KernelRelocOffset)))(%esp)
// Store relocation offset
movl %edi, KADDR(%ebp) // Relocate kaddr in kernbootstruct