[ECOS] flash base mask question
Wed Nov 12 20:04:00 GMT 2003
On Wed, 2003-11-12 at 11:07, John Newlin wrote:
> In file:
> There is a line that says:
> #define CYGNUM_FLASH_BASE_MASK (0xFC000000u) // 32Mb total
> First question:
> Does Mb stand for Megabit or MegaByte?
> If Megabyte should the number not be?
> ~(1024*1024*32-1) which is: 0xfe00_0000 ( i wish c did underscore in
> numbers like verilog)
> If it is megaBIT then it would it not be:
> ~(32/8*1024*1024) which is: 0xffc0_0000
> Or maybe the mask is per device? There are 2 of these 32MB devices, which
> would then make a total of 64MB and then the mask would make sense to my
> simple brain.
> If the numbers in the file are indeed correct, can someone please explain
> to me how to derive the mask so that I can put the correct mask for my
It's MegaBytes and in this particular case, the value doesn't match the
The value should be ~((32*1024*1024)-1) == 0xFE000000. It's used to
take an arbitrary FLASH device and divine the device base address from
it. It should correspond to the size of the largest device [set] which
can be installed.
Note: it's only used by the Intel FLASH device drivers in any case.
Gary Thomas <email@example.com>
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss