diff --git a/hypervisor/include/arch/x86/io.h b/hypervisor/include/arch/x86/io.h index 1162cd69a..577e547f0 100644 --- a/hypervisor/include/arch/x86/io.h +++ b/hypervisor/include/arch/x86/io.h @@ -166,64 +166,4 @@ static inline uint8_t mmio_read8(const void *addr) return *((volatile const uint8_t *)addr); } -/** Reads a 64 Bit memory mapped IO register, mask it and write it back into - * memory mapped IO register. - * - * @param addr The address of the memory mapped IO register. - * @param mask The mask to apply to the value read. - * @param value The 64 bit value to write. - */ -static inline void set64(void *addr, uint64_t mask, uint64_t value) -{ - uint64_t temp_val; - - temp_val = mmio_read64(addr); - mmio_write64((temp_val & ~mask) | value, addr); -} - -/** Reads a 32 Bit memory mapped IO register, mask it and write it back into - * memory mapped IO register. - * - * @param addr The address of the memory mapped IO register. - * @param mask The mask to apply to the value read. - * @param value The 32 bit value to write. - */ -static inline void set32(void *addr, uint32_t mask, uint32_t value) -{ - uint32_t temp_val; - - temp_val = mmio_read32(addr); - mmio_write32((temp_val & ~mask) | value, addr); -} - -/** Reads a 16 Bit memory mapped IO register, mask it and write it back into - * memory mapped IO register. - * - * @param addr The address of the memory mapped IO register. - * @param mask The mask to apply to the value read. - * @param value The 16 bit value to write. - */ -static inline void set16(void *addr, uint16_t mask, uint16_t value) -{ - uint16_t temp_val; - - temp_val = mmio_read16(addr); - mmio_write16((temp_val & ~mask) | value, addr); -} - -/** Reads a 8 Bit memory mapped IO register, mask it and write it back into - * memory mapped IO register. - * - * @param addr The address of the memory mapped IO register. - * @param mask The mask to apply to the value read. - * @param value The 8 bit value to write. - */ -static inline void set8(void *addr, uint8_t mask, uint8_t value) -{ - uint8_t temp_val; - - temp_val = mmio_read8(addr); - mmio_write8((temp_val & ~mask) | value, addr); -} - #endif /* _IO_H defined */