Signed-off-by: Michael Brown <mcb30@ipxe.org>
*
*/
+/** Page shift */
+#define PAGE_SHIFT 12
+
/*
* Physical<->Bus and Bus<->I/O address mappings
*
#include <config/ioapi.h>
#include <ipxe/uaccess.h>
+/** Page size */
+#define PAGE_SIZE ( 1 << PAGE_SHIFT )
+
+/** Page mask */
+#define PAGE_MASK ( PAGE_SIZE - 1 )
+
/**
* Calculate static inline I/O API function name
*
#ifndef _VIRTIO_RING_H_
# define _VIRTIO_RING_H_
-#define PAGE_SHIFT (12)
-#define PAGE_SIZE (1<<PAGE_SHIFT)
-#define PAGE_MASK (PAGE_SIZE-1)
/* Status byte for guest to report progress, and synchronize features. */
/* We have seen device and processed generic fields (VIRTIO_CONFIG_F_VIRTIO) */