thanks for your quick response.
1. So in the default 4K boot page TLB entry, the effective address is 0xFFFF_Fnnn, the physical address is boot ROM physical address, it is configured by hardware.
[yang] how to config the physical address by hardware?
in the p2041.reg file,
SCGA LA LAWBARH0 00000C00 00000000 LA /ua:0
SCGA LA LAWBARL0 00000C04 E0000000 LA /ua:0
SCGA LA LAWAR0 00000C08 81F0001B LA /ua:0
SCGA ELBC BR0 00124000 E8001001 ELBC /ua:0
SCGA ELBC OR0 00124004 F8000F85 ELBC /ua:0
so the physical address: 0x0_e000_0000 ~ 0x0_efff_ffff, 256MB ?
effective address: 0x0_e800_0000_0x0_efff_ffff, 128MB
I program the bootrom.bin in the 0xeff0_0000~0xefff_fffff, how to map the address 0xefff_ffff to the 0xffff_ffff ? I am confused.
2. i use the vxworks bootrom, which may be the same theory with the uboot,
in my code ,
FLASH_BASE_ADRS 0xff00_0000 ~0xffff_ffff ,16MB;
ROM_TEXT_ADRS 0xfff0_0100
now I want to expand the nor flash size, edit as follows:
in the bootcode:
1)
LAWBARH0 00000C00 00000000
LAWBARL0 00000C04 E0000000
LAWAR0 00000C08 81F0001B
BR0 00124000 E8001001
OR0 00124004 F8000F85
FLASH_BASE_ADRS 0xe800_0000 ~0xefff_ffff ,128MB;
ROM_TEXT_ADRS 0xeff0_0100
2) flash TLB:
addis r4,0,0x1000 /* TLBSEL = TLB1(CAM) , ESEL = 0 */
ori r4,r4,0x0000
addis r5, 0, HI(MMU_STATE_VALID|MMU_STATE_IPROT)
ori r5,r5,_MMU_TLB_SZ_256M /* TS = 0, TSIZE = 256MByte page size*/
addis r6, 0, HI(FLASH_BASE_ADRS) /* EPN */
ori r6,r6,MMU_ROM_ACCESS
addis r7, 0, HI(FLASH_BASE_ADRS) /* RPN */
ori r7,r7,0x0015 /* Supervisor XWR*/
3) edit the boot Space Translation
BSTRL 00000C24 0xefff_f000
BSTAR 00000C28 0x8100_000b
now the the effective address is 0xefff_fffc?
would you please give me some suggestion?
thanks very much.