diff mbox series

[v3,01/22] microvm: name qboot binary qboot.bin

Message ID 20200520132003.9492-2-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series microvm: add acpi support | expand

Commit Message

Gerd Hoffmann May 20, 2020, 1:19 p.m. UTC
qboot isn't a bios and shouldnt be named that way.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/i386/microvm.c                       |   4 ++--
 pc-bios/{bios-microvm.bin => qboot.bin} | Bin
 roms/Makefile                           |   6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
 rename pc-bios/{bios-microvm.bin => qboot.bin} (100%)

Comments

Philippe Mathieu-Daudé May 20, 2020, 1:25 p.m. UTC | #1
Hi Gerd,

On 5/20/20 3:19 PM, Gerd Hoffmann wrote:
> qboot isn't a bios and shouldnt be named that way.

Still it resides in a directory named pc-bios =)

It is used later in x86_bios_rom_init() as:

     bios = g_malloc(sizeof(*bios));
     memory_region_init_ram(bios, NULL, "pc.bios", bios_size, &error_fatal);
     if (!isapc_ram_fw) {
         memory_region_set_readonly(bios, true);
     }
     ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size), -1);
     if (ret != 0) {
     bios_error:
         fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name);
         exit(1);
     }
     g_free(filename);

Many 'bios' occurrences.

Should it be called 'qboot.rom' instead?

> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>   hw/i386/microvm.c                       |   4 ++--
>   pc-bios/{bios-microvm.bin => qboot.bin} | Bin
>   roms/Makefile                           |   6 +++---
>   3 files changed, 5 insertions(+), 5 deletions(-)
>   rename pc-bios/{bios-microvm.bin => qboot.bin} (100%)
> 
> diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
> index 937db10ae6a5..867d3d652145 100644
> --- a/hw/i386/microvm.c
> +++ b/hw/i386/microvm.c
> @@ -47,7 +47,7 @@
>   #include "kvm_i386.h"
>   #include "hw/xen/start_info.h"
>   
> -#define MICROVM_BIOS_FILENAME "bios-microvm.bin"
> +#define MICROVM_QBOOT_FILENAME "qboot.bin"
>   
>   static void microvm_set_rtc(MicrovmMachineState *mms, ISADevice *s)
>   {
> @@ -158,7 +158,7 @@ static void microvm_devices_init(MicrovmMachineState *mms)
>       }
>   
>       if (bios_name == NULL) {
> -        bios_name = MICROVM_BIOS_FILENAME;
> +        bios_name = MICROVM_QBOOT_FILENAME;
>       }
>       x86_bios_rom_init(get_system_memory(), true);
>   }
> diff --git a/pc-bios/bios-microvm.bin b/pc-bios/qboot.bin
> similarity index 100%
> rename from pc-bios/bios-microvm.bin
> rename to pc-bios/qboot.bin
> diff --git a/roms/Makefile b/roms/Makefile
> index f9acf39954dc..d6d4948bfc31 100644
> --- a/roms/Makefile
> +++ b/roms/Makefile
> @@ -68,7 +68,7 @@ default help:
>   	@echo "  opensbi64-virt     -- update OpenSBI for 64-bit virt machine"
>   	@echo "  opensbi32-sifive_u -- update OpenSBI for 32-bit sifive_u machine"
>   	@echo "  opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u machine"
> -	@echo "  bios-microvm       -- update bios-microvm.bin (qboot)"
> +	@echo "  qboot              -- update qboot"
>   	@echo "  clean              -- delete the files generated by the previous" \
>   	                              "build targets"
>   
> @@ -194,9 +194,9 @@ opensbi64-sifive_u:
>   		PLATFORM="sifive/fu540"
>   	cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
>   
> -bios-microvm:
> +qboot:
>   	$(MAKE) -C qboot
> -	cp qboot/bios.bin ../pc-bios/bios-microvm.bin
> +	cp qboot/bios.bin ../pc-bios/qboot.bin
>   
>   clean:
>   	rm -rf seabios/.config seabios/out seabios/builds
>
Gerd Hoffmann May 25, 2020, 11:02 a.m. UTC | #2
On Wed, May 20, 2020 at 03:25:53PM +0200, Philippe Mathieu-Daudé wrote:
> Hi Gerd,
> 
> On 5/20/20 3:19 PM, Gerd Hoffmann wrote:
> > qboot isn't a bios and shouldnt be named that way.
> 
> Still it resides in a directory named pc-bios =)

