Add KDL command "mapping"
* VMTranslationMap:
- Add DebugPrintMappingInfo(): Given a virtual address it is supposed
to print the paging structure information for that address. To be
implemented by derived classes.
- Add DebugGetReverseMappingInfo(): Given a physical addresss it is
supposed to find all virtual addresses mapped to it. To be
implemented by derived classes.
* X86VMTranslationMapPAE: Implement the new methods
DebugPrintMappingInfo() and DebugGetReverseMappingInfo().
* Add KDL command "mapping". It supports both virtual address lookups
and reverse lookups.
This commit is contained in:
@@ -20,6 +20,9 @@ struct vm_page_reservation;
|
||||
|
||||
|
||||
struct VMTranslationMap {
|
||||
struct ReverseMappingInfoCallback;
|
||||
|
||||
public:
|
||||
VMTranslationMap();
|
||||
virtual ~VMTranslationMap();
|
||||
|
||||
@@ -72,6 +75,12 @@ struct VMTranslationMap {
|
||||
|
||||
virtual void Flush() = 0;
|
||||
|
||||
// backends for KDL commands
|
||||
virtual void DebugPrintMappingInfo(addr_t virtualAddress);
|
||||
virtual bool DebugGetReverseMappingInfo(
|
||||
phys_addr_t physicalAddress,
|
||||
ReverseMappingInfoCallback& callback);
|
||||
|
||||
protected:
|
||||
void PageUnmapped(VMArea* area,
|
||||
page_num_t pageNumber, bool accessed,
|
||||
@@ -85,6 +94,13 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
struct VMTranslationMap::ReverseMappingInfoCallback {
|
||||
virtual ~ReverseMappingInfoCallback();
|
||||
|
||||
virtual bool HandleVirtualAddress(addr_t virtualAddress) = 0;
|
||||
};
|
||||
|
||||
|
||||
struct VMPhysicalPageMapper {
|
||||
VMPhysicalPageMapper();
|
||||
virtual ~VMPhysicalPageMapper();
|
||||
|
||||
Reference in New Issue
Block a user