Question: One memory access over two pages
Posted: Mon Feb 20, 2017 2:23 am
Hello guys and girls,
As I read the last thread about paging, a question arises in my mind:
What happens, if you have paging with two pages not mapped to sequential physical memory, and then make one instruction that accesses both pages?
An Example:
Lets assume we have two 4kb-pages. In virtual memory the first page is from 0 to 0xFFF and the second page goes from 0x1000 to 0x1FFF.
But they are mapped not sequential. Lets assume the first page to map to address 0 and the second page to 0x4000.
What happens, if I make a dword (4 byte) access on virtual address 0xFFE? Will the MMU recognize, she has to split the access into two accesses - one word (2 byte) at physical 0xFFE and one word at physical 0x4000? Or will it access the wrong memory from 0xFFE to 0x1001? Will there be a GPF?
Best regards
Sebi
As I read the last thread about paging, a question arises in my mind:
What happens, if you have paging with two pages not mapped to sequential physical memory, and then make one instruction that accesses both pages?
An Example:
Lets assume we have two 4kb-pages. In virtual memory the first page is from 0 to 0xFFF and the second page goes from 0x1000 to 0x1FFF.
But they are mapped not sequential. Lets assume the first page to map to address 0 and the second page to 0x4000.
What happens, if I make a dword (4 byte) access on virtual address 0xFFE? Will the MMU recognize, she has to split the access into two accesses - one word (2 byte) at physical 0xFFE and one word at physical 0x4000? Or will it access the wrong memory from 0xFFE to 0x1001? Will there be a GPF?
Best regards
Sebi