Maps the given hander (created with vtlb_RegisterHandler) to the specified memory region. New mappings always assume priority over previous mappings, so place "generic" mappings for large areas of memory first, and then specialize specific small regions of memory afterward. A single handler can be mapped to many different regions by using multiple calls to this function. The memory region start a
| 733 | // |
| 734 | // The memory region start and size parameters must be pagesize aligned. |
| 735 | void vtlb_MapHandler(vtlbHandler handler, u32 start, u32 size) |
| 736 | { |
| 737 | verify(0 == (start & VTLB_PAGE_MASK)); |
| 738 | verify(0 == (size & VTLB_PAGE_MASK) && size > 0); |
| 739 | |
| 740 | u32 end = start + (size - VTLB_PAGE_SIZE); |
| 741 | pxAssume((end >> VTLB_PAGE_BITS) < (sizeof(vtlbdata.pmap) / sizeof(vtlbdata.pmap[0]))); |
| 742 | |
| 743 | while (start <= end) |
| 744 | { |
| 745 | vtlbdata.pmap[start >> VTLB_PAGE_BITS] = VTLBPhysical::fromHandler(handler); |
| 746 | start += VTLB_PAGE_SIZE; |
| 747 | } |
| 748 | } |
| 749 | |
| 750 | void vtlb_MapBlock(void* base, u32 start, u32 size, u32 blocksize) |
| 751 | { |
no outgoing calls
no test coverage detected