hw/arm/boot: Fix block comment style in arm_load_kernel()

Fix the block comment style in arm_load_kernel() to QEMU's
current style preferences. This will allow us to do some
refactoring of this function without checkpatch complaining
about the code-motion patches.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-id: 20190131112240.8395-2-peter.maydell@linaro.org
This commit is contained in:
Peter Maydell 2019-02-05 16:52:41 +00:00
parent 45a4de2583
commit c3a42358e3
1 changed files with 20 additions and 10 deletions

View File

@ -961,7 +961,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
static const ARMInsnFixup *primary_loader; static const ARMInsnFixup *primary_loader;
AddressSpace *as = arm_boot_address_space(cpu, info); AddressSpace *as = arm_boot_address_space(cpu, info);
/* CPU objects (unlike devices) are not automatically reset on system /*
* CPU objects (unlike devices) are not automatically reset on system
* reset, so we must always register a handler to do so. If we're * reset, so we must always register a handler to do so. If we're
* actually loading a kernel, the handler is also responsible for * actually loading a kernel, the handler is also responsible for
* arranging that we start it correctly. * arranging that we start it correctly.
@ -970,7 +971,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
qemu_register_reset(do_cpu_reset, ARM_CPU(cs)); qemu_register_reset(do_cpu_reset, ARM_CPU(cs));
} }
/* The board code is not supposed to set secure_board_setup unless /*
* The board code is not supposed to set secure_board_setup unless
* running its code in secure mode is actually possible, and KVM * running its code in secure mode is actually possible, and KVM
* doesn't support secure. * doesn't support secure.
*/ */
@ -983,7 +985,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
if (!info->kernel_filename || info->firmware_loaded) { if (!info->kernel_filename || info->firmware_loaded) {
if (have_dtb(info)) { if (have_dtb(info)) {
/* If we have a device tree blob, but no kernel to supply it to (or /*
* If we have a device tree blob, but no kernel to supply it to (or
* the kernel is supposed to be loaded by the bootloader), copy the * the kernel is supposed to be loaded by the bootloader), copy the
* DTB to the base of RAM for the bootloader to pick up. * DTB to the base of RAM for the bootloader to pick up.
*/ */
@ -998,7 +1001,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
try_decompressing_kernel = arm_feature(&cpu->env, try_decompressing_kernel = arm_feature(&cpu->env,
ARM_FEATURE_AARCH64); ARM_FEATURE_AARCH64);
/* Expose the kernel, the command line, and the initrd in fw_cfg. /*
* Expose the kernel, the command line, and the initrd in fw_cfg.
* We don't process them here at all, it's all left to the * We don't process them here at all, it's all left to the
* firmware. * firmware.
*/ */
@ -1018,7 +1022,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
} }
} }
/* We will start from address 0 (typically a boot ROM image) in the /*
* We will start from address 0 (typically a boot ROM image) in the
* same way as hardware. * same way as hardware.
*/ */
return; return;
@ -1045,7 +1050,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
if (info->nb_cpus == 0) if (info->nb_cpus == 0)
info->nb_cpus = 1; info->nb_cpus = 1;
/* We want to put the initrd far enough into RAM that when the /*
* We want to put the initrd far enough into RAM that when the
* kernel is uncompressed it will not clobber the initrd. However * kernel is uncompressed it will not clobber the initrd. However
* on boards without much RAM we must ensure that we still leave * on boards without much RAM we must ensure that we still leave
* enough room for a decent sized initrd, and on boards with large * enough room for a decent sized initrd, and on boards with large
@ -1062,12 +1068,14 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
kernel_size = arm_load_elf(info, &elf_entry, &elf_low_addr, kernel_size = arm_load_elf(info, &elf_entry, &elf_low_addr,
&elf_high_addr, elf_machine, as); &elf_high_addr, elf_machine, as);
if (kernel_size > 0 && have_dtb(info)) { if (kernel_size > 0 && have_dtb(info)) {
/* If there is still some room left at the base of RAM, try and put /*
* If there is still some room left at the base of RAM, try and put
* the DTB there like we do for images loaded with -bios or -pflash. * the DTB there like we do for images loaded with -bios or -pflash.
*/ */
if (elf_low_addr > info->loader_start if (elf_low_addr > info->loader_start
|| elf_high_addr < info->loader_start) { || elf_high_addr < info->loader_start) {
/* Set elf_low_addr as address limit for arm_load_dtb if it may be /*
* Set elf_low_addr as address limit for arm_load_dtb if it may be
* pointing into RAM, otherwise pass '0' (no limit) * pointing into RAM, otherwise pass '0' (no limit)
*/ */
if (elf_low_addr < info->loader_start) { if (elf_low_addr < info->loader_start) {
@ -1128,7 +1136,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
fixupcontext[FIXUP_BOARDID] = info->board_id; fixupcontext[FIXUP_BOARDID] = info->board_id;
fixupcontext[FIXUP_BOARD_SETUP] = info->board_setup_addr; fixupcontext[FIXUP_BOARD_SETUP] = info->board_setup_addr;
/* for device tree boot, we pass the DTB directly in r2. Otherwise /*
* for device tree boot, we pass the DTB directly in r2. Otherwise
* we point to the kernel args. * we point to the kernel args.
*/ */
if (have_dtb(info)) { if (have_dtb(info)) {
@ -1181,7 +1190,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
info->write_board_setup(cpu, info); info->write_board_setup(cpu, info);
} }
/* Notify devices which need to fake up firmware initialization /*
* Notify devices which need to fake up firmware initialization
* that we're doing a direct kernel boot. * that we're doing a direct kernel boot.
*/ */
object_child_foreach_recursive(object_get_root(), object_child_foreach_recursive(object_get_root(),