OpenCores
no use no use 1/1 no use no use
Virtual to Physical page mapping issue.
by avamsi on Jun 11, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
Hi,

When I am trying build(menu config) the Linux kernel with the modified .dts file, it is creating the kernel image, but the changes that I did in the .dts file are not reflecting in the image when I looked into the disassemble file. I modified the physical memory range from some 0x20000000 to 100Mb instead of default 0x0 to 0x02000000. But in the created image, it is showing like all the virtual pages are mapped from 0x0 physical memory location only(default mapping). Did any one try this out before ?. can any one explain why is it taking so.

Thanks & regards,
A.Vamsi
RE: Virtual to Physical page mapping issue.
by firefalcon on Jun 12, 2012
firefalcon
Posts: 99
Joined: Jan 10, 2011
Last seen: Mar 26, 2024
How are you decoding the page tables from the binary? Did you try t run the image on hardware with a different memory map? I have changed the ending address of RAM in the dts file all sorts of ways with the Linux build process adapting to it all correctly.
RE: Virtual to Physical page mapping issue.
by avamsi on Jun 13, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
Hi,
I have generated the disassemble file from the binary there actually I observed the mapping issue. The physical memory available on the board is like some 8KB from 0x0 to 0x2000 and some 256MB from 0x20000000. Now the issue is where can I mention both the address spaces, hence the virtual to physical mapping will be done correctly.

Thanks,
A.Vamsi
RE: Virtual to Physical page mapping issue.
by firefalcon on Jun 13, 2012
firefalcon
Posts: 99
Joined: Jan 10, 2011
Last seen: Mar 26, 2024
Hi,
I have generated the disassemble file from the binary there actually I observed the mapping issue. The physical memory available on the board is like some 8KB from 0x0 to 0x2000 and some 256MB from 0x20000000. Now the issue is where can I mention both the address spaces, hence the virtual to physical mapping will be done correctly.

Thanks,
A.Vamsi


The disassembly, in the case of the Linux, contains both physical and virtual addresses. Even if you change the start address of RAM in the dts file, some part of the kernel is tied to the 0xX00 address range due to interrupt and exception handlers. Later incarnations of the OR1200 will support relocating the interrupt and exception handlers to other address ranges.

Like I said before, your best best is to build it and see what happens when you try to boot Linux. You cannot just look at the disassembly and understand what physical addresses will be used one the MMU is enabled.

Looking forward to hearing what happens.
RE: Virtual to Physical page mapping issue.
by avamsi on Jun 14, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
Hi,
I did not start running it on the hardware. Here is the actual issue that we are expecting. The available memory on the board is 8KB SRAM from 0x0 to 0x200 and 512MB DRAM from 0x40000000. I am able to map all the sections(except .text) to the 512MB space. The corresponding virtual memory map is fine. But the size of .text section is more in that the first 8k page(vector table stuff) should be placed in the 8KB memory space available at 0x0 location. And the rest of the .text section should be placed in the 512MB memory starts at 0x40000000.If I keep all the .text section in the 512MB itself and some ISR jump routines in the 8KB, It will end up with giving page faults definitely. My concern is how to fragment that .text section in such a way that the first 8KB can go to 8KB SRAM space and rest will go to 512MB space. Are there any linker scripts that can help us.

Thanks,
A.Vamsi
no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.