From patchwork Tue May 28 20:59:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 2626271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id EFB563FDBC for ; Tue, 28 May 2013 20:59:46 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhQze-0002zG-So; Tue, 28 May 2013 20:59:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhQzc-0006ax-8u; Tue, 28 May 2013 20:59:40 +0000 Received: from mail-qe0-f46.google.com ([209.85.128.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhQzZ-0006aB-PN for linux-arm-kernel@lists.infradead.org; Tue, 28 May 2013 20:59:38 +0000 Received: by mail-qe0-f46.google.com with SMTP id 1so4469956qee.5 for ; Tue, 28 May 2013 13:59:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:user-agent:mime-version :content-type:x-gm-message-state; bh=54uytCWKpN5YNRL3qt7unVbI3Uh5nR4P/cM1LFlN89s=; b=lNUuzyP1G/QgzXFIx4D9a4EMi3LIw9N4SzTSTmNkfePNf2YSbIlgyAgWo0e5JDNiCG xjryQYvCrux6eJfLS038Zd9SclSkGW5BPeWO/L4x6rpCnAmTfRdsXbd0CiKzN4KUiSLz MhizMLflVoQJiywfGFXnr+Tv85l0Pz3+lWFKzuzXftNRw09G2Tv89LUmxiZI8F8L4m8I Aal/zSxt++PEm/fIfDqFRHLkgKd5cf8LkhIS3euqumBhK6nkywLnZEj/9th58V5Ur7aM KURMM2jgP24+VVj6AMrSNcbY8JpUomV0HdieDR5pSFJ4TCXQKnSQTztRTAQDuxybWmXp RGFg== X-Received: by 10.229.173.194 with SMTP id q2mr6455835qcz.73.1369774755769; Tue, 28 May 2013 13:59:15 -0700 (PDT) Received: from xanadu.home (modemcable044.209-83-70.mc.videotron.ca. [70.83.209.44]) by mx.google.com with ESMTPSA id oh9sm26976095qeb.5.2013.05.28.13.59.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 28 May 2013 13:59:15 -0700 (PDT) Date: Tue, 28 May 2013 16:59:13 -0400 (EDT) From: Nicolas Pitre To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: fix kernel decompressor compilation error with CONFIG_DEBUG_SEMIHOSTING Message-ID: User-Agent: Alpine 2.03 (LFD 1266 2009-07-14) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnD5ZHbCjA71JO3oznJdnPnfP0+oYL7Q/u0qwpbYLPcVZkVBTIEAutHrI72/cJngOPXW9gp X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130528_165937_850917_01C38117 X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.128.46 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Shawn Guo , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org ... and add semihosting output support to the decompressor while at it. Signed-off-by: Nicolas Pitre Acked-by: Shawn Guo diff --git a/arch/arm/boot/compressed/debug.S b/arch/arm/boot/compressed/debug.S index 6e8382d5b7..5392ee6333 100644 --- a/arch/arm/boot/compressed/debug.S +++ b/arch/arm/boot/compressed/debug.S @@ -1,6 +1,8 @@ #include #include +#ifndef CONFIG_DEBUG_SEMIHOSTING + #include CONFIG_DEBUG_LL_INCLUDE ENTRY(putc) @@ -10,3 +12,29 @@ ENTRY(putc) busyuart r3, r1 mov pc, lr ENDPROC(putc) + +#else + +ENTRY(putc) + adr r1, 1f + ldmia r1, {r2, r3} + add r2, r2, r1 + ldr r1, [r2, r3] + strb r0, [r1] + mov r0, #0x03 @ SYS_WRITEC + ARM( svc #0x123456 ) + THUMB( svc #0xab ) + mov pc, lr + .align 2 +1: .word _GLOBAL_OFFSET_TABLE_ - . + .word semi_writec_buf(GOT) +ENDPROC(putc) + + .bss + .global semi_writec_buf + .type semi_writec_buf, %object +semi_writec_buf: + .space 4 + .size semi_writec_buf, 4 + +#endif