static inline void outsb(uint16_t port, const void *addr, unsigned long count)
{
__asm__ __volatile__ (
- "cld ; rep ; outsb "
+ "cld ; rep ; outsb "
: "=S" (addr), "=c" (count)
: "d"(port), "0"(addr), "1" (count)
);
static inline void outsw(uint16_t port, const void *addr, unsigned long count)
{
__asm__ __volatile__ (
- "cld ; rep ; outsw "
+ "cld ; rep ; outsw "
: "=S" (addr), "=c" (count)
: "d"(port), "0"(addr), "1" (count)
);
static inline void outsl(uint16_t port, const void *addr, unsigned long count)
{
__asm__ __volatile__ (
- "cld ; rep ; outsl "
+ "cld ; rep ; outsl "
: "=S" (addr), "=c" (count)
: "d"(port), "0"(addr), "1" (count)
);
static inline void insb(uint16_t port, void *addr, unsigned long count)
{
__asm__ __volatile__ (
- "cld ; rep ; insb "
+ "cld ; rep ; insb "
: "=D" (addr), "=c" (count)
: "d"(port), "0"(addr), "1" (count)
);
static inline void insw(uint16_t port, void *addr, unsigned long count)
{
__asm__ __volatile__ (
- "cld ; rep ; insw "
+ "cld ; rep ; insw "
: "=D" (addr), "=c" (count)
: "d"(port), "0"(addr), "1" (count)
);
static inline void insl(uint16_t port, void *addr, unsigned long count)
{
__asm__ __volatile__ (
- "cld ; rep ; insl "
+ "cld ; rep ; insl "
: "=D" (addr), "=c" (count)
: "d"(port), "0"(addr), "1" (count)
);
}
-#if 0
-/* XXX XXX XXX This is a story from the evil API from hell XXX XXX XXX
- * We have different functions for memory access in pre-ram stage and ram
- * stage. Those in pre-ram stage are called write32 and expect the address
- * first and the address as a pointer type. Those in ram stage are called
- * writel and expect the datum first and the address as an integer type.
- * Until all code is checked and fixed, I'll add both versions here now.
- */
-
-static inline void writeb(uint8_t b, volatile void *addr)
-{
- *(volatile uint8_t *) addr = b;
-}
-
-static inline void writew(uint16_t b, volatile void *addr)
-{
- *(volatile uint16_t *) addr = b;
-}
-
-static inline void writel(uint32_t b, volatile void *addr)
-{
- *(volatile uint32_t *) addr = b;
-}
-
-static inline uint8_t readb(const volatile void *addr)
-{
- return *(volatile uint8_t *) addr;
-}
-
-static inline uint16_t readw(const volatile void *addr)
-{
- return *(volatile uint16_t *) addr;
-}
-
-static inline uint32_t readl(const volatile void *addr)
-{
- return *(volatile uint32_t *) addr;
-}
-#endif
-
-#if !defined(__PRE_RAM__)
static inline __attribute__((always_inline)) uint8_t read8(unsigned long addr)
{
return *((volatile uint8_t *)(addr));
{
*((volatile uint32_t *)(addr)) = value;
}
-#endif
#endif