U-Boot with MMU

Showing results for 
Search instead for 
Did you mean: 

U-Boot with MMU

U-Boot with MMU

For basics on getting started with U-Boot, read DasUBoot.

These instructions assume you have generated the file custom_fpga.h for your design, as described in Linux.

When porting U-Boot to a Nios II with an MMU, you have to take the memory map into account.

The Nios II Memory partitions are defined as follows:

PartitionVirtual Address RangeUsed ByMemory AccessUser Mode AccessDefault Data Cacheability
I/O (1)0xE0000000–0xFFFFFFFFOperating systemBypasses TLBNoDisabled
Kernel (1)0xC0000000–0xDFFFFFFFOperating systemBypasses TLBNoEnabled
Kernel MMU (1)0x80000000–0xBFFFFFFFOperating systemUses TLBNoSet by TLB
User0x00000000–0x7FFFFFFFUser processesUses TLBSet by TLBSet by TLB

(1) Supervisor-only partition 

(From Nios II Processor Reference Handbook, Table 3-2.)

The high four bits of the address are used to define which partition the memory appears in.

Your custom_fpga.h probably shows that all the devices are down in the "User" section. For example, my JTAG_UART_BASE is at 0x21208B0.

For U-Boot use the JTAG UART, it has to be in the I/O Address area. Fortunately, you do not need to change the design. You just need to address it as if it is there, at 0xE21208B0.

The same applies to flash. Your Flash Base Address is probably down at 0x00000000. To write flash, U-Boot needs to see it at 0xE0000000. This is where you need to define it at for your board configuration. To boot, it needs to see it at the RESET_ADDR, which is 0xC0000000. If you burn the U-Boot image to 0xE0000000, it will be there at 0xC0000000.

Version history
Last update:
‎06-26-2019 02:06 AM
Updated by: