From: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: "samuel.thibault@ens-lyon.org" <samuel.thibault@ens-lyon.org>,
"Ian.Campbell@citrix.com" <Ian.Campbell@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 01/11] Add ioread/iowrite functions to mini-os
Date: Fri, 28 Sep 2012 09:57:11 -0400 [thread overview]
Message-ID: <5065ACB7.3040902@jhuapl.edu> (raw)
In-Reply-To: <CAFLBxZYaDJZW7rXTnzo4UtxJbfggZz86Szw4O=30q2RxtNocBg@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 4024 bytes --]
On 09/28/2012 06:16 AM, George Dunlap wrote:
> On Thu, Sep 27, 2012 at 6:09 PM, Matthew Fioravante
> <matthew.fioravante@jhuapl.edu> wrote:
>> This patch adds iowritexx() and ioreadxx() functions for interacting
>> with hardware memory to mini-os. The functions are available in a header
>> iorw.h
>>
>> Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
>> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>>
>> diff --git a/extras/mini-os/arch/ia64/iorw.c b/extras/mini-os/arch/ia64/iorw.c
> Is there any reason to have the ia64 stuff? ia64 isn't supported in
> Xen anymore, AFAIK.
Maybe not. But until ia64 support is removed from mini-os the function
bodies should exist so stuff will compile.
> -George
>
>> new file mode 100644
>> index 0000000..aa58807
>> --- /dev/null
>> +++ b/extras/mini-os/arch/ia64/iorw.c
>> @@ -0,0 +1,48 @@
>> +#include <mini-os/iorw.h>
>> +#include <mini-os/console.h>
>> +
>> +void iowrite8(volatile void* addr, uint8_t val)
>> +{
>> + printk("iorw not implemented!!\n");
>> + BUG();
>> +}
>> +void iowrite16(volatile void* addr, uint16_t val)
>> +{
>> + printk("iorw not implemented!!\n");
>> + BUG();
>> +}
>> +void iowrite32(volatile void* addr, uint32_t val)
>> +{
>> + printk("iorw not implemented!!\n");
>> + BUG();
>> +}
>> +void iowrite64(volatile void* addr, uint64_t val)
>> +{
>> + printk("iorw not implemented!!\n");
>> + BUG();
>> +}
>> +
>> +uint8_t ioread8(volatile void* addr)
>> +{
>> + printk("iorw not implemented!!\n");
>> + BUG();
>> + return 0;
>> +}
>> +uint16_t ioread16(volatile void* addr)
>> +{
>> + printk("iorw not implemented!!\n");
>> + BUG();
>> + return 0;
>> +}
>> +uint32_t ioread32(volatile void* addr)
>> +{
>> + printk("iorw not implemented!!\n");
>> + BUG();
>> + return 0;
>> +}
>> +uint64_t ioread64(volatile void* addr)
>> +{
>> + printk("iorw not implemented!!\n");
>> + BUG();
>> + return 0;
>> +}
>> diff --git a/extras/mini-os/arch/x86/iorw.c b/extras/mini-os/arch/x86/iorw.c
>> new file mode 100644
>> index 0000000..3080769
>> --- /dev/null
>> +++ b/extras/mini-os/arch/x86/iorw.c
>> @@ -0,0 +1,35 @@
>> +#include <mini-os/iorw.h>
>> +
>> +void iowrite8(volatile void* addr, uint8_t val)
>> +{
>> + *((volatile uint8_t*)addr) = val;
>> +}
>> +void iowrite16(volatile void* addr, uint16_t val)
>> +{
>> + *((volatile uint16_t*)addr) = val;
>> +}
>> +void iowrite32(volatile void* addr, uint32_t val)
>> +{
>> + *((volatile uint32_t*)addr) = val;
>> +}
>> +void iowrite64(volatile void* addr, uint64_t val)
>> +{
>> + *((volatile uint64_t*)addr) = val;
>> +}
>> +
>> +uint8_t ioread8(volatile void* addr)
>> +{
>> + return *((volatile uint8_t*) addr);
>> +}
>> +uint16_t ioread16(volatile void* addr)
>> +{
>> + return *((volatile uint16_t*) addr);
>> +}
>> +uint32_t ioread32(volatile void* addr)
>> +{
>> + return *((volatile uint32_t*) addr);
>> +}
>> +uint64_t ioread64(volatile void* addr)
>> +{
>> + return *((volatile uint64_t*) addr);
>> +}
>> diff --git a/extras/mini-os/include/iorw.h b/extras/mini-os/include/iorw.h
>> new file mode 100644
>> index 0000000..d5ec065
>> --- /dev/null
>> +++ b/extras/mini-os/include/iorw.h
>> @@ -0,0 +1,16 @@
>> +#ifndef MINIOS_IORW_H
>> +#define MINIOS_IORW_H
>> +
>> +#include <mini-os/types.h>
>> +
>> +void iowrite8(volatile void* addr, uint8_t val);
>> +void iowrite16(volatile void* addr, uint16_t val);
>> +void iowrite32(volatile void* addr, uint32_t val);
>> +void iowrite64(volatile void* addr, uint64_t val);
>> +
>> +uint8_t ioread8(volatile void* addr);
>> +uint16_t ioread16(volatile void* addr);
>> +uint32_t ioread32(volatile void* addr);
>> +uint64_t ioread64(volatile void* addr);
>> +
>> +#endif
>> --
>> 1.7.9.5
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 1459 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-09-28 13:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 17:09 [PATCH 01/11] Add ioread/iowrite functions to mini-os Matthew Fioravante
2012-09-27 17:09 ` [PATCH 02/11] add posix io for blkfront Matthew Fioravante
2012-09-28 10:36 ` George Dunlap
2012-09-27 17:09 ` [PATCH 03/11] Add endian, byteswap, and wordsize macros to mini-os Matthew Fioravante
2012-09-28 10:48 ` George Dunlap
2012-09-27 17:09 ` [PATCH 04/11] Disable the mfn_is_ram() check, it doesn't work correctly on all systems Matthew Fioravante
2012-10-02 10:49 ` Ian Campbell
2012-10-02 14:20 ` Matthew Fioravante
2012-09-27 17:09 ` [PATCH 05/11] add CONFIG_XC conditional Matthew Fioravante
2012-09-28 11:18 ` George Dunlap
2012-09-28 13:59 ` Matthew Fioravante
2012-09-28 15:24 ` Matthew Fioravante
2012-09-28 15:26 ` Matthew Fioravante
2012-09-27 17:10 ` [PATCH 06/11] add select definition to sys/time.h when HAVE_LIBC is defined Matthew Fioravante
2012-09-27 17:10 ` [PATCH 07/11] setup fpu and sse in mini-os Matthew Fioravante
2012-09-27 17:10 ` [PATCH 08/11] add tpmfront, tpm_tis, and tpmback drivers to mini-os Matthew Fioravante
2012-10-02 10:57 ` Ian Campbell
2012-10-02 11:08 ` Ian Jackson
2012-10-02 14:17 ` Matthew Fioravante
2012-10-02 14:44 ` Ian Campbell
2012-09-28 10:16 ` [PATCH 01/11] Add ioread/iowrite functions " George Dunlap
2012-09-28 13:57 ` Matthew Fioravante [this message]
2012-09-28 15:39 ` George Dunlap
2012-10-02 9:10 ` Ian Campbell
2012-10-02 14:23 ` Matthew Fioravante
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5065ACB7.3040902@jhuapl.edu \
--to=matthew.fioravante@jhuapl.edu \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.