aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/fw/lib/cmdline.c
AgeCommit message (Collapse)AuthorFilesLines
2023-04-12MIPS: fw: Allow firmware to pass a empty envJiaxun Yang1-1/+1
fw_getenv will use env entry to determine style of env, however it is legal for firmware to just pass a empty list. Check if first entry exist before running strchr to avoid null pointer dereference. Cc: [email protected] Link: https://github.com/clbr/n64bootloader/issues/5 Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2020-03-25MIPS: do not compile generic functions for CONFIG_CAVIUM_OCTEON_SOCMasahiro Yamada1-0/+2
MIPS provides multiple definitions for the following functions: fw_init_cmdline __delay __udelay __ndelay memmove __rmemcpy memcpy __copy_user The generic ones are defined in lib-y objects, which are overridden by the Octeon ones when CONFIG_CAVIUM_OCTEON_SOC is enabled. The use of EXPORT_SYMBOL in static libraries potentially causes a problem for the llvm linker [1]. So, I want to forcibly link lib-y objects to vmlinux when CONFIG_MODULES=y. As a groundwork, we must fix multiple definitions that have previously been hidden by lib-y. If you look at lib/string.c, arch can define __HAVE_ARCH_* to opt out the generic implementation. Similarly, this commit adds CONFIG_HAVE_PLAT_* to allow a platform to opt out the MIPS generic code. [1]: https://github.com/ClangBuiltLinux/linux/issues/515 Reported-by: kbuild test robot <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2014-11-24MIPS: FW: Use kstrtoul() to parse unsigned long from the fw environmentAlban Bedel1-3/+3
Fix some value corruptions with values that can't be represented in a signed long. Signed-off-by: Alban Bedel <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/8358/ Signed-off-by: Ralf Baechle <[email protected]>
2014-11-24MIPS: FW: Fix parsing u-boot environmentAlban Bedel1-1/+1
When reading u-boot's key=value pairs it should skip the '=' and not use the next argument. Signed-off-by: Alban Bedel <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/8357/ Signed-off-by: Ralf Baechle <[email protected]>
2013-05-08MIPS: FW: Add environment variable processing.Steven J. Hill1-0/+101
Add parsing of the environment and command line variables passed to the kernel to the firmware library. Signed-off-by: Steven J. Hill <[email protected]>