You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#ifndef __BASIC_MEMORY_OPERATION_H_INCL__
#define __BASIC_MEMORY_OPERATION_H_INCL__
#include <stdio.h>
#include <malloc.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#define S32_BIT_OPERATIONS
#ifdef S32_BIT_OPERATIONS
#define PAGEMAP_ENTRY 8
#define GET_BIT(X,Y) (X & ((uint64_t)1<<Y)) >> Y
#define GET_PFN(X) X & 0x7FFFFFFFFFFFFF
uint32_t getPhysicalAddr( uint32_t VirtualAddr );#else
#define PAGEMAP_ENTRY 8
#define GET_BIT(X,Y) (X & ((uint64_t)1<<Y)) >> Y
#define GET_PFN(X) X & 0x7FFFFFFFFFFFFF
uint64_t getPhysicalAddr( uint64_t VirtualAddr );#endif
#endif // __BASIC_MEMORY_OPERATION_H_INCL__
|