El 5 feb. 2016 1:24 PM, "Peter Maydell" escribió: > On 5 February 2016 at 16:09, Aurelio Remonda > wrote: > > Hello, im working on this feature right now. > > i have a working patch but maybe I can make some changes to make it look > better: > > for example in some point i check ram_size like this: > > if (ram_size == 0x8000000) > > Maybe if i make ram_addr_t default_ram_size global (is a local > > variable of set_memory_options function) > > i can use it instead of hardcoded 0x8000000. > > No, don't do that. > > Why do you care about whether the ram size is the default or not? > > thanks > -- PMM > Im making something like this: if (ram_size == 0x8000000) /* default value, means whitout -m flag */ { sram_size = ((board->dc0 >> 18) + * 1024; } else if (ram_size >= UINT_MAX) /* more than 4GB */ sram_size = UINT_MAX; else sram_size = ram_size So in case someone does not use the -m flag i want to be sure the ram is calculated like it was before. If the flag is indeed used you have a limit given by the size of sram_size (32 bits) in that case if you try using the -m option with a size greater than 4GB you will always get a 4GB (4294967296 to be precise).