-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcha.H
More file actions
26 lines (22 loc) · 751 Bytes
/
cha.H
File metadata and controls
26 lines (22 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once
#include <cstdint>
#include <string>
#include <vector>
#if 0
struct PagemapEntry {
uint64_t pfn : 55;
unsigned int soft_dirty : 1;
unsigned int file_page : 1;
unsigned int swapped : 1;
unsigned int present : 1;
};
#endif
uint64_t compute_perm(uintptr_t physical_address);
uintptr_t getPhysicalAddress(uintptr_t virtual_address);
int findCHAByHashing(uintptr_t virtual_address);
int virt_to_phys_user(uintptr_t* paddr, pid_t pid, uintptr_t vaddr);
uint64_t getIndex(uintptr_t physical_address);
std::vector<int> readBaseSequence(const std::string& filename);
//int pagemap_get_entry(PagemapEntry* entry, int pagemap_fd, uintptr_t vaddr);
int getCoreCount();
std::pair<int, int> findCHAPerfCounter(long long* data);