From patchwork Fri Dec 14 21:13:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 206564 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 14B502C0093 for ; Sat, 15 Dec 2012 08:15:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2A9034A14A; Fri, 14 Dec 2012 22:15:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 54WluIrZN3pe; Fri, 14 Dec 2012 22:15:55 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 60D5D4A188; Fri, 14 Dec 2012 22:15:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EF4D84A14A for ; Fri, 14 Dec 2012 22:15:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 4iqtOfkqa7ch for ; Fri, 14 Dec 2012 22:15:13 +0100 (CET) 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-we0-f202.google.com (mail-we0-f202.google.com [74.125.82.202]) by theia.denx.de (Postfix) with ESMTPS id 06C924A173 for ; Fri, 14 Dec 2012 22:15:08 +0100 (CET) Received: by mail-we0-f202.google.com with SMTP id t57so206055wey.3 for ; Fri, 14 Dec 2012 13:15:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=QtNKi/5xTEFvZXq7wZMRZwLvLxND/d2QilGvRqm9X5Q=; b=Q0lAfjQe5uvH7H7MoHGuNbCcjAORD4fNWoIPO5xQA32PTmywdFcidzghYZ14zALPBB qZsJ1xFs7/0WRTsZ3NOMU55ucdaiPk04pH349otFZhtmHTNz3AGV4BkwlqTLbw0NdYkw wLqTePcizwtSI3ge6wuRmjEPU3AkDjjgz4i0Jgsbm0futH32l3gLRLmS8FslNbt5Va+S u7ZJNwQWRxhuEEYkH2jv9b8X6IPaanhqhTORQOja50uq0jjUYsiMKebn5jyiaMJXg8nk R62XiBpooW6+lfa55GPYuMi1JSra7jPDXn5d27OCCuT69KfVgRq/mx21IHIrmPj8d2Hw Ct1w== Received: by 10.14.180.2 with SMTP id i2mr6736569eem.1.1355519706941; Fri, 14 Dec 2012 13:15:06 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id z44si1457588een.0.2012.12.14.13.15.06 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 14 Dec 2012 13:15:06 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 877C9200061; Fri, 14 Dec 2012 13:15:06 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id DC3DD160380; Fri, 14 Dec 2012 13:15:05 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Fri, 14 Dec 2012 13:13:07 -0800 Message-Id: <1355519594-5694-3-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1355519594-5694-1-git-send-email-sjg@chromium.org> References: <1355519594-5694-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkmoP8MW5i6/H2qirxpEHtKgeVhgq6kmH7nijq0QbAMe1p9fWHRnrBwiv8dDJpqNoQ7vE01rLyCIlW6jMg+w1QtH3JKkGayCmLjiCY6QECp1fUwxCYQR9ATq4hxjDLSkn8GVuZmOigjzY8+tscqNeG+uRqXkkx6ZcQ8YnlnG7XkVybdvyCSs78BUXbURrX/zhFwiTNj Subject: [U-Boot] [PATCH 03/10] x86: Permit bootstage and timer data to be used prior to relocation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 It is useful to be able to access the timer before U-Boot has relocated so that we can fully support bootstage. Move the relevant variables to the data region to support this. Signed-off-by: Simon Glass --- arch/x86/cpu/coreboot/coreboot.c | 4 ++-- arch/x86/cpu/interrupts.c | 2 +- arch/x86/lib/timer.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c index 9c9431e..22474f5 100644 --- a/arch/x86/cpu/coreboot/coreboot.c +++ b/arch/x86/cpu/coreboot/coreboot.c @@ -68,8 +68,8 @@ int board_early_init_r(void) void show_boot_progress(int val) { #if MIN_PORT80_KCLOCKS_DELAY - static uint32_t prev_stamp; - static uint32_t base; + static uint32_t prev_stamp __attribute__((section(".data"))); + static uint32_t base __attribute__((section(".data"))); /* * Scale the time counter reading to avoid using 64 bit arithmetics. diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c index dd30a05..60ae950 100644 --- a/arch/x86/cpu/interrupts.c +++ b/arch/x86/cpu/interrupts.c @@ -626,7 +626,7 @@ asm(".globl irq_common_entry\n" \ */ u64 get_ticks(void) { - static u64 tick_base; + static u64 tick_base __attribute__((section(".data"))); u64 now_tick = rdtsc(); if (!tick_base) diff --git a/arch/x86/lib/timer.c b/arch/x86/lib/timer.c index a13424b..6303ca5 100644 --- a/arch/x86/lib/timer.c +++ b/arch/x86/lib/timer.c @@ -37,7 +37,7 @@ struct timer_isr_function { static struct timer_isr_function *first_timer_isr; static unsigned long system_ticks; -static uint64_t base_value; +static uint64_t base_value __attribute__((section(".data"))); /* * register_timer_isr() allows multiple architecture and board specific