From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F9D3C433EF for ; Thu, 3 Feb 2022 15:25:29 +0000 (UTC) Received: from localhost ([::1]:48300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFdzE-0002fA-0p for qemu-devel@archiver.kernel.org; Thu, 03 Feb 2022 10:25:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFdyI-0001oG-N0; Thu, 03 Feb 2022 10:24:30 -0500 Received: from mail01.asahi-net.or.jp ([202.224.55.13]:58611) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFdyG-00083s-PV; Thu, 03 Feb 2022 10:24:30 -0500 Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) (Authenticated sender: PQ4Y-STU) by mail01.asahi-net.or.jp (Postfix) with ESMTPA id 56E3F1021B2; Fri, 4 Feb 2022 00:24:25 +0900 (JST) Received: from SIOS1075.ysato.ml (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by sakura.ysato.name (Postfix) with ESMTPSA id CC5321C040F; Fri, 4 Feb 2022 00:24:24 +0900 (JST) Date: Fri, 04 Feb 2022 00:24:24 +0900 Message-ID: <87tudg0y8n.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Philippe =?ISO-8859-1?Q?Mathieu-Daud=E9?= Subject: Re: [PATCH v2] hw/rx: rx-gdbsim DTB load address aligned of 16byte. In-Reply-To: References: <20220202103023.788916-1-ysato@users.sourceforge.jp> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Received-SPF: softfail client-ip=202.224.55.13; envelope-from=ysato@users.sourceforge.jp; helo=mail01.asahi-net.or.jp X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, 02 Feb 2022 21:46:22 +0900, Philippe Mathieu-Daud=E9 via wrote: >=20 > On 2/2/22 11:30, Yoshinori Sato wrote: > > Linux kernel required alined address of DTB. > > But missing align in dtb load function. > > Fixed to load to the correct address. > >=20 > > v2 changes. > > Use ROUND_DOWN macro. > >=20 > > Signed-off-by: Yoshinori Sato > > Reviewed-by: Philippe Mathieu-Daud=E9 > > --- > > hw/rx/rx-gdbsim.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c > > index 75d1fec6ca..2356af83a0 100644 > > --- a/hw/rx/rx-gdbsim.c > > +++ b/hw/rx/rx-gdbsim.c > > @@ -142,7 +142,7 @@ static void rx_gdbsim_init(MachineState *machine) > > exit(1); > > } > > /* DTB is located at the end of SDRAM space. */ > > - dtb_offset =3D machine->ram_size - dtb_size; > > + dtb_offset =3D ROUND_DOWN(machine->ram_size - dtb_size, 16= - 1); >=20 > Why did you add '-1'? >=20 Oh. I misunderstood. I'll sent v3. Thanks. --=20 Yosinori Sato