mirror of https://github.com/ipxe/ipxe.git
[ioapi] Centralise notion of PAGE_SIZE
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/20/merge
parent
6153c09c41
commit
ec30c856a8
|
@ -28,6 +28,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
|||
*
|
||||
*/
|
||||
|
||||
/** Page shift */
|
||||
#define PAGE_SHIFT 12
|
||||
|
||||
/*
|
||||
* Physical<->Bus and Bus<->I/O address mappings
|
||||
*
|
||||
|
|
|
@ -23,6 +23,12 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
|||
#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
|
||||
*
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#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) */
|
||||
|
|
Loading…
Reference in New Issue