1from arm_ds.debugger_v1 import Debugger 2from arm_ds.debugger_v1 import DebugException 3import os 4 5# The CPU driver is linked at this address 6LINKADDRESS = 0 7 8# The boot driver is relocated to this address 9RAMBASE = 0x80000000 10 11debugger = Debugger() 12ec = debugger.getCurrentExecutionContext() 13 14# Load the boot driver symbols 15im= ec.getImageService() 16im.loadSymbols('Barrelfish/armv7/sbin/boot_ve', RAMBASE) 17 18# Get the CPU driver's final load address. 19vs = ec.getVariableService() 20kernel_start = vs.readValue('boot_arguments.cpu_driver_base') 21 22offset = int(kernel_start) - LINKADDRESS 23 24print "Kernel loaded at: %08x" % int(kernel_start), " linked at %08x" % LINKADDRESS, " offset %08x" % offset 25 26# Add CPU driver symbols 27im.addSymbols('Barrelfish/armv7/sbin/cpu_a9ve', offset) 28 29# Finally, advance to arch_init() 30es = ec.getExecutionService() 31es.resumeTo('arch_init') 32