From patchwork Wed Sep 16 08:48:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1365063 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=MgHKqAqe; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4Brv0D61gRz9sSC for ; Wed, 16 Sep 2020 18:48:58 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ECD0B81260; Wed, 16 Sep 2020 10:48:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="MgHKqAqe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2872C822DB; Wed, 16 Sep 2020 10:48:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 04C28801D8 for ; Wed, 16 Sep 2020 10:48:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x641.google.com with SMTP id i26so9135916ejb.12 for ; Wed, 16 Sep 2020 01:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J0gJPoFbjOiuW4OVQP+FDA3uemESnuwZMrTYCGYV4Ik=; b=MgHKqAqe4uyH5pIKOzUwq7BGpkWyOSIy69aIAh3XoQvIlWtYrxmL5CTgtIlebGRe2A 3RU1jTNi7Ys5pdUbNLs/AIu8tWqxDc0Uq4jUz1+kANHCZZCAg+OkZBr57kVjOHmp5KYy FW6cMyBbts/MfYm5eo6edHfuAKc3zop4L9R2d0o4ewtj2gYS7216P0jOg1oO+ySiAwom h6HGtFh+utQhPla2swJEObqAqo14vlYNjXCjJDTBJo5B8Ji6nJPnp676i5GoH1HI8qLH SwLEZebOWekdKgQVhWYAfyiHz39ppWO9SyozXMwsiSdbJUT/1/mdsZKZwSGADqhELimy +6dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=J0gJPoFbjOiuW4OVQP+FDA3uemESnuwZMrTYCGYV4Ik=; b=DlYt+Xv6WdnOSHEoKFUtklfo3PLcxX3UnkUVRzs7DABQ5CoHLyN1qFIqOF3jTPz4oE qUOs2aPnmiGbEYT0XijywkATrgEh+c86AU+pZUVLAH3/WKXaB+eV6AvE8zRBW4xt/U7m MjsUgLV+3UEchox0g2/IOGI4S86dARRTy4LWfSmYyiXoB4Zh+TO2A34/d+UJBC/AW2fR TypClimFkwTjVUzKZdfpsKQN5pwAEibyRTOaOpKxdu/R3CfZyxGbvB5f1INtwhKmOksX sCYykDh7MTt1VQ68F2bUN3/RzzMqdW6vDHX+Eu9hCMvE0V58pXmGdYAO/WMWD6+Ocri8 YTVQ== X-Gm-Message-State: AOAM5311bci1LdcV1m1NtJC5FazyZ4xvVW8Oelbkuq8r0YoFbWWB4ZGS 1CTLjuA0b2ipZW1YPetcYYh5WAH8NiPpQw== X-Google-Smtp-Source: ABdhPJw7zcIGXJ1tFJxUlAIpbJclrp/2Rp5iD0QYlLlcQmeTTsUFbLxwFU647TQRla+V7ZeBnLNeEA== X-Received: by 2002:a17:906:6682:: with SMTP id z2mr25482452ejo.434.1600246124311; Wed, 16 Sep 2020 01:48:44 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id o6sm13651412edh.40.2020.09.16.01.48.43 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Sep 2020 01:48:43 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: T Karthik Reddy , Abhishek Shah , Patrice Chotard , Simon Glass , Vladimir Olovyannikov Subject: [PATCH] cmd: pxe: Add relocation to pxe_sub cmds Date: Wed, 16 Sep 2020 10:48:42 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: T Karthik Reddy pxe sub commands need to be manually relocated for architectures which enables MANUAL_RELOC as Microblaze. Signed-off-by: T Karthik Reddy Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- cmd/pxe.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmd/pxe.c b/cmd/pxe.c index 6372fc987187..46ac08fa3a03 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -212,10 +212,24 @@ static struct cmd_tbl cmd_pxe_sub[] = { U_BOOT_CMD_MKENT(boot, 2, 1, do_pxe_boot, "", "") }; +static void __maybe_unused pxe_reloc(void) +{ + static int relocated_pxe; + + if (!relocated_pxe) { + fixup_cmdtable(cmd_pxe_sub, ARRAY_SIZE(cmd_pxe_sub)); + relocated_pxe = 1; + } +} + static int do_pxe(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct cmd_tbl *cp; +#if defined(CONFIG_NEEDS_MANUAL_RELOC) + pxe_reloc(); +#endif + if (argc < 2) return CMD_RET_USAGE;