hw/arm/boot: Factor out "direct kernel boot" code into its own function