Quick-kill the MMIO handler if the fault address is above the mapping range.

This commit is contained in:
Dr. Chat
2015-09-07 21:23:24 -05:00
parent 3ac83b16c8
commit a2bc0443f2
3 changed files with 11 additions and 6 deletions

View File

@@ -42,7 +42,8 @@ class MMIOHandler {
virtual ~MMIOHandler();
static std::unique_ptr<MMIOHandler> Install(uint8_t* virtual_membase,
uint8_t* physical_membase);
uint8_t* physical_membase,
uint8_t* membase_end);
static MMIOHandler* global_handler() { return global_handler_; }
bool RegisterRange(uint32_t virtual_address, uint32_t mask, uint32_t size,
@@ -86,6 +87,7 @@ class MMIOHandler {
uint8_t* virtual_membase_;
uint8_t* physical_membase_;
uint8_t* memory_end_;
std::vector<MMIORange> mapped_ranges_;