From patchwork Fri Jun 24 19:23:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 101879 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 CEA8FB6F83 for ; Sat, 25 Jun 2011 05:37:35 +1000 (EST) Received: from localhost ([::1]:35094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaCC2-0001ck-I8 for incoming@patchwork.ozlabs.org; Fri, 24 Jun 2011 15:37:30 -0400 Received: from eggs.gnu.org ([140.186.70.92]:52389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaBzA-0007om-16 for qemu-devel@nongnu.org; Fri, 24 Jun 2011 15:24:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaBz8-0000qB-AX for qemu-devel@nongnu.org; Fri, 24 Jun 2011 15:24:11 -0400 Received: from mail-ww0-f53.google.com ([74.125.82.53]:36281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaBz8-0000q2-08 for qemu-devel@nongnu.org; Fri, 24 Jun 2011 15:24:10 -0400 Received: by wwf26 with SMTP id 26so2795385wwf.10 for ; Fri, 24 Jun 2011 12:24:09 -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=V/UZUctw/mFMkb31m+yiFjOwRbIyJXcaZwpiu2esI9Q=; b=m0RDrjURLIsJJtvtspL5waRUvLWrJU+LoDpNSZ+VgBodHumtekO+d8BZFvkJYXSgZx XYcQj7m1tpgg/vWUvmvtVdP7QWv9GMU6NvxFNYbA9YYCvmXJsSstDfCSZwHfD1Ct40ug lJ3R2pvOf2UFVgpcMpb543AcXdIUvu0bUTmmk= 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=sWtHjIX3inzh6HxJzwqvc+LhNmV+XpoQh0YkUnUI0txGq/udzrvJbYgkp3sq+ancvm 3KGEbKByZKdVzzDsqx5Oi3vk1dM1Wm4SqiLgW+j3EBec5R5/3EWsVTMns7bcPRxllZ3w Wxyid+cnfBUINVxJabkQvL1lPSI/y4Q7j0Uq4= Received: by 10.227.208.65 with SMTP id gb1mr3422245wbb.42.1308943449018; Fri, 24 Jun 2011 12:24:09 -0700 (PDT) Received: from localhost.localdomain (c-71-227-161-214.hsd1.wa.comcast.net [71.227.161.214]) by mx.google.com with ESMTPS id ex2sm2224860wbb.14.2011.06.24.12.24.07 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Jun 2011 12:24:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 24 Jun 2011 12:23:48 -0700 Message-Id: <1308943435-24993-2-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1308943435-24993-1-git-send-email-rth@twiddle.net> References: <1308943435-24993-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.53 Subject: [Qemu-devel] [PATCH 1/8] 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 b027e43..0654d95 100644 --- a/cpu-common.h +++ b/cpu-common.h @@ -56,6 +56,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 b03b5be..9df8b13 100644 --- a/exec.c +++ b/exec.c @@ -3227,7 +3227,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); @@ -3238,7 +3238,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); @@ -3249,7 +3249,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); @@ -3260,7 +3260,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); @@ -3270,7 +3270,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); @@ -3280,7 +3280,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);