[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH vtpm v2 01/12] Add ioread/iowrite functions to mini-os
I was about to apply nos. 1 & 3-7 but there was a build error: In file included from mini-os.c:23: ../grub-upstream/netboot/etherboot.h:526: error: conflicting types for âinet_atonâ /local/scratch/ianc/devel/committer.git/stubdom/lwip-x86_64/src/include/ipv4/lwip/inet.h:44: note: previous declaration of âinet_atonâ was here mini-os.c: In function âload_moduleâ: mini-os.c:244: warning: statement with no effect mini-os.c: In function âmainâ: mini-os.c:747: warning: cast from pointer to integer of different size make[2]: *** [/local/scratch/ianc/devel/committer.git/stubdom/grub-x86_64/mini-os.o] Error 1 make[2]: *** Waiting for unfinished jobs.... There was also a slew of warnings -- but I think many of them might be normal for a stubdom build (I'll have to check). BTW I was skipping, this time round: #2 because Samuel seemed to have some additional thoughts this morning. #8 because I wanted to have another quick read through before I applied it. #9 and #10 are already applied. #11 hasn't been acked, although I see George has reviewed it at least somewhat. Hopefully one or the other of us (or someone else) will find the time shortly. #12 is already applied Ian. On Fri, 2012-10-05 at 19:01 +0100, Matthew Fioravante 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@xxxxxxxxxx> > Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx> > Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> > > 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |