ref: 3249e3cea268eeaaab236ee3682081e88873335b
parent: 50e797219a8546c6c013cc7d9e1837eb5d92caf3
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Apr 22 15:57:25 EDT 2020
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.
--- a/sys/src/9/bcm/bootargs.c
+++ b/sys/src/9/bcm/bootargs.c
@@ -89,7 +89,8 @@
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;
--
⑨