From patchwork Wed Jul 22 15:49:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 498662 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CE8001402AE for ; Thu, 23 Jul 2015 01:54:20 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=CYnUuxq1; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 472EE4B93A; Wed, 22 Jul 2015 17:52:56 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id niDwL078X2-e; Wed, 22 Jul 2015 17:52:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 10BAD4B8D5; Wed, 22 Jul 2015 17:52:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 422804B7CC for ; Wed, 22 Jul 2015 17:51:05 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ad70-n18weuG for ; Wed, 22 Jul 2015 17:51:05 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ig0-f179.google.com (mail-ig0-f179.google.com [209.85.213.179]) by theia.denx.de (Postfix) with ESMTPS id D82614B7D1 for ; Wed, 22 Jul 2015 17:50:50 +0200 (CEST) Received: by igr7 with SMTP id 7so71651718igr.0 for ; Wed, 22 Jul 2015 08:50:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=vatFd8PrvO2WDLS5qbfXuVVe+AF9DLXyVu8cabxOOQ8=; b=CYnUuxq1WZ9lGcaa7bGUOzvN5HHKzFJir4a0naqYhWQRsHttPRCJTW58dZj7WOrFb1 yX+JXjrQHQEJI2c69JkCIf5jg1ZiMRlVc6dicCyrffaL4XCWoL7z68q4o2fmK5OmCpZj R3FKxWcBh2hYX3UI4c7GwfPtVSvQjUd5J9aBQGbnN0BO6CWxsua6qOd+b4o4gYejcbWA ELQW0NVMqepHuH56ijTab2eIOEh5Y/OhBU/pBr0B5T3+acd28Xh2W467PyjT/NnyYVJh BOh8ff9KkIa0Ea1ZKBwNpktu8DV0RROHfwdisJCOLOKWQMBFHkiGcpi9lhiBHk9bvLP5 vQBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=vatFd8PrvO2WDLS5qbfXuVVe+AF9DLXyVu8cabxOOQ8=; b=FHeFg0VOH5xxKyFTg0iPXzSKqdN/1jPSvTwQe2cZHoOCmhc/k/xQB0XbuIisSpRCEN 4NOAE5gu6+vaO/DiudbJ7xV5zFzc5D2bGFd37tvsCa0kMtrPr4B+XmtF5mJD/VVZldyo H+Qbt62aGEwxNY+MN/C7zcp5a+/mOzbu9Q/kszazdP9rKzaaB028f0YnohJDBbxCCx/F j8pnWr5QbwfEvSNgct+OVbVEM4aX+7MagTc2XMTnYEFAtIglLmC9M5XRJpb/JO1fdXW8 Kaft723m4KMLdS5X5n98/775bAObShL7X8B38Z3hm1VwXgXJRwgqVBVa1T2Pd/8fZHzH pnBg== X-Gm-Message-State: ALoCoQkacMLE279RQzgqpiKUojkYrqjrnn8tDlwHNkHhCtnocl41JWykkAaTFJobaH0bMG82g4CJ X-Received: by 10.107.151.75 with SMTP id z72mr5969110iod.46.1437580249342; Wed, 22 Jul 2015 08:50:49 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id k203sm1043570ioe.42.2015.07.22.08.50.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 08:50:49 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 496302212C6; Wed, 22 Jul 2015 09:50:43 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 22 Jul 2015 09:49:09 -0600 Message-Id: <1437580180-6405-18-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.4.3.573.g4eafbef In-Reply-To: <1437580180-6405-1-git-send-email-sjg@chromium.org> References: <1437580180-6405-1-git-send-email-sjg@chromium.org> Cc: Tom Rini , Ben Stoltz , Stephen Warren , "angelo@sysam.it" , Alexey Brodkin , Sonic Zhang Subject: [U-Boot] [PATCH 17/48] efi: Avoid using non-existent text base X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Ben Stoltz When U-Boot runs as an EFI application is does not have a definition of CONFIG_SYS_TEXT_BASE. U-Boot is a relocatable application and the relocation is done by EFI. U-Boot can be loaded at any address. This is similar to how sandbox works. Adjust the early board init to deal with this. Signed-off-by: Ben Stoltz Signed-off-by: Simon Glass --- common/board_f.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 5e09c5f..ad5500f 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -144,7 +144,7 @@ static int init_baud_rate(void) static int display_text_info(void) { -#ifndef CONFIG_SANDBOX +#if !defined(CONFIG_SANDBOX) && !defined(CONFIG_ARCH_EFI) ulong bss_start, bss_end, text_base; bss_start = (ulong)&__bss_start; @@ -267,7 +267,7 @@ static int setup_mon_len(void) { #if defined(__ARM__) || defined(__MICROBLAZE__) gd->mon_len = (ulong)&__bss_end - (ulong)_start; -#elif defined(CONFIG_SANDBOX) +#elif defined(CONFIG_SANDBOX) || defined(CONFIG_ARCH_EFI) gd->mon_len = (ulong)&_end - (ulong)_init; #elif defined(CONFIG_BLACKFIN) || defined(CONFIG_NIOS2) gd->mon_len = CONFIG_SYS_MONITOR_LEN; @@ -975,7 +975,8 @@ void board_init_f(ulong boot_flags) if (initcall_run_list(init_sequence_f)) hang(); -#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) +#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \ + !defined(CONFIG_ARCH_EFI) /* NOTREACHED - jump_to_copy() does not return */ hang(); #endif