bcm, bcm64: dancing to the drum of the linux clowns for device tree memory size detection (thanks kenji)

looks like linux changed the device tree names for
the memory node:

4b17654f51 (diff-ac03c9402b807c11d42edc9e8d03dfc7)

this fixes the memory size detection with latest firmware
on raspberry pi4-b (4GB) for kenji.
front
cinap_lenrek 2020-04-22 19:57:25 +02:00
parent 77048feb25
commit 759656ad4c
1 changed files with 2 additions and 1 deletions

View File

@ -89,7 +89,8 @@ beget4(uchar *p)
static void
devtreeprop(char *path, char *key, void *val, int len)
{
if(strcmp(path, "/memory") == 0 && strcmp(key, "reg") == 0){
if((strcmp(path, "/memory") == 0 || strcmp(path, "/memory@0") == 0)
&& strcmp(key, "reg") == 0){
if(findconf("*maxmem") < 0 && len > 0 && (len % (3*4)) == 0){
uvlong top;
uchar *p = val;