From: Jamin Lin via <qemu-devel@nongnu.org>
To: "Cédric Le Goater" <clg@kaod.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Troy Lee" <leetroy@gmail.com>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Joel Stanley" <joel@jms.id.au>,
"open list:All patches CC here" <qemu-devel@nongnu.org>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>
Cc: <jamin_lin@aspeedtech.com>, <troy_lee@aspeedtech.com>,
<kane_chen@aspeedtech.com>
Subject: [PATCH v2 04/17] hw/arm/aspeed: Move ASPEED_RAM_SIZE() macro to common header for reuse
Date: Wed, 29 Oct 2025 12:36:50 +0800 [thread overview]
Message-ID: <20251029043710.1486573-5-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20251029043710.1486573-1-jamin_lin@aspeedtech.com>
Moving it into aspeed.h allows all Aspeed machine source files
(AST2400, AST2500, AST2600, AST2700, etc.) to reuse the same macro
definition for consistent behavior and maintainability.
No functional changes.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
include/hw/arm/aspeed.h | 7 +++++++
hw/arm/aspeed.c | 7 -------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h
index fbe684d505..414c181c3a 100644
--- a/include/hw/arm/aspeed.h
+++ b/include/hw/arm/aspeed.h
@@ -25,6 +25,13 @@ DECLARE_OBJ_CHECKERS(AspeedMachineState, AspeedMachineClass,
#define ASPEED_MAC2_ON (1 << 2)
#define ASPEED_MAC3_ON (1 << 3)
+/* On 32-bit hosts, lower RAM to 1G because of the 2047 MB limit */
+#if HOST_LONG_BITS == 32
+#define ASPEED_RAM_SIZE(sz) MIN((sz), 1 * GiB)
+#else
+#define ASPEED_RAM_SIZE(sz) (sz)
+#endif
+
struct AspeedMachineState {
/* Private */
MachineState parent_obj;
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index f58245456a..690ad0be87 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -35,13 +35,6 @@ static struct arm_boot_info aspeed_board_binfo = {
.board_id = -1, /* device-tree-only board */
};
-/* On 32-bit hosts, lower RAM to 1G because of the 2047 MB limit */
-#if HOST_LONG_BITS == 32
-#define ASPEED_RAM_SIZE(sz) MIN((sz), 1 * GiB)
-#else
-#define ASPEED_RAM_SIZE(sz) (sz)
-#endif
-
/* AST2600 evb hardware value */
#define AST2600_EVB_HW_STRAP1 0x000000C0
#define AST2600_EVB_HW_STRAP2 0x00000003
--
2.43.0
next prev parent reply other threads:[~2025-10-29 4:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 4:36 [PATCH v2 00/17] Split AST2400, AST2600, AST2700 and AST1030 SoC machines into separate source files for maintainability Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 01/17] hw/arm/aspeed: Split Quanta-Q71L machine into a separate source file " Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 02/17] hw/arm/aspeed: Split Supermicro X11 " Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 03/17] hw/arm/aspeed: Split Palmetto " Jamin Lin via
2025-10-29 4:36 ` Jamin Lin via [this message]
2025-10-29 4:36 ` [PATCH v2 05/17] hw/arm/aspeed: Split Bletchley " Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 06/17] hw/arm/aspeed: Split FBY35 BMC " Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 07/17] hw/arm/aspeed: Split Fuji " Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 08/17] hw/arm/aspeed: Split QCOM Firework " Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 09/17] hw/arm/aspeed: Split QCOM DC-SCM V1 " Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 10/17] hw/arm/aspeed: Make aspeed_machine_ast2600_class_emmc_init() a common API for eMMC boot setup Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 11/17] hw/arm/aspeed: Split GB200NVL machine into a separate source file for maintainability Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 12/17] hw/arm/aspeed: Split Rainier " Jamin Lin via
2025-10-29 4:36 ` [PATCH v2 13/17] hw/arm/aspeed: Split Catalina " Jamin Lin via
2025-10-29 4:37 ` [PATCH v2 14/17] hw/arm/aspeed: Split AST2600 EVB " Jamin Lin via
2025-10-29 4:37 ` [PATCH v2 15/17] hw/arm/aspeed: Split AST2700 " Jamin Lin via
2025-10-29 4:37 ` [PATCH v2 16/17] hw/arm/aspeed: Promote connect_serial_hds_to_uarts() to public machine API Jamin Lin via
2025-10-29 17:33 ` [SPAM] " Cédric Le Goater
2025-10-29 4:37 ` [PATCH v2 17/17] hw/arm/aspeed: Split AST1030 EVB machine into a separate source file for maintainability Jamin Lin via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251029043710.1486573-5-jamin_lin@aspeedtech.com \
--to=qemu-devel@nongnu.org \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--cc=jamin_lin@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=kane_chen@aspeedtech.com \
--cc=leetroy@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=steven_lee@aspeedtech.com \
--cc=troy_lee@aspeedtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).