public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Acccessing IRAM in MX53
@ 2012-06-11  9:09 Teemu Keskinarkaus
  2012-06-11 10:20 ` Stefano Babic
  0 siblings, 1 reply; 3+ messages in thread
From: Teemu Keskinarkaus @ 2012-06-11  9:09 UTC (permalink / raw)
  To: u-boot

Hi,

I need to access IRAM from U-boot in MX53 based HW. This is part of the data transfer between kernel and U-boot. I've already done the kernel part and now I need to do the U-boot part.

I tried this:

#define IRAM_ADDRESS IRAM_BASE_ADDR + IRAM_SIZE - SZ_4K

unsigned long *iram = (unsigned long*)IRAM_ADDRESS;
unsigned long data;

data = *iram;

But with that code the U-boot just gets stuck when trying to access the IRAM. I looked and it seems that IRAM is added to MMU definitions and virtual address is the same as physical.

So questions is. How should I access the IRAM if the method I'm using is not correct or what's wrong in my method?

Teemu Keskinarkaus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] Acccessing IRAM in MX53
  2012-06-11  9:09 [U-Boot] Acccessing IRAM in MX53 Teemu Keskinarkaus
@ 2012-06-11 10:20 ` Stefano Babic
  2012-06-18  4:37   ` Teemu Keskinarkaus
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Babic @ 2012-06-11 10:20 UTC (permalink / raw)
  To: u-boot

On 11/06/2012 11:09, Teemu Keskinarkaus wrote:
> Hi,
> 

Hi,

> I need to access IRAM from U-boot in MX53 based HW. This is part of the data transfer between kernel and U-boot. I've already done the kernel part and now I need to do the U-boot part.
> 
> I tried this:
> 
> #define IRAM_ADDRESS IRAM_BASE_ADDR + IRAM_SIZE - SZ_4K
> 
> unsigned long *iram = (unsigned long*)IRAM_ADDRESS;
> unsigned long data;
> 
> data = *iram;
> 
> But with that code the U-boot just gets stuck when trying to access the IRAM. I looked and it seems that IRAM is added to MMU definitions and virtual address is the same as physical.

In u-boot, the MMU is not turned on. This was done by design to make
things simpler. I do not know what you are talking about.

> 
> So questions is. How should I access the IRAM if the method I'm using is not correct or what's wrong in my method?

MX53LOCO U-Boot > md 0xF8000000
f8000000: 5f04dbd6 e0a62773 fa92b272 e85f7213    ..._s'..r....r_.
f8000010: 946065a3 fbe525ce 0cedf27e d2f2e4df    .e`..%..~.......
f8000020: e7d76787 e8e97cfe 49927a97 d2b1a033    .g...|...z.I3...
f8000030: e84ac878 ec76c015 4fde5c14 338d88c8    x.J...v..\.O...3
f8000040: f797b909 fabf35ba 9dee0101 61b6c523    .....5......#..a
f8000050: 3a9057e3 dbea4c77 8347b4bd bcbce01a    .W.:wL....G.....

iram is read flawlessy.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] Acccessing IRAM in MX53
  2012-06-11 10:20 ` Stefano Babic
@ 2012-06-18  4:37   ` Teemu Keskinarkaus
  0 siblings, 0 replies; 3+ messages in thread
From: Teemu Keskinarkaus @ 2012-06-18  4:37 UTC (permalink / raw)
  To: u-boot

> From: Stefano Babic [mailto:sbabic at denx.de] 

> MX53LOCO U-Boot > md 0xF8000000
> f8000000: 5f04dbd6 e0a62773 fa92b272 e85f7213    ..._s'..r....r_.
> f8000010: 946065a3 fbe525ce 0cedf27e d2f2e4df    .e`..%..~.......
> f8000020: e7d76787 e8e97cfe 49927a97 d2b1a033    .g...|...z.I3...
> f8000030: e84ac878 ec76c015 4fde5c14 338d88c8    x.J...v..\.O...3
> f8000040: f797b909 fabf35ba 9dee0101 61b6c523    .....5......#..a
> f8000050: 3a9057e3 dbea4c77 8347b4bd bcbce01a    .W.:wL....G.....

>iram is read flawlessy.

Yes, it seems that it works. I tried that command in my U-boot and it works ok. I didn't remember those memory dump command. I'll have to investigate how it's read and copy that to my code.

About the MMU. I saw some MMU settings used and assumed that MMU was used although I assumed too that it's not used.

But anyway. Thanks. I think I can continue from here.

-Teemu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-18  4:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-11  9:09 [U-Boot] Acccessing IRAM in MX53 Teemu Keskinarkaus
2012-06-11 10:20 ` Stefano Babic
2012-06-18  4:37   ` Teemu Keskinarkaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox