From: J. William Campbell <jwilliamcampbell@comcast.net>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Re: ENV_IS_EMBEDDED functionality
Date: Fri, 13 Jan 2006 14:05:45 -0800 [thread overview]
Message-ID: <43C82439.6030102@comcast.net> (raw)
In-Reply-To: <20060113204748.2A84535265A@atlas.denx.de>
Thanks for the quick response. There are some Blackfin related questions
on the old list, but the attempt made a couple of years ago to submit
the patches was rejected for a lot of reasons. I was not involved at
that time. I am attempting to determine if this ENV_IS_EMBEDDED
approach is also going to be rejected so I can find another way. It is
not clear to me that it is really necessary, but I want to understand
further the functionality to determine if it is in any way useful. This
reflects the current state of the Blackfin code, so I am trying to clean
it up somewhat. I have a further question below.
Wolfgang Denk wrote:
>In message <43C7FF53.7020809@comcast.net> you wrote:
>
>
>> I have a question regarding the functionality provided by
>>ENV_IS_EMBEDDED. Currently, this value is computed only for the case
>>CFG_ENV_IS_IN_FLASH defined in environment.h, and is based on the flash
>>
>>
>
>Yes, because it can only be located in the middle of the U-Boot image
>in flash if the environment is stored itself in flash - you cannot
>have this if the environment is, for example, sotred in a EEPROM.
>
>
>
>>addresses of the environment being defined as inside the executing
>>addresses of u-boot. This seems to be designed for the case where u-boot
>>is executed out of flash and not copied into ram for execution. There is
>>
>>
>
>Wrong. This has nothing to do with execution, just with storage.
>
>
The source of my confusion is that ENV_IS_EMBEDDED is defined as follows
in environment.h
#if (CFG_ENV_ADDR >= CFG_MONITOR_BASE) && \
(CFG_ENV_ADDR+CFG_ENV_SIZE) <= (CFG_MONITOR_BASE+CFG_MONITOR_LEN)
#define ENV_IS_EMBEDDED 1
#endif
Isn't CFG_MONITOR_BASE the address where u-boot resides for execution?
It is defined that way on the Blackfin code
because CFG_MONITOR_BASE is defined as TEXT_BASE and TEXT_BASE is
defined as 0x07FC0000. The flash
memory is located at CFG_FLASH_BASE (defined as 0x20000000) and
CFG_ENV_ADDR is 0x20004000. U-boot is loaded into flash@0x20000000,
so the environment data does reside in flash even though the
ENV_IS_EMBEDDED test fails. The code gets around this by just defining
it directly. So is CFG_MONITOR_BASE incorrectly defined and it should be
a flash address?? BTW the u-boot code is not compiled PIC, so the
execution address must matc the link address.
>
>
>>an old configuration variable, CFG_ENV_IS_EMBEDDED, that appears to be
>>non-functional and deprecated. I am working with u-boot for the Analog
>>Devices Blackfin chip, which has not yet been submitted to mainstream
>>
>>
>
>I think I remember to have seen patches here on the list - search the
>archives, please.
>
>
>
>>(AFAIK). The code directly defines ENV_IS_EMBEDDED to force that
>>functionality even though it is copied to ram for execution (and thereby
>>
>>
>
>This has nothing to do with execution.
>
>
>
>> My question is: What is your opinion of this approach? It seems
>>
>>
>
>You misunderstand the function.
>
>
>Best regards,
>
>Wolfgang Denk
>
>
>
next prev parent reply other threads:[~2006-01-13 22:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-13 19:28 [U-Boot-Users] ENV_IS_EMBEDDED functionality J. William Campbell
2006-01-13 20:47 ` [U-Boot-Users] " Wolfgang Denk
2006-01-13 22:05 ` J. William Campbell [this message]
2006-01-13 23:48 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43C82439.6030102@comcast.net \
--to=jwilliamcampbell@comcast.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.