From patchwork Fri Oct 23 13:56:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 534994 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 23A1C141333 for ; Sat, 24 Oct 2015 00:58:03 +1100 (AEDT) Received: from localhost ([::1]:38631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpcr3-0000lg-6t for incoming@patchwork.ozlabs.org; Fri, 23 Oct 2015 09:58:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpcqI-00080N-91 for qemu-devel@nongnu.org; Fri, 23 Oct 2015 09:57:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpcqE-00005h-EP for qemu-devel@nongnu.org; Fri, 23 Oct 2015 09:57:14 -0400 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:50334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpcqE-000059-84; Fri, 23 Oct 2015 09:57:10 -0400 Received: from [87.252.56.82] (helo=kentang.home.gateway) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ZpcqC-0008H8-RO; Fri, 23 Oct 2015 14:57:09 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, agraf@suse.de, david@gibson.dropbear.id.au, cormac@c-obrien.org Date: Fri, 23 Oct 2015 14:56:32 +0100 Message-Id: <1445608598-24485-8-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1445608598-24485-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1445608598-24485-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 87.252.56.82 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 07/13] cuda.c: implement dummy IIC access commands 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 These are used by MacOS 9 on boot. Here we return an error except for 4-byte commands which write to the IIC bus. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/cuda.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index 4fe901b..d3ec58a 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -529,6 +529,24 @@ static void cuda_receive_packet(CUDAState *s, cuda_send_packet_to_host(s, obuf, 3); qemu_system_reset_request(); break; + case CUDA_COMBINED_FORMAT_IIC: + obuf[0] = ERROR_PACKET; + obuf[1] = 0x5; + obuf[2] = CUDA_PACKET; + obuf[3] = data[0]; + cuda_send_packet_to_host(s, obuf, 4); + break; + case CUDA_GET_SET_IIC: + if (len == 4) { + cuda_send_packet_to_host(s, obuf, 3); + } else { + obuf[0] = ERROR_PACKET; + obuf[1] = 0x2; + obuf[2] = CUDA_PACKET; + obuf[3] = data[0]; + cuda_send_packet_to_host(s, obuf, 4); + } + break; default: break; }