This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH 3/12] VTPM mini-os: Add ioread() and iowrite() fu

To: Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 3/12] VTPM mini-os: Add ioread() and iowrite() functions to mini-os
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Sat, 12 Mar 2011 01:29:14 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 11 Mar 2011 17:40:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D7AA468.7000204@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
References: <4D7AA468.7000204@xxxxxxxxxx>
Resent-date: Sat, 12 Mar 2011 02:39:37 +0100
Resent-from: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Resent-message-id: <20110312013937.GI4922@xxxxxxxxxxxxxxxxxxxxxxxxx>
Resent-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Matthew Fioravante, le Fri 11 Mar 2011 17:38:32 -0500, a écrit :
> Mini-os currently doesn't have very many facilities for reading and 
> writing to hardware io memory. This patch addes  a new header file 
> iorw.h which when included gives access to
> the ioread8(), iread32(), iowrite8(), iowrite32() family of functions. 

> +void iowrite8(void* addr, uint8_t val)
> +{
> +   *((uint8_t*)addr) = val;
> +}
> +void iowrite32(void* addr, uint32_t val)
> +{
> +   *((uint32_t*)addr) = val;
> +}

Don't you need a volatile qualifier on the cast pointer to not let the
compiler optimize it away?


Xen-devel mailing list