CVSROOT: /cvs Module name: src Changes by: kette...@cvs.openbsd.org 2020/07/06 09:18:04
Modified files: sys/dev/ofw : fdt.c openfirm.h sys/arch/arm/arm: openprom.c sys/arch/arm64/arm64: openprom.c sys/arch/octeon/octeon: openprom.c sys/arch/powerpc64/powerpc64: openprom.c Log message: IEEE1275 (Open Firmware) defines that parameter name strings can have a length of up to 31 characters. This limit is also present in the flattened device tree specification/ Unfortunately this limit isn't enforced by the tooling and there are systems in the wild that use longer strings. This includes the device trees used on POWER9 systems and has been seen on some ARM systems as well. So bump the buffer size from 32 bytes (31 + terminating NUL) to 64 bytes. Centrally define OFMAXPARAM to this value (in <dev/ofw/openfirm.h>) replacing the various OPROMMAXPARAM definition scattered around the tree to make sure the FDT implementation of OF_nextprop() uses the same buffer size as its consumers. Eliminate the static buffer in various openprom(4) implementations on FDT systems. Makes it possible to dump the full device tree on POWER9 systems using eeprom -p. ok deraadt@, visa@