From patchwork Thu Apr 28 20:50:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 93301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 76FD1B6F5F for ; Fri, 29 Apr 2011 06:52:22 +1000 (EST) Received: from localhost ([::1]:45164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFYCB-0005SK-Tl for incoming@patchwork.ozlabs.org; Thu, 28 Apr 2011 16:52:19 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFYBL-0004qE-CB for qemu-devel@nongnu.org; Thu, 28 Apr 2011 16:51:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFYBK-0005Y2-9A for qemu-devel@nongnu.org; Thu, 28 Apr 2011 16:51:27 -0400 Received: from mail-px0-f179.google.com ([209.85.212.179]:58851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFYBK-0005Xi-4D for qemu-devel@nongnu.org; Thu, 28 Apr 2011 16:51:26 -0400 Received: by pxi2 with SMTP id 2so298049pxi.10 for ; Thu, 28 Apr 2011 13:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:subject:date:message-id:x-mailer :in-reply-to:references; bh=0Q+oWHqOpoynECqdEwH/fRITtrju3Le7O7D9yqwEXhg=; b=JEwmD1Mgh91NdeabX4PeZ0Z/ujWotud7LDTNVLfbxcym/gCAiBpFc27qOzIh2Omkwx YBmCvgR83S9Tyyd9rJGtn9teFHmTlmzC+OoDg8ctCgI0tBbank+EjZuLYrzSAISc+Pmc uR2vcU/MuXNBMjOLYqBaB4555FmEyRjrziMfA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; b=YZ/lJTCxPNjhAS70Z/DyyaJNhAADytEefMN5jpx99wfHdEPyiRbD32KT6+16TYJaa4 J3o88i73e9DHeP081j17916Xw6muyuUdbIhl3b5/Pi+hWNSVvWv17iv80cAABrNbTf4G wNSH8UnBhHWyULoL6vObbb8PlvQNV6JU7iocE= Received: by 10.142.204.1 with SMTP id b1mr1311367wfg.194.1304023883197; Thu, 28 Apr 2011 13:51:23 -0700 (PDT) Received: from localhost.localdomain (are.twiddle.net [75.101.38.216]) by mx.google.com with ESMTPS id z10sm2266797wfj.12.2011.04.28.13.51.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2011 13:51:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 28 Apr 2011 13:50:43 -0700 Message-Id: <1304023875-25040-2-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1304023875-25040-1-git-send-email-rth@twiddle.net> References: <1304023875-25040-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.179 Subject: [Qemu-devel] [PATCH 01/33] Export the unassigned_mem read/write functions. 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 Signed-off-by: Richard Henderson --- cpu-common.h | 7 +++++++ exec.c | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index 96c02ae..e17020b 100644 --- a/cpu-common.h +++ b/cpu-common.h @@ -45,6 +45,13 @@ static inline void cpu_register_physical_memory(target_phys_addr_t start_addr, cpu_register_physical_memory_offset(start_addr, size, phys_offset, 0); } +extern CPUReadMemoryFunc unassigned_mem_readb; +extern CPUReadMemoryFunc unassigned_mem_readw; +extern CPUReadMemoryFunc unassigned_mem_readl; +extern CPUWriteMemoryFunc unassigned_mem_writeb; +extern CPUWriteMemoryFunc unassigned_mem_writew; +extern CPUWriteMemoryFunc unassigned_mem_writel; + ram_addr_t cpu_get_physical_page_desc(target_phys_addr_t addr); ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, ram_addr_t size, void *host); diff --git a/exec.c b/exec.c index c3dc68a..c82ff70 100644 --- a/exec.c +++ b/exec.c @@ -3089,7 +3089,7 @@ ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr) return ram_addr; } -static uint32_t unassigned_mem_readb(void *opaque, target_phys_addr_t addr) +uint32_t unassigned_mem_readb(void *opaque, target_phys_addr_t addr) { #ifdef DEBUG_UNASSIGNED printf("Unassigned mem read " TARGET_FMT_plx "\n", addr); @@ -3100,7 +3100,7 @@ static uint32_t unassigned_mem_readb(void *opaque, target_phys_addr_t addr) return 0; } -static uint32_t unassigned_mem_readw(void *opaque, target_phys_addr_t addr) +uint32_t unassigned_mem_readw(void *opaque, target_phys_addr_t addr) { #ifdef DEBUG_UNASSIGNED printf("Unassigned mem read " TARGET_FMT_plx "\n", addr); @@ -3111,7 +3111,7 @@ static uint32_t unassigned_mem_readw(void *opaque, target_phys_addr_t addr) return 0; } -static uint32_t unassigned_mem_readl(void *opaque, target_phys_addr_t addr) +uint32_t unassigned_mem_readl(void *opaque, target_phys_addr_t addr) { #ifdef DEBUG_UNASSIGNED printf("Unassigned mem read " TARGET_FMT_plx "\n", addr); @@ -3122,7 +3122,7 @@ static uint32_t unassigned_mem_readl(void *opaque, target_phys_addr_t addr) return 0; } -static void unassigned_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) +void unassigned_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) { #ifdef DEBUG_UNASSIGNED printf("Unassigned mem write " TARGET_FMT_plx " = 0x%x\n", addr, val); @@ -3132,7 +3132,7 @@ static void unassigned_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_ #endif } -static void unassigned_mem_writew(void *opaque, target_phys_addr_t addr, uint32_t val) +void unassigned_mem_writew(void *opaque, target_phys_addr_t addr, uint32_t val) { #ifdef DEBUG_UNASSIGNED printf("Unassigned mem write " TARGET_FMT_plx " = 0x%x\n", addr, val); @@ -3142,7 +3142,7 @@ static void unassigned_mem_writew(void *opaque, target_phys_addr_t addr, uint32_ #endif } -static void unassigned_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val) +void unassigned_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val) { #ifdef DEBUG_UNASSIGNED printf("Unassigned mem write " TARGET_FMT_plx " = 0x%x\n", addr, val);