Factor out the kernel loading function. Add kernel_min, kernel_max addresses.