diff -r ec1918ac9aa7 -r 5d577db3c48f src/sim/system.cc --- a/src/sim/system.cc Thu Aug 16 16:27:46 2012 -0400 +++ b/src/sim/system.cc Thu Aug 16 16:27:49 2012 -0400 @@ -267,6 +267,13 @@ * Load the kernel code into memory */ if (params()->kernel != "") { + // Validate kernel mapping before loading binary + if (!(isMemAddr(kernelStart & loadAddrMask) && + isMemAddr(kernelEnd & loadAddrMask))) { + fatal("Kernel is mapped to invalid location (not memory). " + "kernelStart 0x(%x) - kernelEnd 0x(%x)\n", kernelStart, + kernelEnd); + } // Load program sections into memory kernel->loadSections(physProxy, loadAddrMask);