diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2015-09-29 10:14:58 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-10-15 10:52:13 -0400 |
commit | eee06e060ebd536a1ac9610fdcb41406142b88f0 (patch) | |
tree | 3bb88c25927ae61651a4a24b969afa246d8d2e88 /src/memmap.h | |
parent | 1dcf02b06797309676a2915454d1388b8ef0434d (diff) | |
download | seabios-hppa-eee06e060ebd536a1ac9610fdcb41406142b88f0.zip seabios-hppa-eee06e060ebd536a1ac9610fdcb41406142b88f0.tar.gz seabios-hppa-eee06e060ebd536a1ac9610fdcb41406142b88f0.tar.bz2 |
virtio: Move standard definitions from virtio-ring.h to standard headers
Move PAGE_SHIFT / virt_to_phys() to memmap.h and smp_[rw]mb() to
x86.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/memmap.h')
-rw-r--r-- | src/memmap.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/memmap.h b/src/memmap.h index c439982..9a59024 100644 --- a/src/memmap.h +++ b/src/memmap.h @@ -1,7 +1,14 @@ #ifndef __MEMMAP_H #define __MEMMAP_H +#include "types.h" // u32 + // A typical OS page size #define PAGE_SIZE 4096 +#define PAGE_SHIFT 12 + +static inline u32 virt_to_phys(void *v) { + return (u32)v; +} #endif // memmap.h |