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

Hi,
When trying to port u-boot to a MPC8245 card, I'm not sure what IBAT and DBAT register work for. For example, sl8245.h defines 4 regions of IBAT: SDRAM_BASE, 0x40000000, 0x80000000, and 0xf0000000.
1. Why are these regions defined?
2. Does it mean that you cannot access that memory area if the area hasn't been set by configuring IBAT and DBAT accordingly?
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?
Thanks, -Shawn.
__________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail

Dear Shawn,
in message 20040628062500.214.qmail@web20703.mail.yahoo.com you wrote:
When trying to port u-boot to a MPC8245 card, I'm not sure what IBAT and DBAT register work for. For example, sl8245.h defines 4 regions of IBAT:
If you have to ask such a question this is an indication that you don't have the qualification to port U-Boot. When dealing with software on such a low level as the boot loader you need a thorough understanding of the hardware and it's internal workings. Without this you are lost.
No offence meant.
Best regards,
Wolfgang Denk

When trying to port u-boot to a MPC8245 card, I'm not sure what IBAT
and
DBAT register work for. For example, sl8245.h defines 4 regions of
IBAT:
If you have to ask such a question this is an indication that you don't have the qualification to port U-Boot. When dealing with software on such a low level as the boot loader you need a thorough understanding of the hardware and it's internal workings. Without this you are lost.
:(. You didn't answer the questions though. I'm learning from practice. I don't recall I touched any IBAT/DBAT configuration when I ported ppcboot to a MPC855 board. So configuring them seems new to me.
Thank other guys here for giving me hints and references.
-Shawn.
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail

Shawn wrote:
- 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?
The Broadcom BMW board is based on the MPC8245, and it accesses part of that region of memory. You should use that code as an example.
However, I should note that, in U-Boot 1.0.0, the file "board/bmw/early_init.S" does not contain a GPL header.
-Robert DeLaGarza

If you do use the bmw board as a model, be sure to include your define along with the "#if defined CONFIG_BMW" (in start.S) or you will not "drop" into early_init_f in early_init.S.
--- "DeLaGarza, Robert" robdlg@att.net wrote:
Shawn wrote:
- 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?
The Broadcom BMW board is based on the MPC8245, and it accesses part of that region of memory. You should use that code as an example.
However, I should note that, in U-Boot 1.0.0, the file "board/bmw/early_init.S" does not contain a GPL header.
-Robert DeLaGarza
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
__________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail

In message 40DFC8A9.6080506@att.net you wrote:
However, I should note that, in U-Boot 1.0.0, the file "board/bmw/early_init.S" does not contain a GPL header.
Thanks for pointing out. I will try to fix this.
James, IIRC it was you who submitted the "board/bmw/early_init.S" code; can you please submit a patch to add a GPL header to this file, or otherwise make clear that this file is under GPL so I can do that?
Best regards,
Wolfgang Denk

Hi,
- 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
participants (5)
-
DeLaGarza, Robert
-
Frank
-
Sangmoon Kim
-
Shawn
-
Wolfgang Denk