From 759656ad4cc778b6cff47296b718cd388e762adc Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 22 Apr 2020 19:57:25 +0200 Subject: 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: https://github.com/raspberrypi/linux/commit/4b17654f51fd87c42cda3217b0863e6aa1df49b9#diff-ac03c9402b807c11d42edc9e8d03dfc7 this fixes the memory size detection with latest firmware on raspberry pi4-b (4GB) for kenji. --- sys/src/9/bcm/bootargs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/src') diff --git a/sys/src/9/bcm/bootargs.c b/sys/src/9/bcm/bootargs.c index efb0183b5..aac14c501 100644 --- a/sys/src/9/bcm/bootargs.c +++ b/sys/src/9/bcm/bootargs.c @@ -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; -- cgit v1.2.3