Write to physical flash memory when remapped

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Write to physical flash memory when remapped

ソリューションへジャンプ
800件の閲覧回数
mathias_edman
Contributor III

Hi,

I use MPC5644A.

I wonder if it is possible to write to a flash location that has been remapped to a virtual address using TLB.

So for example:

Physical address 0x0000-0x1000 is remapped to virtual address 0x8000-0x9000. Is it then still possible to write to physical flash memory 0x0000 ?

Regards,

Mathias

0 件の賞賛
1 解決策
711件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

we are allowed to access only an address range which is covered by MMU. Otherwise an exception TLB Miss is triggered.

Each core access (I do not consider debug features) uses virtual address. It doesn't matter if virtual address and physical address is identical or if there's some translation.

If you want to access the same physical address using two virtual addresses, it can be done but you need to have two TLBs.

First TLB will be configured in this way: physical address 0x0000-0x1000, virtual address 0x0000-0x1000

Second TLB: physical address 0x0000-0x1000, virtual address 0x8000-0x9000

"My assumption is that the flash driver cannot handle virtual address space, and that only real physical address should be used."

SSD flash drivers expect that physical and virtual address is identical because it checks addresses, blocks and so on... That means you should really have two TLBs as mentioned above and use 'physical' address for programming.

Regards,

Lukas

元の投稿で解決策を見る

4 返答(返信)
711件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

yes but there should be two TLBs - one covering virtual address 0x0000-0x1000 and second covering virtual address 0x8000-0x9000 while both are translating the address to physical address 0x0000-0x1000.

In other words, two TLBs with different virtual address range can point to the same physical address range. It doesn't work in opposite direction, of course.

Regards,

Lukas

0 件の賞賛
711件の閲覧回数
mathias_edman
Contributor III

Hi again,

Thanks for answer, but I am not sure I understand.

If I have remapped the physical memory 0x0000-0x1000 to virtual address 0x8000-0x9000, then as far as I understand I cannot write anything to the address range 0x0000-0x1000 any longer. You are saying that creating another TBL originating from the same physical memory will help my cause?

My scenario is to install new software to a physical address in flash that has been remapped to a virtual address at another location. My assumption is that the flash driver cannot handle virtual address space, and that only real physical address should be used.

Mathias

0 件の賞賛
712件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

we are allowed to access only an address range which is covered by MMU. Otherwise an exception TLB Miss is triggered.

Each core access (I do not consider debug features) uses virtual address. It doesn't matter if virtual address and physical address is identical or if there's some translation.

If you want to access the same physical address using two virtual addresses, it can be done but you need to have two TLBs.

First TLB will be configured in this way: physical address 0x0000-0x1000, virtual address 0x0000-0x1000

Second TLB: physical address 0x0000-0x1000, virtual address 0x8000-0x9000

"My assumption is that the flash driver cannot handle virtual address space, and that only real physical address should be used."

SSD flash drivers expect that physical and virtual address is identical because it checks addresses, blocks and so on... That means you should really have two TLBs as mentioned above and use 'physical' address for programming.

Regards,

Lukas

711件の閲覧回数
mathias_edman
Contributor III

Crystal clear now, thanks!

0 件の賞賛