This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mmu | How to set different virtual address than physical

Hi, in my current understanding, when I want to map a certain range of virtual addresses, for example 0xffff-0xffff8000, to 0x0-0x8000, I have to put the physical address in the section entry (0x0-0x8000). Now if I want to map 0xffff-0xffff8000 to 0x800-0x10000, the adresses in the section entry are 0x800-0x10000,

is that correct? Bc I have the exact same setup and although the section entry(the last block entry that points at the physical mem)  address is different than then the virtual it’s address it still points to an range beginning at 0, so with zero offset…

What do I have to do to have the virtual address point to another(with an offset, of that makes sens) physical address.

Sorry, I find it really difficult to explain the problem at hand.

Best regards Niklas

Parents
  • Could you provide more details? Because it looks unclear for me what do you want to do.

    When you map some virtual address range to physical one you can use that physical address space only for one mapping.

    For example one process virtual addresses 0x0000 0000 - 0x0000 FFFF (first translation table) you can map to physical ones 0x8001 0000 - 0x8001 FFFF,

    second process virtual addresses 0x0000 0000 - 0x0000 FFFF (second translation table) you can map to physical ones 0x8002 0000 - 0x8002 FFFF or other ranges but you can't use already allocated physical addresses.

Reply
  • Could you provide more details? Because it looks unclear for me what do you want to do.

    When you map some virtual address range to physical one you can use that physical address space only for one mapping.

    For example one process virtual addresses 0x0000 0000 - 0x0000 FFFF (first translation table) you can map to physical ones 0x8001 0000 - 0x8001 FFFF,

    second process virtual addresses 0x0000 0000 - 0x0000 FFFF (second translation table) you can map to physical ones 0x8002 0000 - 0x8002 FFFF or other ranges but you can't use already allocated physical addresses.

Children