[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/17] hw/i386/pc: fix code comment on cumulative flash size
From: |
Michael Tokarev |
Subject: |
[PULL 09/17] hw/i386/pc: fix code comment on cumulative flash size |
Date: |
Thu, 21 Sep 2023 11:34:58 +0300 |
From: Laszlo Ersek <lersek@redhat.com>
- The comment is incorrectly indented / formatted.
- The comment states a 8MB limit, even though the code enforces a 16MB
limit.
Both of these warts come from commit 0657c657eb37 ("hw/i386/pc: add max
combined fw size as machine configuration option", 2020-12-09); clean them
up.
Arguably, it's also better to be consistent with the binary units (such as
"MiB") that QEMU uses nowadays.
Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:PC)
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> (supporter:PC)
Cc: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86 TCG CPUs)
Cc: Richard Henderson <richard.henderson@linaro.org> (maintainer:X86 TCG CPUs)
Cc: Eduardo Habkost <eduardo@habkost.net> (maintainer:X86 TCG CPUs)
Cc: qemu-trivial@nongnu.org
Fixes: 0657c657eb37
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
hw/i386/pc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2872f60cdf..3db0743f31 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1746,12 +1746,12 @@ static void pc_machine_set_max_fw_size(Object *obj,
Visitor *v,
}
/*
- * We don't have a theoretically justifiable exact lower bound on the base
- * address of any flash mapping. In practice, the IO-APIC MMIO range is
- * [0xFEE00000..0xFEE01000] -- see IO_APIC_DEFAULT_ADDRESS --, leaving free
- * only 18MB-4KB below 4G. For now, restrict the cumulative mapping to 8MB
in
- * size.
- */
+ * We don't have a theoretically justifiable exact lower bound on the base
+ * address of any flash mapping. In practice, the IO-APIC MMIO range is
+ * [0xFEE00000..0xFEE01000] -- see IO_APIC_DEFAULT_ADDRESS --, leaving free
+ * only 18MiB-4KiB below 4GiB. For now, restrict the cumulative mapping to
+ * 16MiB in size.
+ */
if (value > 16 * MiB) {
error_setg(errp,
"User specified max allowed firmware size %" PRIu64 " is "
--
2.39.2
- [PULL 00/17] Trivial patches for 2023-09-21, Michael Tokarev, 2023/09/21
- [PULL 01/17] ppc: spelling fixes, Michael Tokarev, 2023/09/21
- [PULL 06/17] hw/tpm: spelling fixes, Michael Tokarev, 2023/09/21
- [PULL 03/17] i386: spelling fixes, Michael Tokarev, 2023/09/21
- [PULL 02/17] bsd-user: spelling fixes, Michael Tokarev, 2023/09/21
- [PULL 05/17] hw/pci: spelling fixes, Michael Tokarev, 2023/09/21
- [PULL 09/17] hw/i386/pc: fix code comment on cumulative flash size,
Michael Tokarev <=
- [PULL 10/17] hw/cxl: Fix CFMW config memory leak, Michael Tokarev, 2023/09/21
- [PULL 08/17] subprojects: Use the correct .git suffix in the repository URLs, Michael Tokarev, 2023/09/21
- [PULL 04/17] hw/net: spelling fixes, Michael Tokarev, 2023/09/21
- [PULL 07/17] hw/other: spelling fixes, Michael Tokarev, 2023/09/21
- [PULL 11/17] hw/pci-bridge/cxl_upstream: Fix bandwidth entry base unit for SSLBIS, Michael Tokarev, 2023/09/21
- [PULL 12/17] hw/cxl/cxl_device: Replace magic number in CXLError definition, Michael Tokarev, 2023/09/21
- [PULL 14/17] hw/cxl: Fix out of bound array access, Michael Tokarev, 2023/09/21
- [PULL 13/17] docs/cxl: Change to lowercase as others, Michael Tokarev, 2023/09/21
- [PULL 15/17] hw/mem/cxl_type3: Add missing copyright and license notice, Michael Tokarev, 2023/09/21
- [PULL 16/17] docs/cxl: Cleanout some more aarch64 examples., Michael Tokarev, 2023/09/21