From patchwork Sat Aug 15 23:28:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 507658 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7E21914012C for ; Sun, 16 Aug 2015 09:33:05 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=dyP8Awt7; dkim-atps=neutral Received: from localhost ([::1]:51043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQkwh-0006SD-KF for incoming@patchwork.ozlabs.org; Sat, 15 Aug 2015 19:33:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQksZ-0006NI-Bc for qemu-devel@nongnu.org; Sat, 15 Aug 2015 19:28:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZQksY-0000Xv-F0 for qemu-devel@nongnu.org; Sat, 15 Aug 2015 19:28:47 -0400 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:34325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQksY-0000Xm-7F for qemu-devel@nongnu.org; Sat, 15 Aug 2015 19:28:46 -0400 Received: by paccq16 with SMTP id cq16so38649330pac.1 for ; Sat, 15 Aug 2015 16:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=QCKCtXDsPU98GMWEgdXFp0flWFFiwOFaFtKomkXAyyo=; b=dyP8Awt7uahcBQrdGfSpjGNOWSaxIfIHcZrIZPe3HvU+ScPy9h5koYnfnE2TmmeZrg 17iL7ubJvMqnHWwrE8luNVHwT0ElY4jvAkpsl7wz7LQVraCQullyVq5grfaDqGbI6zVz 4M1Lk0/fMa2Wy0GtMty+IZXW9vbabfqMBd1jMbJwmaPj/50gbfxlZ5JXICwmib8fEt4D zwFVi8aS1b39ocr6LPokcH+V8xFVtcy9v22ulN+eQ4z4PCIPOy+wodIYROllSdXUu3qe WlFPmKJugTfNUDTG9LIpamcMe0CvKSRvB4SAe1deBL+NEXDKQQbt4moYiw5xjeQfvkzq foLw== X-Received: by 10.67.5.36 with SMTP id cj4mr21153962pad.140.1439681325591; Sat, 15 Aug 2015 16:28:45 -0700 (PDT) Received: from pcrost-box.hsd1.ca.comcast.net (c-50-168-24-48.hsd1.ca.comcast.net. [50.168.24.48]) by smtp.gmail.com with ESMTPSA id q6sm9863304pdp.14.2015.08.15.16.28.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Aug 2015 16:28:44 -0700 (PDT) From: Peter Crosthwaite X-Google-Original-From: Peter Crosthwaite To: qemu-devel@nongnu.org Date: Sat, 15 Aug 2015 16:28:14 -0700 Message-Id: <67fbb0eaec6f52ee28a39970047894c86d4b391b.1439679104.git.crosthwaite.peter@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::234 Cc: pbonzini@redhat.com, Peter Crosthwaite , riku.voipio@iki.fi, Peter Crosthwaite , "Edgar E. Iglesias" Subject: [Qemu-devel] [PATCH 04/19] mb: Remove ELF_MACHINE from cpu.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Crosthwaite The only generic code relying on this is linux-user, but linux-users' default behaviour or setting ELF_MACHINE to ELF_ARCH will handle this. The microblaze bootloader can just pass EM_MICROBLAZE directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Edgar E. Iglesias Signed-off-by: Peter Crosthwaite --- hw/microblaze/boot.c | 4 ++-- target-microblaze/cpu.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c index 3e8820f..d7eaa1f 100644 --- a/hw/microblaze/boot.c +++ b/hw/microblaze/boot.c @@ -141,12 +141,12 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base, /* Boots a kernel elf binary. */ kernel_size = load_elf(kernel_filename, NULL, NULL, &entry, &low, &high, - big_endian, ELF_MACHINE, 0); + big_endian, EM_MICROBLAZE, 0); base32 = entry; if (base32 == 0xc0000000) { kernel_size = load_elf(kernel_filename, translate_kernel_address, NULL, &entry, NULL, NULL, - big_endian, ELF_MACHINE, 0); + big_endian, EM_MICROBLAZE, 0); } /* Always boot into physical ram. */ boot_info.bootstrap_pc = (uint32_t)entry; diff --git a/target-microblaze/cpu.h b/target-microblaze/cpu.h index 7e20e59..b49dcf4 100644 --- a/target-microblaze/cpu.h +++ b/target-microblaze/cpu.h @@ -34,8 +34,6 @@ typedef struct CPUMBState CPUMBState; #include "mmu.h" #endif -#define ELF_MACHINE EM_MICROBLAZE - #define EXCP_MMU 1 #define EXCP_IRQ 2 #define EXCP_BREAK 3