From patchwork Thu Oct 15 08:12:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1382492 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=J2H1AYP7; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=KAMQ+eO5; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-sharedspace-onmicrosoft-com header.b=feOSMIwW; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CBhqH5wk9z9sV1 for ; Thu, 15 Oct 2020 19:12:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8J4a8XebL24XCSv5CUjg0dF+NrDlvNoQRjshGxpNedg=; b=J2H1AYP7okK5VoaYtYods4EHQ ec/iJ0SY2tm++i0eEp4ofKpls2MlWYZXwH01CZDVJLrYEUmA45tvSW+UOs4wdeN8xzk3rbaSN+dAY T+DL8bSL+AfHfD7EQFn53KG+q3EZeFScj1tzGl8exeM1rNWgj25H57dgQOku7bLuYXHEXS4T51ttb FDMGVD7eiiC7X04+NSg5ZrJVe7akhQ+RcHFVA1AO2t0msOBKYqnj0Uetih4Iec4zd/raXmrQxNZAc CE4yK18FcPLz5fAmG6dVJDCYyjxT8TNsfKvOHQEIokMLr3kVZe6qxDAy1BYp4g6YSo1LHEW+Icllz tb5S2+fSw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNV-0005FA-8V; Thu, 15 Oct 2020 08:12:49 +0000 Received: from esa3.hgst.iphmx.com ([216.71.153.141]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNS-0005E7-CT for opensbi@lists.infradead.org; Thu, 15 Oct 2020 08:12:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1602749567; x=1634285567; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=0j90GenNmrXdoWAvzbTWTU+hyJumzBObsF3E1XEjEO8=; b=KAMQ+eO50AJqZ2inq/GUm2pkp6lJNAGrKBEY6QzA3iQHBI4JvhepDXIo B39xZ3UcHw5XY6JyssiEFTKjl+qBtnn29SnY6ndLUPXoGNbXT9lnUHIRZ 8H/t49B34ain0+44+eEvxTW8Vg5UXDqAeCiaOwEMg0WwWpiV6ENbdk3OB AteG8ShOqQGIXgXUaFVbvu/dnIIoW1jQHXG1lmRu1t2YOEknx3/4u2nhc iSfeRAg4B9F9LgAXOX64kjhjINk+fFMHvhgKz8xZSjTGYphfm2qzRWCo8 DwoQjlDnn2Mz/boUxUEnfqa2/xgWHA018X1rJa5qp+DJ9azFqDlhuaKH6 g==; IronPort-SDR: Q23QrU4DwRPX3mTn7Yd8t42pncmr2A5kNi8C+ujyPixGxGjIfMUsunQ0ybFqR8SxSW0qappL2H 4zDtdTCbeKxXp2euiWpwVQeUWuN6t543SSL4V+mPrlpB6vgW+Y9Uj0u0q+rtNauI9Xq0tfoPrV 31MwIw2Mnk2mw9c5520KflvBEjraRX4k0G4aO9fPLD+dQPJ3+Ky+t04FLrKFZWlqHcqBZwSgGM E1NZL4mIrMsFMHDm4eX6omSmwrDk6G7nNkTwNXWHqUBs/2OKKqoY65vB2eSs7K3J95+l1DK1Eo 0fo= X-IronPort-AV: E=Sophos;i="5.77,378,1596470400"; d="scan'208";a="154373548" Received: from mail-mw2nam10lp2104.outbound.protection.outlook.com (HELO NAM10-MW2-obe.outbound.protection.outlook.com) ([104.47.55.104]) by ob1.hgst.iphmx.com with ESMTP; 15 Oct 2020 16:12:44 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=doipnrLmdFDWecGtBn28hgr3y2o9vEn4d2ztV7m5lZgdDp0K6yslpaWJHvpggefk6xsqK9sh8Sq0/mjz5maDn1R3uzg36mPgcr2phoYekrzwQNvipFc8U7j5JfK6toOhJSdhwgLm0DM2nt8eMIwxEQJa5mRLHo0PgSXvN+Cqmlr2eAkpKFqlbYlBfDdT1DVfu2bkNgB5AopqqkH+qGs5P7DOzA+dGA5Ipr7UoD1VPlbhsnYSYgkTE/MqDWmpXyGLnPJbir05oPPMuV1DKI4cNPaXOmWy9U8Xkor/IYxR4nSRQazMu392iXc4h+e/PcBbXASYLJ7vz3d10cJp0myO1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cjRIdzbnv194KcQtvMV8s7xb/4oUk+cv0BakOFTDIng=; b=W4xJ53pa8nuL9FEDNnL87OnyL38P4FjlWahU2TimqhorvCuzXVuqGypVpzNfa2pC+t0bfItu9y6WFNon3rL7Odcv/OjrtglVeOiByoJdvg4jny+dmMXr03b5x92J02Cqgfdfj8NZr19GgsAQGATmLp8zR6zwBw/3Qv8BuyuqD74imO7NeV/Ro5tBybEFoat0KCvEgYjYKDDohjGoZNZevMb0a1ZCDGvvEg6E3APVOUpwffKpq2z6weOzBouaJcbzb0zhObDJEM+9v69QAKXGH4qWWU/IyMcYGXN/5Jjyszg7Giyh+9iq339KD+YEaAyMXq9bXbtbf5IZzXyvQ3DHmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cjRIdzbnv194KcQtvMV8s7xb/4oUk+cv0BakOFTDIng=; b=feOSMIwWZi2wXw7/y5/gUeq3wEGs/3TD3M3CUk8RssWo+PjxxslKD5MaNAtr9AT8Rvjpi60zjpCFK+VN68W4FirpkdCbGblZF1onHGDcWtYNm+6LT/Kx+LWyRV7UKr/jvvr+ZzED+gX/yEOmBAh/ebr2SAod3DMlUqGLD5oeu6E= Authentication-Results: wdc.com; dkim=none (message not signed) header.d=none;wdc.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB5836.namprd04.prod.outlook.com (2603:10b6:5:168::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22; Thu, 15 Oct 2020 08:12:42 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd%6]) with mapi id 15.20.3477.021; Thu, 15 Oct 2020 08:12:42 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH 1/5] Makefile: Build ELF, BIN and LD script in platform build directory Date: Thu, 15 Oct 2020 13:42:07 +0530 Message-Id: <20201015081211.1956554-2-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201015081211.1956554-1-anup.patel@wdc.com> References: <20201015081211.1956554-1-anup.patel@wdc.com> X-Originating-IP: [122.167.44.151] X-ClientProxiedBy: MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (122.167.44.151) by MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Thu, 15 Oct 2020 08:12:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 05f16b3a-20dc-4f7c-fbf7-08d870e216a0 X-MS-TrafficTypeDiagnostic: DM6PR04MB5836: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UzFOOjhGGuXMQJDP8gvgq+6aDaqIU/LDD4PWzjz0T8rpctjFGNFrgVvv/hpwg4wIqLiM34L1hdRWa6fQjVx8Qu/0TgVs555d5jbKL28MWqRnYS/46buQFBP8fxtonbu2u8NIUN5YWIm4ECoCMrqYqgZyFCialsdQJoP9eTo32OwaVp8yc8HJ2MdI1rLlxKYRHlcVCZkykbsev7ciRky9HFYOsE8iHD3OPb/OoL/XpRSNEZ4LBl8dT27jqelidSkfISwrSGdZI6ooc21KW/K2hyyf7ypRCgwqWrP1s27vrv2DBSh6o3fqmEi4hYXMDbeTwqnxmAcHykaB+JFB+MDpiDDcr6rHV6n9nVh8f5KrJ2zbJIcVCdDlPmQeLhCHVzIB X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(39860400002)(136003)(346002)(366004)(44832011)(8936002)(66946007)(36756003)(478600001)(6636002)(8676002)(2906002)(8886007)(34490700002)(110136005)(186003)(7696005)(66476007)(6666004)(86362001)(4326008)(52116002)(55016002)(1076003)(316002)(2616005)(16526019)(956004)(26005)(5660300002)(66556008)(54906003)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: hd0s59uNdO4fC9xrXStxAmmRhL++GnBw9areL3m4aIsE6s7H23ss4ckBGVbfGPRATdV2YT5ZGWsPKYmzMb6LqtVfPTeyco+OBqd19KnS+0wI8Sr18X4xWb5iOTV6SYp78I/AzlcZM9F9IMyrZOSDpYi4xlBQE/+ARLR6pA5a5TdPiZ6x9kYiZ5XG3wfKQPffMrV+aGpbZT8krs5KFRUUpIktLbekr5S0aI41VmAy22we+e0/0L63oObL7dNhYZQPoKEuWslePUt+hifCGuBNMVunnSZmZUXDwpKOMWNZwXU9/LaqFwSwcNLxF28xThL7oOmcSqt27Sf9crm2fMn+eGj2xiAu7XUum6FcQq2i0DvQ3e/mrTcHVL74os9oz7jcPMp1vMlEg1713oC+vBjVKRSijcKXcfWe5fLDCejknX93j43UG4/81EdiLKDDNLzB7xn9vzlHUPhJCuMdZe5uhNDp0ApcwCaNJ2bB4FNepbCgTFy4i+PiTTvkb6BTZ0Vr1l8kfqohUlNBMkWVwReIiB8Tvxuq5vKbejfIc3Bf1BbOSsq9u1QalJReSde7O0izzHt0TyN+32OSHcFULz+uneyhVxo0gR2GLG8sZ84H4njf2ztYuRleMpe8uihkbfdTD/lpzb8PheM1zE5UffROeg== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05f16b3a-20dc-4f7c-fbf7-08d870e216a0 X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2020 08:12:42.2970 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: B67ir98h6Drjy3FFYSsZ9q/HtEX1mul8dGL7c2VKXnW+nE8zP6pJyf8ixH2hVCKkdHAkDmYOOPMq/QDPMJUGWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5836 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201015_041246_564438_9CC021C5 X-CRM114-Status: GOOD ( 13.05 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [216.71.153.141 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Damien Le Moal , Anup Patel , opensbi@lists.infradead.org Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Currently, the make rules for ELF, BIN and LD script are little generic to allowing ELF, BIN and LD script to be anywhere in the build directory. For OpenSBI firwares, the ELF, BIN, and LD script are always platform specific so we update make rules accordingly. Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 2a352ef..6c36f09 100644 --- a/Makefile +++ b/Makefile @@ -310,15 +310,6 @@ all: $(targets-y) # Preserve all intermediate files .SECONDARY: -$(build_dir)/%.bin: $(build_dir)/%.elf - $(call compile_objcopy,$@,$<) - -$(build_dir)/%.elf: $(build_dir)/%.o $(build_dir)/%.elf.ld $(platform_build_dir)/lib/libplatsbi.a - $(call compile_elf,$@,$@.ld,$< $(platform_build_dir)/lib/libplatsbi.a) - -$(platform_build_dir)/%.ld: $(src_dir)/%.ldS - $(call compile_cpp,$@,$<) - $(build_dir)/lib/libsbi.a: $(libsbi-objs-path-y) $(call compile_ar,$@,$^) @@ -340,6 +331,15 @@ $(build_dir)/%.dep: $(src_dir)/%.S $(build_dir)/%.o: $(src_dir)/%.S $(call compile_as,$@,$<) +$(platform_build_dir)/%.bin: $(platform_build_dir)/%.elf + $(call compile_objcopy,$@,$<) + +$(platform_build_dir)/%.elf: $(platform_build_dir)/%.o $(platform_build_dir)/%.elf.ld $(platform_build_dir)/lib/libplatsbi.a + $(call compile_elf,$@,$@.ld,$< $(platform_build_dir)/lib/libplatsbi.a) + +$(platform_build_dir)/%.ld: $(src_dir)/%.ldS + $(call compile_cpp,$@,$<) + $(platform_build_dir)/%.dep: $(platform_src_dir)/%.c $(call compile_cc_dep,$@,$<) From patchwork Thu Oct 15 08:12:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1382491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=aprc5CmX; dkim=permerror header.d=wdc.com header.i=@wdc.com header.a=rsa-sha1 header.s=dkim.wdc.com header.b=awC6eUtF; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-sharedspace-onmicrosoft-com header.b=LyyrURnS; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CBhqH32Q9z9sTK for ; Thu, 15 Oct 2020 19:12:56 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ajPaCfW6jgM8LT9T/TWkaufrkPzlbq5lL89h43YRLwA=; b=aprc5CmXAd2/ldWFGxevS+Kc+ CiJSEeghZkTAsUsBxHcVvtQekMJN2rc5JMAmea6qeVF0frWGH+2f/ermoeUsxYlTYqNrAgV7GtDSD 9XJl1nv/snim/B2Uw9knLJJg09RUtrjuRs0wMBH8d4Rja+9bXX5m2gbdjb3KSaUFlQIz3pvi/gGXG lEKNA94kl7Jxk9y/Iw5dlipqqE+/AVgON0xw6ZmOcdzmrvrf2b2gUZpLA2ypzcLNspwuJ9Nvhbhth xxQJxQGdDHi2bDuoqItXz6kUS2O9DInSEC56t65nV+vo31e+m/QpujGMoqJp7BNVvE937r4NuG77x lhjyQkT9w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNX-0005Kb-56; Thu, 15 Oct 2020 08:12:51 +0000 Received: from esa2.hgst.iphmx.com ([68.232.143.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNU-0005Eq-Vw for opensbi@lists.infradead.org; Thu, 15 Oct 2020 08:12:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1602750001; x=1634286001; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=SYm6/bNzUfIa/2Fr9T4ANOeiX+hEaCKpC4OaWK6clTs=; b=awC6eUtFs1rJIsdYfvytZt4uODgTcoDu6YJcu6+BWAMslkr+lt42xJ6E CrPw8pxW4aKAjixyBpRt8L895fnBQNItC7rh2lvGM2BCCY8As8nqwBX09 vRBExmXfyNG5U1flTryJvgQs033e6Cz09VlKNIk8+puatZ2PZUjmub6u8 Ac1HQRooQRa1d0So8aeeZTZAvQ4rdnwIYN3RUC7f6ZxvDMmHw3VDhFLyK Ae6M9bDS9S5RKxp4tAdCZVZACR9dlMnoP2scJXEP202P1qPuh7CGf2J5Z ecKimSGSbZqHInx91OYt58zmQ7O8V8ZO1lPR30Z8WR2aMxnprdgwk+uqQ w==; IronPort-SDR: XRS8+5sOPRqk52ShYMGz/+xlhlyA9gEDCoze/uZlMIctgGIV7VZvnNYc2ji94KVwZE8mDNGQ05 touM/JR8h2hIX6yXY5JKSHB+jNpMBVhBGZRv7dKOVEeIb/cfQdyRPAvhiBUsdp3kACQ1WR09LL gCZ5Lt/V/JnHS2gfYwj4GNxyo8zRnYPYPsob6TaV/WZYr3Yk4HBYEg7Fzr+A7x+r3aizY0RYGx 76sWIyvij/5C/Lz7UIhV5BFVhBtHmmyRQK/3lSbfk/v2AmW5mxKaDyZdpMRq0scZ7ucAT9/Ww+ ClU= X-IronPort-AV: E=Sophos;i="5.77,378,1596470400"; d="scan'208";a="253417237" Received: from mail-mw2nam10lp2105.outbound.protection.outlook.com (HELO NAM10-MW2-obe.outbound.protection.outlook.com) ([104.47.55.105]) by ob1.hgst.iphmx.com with ESMTP; 15 Oct 2020 16:19:56 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mqtPR/IJ6jm2VhCJ+LoyhxAlwN0T/2ZJqnX19dkVimYdSMPBqN+B0+HOu3sNKuIWfdQNfFu7tuq9nfPAGMZM57zdpusc/wWdd7qnSZ4VbwAU32fm2KHOij+Nynbu1ffct0EppklhoOQm3T0GahXi+cu4JGwiCr1USWXYhDGpeXcKeFPQW8S8kxRSjK75XGhLI0jOKvVoyJ/j4EAdzPQhDl63X6rZr0ABLeNXW8Z7AN7X478cDAm+eLXCN0vdgxkJum1pJlSan7RDqnpB1bcs2s4ApHzuUz4V39haxaqOzMLUSF5vZjgdgyZR/pgGc76CBJlb76HBXgfJrDaBU+KHjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7VB4oTMJy3QhNLDa3oSaikVhcEtxkWtHvlobKjYBzCY=; b=bal1ITzDCs/1tFvWZ0PzXlZ7PMfYddtcMjWAn0d4/wSYR5EismOWYMFpjBMhXzsuTMsrJ8wuFRAyUnkYfi4GPoaCwhtaQbHZdhp7uVHHgSNYZZ9mDcemrL0jhaakn57zuHxO8wyLsoqMilA62S24lD+tGCFPsveLgdy19uUtDaQWg7YKXX0YV/0xeeDvQvmc3/3DAHHsON0VSlQ3IN99FoYKc2HHlPHzqyOTvvr92aWNgm0RSl+8dZ7i7m5doh9sHIaGdYMXyfBVPwDb8TEt6KozbmtUPSJGQJ6iJnGOojlSsvRgGcrIV097bJWyONV7iWztECWIGKvCMwpJwuTEBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7VB4oTMJy3QhNLDa3oSaikVhcEtxkWtHvlobKjYBzCY=; b=LyyrURnSjbOxjjP1LhR/7QwKKapb6y9pns8zAN53vlYCoPl7z5DXQqbMABu1oKCCkVhYNwkzp3O1VzWhrfbWLWuV+i/VzQaE3Cd45E/4nts9yOTxFmHlblGe3cs8dFyBqkt0zfYhH+VhabUtMXjdUiJlgNZFGJAY0/ksO4aVs+c= Authentication-Results: wdc.com; dkim=none (message not signed) header.d=none;wdc.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB5836.namprd04.prod.outlook.com (2603:10b6:5:168::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22; Thu, 15 Oct 2020 08:12:45 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd%6]) with mapi id 15.20.3477.021; Thu, 15 Oct 2020 08:12:45 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH 2/5] firmware: Add common FW_FDT_PATH compile-time option Date: Thu, 15 Oct 2020 13:42:08 +0530 Message-Id: <20201015081211.1956554-3-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201015081211.1956554-1-anup.patel@wdc.com> References: <20201015081211.1956554-1-anup.patel@wdc.com> X-Originating-IP: [122.167.44.151] X-ClientProxiedBy: MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (122.167.44.151) by MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Thu, 15 Oct 2020 08:12:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5178589e-de04-40b9-41f0-08d870e21855 X-MS-TrafficTypeDiagnostic: DM6PR04MB5836: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: onKRqIHRpQiZf8QD041Smpa0EB4hzc0S4/RdnlqjSO5EXI3g9MXCPW6m+HBAqzyMmr7kR8Bacj34UkrJCH67fhueNgRHudyoVTs9p+HKUCuNGJpdAGW1lIVGnftj9wy+wPNDsBlCUIRrFWRZtLE6mohHPn3uZLIDoIlUufomwMl1r0U6JHq0jVsWsu5D/pqgwwSHwT8bnyt+72pmHoxTVeEmFXYufjwzz5fHQohcLE+9X0GpVrd6zllb9xCFwPH1gwYF6nnyKkMdWN2CKuxu3pMr7ZBrbDcRD8LTOoLmCwFMQPMqwScDXda4/w0hToWDUjEJFi5NJcH/ggE1q8GIm4md286b0LiMP2FFYzGmgyV7TmZ2PqYqCxAjZCNNP5w0 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(39860400002)(136003)(346002)(366004)(44832011)(8936002)(66946007)(36756003)(478600001)(6636002)(8676002)(2906002)(8886007)(34490700002)(110136005)(186003)(7696005)(66476007)(6666004)(86362001)(4326008)(52116002)(55016002)(1076003)(316002)(2616005)(16526019)(956004)(26005)(5660300002)(66556008)(54906003)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: UVR1EHMPSPdFT4ZaZTpXu1iZp5kPgu9WL8GqxMEkJFVxFVXUab5KQ1Rc4hnfMNJaa4baSlEjJV6w+9nJ3SjuSt8avRrtC3OXwj+T8WV1EifuTMj810Sd9u4ul7MWBBSid5C6RcSv3+bZTtEAPeGF8FVKQczZhWvko9gBmCgjeq+d5o1j220XtQwAo1aWy/l43ROF2Pd4pVVcDe+shBuvEV7es7SN6O+Ke0vvn2akgEx2v7JVuZWn9SyQBD2rOQ2tlMcPa0RaYmWRSEAQeG7++HS9WMfIrWB4fiDI/AccV+edJTy6ZpXYK30sVgaBVp/rzA6ma9rblyTHMnJzJliw6pzuoZcrqZ9MF+e2YGDl+Z8hgu/HQ5yBaAfZZAl2DFNHQaP8V62tQ1Pi0wYfAX7Xv8HST6LM7u2ZL7BeOpw10yUT5aqVFxfK/GrwnajQBmdDbDbp0x9gA5R48FpSsLJ7MOtdUBvOUT/vosAgBc4qpoCIFtdviLw7AMjg45JguLwpUvdNvBOsa6zfnHDdW7fUeTA94ciciSjYjPcKtNX9kp/KcaHym5Hu6CpFRTKb8SM7ntFCQrlrTuVUyucMf4g8PYoyyjVJJ60CnWArG1vLQ13RlyNT/S5v3CJ/f/seXOjWB55cB9G199/YwQaMxHLixQ== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5178589e-de04-40b9-41f0-08d870e21855 X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2020 08:12:45.0352 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FEoSFoPN+vkSisShvNCwmgJU3N8WMC94u+4P00UZZnjlclUC6z4Ut+gKnzhexSEMf2hluXP2TaWIYp5MUm7QXg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5836 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201015_041249_208945_8CD06CCC X-CRM114-Status: GOOD ( 15.83 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.143.124 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Damien Le Moal , Anup Patel , opensbi@lists.infradead.org Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Currently, only FW_PAYLOAD has mechanism to embed external FDT using FW_PAYLOAD_FDT_PATH compile-time option. This patch adds a commong FW_FDT_PATH compile-time option to embed external FDT for all OpenSBI firmwares (i.e FW_JUMP, FW_PAYLOAD, and FW_DYNAMIC). Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- docs/firmware/fw.md | 14 +++++++++----- firmware/external_deps.mk | 4 ++++ firmware/fw_base.S | 16 ++++++++++++++++ firmware/objects.mk | 7 +++++++ 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/docs/firmware/fw.md b/docs/firmware/fw.md index 4133c23..1efdadf 100644 --- a/docs/firmware/fw.md +++ b/docs/firmware/fw.md @@ -51,11 +51,15 @@ case, a *FW_PAYLOAD* firmware allows embedding a flattened device tree in the Firmware Configuration and Compilation -------------------------------------- -All firmware types mandate the definition of the following compile time -configuration parameter. - -* **FW_TEXT_ADDR** - Defines the address at which the previous booting stage - loads OpenSBI firmware. +All firmware types support the following common compile time configuration +parameters: + +* **FW_TEXT_ADDR** - Defines the execution address of the OpenSBI firmware. + This configuration parameter is mandatory. +* **FW_FDT_PATH** - Path to an external flattened device tree binary file to + be embedded in the *.rodata* section of the final firmware. If this option + is not provided then the firmware will expect the FDT to be passed as an + argument by the prior booting stage. Additionally, each firmware type as a set of type specific configuration parameters. Detailed information for each firmware type can be found in the diff --git a/firmware/external_deps.mk b/firmware/external_deps.mk index 2b8f9f6..f43ac06 100644 --- a/firmware/external_deps.mk +++ b/firmware/external_deps.mk @@ -7,5 +7,9 @@ # Anup Patel # +$(platform_build_dir)/firmware/fw_dynamic.o: $(FW_FDT_PATH) +$(platform_build_dir)/firmware/fw_jump.o: $(FW_FDT_PATH) +$(platform_build_dir)/firmware/fw_payload.o: $(FW_FDT_PATH) + $(platform_build_dir)/firmware/fw_payload.o: $(FW_PAYLOAD_PATH_FINAL) $(platform_build_dir)/firmware/fw_payload.o: $(FW_PAYLOAD_FDT_PATH) diff --git a/firmware/fw_base.S b/firmware/fw_base.S index 0271d9a..95197da 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -182,6 +182,11 @@ _bss_zero: call fw_save_info MOV_5R a0, s0, a1, s1, a2, s2, a3, s3, a4, s4 +#ifdef FW_FDT_PATH + /* Override previous arg1 */ + la a1, fw_fdt_bin +#endif + /* Override previous arg1 */ MOV_3R s0, a0, s1, a1, s2, a2 call fw_prev_arg1 @@ -668,3 +673,14 @@ _reset_regs: csrw CSR_MSCRATCH, 0 ret + +#ifdef FW_FDT_PATH + .section .rodata + .align 4 + .globl fw_fdt_bin +fw_fdt_bin: + .incbin FW_FDT_PATH +#ifdef FW_FDT_PADDING + .fill FW_FDT_PADDING, 1, 0 +#endif +#endif diff --git a/firmware/objects.mk b/firmware/objects.mk index c980362..2eea54c 100644 --- a/firmware/objects.mk +++ b/firmware/objects.mk @@ -17,6 +17,13 @@ ifdef FW_TEXT_START firmware-genflags-y += -DFW_TEXT_START=$(FW_TEXT_START) endif +ifdef FW_FDT_PATH +firmware-genflags-y += -DFW_FDT_PATH=\"$(FW_FDT_PATH)\" +ifdef FW_FDT_PADDING +firmware-genflags-y += -DFW_FDT_PADDING=$(FW_FDT_PADDING) +endif +endif + firmware-bins-$(FW_DYNAMIC) += fw_dynamic.bin firmware-bins-$(FW_JUMP) += fw_jump.bin From patchwork Thu Oct 15 08:12:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1382494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=SV03d9xv; dkim=permerror header.d=wdc.com header.i=@wdc.com header.a=rsa-sha1 header.s=dkim.wdc.com header.b=AMlxzjUA; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-sharedspace-onmicrosoft-com header.b=bUbP0DGr; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CBhqJ1NQTz9sVH for ; Thu, 15 Oct 2020 19:12:59 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2WVi5M4YYEX2uUUOHYrvlW1MfmAohUsy24ul1fuONHQ=; b=SV03d9xvQrRlCIrwEovU+uCbt UGRbgV7+uho3OziEXIqUgJvdmIrgYU0Pxll7P8S6UD5zn4TJ5Am6HS1MiCuZGCfPoIdmfWWaDD26t I1oZ2xdqytmFpg98/jCYvyNr76uAfljcaqV5anDzDjiGBypUuwVinVtaQbGqCod8WCYE/9CiqDjIJ +EquzkfcWqBKGeWtwxHdxcO4gCctl+AKHVoDV7Ru77pG9HlJ1+DQv4O+R34fyIjZCsv4k9OJD/Eeq uzgv/409EWBM4emzBBSH4M+Fb5E5oKdZ4JDN+3IXkpmkgRof8AUVDnhf1/gN17p5f5mekYBuwCIbb pdHpCPPbg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNZ-0005LY-K9; Thu, 15 Oct 2020 08:12:53 +0000 Received: from esa2.hgst.iphmx.com ([68.232.143.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNV-0005Il-Mz for opensbi@lists.infradead.org; Thu, 15 Oct 2020 08:12:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1602750002; x=1634286002; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=z22NrooPf5Hi3ybPX2HH2D7ri4DUFekmnwiKJjrHtfE=; b=AMlxzjUAJqpVW3x+4T6pCAvcfpPrQW+LTkHiO+dczscQA7EIaBvK1LdK hyykPA+LfpI1hFrKZh+xi/VCY1RYfF4TrgUb6HKVrwXoNqrPjOFPJWy/X aNq0L31js8Xzz8hPbAQ6f287Yg5PcoajA6K62iS8nwoSJ1C6PScFxeM4D D6Zz0AeMgO/sNVr89dzZgfKbb1Cl14bBVJSDm6djHzXTRkC5l7zhRPO8O 8teqmkcrSusgEIYBqskPa3bQzyOWesU8eyErBjk0uetAZvdAab4mtDi60 IyAqp/XaRQDtA73SY7Cz+5nnQw6ZSE9uVcCzf81c03uWKKtobed6Kq8Mb A==; IronPort-SDR: bDiSrPar+yptq76+nVi/amuvaSFVVwwDqryq/ke0m8zvag1CCGch4GUN9uPr1CNuSbKyV869zo IvxiUSNJv1yNxN8v6Hm7cuFxqjm8+mUcy/3TdQycbHnRUQELhHbdMrBwwirPw9QqFiSoIA4/xD qy/07TDnXhekfC8doogNMuMOcgntjT74FNvgpNmShqwuuJ64pTKGtggFjWewsWz0YO1fzEKc3t jDLJ1uo+3EkpAl9wYpM3mQnrLu/SSil1cnguouqDTJa/a2AZF5uq6imjTRR2VIP3tjnDz/asaq 4IM= X-IronPort-AV: E=Sophos;i="5.77,378,1596470400"; d="scan'208";a="253417254" Received: from mail-mw2nam10lp2106.outbound.protection.outlook.com (HELO NAM10-MW2-obe.outbound.protection.outlook.com) ([104.47.55.106]) by ob1.hgst.iphmx.com with ESMTP; 15 Oct 2020 16:20:00 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gZdI6PqrYOGHcssvNlO+I0VNtpnK0L4gKrIY1dY8wfH6jQ8xiWLtfKxDvSTEmUoA3LlxgCo5zTGPusXP95veVB/1qJpokJaeYr/AlJ+HA7NhkGTEd/AfKNX7aVtZG5DD0OOPU6YCT8RLjfluOyYCdDHvPc3BikZgDRU123MlMyeUol28LMFLTEgF9qTqRE6NK/T4oGFiJTDba4xvKmmzUfGWC/XEcbW8RyEvhUxqHTNbo6zL7Xbv2dCk5ujc8EUabVkF/lZqmIMTjQLE25mngSv8lxGnyrPv2AaCcRFU4ayKmVvrYC/vtw2ZqYn/KC1aWpEZe7PPGOgxS/wNizfgGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/qiTSwbP8bI+aehtpn9WC9l4/UTQZfKL3nBuuPLVC3A=; b=kEy8IcTshsXge6oKpWw2pmFFTbyqmlpv9Moqhk79edZScoXP4Mgh0Fx62Ivp3DOmwTz5bLbVJhXHtZVxIrV6IOcB7Yq0VwE/qvMOznPHMjHh9Xc33Lis1l+n0w6b/ZhZfBsnJl5nX86FxVyp1OUIm1vLHsOmTUp/vhp7W7Rvmv2Xkvx48WDAHdbFxUF8T+zdXCLaWDlHZhM3TQj6dh+/bZmz4OxLNz+eX0T3EMno+rqe+8rkTDY7RyIBbDHdv7jmTDKH23kbXc8+vhduGj3+FEIeJF3FmACrv8bozPB0TuLG7lqD/RPanONjtdmTrBG/lGHva8ymz1ERvHHVG5IZ3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/qiTSwbP8bI+aehtpn9WC9l4/UTQZfKL3nBuuPLVC3A=; b=bUbP0DGrdYqjZzLnHplZIi5AVD91OKF9EiC8sidEHTRO379SJmdX2ZRH5926++ouFpv2UvQ4+4wRDcdEUNHPn53tP4MXpY1vBlN+HkmzVeFNz8WzVbdvprHzGTUMeonHDjwJdOb2RGYqFoNrL0OKC8GF4kh9F494aTTyQaLMMLA= Authentication-Results: wdc.com; dkim=none (message not signed) header.d=none;wdc.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB5836.namprd04.prod.outlook.com (2603:10b6:5:168::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22; Thu, 15 Oct 2020 08:12:47 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd%6]) with mapi id 15.20.3477.021; Thu, 15 Oct 2020 08:12:47 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH 3/5] firmware: Remove FW_PAYLOAD_FDT_PATH compile-time option Date: Thu, 15 Oct 2020 13:42:09 +0530 Message-Id: <20201015081211.1956554-4-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201015081211.1956554-1-anup.patel@wdc.com> References: <20201015081211.1956554-1-anup.patel@wdc.com> X-Originating-IP: [122.167.44.151] X-ClientProxiedBy: MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (122.167.44.151) by MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Thu, 15 Oct 2020 08:12:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cf997503-d912-4fa0-18d3-08d870e219f5 X-MS-TrafficTypeDiagnostic: DM6PR04MB5836: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EvAIRdqIstg1lU8Rk78y1BiUYdOq7GeugUocls6fHlGERGn8Y1SQ9jke06QyeCC7f7huRZa2tum0aTlNKWTFlX/8ZOwAGz2F8rKP/Ks8T7fpFW4lIcZ4M/csAByO5Chv3AkyfYTW0TQBshNh/B5mW2JDQfLtQPScGjIUsSCdpGdmqBg47y0A0fNrXqs1GJog9p91PWshmfzIHg9Sam4vDsX4xwEFGGi7eClgMkCAmbQKLm47fCfWBcIYzD1cYcGgqOOLhUvp4xqguWK0+uQcSsyeENbe7Dt1BvrprzRucWH2QZaDNFIF9tKtKPYOtWpQr1/m6kqQLrPGfv2ox5IUNWZ96Hulf0zX8Tco+BXKQKUlqkGn0zVtW6WvMNf4jaBkim8JDz/2YdqktS8D1EAM3rEDKhODIMlE3Txgmjia4O21SAdboQ3RtFo1v+KK2XcrzT/UcrEcDb+Dph5ltif+5Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(39860400002)(136003)(346002)(366004)(44832011)(8936002)(66946007)(36756003)(478600001)(6636002)(8676002)(2906002)(8886007)(34490700002)(110136005)(186003)(7696005)(66476007)(6666004)(86362001)(83080400001)(4326008)(52116002)(55016002)(1076003)(316002)(2616005)(966005)(16526019)(956004)(26005)(5660300002)(66556008)(54906003)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: I58RVuIaKs2aSYq3mEYY8+EbuPL9y1Kkum8lDcKHsdh0RcYImz+UqSKLAcLxkuFsegEBAFFHvW6M76sFTgkSYXp26YHffA9Og4b7s2EZSjvkNkJZLfhJz6CeyMQ6jgGqteR7qeE+0ti0E8SWknQKl6/8RhEcFYpFaAd55ARvgpbG42smtOj4eUcK+AqB42iBpU1LfQP3knQ8oJIu+vB4PHdSNG5D2vq/MvmHD8srwToqdSlEXxFqzKfSwiQjmLdldIICiVotufsmWI1QZ/7kHVi0wags6jo+RA8W7M5VCENApvKZQjMk/h4Vzt5Q8GNBd73Zyb99gamHCRWGKtWCSyHX9fXhlX1Dzk7benqNR7Dl7ulz0P0J3PeyHkVvXWD78YvcR3RiMGg98xeN6zwODWnzq4qVugYDLUy4TeWqs0qaIvucTd7waWF8hH6j16PAYFaWcYTYMYvDgr03vuGOjR5DDAxdVhOMyrIcvw89qZBZJ9HoBzM5oqNRkGhCwCUVLiRS5pqdTl0yGweNnAq8SWzBiNtQ5ROqP4UYq03Ugrxu6cLpZMN58PAeYSNkD9O9FNLXGJHG2phSr4pJmGq4XIZ/KdFP6ZUC0TZspHQFSEnccO934F1uYK+9w5vs3neKpB2Y/sLoj4Rqgk49W14enQ== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf997503-d912-4fa0-18d3-08d870e219f5 X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2020 08:12:47.5796 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ilLIqbZNczUfDPtzQQ+68UWk9HjdHZhEbtk4DWvk/tzFJ1ObL34zM2T80PnEhdxp+NxePDufOYzltfCQ4baQsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5836 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201015_041250_014575_C3646090 X-CRM114-Status: GOOD ( 20.44 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.143.124 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Damien Le Moal , Anup Patel , opensbi@lists.infradead.org Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The FW_PAYLOAD_FDT_PATH compile-time option is replaced by FW_FDT_PATH compile-time option which is more flexible and common across all OpenSBI firmwares. This patch removes FW_PAYLOAD_FDT_PATH and updates related documentation to use FW_FDT_PATH. Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- docs/firmware/fw_payload.md | 9 ++------- docs/platform/andes-ae350.md | 4 ++-- docs/platform/shakti_cclass.md | 4 ++-- docs/platform/sifive_fu540.md | 6 +++--- firmware/external_deps.mk | 1 - firmware/fw_base.S | 9 --------- firmware/fw_dynamic.S | 13 ------------- firmware/fw_jump.S | 13 ------------- firmware/fw_payload.S | 25 ------------------------- firmware/objects.mk | 3 --- platform/template/config.mk | 4 +++- 11 files changed, 12 insertions(+), 79 deletions(-) diff --git a/docs/firmware/fw_payload.md b/docs/firmware/fw_payload.md index bc712d2..0947448 100644 --- a/docs/firmware/fw_payload.md +++ b/docs/firmware/fw_payload.md @@ -55,14 +55,9 @@ file. The parameters currently defined are as follows: automatically generated and used as a payload. This test payload executes an infinite `while (1)` loop after printing a message on the platform console. -* **FW_PAYLOAD_FDT_PATH** - Path to an external flattened device tree binary - file to be embedded in the *.text* section of the final firmware. If this - option is not provided then the firmware will expect the FDT to be passed - as an argument by the prior booting stage. - * **FW_PAYLOAD_FDT_ADDR** - Address where the FDT passed by the prior booting - stage or specified by the *FW_PAYLOAD_FDT_PATH* parameter and embedded in - the *.text* section will be placed before executing the next booting stage, + stage or specified by the *FW_FDT_PATH* parameter and embedded in the + *.rodata* section will be placed before executing the next booting stage, that is, the payload firmware. If this option is not provided, then the firmware will pass the FDT address passed by the previous booting stage to the next booting stage. diff --git a/docs/platform/andes-ae350.md b/docs/platform/andes-ae350.md index 5a98707..46889a1 100644 --- a/docs/platform/andes-ae350.md +++ b/docs/platform/andes-ae350.md @@ -19,12 +19,12 @@ Building Andes AE350 Platform ----------------------------- To use Linux v5.2 should be used to build Andes AE350 OpenSBI binaries by using -the compile time option FW_PAYLOAD_FDT_PATH. +the compile time option FW_FDT_PATH. AE350's dts is included in https://github.com/andestech/linux/tree/ast-v3_2_0-release-public **Linux Kernel Payload** ``` -make PLATFORM=andes/ae350 FW_PAYLOAD_PATH=/arch/riscv/boot/Image FW_PAYLOAD_FDT_PATH= +make PLATFORM=andes/ae350 FW_PAYLOAD_PATH=/arch/riscv/boot/Image FW_FDT_PATH= ``` diff --git a/docs/platform/shakti_cclass.md b/docs/platform/shakti_cclass.md index 2f4a699..05c9b3a 100644 --- a/docs/platform/shakti_cclass.md +++ b/docs/platform/shakti_cclass.md @@ -23,11 +23,11 @@ Building Shakti C-class Platform **Linux Kernel Payload** ``` -make PLATFORM=generic FW_PAYLOAD_PATH=/arch/riscv/boot/Image FW_PAYLOAD_FDT_PATH= +make PLATFORM=generic FW_PAYLOAD_PATH=/arch/riscv/boot/Image FW_FDT_PATH= ``` **Test Payload** ``` -make PLATFORM=generic FW_PAYLOAD_FDT_PATH= +make PLATFORM=generic FW_FDT_PATH= ``` diff --git a/docs/platform/sifive_fu540.md b/docs/platform/sifive_fu540.md index 1008432..c9513eb 100644 --- a/docs/platform/sifive_fu540.md +++ b/docs/platform/sifive_fu540.md @@ -29,13 +29,13 @@ DT (device tree) is not backward compatible with the DT passed from FSBL. To use Linux v5.2 (or higher, the pre-built DTB (DT binary) from Linux v5.2 (or higher) should be used to build SiFive FU540 OpenSBI binaries by using -the compile time option *FW_PAYLOAD_FDT_PATH*. +the compile time option *FW_FDT_PATH*. ``` make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=/arch/riscv/boot/Image or (For Linux v5.2 or higher) -make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=/arch/riscv/boot/Image FW_PAYLOAD_FDT_PATH= +make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=/arch/riscv/boot/Image FW_FDT_PATH= ``` **U-Boot Payload** @@ -147,7 +147,7 @@ booti ${kernel_addr_r} - ${fdt_addr_r} QEMU Specific Instructions -------------------------- If you want to test OpenSBI with QEMU 'sifive_u' machine, please follow the -same instructions above, with the exception of not passing FW_PAYLOAD_FDT_PATH. +same instructions above, with the exception of not passing FW_FDT_PATH. This is because QEMU generates a device tree blob on the fly based on the command line parameters and it's compatible with the one used in the upstream diff --git a/firmware/external_deps.mk b/firmware/external_deps.mk index f43ac06..6264005 100644 --- a/firmware/external_deps.mk +++ b/firmware/external_deps.mk @@ -12,4 +12,3 @@ $(platform_build_dir)/firmware/fw_jump.o: $(FW_FDT_PATH) $(platform_build_dir)/firmware/fw_payload.o: $(FW_FDT_PATH) $(platform_build_dir)/firmware/fw_payload.o: $(FW_PAYLOAD_PATH_FINAL) -$(platform_build_dir)/firmware/fw_payload.o: $(FW_PAYLOAD_FDT_PATH) diff --git a/firmware/fw_base.S b/firmware/fw_base.S index 95197da..1d9b375 100644 --- a/firmware/fw_base.S +++ b/firmware/fw_base.S @@ -187,15 +187,6 @@ _bss_zero: la a1, fw_fdt_bin #endif - /* Override previous arg1 */ - MOV_3R s0, a0, s1, a1, s2, a2 - call fw_prev_arg1 - add t1, a0, zero - MOV_3R a0, s0, a1, s1, a2, s2 - beqz t1, _prev_arg1_override_done - add a1, t1, zero -_prev_arg1_override_done: - /* * Initialize platform * Note: The a0 to a4 registers passed to the diff --git a/firmware/fw_dynamic.S b/firmware/fw_dynamic.S index d658011..8b56947 100644 --- a/firmware/fw_dynamic.S +++ b/firmware/fw_dynamic.S @@ -86,19 +86,6 @@ fw_save_info: 2: ret - .section .entry, "ax", %progbits - .align 3 - .global fw_prev_arg1 - /* - * We can only use a0, a1, and a2 registers here. - * The a0, a1, and a2 registers will be same as passed by - * previous booting stage. - * The previous arg1 should be returned in 'a0'. - */ -fw_prev_arg1: - add a0, zero, zero - ret - .section .entry, "ax", %progbits .align 3 .global fw_next_arg1 diff --git a/firmware/fw_jump.S b/firmware/fw_jump.S index afbcec0..8553f8c 100644 --- a/firmware/fw_jump.S +++ b/firmware/fw_jump.S @@ -34,19 +34,6 @@ fw_boot_hart: fw_save_info: ret - .section .entry, "ax", %progbits - .align 3 - .global fw_prev_arg1 - /* - * We can only use a0, a1, and a2 registers here. - * The a0, a1, and a2 registers will be same as passed by - * previous booting stage. - * The previous arg1 should be returned in 'a0'. - */ -fw_prev_arg1: - add a0, zero, zero - ret - .section .entry, "ax", %progbits .align 3 .global fw_next_arg1 diff --git a/firmware/fw_payload.S b/firmware/fw_payload.S index 9805d8c..1ef121e 100644 --- a/firmware/fw_payload.S +++ b/firmware/fw_payload.S @@ -34,23 +34,6 @@ fw_boot_hart: fw_save_info: ret - .section .entry, "ax", %progbits - .align 3 - .global fw_prev_arg1 - /* - * We can only use a0, a1, and a2 registers here. - * The a0, a1, and a2 registers will be same as passed by - * previous booting stage. - * The previous arg1 should be returned in 'a0'. - */ -fw_prev_arg1: -#ifdef FW_PAYLOAD_FDT_PATH - la a0, fdt_bin -#else - add a0, zero, zero -#endif - ret - .section .entry, "ax", %progbits .align 3 .global fw_next_arg1 @@ -102,14 +85,6 @@ fw_options: add a0, zero, zero ret -#ifdef FW_PAYLOAD_FDT_PATH - .section .text, "ax", %progbits - .align 4 - .globl fdt_bin -fdt_bin: - .incbin FW_PAYLOAD_FDT_PATH -#endif - .section .payload, "ax", %progbits .align 4 .globl payload_bin diff --git a/firmware/objects.mk b/firmware/objects.mk index 2eea54c..b2ace75 100644 --- a/firmware/objects.mk +++ b/firmware/objects.mk @@ -48,9 +48,6 @@ ifdef FW_PAYLOAD_ALIGN firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_ALIGN=$(FW_PAYLOAD_ALIGN) endif -ifdef FW_PAYLOAD_FDT_PATH -firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_PATH=\"$(FW_PAYLOAD_FDT_PATH)\" -endif ifdef FW_PAYLOAD_FDT_ADDR firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_ADDR=$(FW_PAYLOAD_FDT_ADDR) endif diff --git a/platform/template/config.mk b/platform/template/config.mk index 7bcf937..f817342 100644 --- a/platform/template/config.mk +++ b/platform/template/config.mk @@ -34,6 +34,9 @@ platform-ldflags-y = # Firmware load address configuration. This is mandatory. FW_TEXT_START=0x80000000 +# Optional parameter for path to external FDT +# FW_FDT_PATH="path to platform flattened device tree file" + # # Dynamic firmware configuration. # Optional parameters are commented out. Uncomment and define these parameters @@ -71,5 +74,4 @@ FW_PAYLOAD_OFFSET=0x200000 endif # FW_PAYLOAD_ALIGN=0x1000 # FW_PAYLOAD_PATH="path to next boot stage binary image file" -# FW_PAYLOAD_FDT_PATH="path to platform flattened device tree file" # FW_PAYLOAD_FDT_ADDR=0x82200000 From patchwork Thu Oct 15 08:12:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1382495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=P5M1GT43; dkim=permerror header.d=wdc.com header.i=@wdc.com header.a=rsa-sha1 header.s=dkim.wdc.com header.b=YNJc3LrW; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-sharedspace-onmicrosoft-com header.b=P40N5F7l; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CBhqL13h6z9sTK for ; Thu, 15 Oct 2020 19:13:01 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2aQsoSZBILOBKth/CPiX6agAZZnaLrNYdSOt+1rALDg=; b=P5M1GT43jOrzdTly5ofmARcNI jd1bC1RHqr6M3GroIk8VeeNOdVJTemeUnTvB9Uj1IwkMQP6mXUHcu10A2Y+5zDwMWlJirpqUw7oQC hjzfNsWSoltIpVDHiDFIpoFw9tOuoM35dR/GclzD57canbvZTJSo/dg7M9bb2BuYd4+2k5zPUn59l mhgpYUV3//Ham0SRPDJJjMbhH+H/rK5UskhJkJcL9eYQRO9nydaSqkwAY3Eu3Me44wIKsNIbk+uwL txgNuoNYWb01wylhJ6+1tNa+ykcrOiPtm8aHZZPfZKgFYH6080/CJrgKZ3ZvMO+1zsP0BXdbOeO8M azptYBDCA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNc-0005Mr-EC; Thu, 15 Oct 2020 08:12:56 +0000 Received: from esa2.hgst.iphmx.com ([68.232.143.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNY-0005L7-6e for opensbi@lists.infradead.org; Thu, 15 Oct 2020 08:12:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1602750005; x=1634286005; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=lF+mxsCyCbyeAEiE7NFBiOEsOzRsM+5lQCFSvWxfhm0=; b=YNJc3LrWwvGeypuzBMYb5eC4f9KWnsnjMzLd99/bpDxx3FlikqMzghf+ 7SxLDmqy3Pz8EzBbLeAWsFBvTQZqgzWB1GuudjcrOnCEFA7DKyOaB9K5X iUIiicKzoj4SoFp/ODnpEewpn2x2MMMFdtcMucCMJy8tPLcAraqYvCAWk HUebtEleUAccJhrFTnFQohaCk1NCPUSqj59o5hFwc3vLkvZom9u0zBleP dLFOYJRtsf7M/XekSxTlk9GNdncQEEgnpBo7IM6O2f8pgFut3uEtPNbi/ 3ldm/e7S0shYEqG02nrLkYOlon3/TZy3SGKGyKDTA4rsOU1DocgF1crLj g==; IronPort-SDR: g5LIfRr+88Tjh9xtp6fTU4itbWIO+wfolrLJsLr5UHSHrJ+zLAI7A3SF5U/O3FpO59fSI4NJ/U MBmA3JPw4Uri3JdUg1rgSDMPFvJ2h2i03zV0iFOu0hBLycanxetwLgC1no/4xLjTOV9iSD6g6e ffYrqEnLg+VATZTPSTz6AaZ6glqMVIl8ISJ8BUJMff61p1n8FVW4+3fiX32X2iv78RxfKydcxx JmOc5+ysRZCQA3vkE0uoDsokEucOk5I5y/CbO+Ym7EhmMGLK+QNQ1mnZXUkcA7KbqrgQqV80Et uVY= X-IronPort-AV: E=Sophos;i="5.77,378,1596470400"; d="scan'208";a="253417270" Received: from mail-mw2nam10lp2103.outbound.protection.outlook.com (HELO NAM10-MW2-obe.outbound.protection.outlook.com) ([104.47.55.103]) by ob1.hgst.iphmx.com with ESMTP; 15 Oct 2020 16:20:04 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QlgMsBn0BDHgbHFhwda0I2zQWS8GEK/wAa5RfHYcm30zU7UXCPlTfJ9/xpys8f5OAtMxpQK78UkMYYC52PNp+yZfS1p8Rog9MZYmWAGum7iP3Uaw8QsPaCIVe1MP2Bon3RUQCvXNYV7qUETzHsmvhvR7QPf/gWpFx/YllXGs6ByJGkS2reZwyIxXQXGOqpmBoQsfag3jx5u2IXnriMnABMDsfw8Ud52Aa+nlR2mUBMO9c5uMLnmFtOBRuXZu3nsHBEny3a8FqjrdJHuzc7Re8hBXI3krcp0i8h13o6KrlVc/r+BfySIsWLwT7zQzDXsEsZoVX2+RNTbUimF2c2YIZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hx5BfvcD0S5yooWzvCy7UZcjfhkKwE6maIfNnTf/eXA=; b=kNHnP737P3d5Kvr7cWkbHKSTjWazaZ6WwfJmnLAgfDttXkyAfzxBcdoz86WDjyqjcc/Kc8pKUkMpJhEWaZwgpKBlQ4zIOjxYDUnDXyKCEQn+G96zjmaF0mNyngw5K5yy1lgEL1zagq30DTvDAUCm8Wrhq3pgPB6xxQFX6FsCupAi6jhTah/O4XVbUkQg+vEcL0mAOYkdPMyj2b6PsMSaPmHxzwTFO5TDau/9vliXbyWyDRtuOif8/TdMC7u82gt7TCejCWvZAGq4Ta5awzEIGEflPpcSdOQ1TpmuUDN3mfcOZDAoQ9eiwSc6L1Ky/0rhLIPf3Pu4hZE5+2WwiwS/XA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hx5BfvcD0S5yooWzvCy7UZcjfhkKwE6maIfNnTf/eXA=; b=P40N5F7lDEhuzn7lEe9haSoECJ7jwaDll2h9UKQ5NUuqt/Lq5tBsscQCl8OtTfL8kPzxnXkEZMHz61ec4aMvbMtInpeh8JQ7gnceu45OeYV8GVAK3w//huDN7dBpmWb7XdADgFEXXAJnmo3bjsffiZq6Hfe0hdOFtig+rbWbcbk= Authentication-Results: wdc.com; dkim=none (message not signed) header.d=none;wdc.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB5836.namprd04.prod.outlook.com (2603:10b6:5:168::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22; Thu, 15 Oct 2020 08:12:50 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd%6]) with mapi id 15.20.3477.021; Thu, 15 Oct 2020 08:12:50 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH 4/5] Makefile: Allow padding zeros when converting DTB to C source Date: Thu, 15 Oct 2020 13:42:10 +0530 Message-Id: <20201015081211.1956554-5-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201015081211.1956554-1-anup.patel@wdc.com> References: <20201015081211.1956554-1-anup.patel@wdc.com> X-Originating-IP: [122.167.44.151] X-ClientProxiedBy: MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (122.167.44.151) by MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Thu, 15 Oct 2020 08:12:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fcb7bbf5-1e66-4a03-a564-08d870e21b9b X-MS-TrafficTypeDiagnostic: DM6PR04MB5836: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:275; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5BNob6Vyk6CMiHbFWYkLmbHxVLJwWjaj28OYUqRoZIQbMdxM7Nw+mzlbhLXkE/dKnS5C+PQ2iG1lEFN+PHRep9sdPE8xd3nIyWzz6vV0deMkQ3b5iVMbeh/n6riQhcMBZkZt/vJgv14A2uQBNSV8IgvdHBFsbUhJg34Wn5pBRzf+fYGXDAAhvRGKs/qBeLbIs5NoYxePdaZGVtx5k6XxMPo6ZF0aAD6sxBAFQe8vlnl0lZqrDp0k7DCTVm+Q2s2qfGNx84k6tg6tOpgJEtT6FJ9TkgNH8SwiSl+SEb1JTGsokAwgapvEI0SP2AjCxFXZSodx9yO1Hvp2oboyqZ/7CvUyPLJtTZeN75lvmr4/JIeDDaHk0AgWI4fgquFW26YN X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(39860400002)(136003)(346002)(366004)(44832011)(8936002)(66946007)(36756003)(478600001)(6636002)(8676002)(2906002)(8886007)(34490700002)(110136005)(186003)(7696005)(66476007)(6666004)(86362001)(4326008)(52116002)(55016002)(1076003)(316002)(2616005)(16526019)(956004)(26005)(5660300002)(66556008)(54906003)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: DevQZ+ddf7s5HcUy1FHkIdg0lx9VO9xHIW901f9zSEvPzJrIsOnRr4aU7X+Rm0+6H/LjfUfM1OEQENOdUFRSqIXiSM1kHb2+U6hkx0e060NL5UX249tiSAbAX5xz7CznjWStWLKvrUdf1MVVHg2tzv4+Hz/J1T9ZDbQHCojfhrwuAXmIEqELkzXwvVzoABv2Ox1qTBHMbYikh047gXfTCtgMjcBbeX/sxUrDHhwbDoCAIfOghblZuSbqCXx6tF3UqT06sCZ2vBGZUkoj+0t2CH0j22qRUABr50q0gZleSOuG41wrxUH1L8e5SU3DT4iU8YggOG8o0CP91N6ehbIN2UztaF70FO0jvCF/FyRMDJBOsywprmT8eTdc3Fb8yRUxX+ja7PodzIXaj+HwtbNlJyEF3avK67cg5l/Tu///3T8IHMiS6mCnc1Zf88PxZk4euRkeD4kEyUnshyvXwWzeFQO+zmqOzJxXvna3DMCFTHlxlHcohfeMknPRkAldeJ97QaqWdkzGGQLxwvo+MA2X7S8AGIaWa2Um/NEzyMR7RrkhoR9jTbFOZnqQPfw6/30GxM7msTHcDJy0qULFqof2JpSvdpEKLKuo09z92DjRL//6XppQywv6Wg05yw8qj8Et3ss8GICf+apxHg/k0G7zWg== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: fcb7bbf5-1e66-4a03-a564-08d870e21b9b X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2020 08:12:50.2949 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PlJXw1BRcR6irqOYMeG8tv7f90FBAIoOE5Vq3UGOrVWZLJa5BpWD0zlb2e7xCbedUplKGlPMKYCGG3EVnrtXLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5836 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201015_041252_375342_3B45C5E6 X-CRM114-Status: GOOD ( 14.21 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.143.124 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Damien Le Moal , Anup Patel , opensbi@lists.infradead.org, Heinrich Schuchardt Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Heinrich Schuchardt We extend d2c.sh to allow padding zeros in output C source when converting DTB to C source. Using this feature, platforms can create extra room for in-place FDT fixups on built-in DTBs. Signed-off-by: Heinrich Schuchardt Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- Makefile | 7 +++++-- scripts/d2c.sh | 9 ++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6c36f09..a231881 100644 --- a/Makefile +++ b/Makefile @@ -291,7 +291,10 @@ compile_dts = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ $(CPP) $(DTSCPPFLAGS) $(2) | $(DTC) -O dtb -i `dirname $(2)` -o $(1) compile_d2c = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ echo " D2C $(subst $(build_dir)/,,$(1))"; \ - $(src_dir)/scripts/d2c.sh -i $(4) -a $(3) -p $(2) > $(1) + $(if $($(2)-varalign-$(3)),$(eval D2C_ALIGN_BYTES := $($(2)-varalign-$(3))),$(eval D2C_ALIGN_BYTES := $(4))) \ + $(if $($(2)-varprefix-$(3)),$(eval D2C_NAME_PREFIX := $($(2)-varprefix-$(3))),$(eval D2C_NAME_PREFIX := $(5))) \ + $(if $($(2)-padding-$(3)),$(eval D2C_PADDING_BYTES := $($(2)-padding-$(3))),$(eval D2C_PADDING_BYTES := 0)) \ + $(src_dir)/scripts/d2c.sh -i $(6) -a $(D2C_ALIGN_BYTES) -p $(D2C_NAME_PREFIX) -t $(D2C_PADDING_BYTES) > $(1) compile_gen_dep = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ echo " GEN-DEP $(subst $(build_dir)/,,$(1))"; \ echo "$(1:.dep=$(2)): $(3)" >> $(1) @@ -361,7 +364,7 @@ $(platform_build_dir)/%.dep: $(platform_src_dir)/%.dts $(call compile_gen_dep,$@,.o,$(@:.dep=.c)) $(platform_build_dir)/%.c: $(platform_build_dir)/%.dtb - $(call compile_d2c,$@,$(platform-varprefix-$(subst .dtb,.o,$(subst /,-,$(subst $(platform_build_dir)/,,$<)))),16,$<) + $(call compile_d2c,$@,platform,$(subst .dtb,.o,$(subst /,-,$(subst $(platform_build_dir)/,,$<))),16,dt,$<) $(platform_build_dir)/%.dtb: $(platform_src_dir)/%.dts $(call compile_dts,$@,$<) diff --git a/scripts/d2c.sh b/scripts/d2c.sh index 821a995..33a3ccf 100755 --- a/scripts/d2c.sh +++ b/scripts/d2c.sh @@ -9,6 +9,7 @@ function usage() echo " -i Input binary file path" echo " -a Output C array alignment" echo " -p Output C array name prefix" + echo " -t Output padding zero bytes" exit 1; } @@ -16,8 +17,9 @@ function usage() INPUT_PATH="" OUTPUT_C_ALIGN="" OUTPUT_C_PREFIX="" +NUM_ZERO_BYTES=0 -while getopts "hi:a:p:o:" o; do +while getopts "hi:a:p:t:" o; do case "${o}" in h) usage @@ -31,6 +33,9 @@ while getopts "hi:a:p:o:" o; do p) OUTPUT_C_PREFIX=${OPTARG} ;; + t) + NUM_ZERO_BYTES=${OPTARG} + ;; *) usage ;; @@ -62,6 +67,8 @@ printf "const char __attribute__((aligned(%s))) %s_start[] = {\n" "${OUTPUT_C_AL od -v -t x1 -An ${INPUT_PATH} | awk '{for (i=1; i<=NF; i++) printf " 0x%s,", $i; printf "\n"; }' +echo __dummy__ | awk "{for (i=1; i<=${NUM_ZERO_BYTES}; i++) { printf \" 0x00,\"; if (i % 16 == 0) printf \"\n\"; } }" + printf "};\n" printf "const unsigned long %s_size = sizeof(%s_start);\n" "${OUTPUT_C_PREFIX}" "${OUTPUT_C_PREFIX}" From patchwork Thu Oct 15 08:12:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1382496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=DZitxrTx; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=j2kYfElf; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-sharedspace-onmicrosoft-com header.b=LNQRe9tp; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CBhqM6LzTz9sTL for ; Thu, 15 Oct 2020 19:13:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0+hD1mbXv4xUTKwa0R16VVN0kWT9EtMU06oI87D3Rsw=; b=DZitxrTxg2ONl/1M1No2qSE7z BFux+66Rc44ME1bjQjRYi+PJdKJVY+GqtwW0x7HnNGvrGkqlfDYJbiLaZM2DTTYKediag2VieNV13 3QwGs7cRp30Os4oGfFvZ+QT/wuHKpt3PGdCT7+NhuURx5W/V7l31+0bHFhZNqGDtcTialrK9Ush5O C0ipJNnHQ2rv3Renoftt2cYC7xq1L5JlEmlXMdLHhiehx7MMZqe9pxGNi5YUkST/MMm+LwVjmSrJH vzAQSgz4jhHSRpH3dKOD2+4qFUu90SOjn4HMDpbqb0PDF7q1TvcFtXUGfb+Qsti0B9m4IFmormEDS sEgBGl5sQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNe-0005NV-LP; Thu, 15 Oct 2020 08:12:58 +0000 Received: from esa5.hgst.iphmx.com ([216.71.153.144]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSyNa-0005Lz-UY for opensbi@lists.infradead.org; Thu, 15 Oct 2020 08:12:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1602749575; x=1634285575; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=Fa8Nd2jjcHXFM7lEPvPRXAD2aXNi0pcJilWiK+dr4dU=; b=j2kYfElflxkbtYkFj3vjJNVluaJMwY1a+Na6v3fQVsrjJuaYFuK2xyEr KaRO4wmTo5fsXbwtVbXl0PA1rBOTEP9WJI6jT8N4mFrSOQ1sKFoYALDuu 5pq8+93v4Mj5mLncf40ictbXZFkEYO6t+kD+1LIyoBquUv2r1oYvxnqdJ AitmHbYiVngfhYNmfQM+bsZgo65st0YdIDqdb8CBHzunxgk2FzKfgb48X CWjAt76DSNWW+tntLPXJeg/fsTi248VWgUepcbHg6rVeTi0ENLHWO6nry YQPpaaBMdzqF5z8zL9dYA+cNgIbf3TMPMBv9KIy49IpVRviuzybw1FAj/ Q==; IronPort-SDR: wRiSLm4VLCKOQ/J3++GFWXTxrmuse7t0ZyukmOkPHlAxmyFJqB4XmIvs6l55VGkKUKCftGyXCv Od470rawMG+fea2H6ME1umLCwXjty2b15aFiTrmtjPwU5zFsJFLPZ3DWXx1Rbo1ltyfDNs/EqW rwL+40EqDoHhBtdEWipX7QL6nSRTrT/fg+2xie5j1cqyNH2twkmHG1NdwSAtFphpSTlHZYCHd+ TmWFQ6JlJFf3oIIA87S0ubAONv8CTAM8IsVSZBwv2ItJjBxl+Joqr/ua3plFoV8hHIEhkLMaY8 bCY= X-IronPort-AV: E=Sophos;i="5.77,378,1596470400"; d="scan'208";a="150014548" Received: from mail-dm6nam12lp2172.outbound.protection.outlook.com (HELO NAM12-DM6-obe.outbound.protection.outlook.com) ([104.47.59.172]) by ob1.hgst.iphmx.com with ESMTP; 15 Oct 2020 16:12:54 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LkzsbhUCOXdGicVOoy5x/CL3VFOveyQM+tE0uWEk/FINiPb0mEYbYXwWQ9ftau4CnaMEAoB49WJnMZMrO6OdmhuFR6uxmSBpT1bUwhZrWzd6MvAWrpuDpSyWijdkhKDU3x1pS88pUIksOhUyA5fUcsYJrdEu1FXUAKzBGwE4xSAy3yki1pRb7Do78FJw/S3YHH1/GkE0Js8CHutlPyegntSNVr9JYKd3i8fciPxkv4WkyMvPmL4wPQyNDUKi5IXOEYwRbPT5fsTGpf5zDPT6isSf5gY4qAlsMsfbhZKLQ18oDyIEbxUSLj9MqA1s9scbhABP2QWOTEDIYyGqUJtf9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UtYtgIsV2H9JoloPtIdAl//wou/o3HjC5EEbDP+sMrs=; b=LVzyRrJKo+awUWlWLww6Qeuo95dO4vZg7cFZDWZhjOPOCHdinMooTFHOEsma+gjHBiRr11xXPw+vboltgFDQOOnXOFV1XiSkDDvvHZFIAolYMwSr9Hf4//zfDqzeRtSm6z9F0xJxKGV9u41cAc63elHfsz0fV6KjwABHrFDlzcHH5URwBfwqbH9hF+Q4H359KUur8ezfJaJbMddoqFuARh7wfo1cmV+JDbzniKghsddjubzAlz2T2Nx66gcSRTJ5N8yEFBbWyNMWEFn3NXfWj7k61NRaFPHn4He2iDOg50olJ07bLlvF9rastVe4P6ZpgTVpawKit7G6UlU7RFMFoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UtYtgIsV2H9JoloPtIdAl//wou/o3HjC5EEbDP+sMrs=; b=LNQRe9tpF5YqJO8a9LaaoskkBl/w0GqIdV9PzZCHESq89wEz7BGq+gjH0u85ovWiqkpXoduZZhqza1tW2cLmQzeunAnAAZjAWWLUTGw4x95k0CeULsnGVdwQ3+6cD0JvPGPGOiuaZlKSWrOmTmCJreY8hDLp3bGzEInZi4Cvkpo= Authentication-Results: wdc.com; dkim=none (message not signed) header.d=none;wdc.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB5836.namprd04.prod.outlook.com (2603:10b6:5:168::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22; Thu, 15 Oct 2020 08:12:53 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::d035:e2c6:c11:51dd%6]) with mapi id 15.20.3477.021; Thu, 15 Oct 2020 08:12:53 +0000 From: Anup Patel To: Atish Patra , Alistair Francis Subject: [PATCH 5/5] platform: kendryte/k210: Add some padding for FDT fixups Date: Thu, 15 Oct 2020 13:42:11 +0530 Message-Id: <20201015081211.1956554-6-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201015081211.1956554-1-anup.patel@wdc.com> References: <20201015081211.1956554-1-anup.patel@wdc.com> X-Originating-IP: [122.167.44.151] X-ClientProxiedBy: MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (122.167.44.151) by MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Thu, 15 Oct 2020 08:12:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7ee8bf0d-95cd-44f6-4f6c-08d870e21d1b X-MS-TrafficTypeDiagnostic: DM6PR04MB5836: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MpPijdn8b6QidFNQF0kxVYzfS+G9olLqefnp5p0Qe65OWXhL8WWDIlO6V1HjwDFGak0LktL5mrmSXtSm62IKuwJdlNzgsHEKDpW/1Csyc4oVv+Mt+WQS3mhVwaxoC9Cm+28Y5uMQsI3VLJLKDT9TrgB9MTwRkef+iThL+v7DAiWLzBML0sQZW7tDALAzALQBuHICwEY3MDhORtXbtVOwPOtbOVhTPm+NE2luErFDGRpp9ASgw6rNpU+ATAe/aFVZUbme0cikqkCrsrSDAazKp5y+UovW8hvwzHmDJWskMe23RhDDYm1Pv1eOd+JKbNs/11fsrS6ApMiIRh6Zlpin3P/nR/it3qx+XUKtqVN6Vh+A1XzJOoLFMcNon1vQzhoz X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(39860400002)(136003)(346002)(366004)(44832011)(8936002)(66946007)(36756003)(478600001)(6636002)(8676002)(2906002)(8886007)(4744005)(34490700002)(110136005)(186003)(7696005)(66476007)(6666004)(86362001)(4326008)(52116002)(55016002)(1076003)(316002)(2616005)(16526019)(956004)(26005)(5660300002)(66556008)(54906003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: oX/Bts2WTmX5nCPoaAPvyQ2NPir2+IJM4Sbsxh32agiFdpa9e7EEWSDWxwFy13NIOf90rYwFSRhifjgo+GfO/zM0fb6EWrZH9yMmd3DS8JGSEElLSEwFMST88C0PEcB1gm7bYQ8lbt1ydRLUb0DP3eM3/Jg4oETWjf2Ho8yDqfHz6kRze0B4bKYcdvsM32AoVfBNkfGZ7eRxaLtEchD9M3O3YXmrYdrAUtdBRQ0Lvp4n93U67R75yy/Gym5WXumbjyPNW2Td1hX6cnnj8Qo1mCGPxmmOZAhW2nqUQMS/JnPZtHAFhuEY/HpwNvdzIGB4TDMBMIx7OK2vjV+3mzl+p0BGFevMjz8DWZ9Jt5hdS+mWmJ3A2G3bwMJ+0TBBStCCyb0xxBQ09rNU0hxYL8PMSuWoP3Ty8I1R4R8M43oUXaWBhtXHWtMcAOPVQ4iKG/tBA061CJe7XJrHOhNbtk2Tpqwb1qD4v9cfqhxDvvmFAANOVwx43OHWLYi3erUWsAzAfFJp5YYih+CuMeQ1k0DURAa1uENfn1+4GduMTWFTMmHze8HFsdbCplPQtYNBUvxddL2B61Hp3l6W2aN2Og2vi3/pKVU+n8YWa6G7V8gopKLixPm4qSPiHUDJdzUqrL2+wSbkcJHIW4hW64kTsZs5JA== X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ee8bf0d-95cd-44f6-4f6c-08d870e21d1b X-MS-Exchange-CrossTenant-AuthSource: DM6PR04MB6201.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2020 08:12:53.0940 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Qms7wgxB2kR8N3PZkIoyFKiWg3EOoaqxW/P+Yx+0Bo/AqCIr7pgdzb/LRqdIOxLnRNTqaU15yiLGNRINclYVMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5836 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201015_041255_181312_B0FCB123 X-CRM114-Status: GOOD ( 14.40 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [216.71.153.144 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Damien Le Moal , Anup Patel , opensbi@lists.infradead.org Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The Kendryte K210 platform has built-in DTB and does not provides FW_PAYLOAD_FDT_ADDR. This means the FDT fixups will be done on the built-in DTB in absence of FW_PAYLOAD_FDT_ADDR. This patch adds some padding in built-in DTB for FDT fixups. Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- platform/kendryte/k210/objects.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/kendryte/k210/objects.mk b/platform/kendryte/k210/objects.mk index 106f9f2..b74da74 100644 --- a/platform/kendryte/k210/objects.mk +++ b/platform/kendryte/k210/objects.mk @@ -11,3 +11,4 @@ platform-objs-y += platform.o platform-objs-y += k210.o platform-varprefix-k210.o = dt_k210 +platform-padding-k210.o = 2048