Apic::reg_read(unsigned reg)
{
Unsigned32 val;
- asm volatile ("mov %1,%0\n" : "=b" (val) : "m" (*(Unsigned32*)(io_base + reg)) : "memory");
+ /* assembly-encoded to match the Jailhouse hypervisor MMIO parser support */
+ void *address = (void*)(/*(Unsigned32*)*/(io_base + reg));
+ asm volatile("mov (%1),%0" : "=r" (val) : "r" (address));
return val;
}
void
Apic::reg_write(unsigned reg, Unsigned32 val)
{
- asm volatile ("mov %1,%0\n" : "=m" (*(Unsigned32*)(io_base + reg)) : "b" (val) : "memory");
+ /* assembly-encoded to match the Jailhouse hypervisor MMIO parser support */
+ void *address = (void*)(/*(Unsigned32*)*/(io_base + reg));
+ asm volatile("mov %0,(%1)" : : "r" (val), "r" (address));
}
PUBLIC static inline