Yep, that should be named "firmware" but changing that is beyond the
scope of this patch ;)

> It is used later in x86_bios_rom_init() as:
> 
>     bios = g_malloc(sizeof(*bios));
>     memory_region_init_ram(bios, NULL, "pc.bios", bios_size, &error_fatal);
>     if (!isapc_ram_fw) {
>         memory_region_set_readonly(bios, true);
>     }
>     ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size), -1);
>     if (ret != 0) {
>     bios_error:
>         fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name);
>         exit(1);
>     }
>     g_free(filename);
> 
> Many 'bios' occurrences.
> 
> Should it be called 'qboot.rom' instead?

I don't care much, I only want bios*.bin for seabios which actually is a
complete bios implementation ...

take care,
  Gerd
Philippe Mathieu-Daudé May 25, 2020, 12:26 p.m. UTC | #3
On 5/25/20 1:02 PM, Gerd Hoffmann wrote:
> On Wed, May 20, 2020 at 03:25:53PM +0200, Philippe Mathieu-Daudé wrote:
>> Hi Gerd,
>>
>> On 5/20/20 3:19 PM, Gerd Hoffmann wrote:
>>> qboot isn't a bios and shouldnt be named that way.
>>
>> Still it resides in a directory named pc-bios =)
> 
> Yep, that should be named "firmware" but changing that is beyond the
> scope of this patch ;)
> 
>> It is used later in x86_bios_rom_init() as:
>>
>>     bios = g_malloc(sizeof(*bios));
>>     memory_region_init_ram(bios, NULL, "pc.bios", bios_size, &error_fatal);
>>     if (!isapc_ram_fw) {
>>         memory_region_set_readonly(bios, true);
>>     }
>>     ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size), -1);
>>     if (ret != 0) {
>>     bios_error:
>>         fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name);
>>         exit(1);
>>     }
>>     g_free(filename);
>>
>> Many 'bios' occurrences.
>>
>> Should it be called 'qboot.rom' instead?
> 
> I don't care much, I only want bios*.bin for seabios which actually is a
> complete bios implementation ...

OK.

Preferably named 'qboot.rom':
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 937db10ae6a5..867d3d652145 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -47,7 +47,7 @@ 
 #include "kvm_i386.h"
 #include "hw/xen/start_info.h"
 
-#define MICROVM_BIOS_FILENAME "bios-microvm.bin"
+#define MICROVM_QBOOT_FILENAME "qboot.bin"
 
 static void microvm_set_rtc(MicrovmMachineState *mms, ISADevice *s)
 {
@@ -158,7 +158,7 @@  static void microvm_devices_init(MicrovmMachineState *mms)
     }
 
     if (bios_name == NULL) {
-        bios_name = MICROVM_BIOS_FILENAME;
+        bios_name = MICROVM_QBOOT_FILENAME;
     }
     x86_bios_rom_init(get_system_memory(), true);
 }
diff --git a/pc-bios/bios-microvm.bin b/pc-bios/qboot.bin
similarity index 100%
rename from pc-bios/bios-microvm.bin
rename to pc-bios/qboot.bin
diff --git a/roms/Makefile b/roms/Makefile
index f9acf39954dc..d6d4948bfc31 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -68,7 +68,7 @@  default help:
 	@echo "  opensbi64-virt     -- update OpenSBI for 64-bit virt machine"
 	@echo "  opensbi32-sifive_u -- update OpenSBI for 32-bit sifive_u machine"
 	@echo "  opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u machine"
-	@echo "  bios-microvm       -- update bios-microvm.bin (qboot)"
+	@echo "  qboot              -- update qboot"
 	@echo "  clean              -- delete the files generated by the previous" \
 	                              "build targets"
 
@@ -194,9 +194,9 @@  opensbi64-sifive_u:
 		PLATFORM="sifive/fu540"
 	cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin
 
-bios-microvm:
+qboot:
 	$(MAKE) -C qboot
-	cp qboot/bios.bin ../pc-bios/bios-microvm.bin
+	cp qboot/bios.bin ../pc-bios/qboot.bin
 
 clean:
 	rm -rf seabios/.config seabios/out seabios/builds