Add an option - AR71XX_REALMEM - which overrides the amount of
memory detected from Redboot, or overrides the "otherwise" case if no Redboot information was found. Some AR71XX platforms don't use Redboot (eg TP-LINK devices using UBoot; some later Ubiquiti devices which apparently also use UBoot) and at least one plain out lies - the Ubiquiti LS-SR71A Redboot says there's 16mb of RAM when in fact there's 32mb. A more "clean" solution will be needed at a later date.
This commit is contained in:
parent
83d59d21b5
commit
c720b9bd9e
@ -872,3 +872,9 @@ SDP opt_ofed.h
|
||||
SDP_DEBUG opt_ofed.h
|
||||
IPOIB_DEBUG opt_ofed.h
|
||||
IPOIB_CM opt_ofed.h
|
||||
|
||||
# At least one of the AR71XX ubiquiti boards has a Redboot configuration
|
||||
# that "lies" about the amount of RAM it has. Until a cleaner method is
|
||||
# defined, this option will suffice in overriding what Redboot says.
|
||||
AR71XX_REALMEM opt_global.h
|
||||
|
||||
|
@ -180,6 +180,20 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused,
|
||||
if (realmem == 0)
|
||||
realmem = btoc(32*1024*1024);
|
||||
|
||||
/*
|
||||
* Allow build-time override in case Redboot lies
|
||||
* or in other situations (eg where there's u-boot)
|
||||
* where there isn't (yet) a convienent method of
|
||||
* being told how much RAM is available.
|
||||
*
|
||||
* This happens on at least the Ubiquiti LS-SR71A
|
||||
* board, where redboot says there's 16mb of RAM
|
||||
* but in fact there's 32mb.
|
||||
*/
|
||||
#if defined(AR71XX_REALMEM)
|
||||
realmem = btoc(MIPS_REALMEM);
|
||||
#endif
|
||||
|
||||
/* phys_avail regions are in bytes */
|
||||
phys_avail[0] = MIPS_KSEG0_TO_PHYS(kernel_kseg0_end);
|
||||
phys_avail[1] = ctob(realmem);
|
||||
|
Loading…
x
Reference in New Issue
Block a user