* [PATCH] hw/loader: Restrict PC_ROM_* definitions to hw/i386/pc
@ 2021-09-17 18:59 Philippe Mathieu-Daudé
2021-09-23 7:54 ` Laurent Vivier
2021-09-23 15:00 ` Laurent Vivier
0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-09-17 18:59 UTC (permalink / raw)
To: qemu-devel
Cc: Eduardo Habkost, Michael S. Tsirkin, qemu-trivial,
Richard Henderson, Paolo Bonzini, Philippe Mathieu-Daudé
The PC_ROM_* definitions are only used by the PC machine,
and are irrelevant to the other architectures / machines.
Reduce their scope by moving them to hw/i386/pc.c.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
include/hw/loader.h | 6 ------
hw/i386/pc.c | 6 ++++++
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/hw/loader.h b/include/hw/loader.h
index cbfc1848737..81104cb02fe 100644
--- a/include/hw/loader.h
+++ b/include/hw/loader.h
@@ -336,12 +336,6 @@ void hmp_info_roms(Monitor *mon, const QDict *qdict);
#define rom_add_blob_fixed_as(_f, _b, _l, _a, _as) \
rom_add_blob(_f, _b, _l, _l, _a, NULL, NULL, NULL, _as, true)
-#define PC_ROM_MIN_VGA 0xc0000
-#define PC_ROM_MIN_OPTION 0xc8000
-#define PC_ROM_MAX 0xe0000
-#define PC_ROM_ALIGN 0x800
-#define PC_ROM_SIZE (PC_ROM_MAX - PC_ROM_MIN_VGA)
-
int rom_add_vga(const char *file);
int rom_add_option(const char *file, int32_t bootindex);
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 7e523b913ca..557d49c9f8f 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -843,6 +843,12 @@ void xen_load_linux(PCMachineState *pcms)
x86ms->fw_cfg = fw_cfg;
}
+#define PC_ROM_MIN_VGA 0xc0000
+#define PC_ROM_MIN_OPTION 0xc8000
+#define PC_ROM_MAX 0xe0000
+#define PC_ROM_ALIGN 0x800
+#define PC_ROM_SIZE (PC_ROM_MAX - PC_ROM_MIN_VGA)
+
void pc_memory_init(PCMachineState *pcms,
MemoryRegion *system_memory,
MemoryRegion *rom_memory,
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/loader: Restrict PC_ROM_* definitions to hw/i386/pc
2021-09-17 18:59 [PATCH] hw/loader: Restrict PC_ROM_* definitions to hw/i386/pc Philippe Mathieu-Daudé
@ 2021-09-23 7:54 ` Laurent Vivier
2021-09-23 15:00 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-09-23 7:54 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Eduardo Habkost, Michael S. Tsirkin, qemu-trivial,
Richard Henderson, Paolo Bonzini
Le 17/09/2021 à 20:59, Philippe Mathieu-Daudé a écrit :
> The PC_ROM_* definitions are only used by the PC machine,
> and are irrelevant to the other architectures / machines.
> Reduce their scope by moving them to hw/i386/pc.c.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> include/hw/loader.h | 6 ------
> hw/i386/pc.c | 6 ++++++
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/hw/loader.h b/include/hw/loader.h
> index cbfc1848737..81104cb02fe 100644
> --- a/include/hw/loader.h
> +++ b/include/hw/loader.h
> @@ -336,12 +336,6 @@ void hmp_info_roms(Monitor *mon, const QDict *qdict);
> #define rom_add_blob_fixed_as(_f, _b, _l, _a, _as) \
> rom_add_blob(_f, _b, _l, _l, _a, NULL, NULL, NULL, _as, true)
>
> -#define PC_ROM_MIN_VGA 0xc0000
> -#define PC_ROM_MIN_OPTION 0xc8000
> -#define PC_ROM_MAX 0xe0000
> -#define PC_ROM_ALIGN 0x800
> -#define PC_ROM_SIZE (PC_ROM_MAX - PC_ROM_MIN_VGA)
> -
> int rom_add_vga(const char *file);
> int rom_add_option(const char *file, int32_t bootindex);
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 7e523b913ca..557d49c9f8f 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -843,6 +843,12 @@ void xen_load_linux(PCMachineState *pcms)
> x86ms->fw_cfg = fw_cfg;
> }
>
> +#define PC_ROM_MIN_VGA 0xc0000
> +#define PC_ROM_MIN_OPTION 0xc8000
> +#define PC_ROM_MAX 0xe0000
> +#define PC_ROM_ALIGN 0x800
> +#define PC_ROM_SIZE (PC_ROM_MAX - PC_ROM_MIN_VGA)
> +
> void pc_memory_init(PCMachineState *pcms,
> MemoryRegion *system_memory,
> MemoryRegion *rom_memory,
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/loader: Restrict PC_ROM_* definitions to hw/i386/pc
2021-09-17 18:59 [PATCH] hw/loader: Restrict PC_ROM_* definitions to hw/i386/pc Philippe Mathieu-Daudé
2021-09-23 7:54 ` Laurent Vivier
@ 2021-09-23 15:00 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-09-23 15:00 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Eduardo Habkost, Michael S. Tsirkin, qemu-trivial,
Richard Henderson, Paolo Bonzini
Le 17/09/2021 à 20:59, Philippe Mathieu-Daudé a écrit :
> The PC_ROM_* definitions are only used by the PC machine,
> and are irrelevant to the other architectures / machines.
> Reduce their scope by moving them to hw/i386/pc.c.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> include/hw/loader.h | 6 ------
> hw/i386/pc.c | 6 ++++++
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/hw/loader.h b/include/hw/loader.h
> index cbfc1848737..81104cb02fe 100644
> --- a/include/hw/loader.h
> +++ b/include/hw/loader.h
> @@ -336,12 +336,6 @@ void hmp_info_roms(Monitor *mon, const QDict *qdict);
> #define rom_add_blob_fixed_as(_f, _b, _l, _a, _as) \
> rom_add_blob(_f, _b, _l, _l, _a, NULL, NULL, NULL, _as, true)
>
> -#define PC_ROM_MIN_VGA 0xc0000
> -#define PC_ROM_MIN_OPTION 0xc8000
> -#define PC_ROM_MAX 0xe0000
> -#define PC_ROM_ALIGN 0x800
> -#define PC_ROM_SIZE (PC_ROM_MAX - PC_ROM_MIN_VGA)
> -
> int rom_add_vga(const char *file);
> int rom_add_option(const char *file, int32_t bootindex);
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 7e523b913ca..557d49c9f8f 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -843,6 +843,12 @@ void xen_load_linux(PCMachineState *pcms)
> x86ms->fw_cfg = fw_cfg;
> }
>
> +#define PC_ROM_MIN_VGA 0xc0000
> +#define PC_ROM_MIN_OPTION 0xc8000
> +#define PC_ROM_MAX 0xe0000
> +#define PC_ROM_ALIGN 0x800
> +#define PC_ROM_SIZE (PC_ROM_MAX - PC_ROM_MIN_VGA)
> +
> void pc_memory_init(PCMachineState *pcms,
> MemoryRegion *system_memory,
> MemoryRegion *rom_memory,
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-23 15:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 18:59 [PATCH] hw/loader: Restrict PC_ROM_* definitions to hw/i386/pc Philippe Mathieu-Daudé
2021-09-23 7:54 ` Laurent Vivier
2021-09-23 15:00 ` Laurent Vivier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.