From patchwork Fri Oct 10 13:49:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 398570 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 664261400AB for ; Sat, 11 Oct 2014 00:49:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4E322A7476; Fri, 10 Oct 2014 15:49:55 +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 rPooyZkByMDv; Fri, 10 Oct 2014 15:49:54 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0D9B04C092; Fri, 10 Oct 2014 15:49:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 59A44A746C for ; Fri, 10 Oct 2014 15:49:44 +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 m2qyHZp1NrE1 for ; Fri, 10 Oct 2014 15:49:44 +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-vc0-f201.google.com (mail-vc0-f201.google.com [209.85.220.201]) by theia.denx.de (Postfix) with ESMTPS id 0DF10A73EB for ; Fri, 10 Oct 2014 15:49:40 +0200 (CEST) Received: by mail-vc0-f201.google.com with SMTP id hq11so332784vcb.2 for ; Fri, 10 Oct 2014 06:49:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=idMAoi1FcuBPxP7Wzz+rem84whKGOvJZUow63uKeokg=; b=aLXobCuJ2+TD0Gf/gEs0SM6drfvGqEE+LY4AnWnmrqSOhkF73vq6I4AqaFuxrQ4NKY rAJMPDfTcIB/xvtcrXe/OIyey+c+x/SSj446EndvRbGh1g6452a+sC5wWmJ1v7lvg4cQ 55n5uzjlUi1jDtbLfVJ7U7GBTHGHbU0IWHXZoDvZOEfoK+ebWIeSRkv6cRkHipOXbRuC O/jAI/imN1aRdehz3ZorXrYlPrvB+NGrGFsFK2TA+bRmKt7J9IVT0Du2khBJx+N/IxBL 0+TEOTNsEBSBSuVuyiAYss8wtDwtvbAPil7FNf0aEw6gGrSOnG4WVAEZ8ZNuKf6Iy9CP ZnIg== X-Gm-Message-State: ALoCoQnrb2VeAXu5+VOjDKp38a7p8Ux/zuS7YaXsyKNAj3TQ40kcgt3/PqAudBCcPgjM87wenod7 X-Received: by 10.224.28.68 with SMTP id l4mr3139962qac.2.1412948979085; Fri, 10 Oct 2014 06:49:39 -0700 (PDT) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id t28si323254yhb.4.2014.10.10.06.49.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Oct 2014 06:49:39 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id mXLBxAa6.1; Fri, 10 Oct 2014 06:49:39 -0700 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 5A3C92213D2; Fri, 10 Oct 2014 07:49:38 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Fri, 10 Oct 2014 07:49:16 -0600 Message-Id: <1412948960-11941-5-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1412948960-11941-1-git-send-email-sjg@chromium.org> References: <1412948960-11941-1-git-send-email-sjg@chromium.org> Cc: Graeme Russ Subject: [U-Boot] [PATCH 4/8] dm: x86: Support pre-reloc malloc() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add support for this by reserving a block of memory below global_data. Signed-off-by: Simon Glass --- arch/x86/cpu/start.S | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index 71cab22..338bab1 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -97,6 +97,13 @@ car_init_ret: /* Reserve space for global descriptor table */ subl $X86_GDT_SIZE, %esp +#if defined(CONFIG_SYS_MALLOC_F_LEN) + subl $CONFIG_SYS_MALLOC_F_LEN, %esp + movl %eax, %edx + addl $GD_MALLOC_BASE, %edx + movl %esp, (%edx) +#endif + /* Align temporary global descriptor table to 16-byte boundary */ andl $0xfffffff0, %esp