[U-Boot-Users] What are IBAT and DBAT?

Sangmoon Kim dogoil at etinsys.com
Mon Jun 28 12:44:46 CEST 2004


Hi,

> 3. Can IBAT and DBAT be modified dynamically? For example, if I want to
> access 0x70000000 ~ 0x78000000 temporarily, which is not defined in
> configuration header file, can I change the configuration of one of IBAT
> and DBAT pair, e.g. ibat2 and dbat2?
>

In case of board/etin/debris board.
DBAT1/IBAT1 is used for cache before RAM is initialized.
After RAM is initialized and the data memory area is mapped to RAM,
DBAT1/IBAT1 is not needed.
So I use DBAT1 for a flash memory at 0x78000000 after it.
See board/etin/debris/flash.c.
You can find the following code in flash_init function.

msr = get_msr();
set_msr(msr & ~(MSR_IR | MSR_DR));
mtibat1l(0x70000000 | BATL_PP_10 | BATL_CACHEINHIBIT);
mtibat1u(0x70000000 | BATU_BL_256M | BATU_VS | BATU_VP);
mtdbat1l(0x70000000 | BATL_PP_10 | BATL_CACHEINHIBIT);
mtdbat1u(0x70000000 | BATU_BL_256M | BATU_VS | BATU_VP);
set_msr(msr);

You can also change IBAT1 with similar method.

Regards,
Sangmoon Kim





More information about the U-Boot mailing list