summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/rtems-fdt (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rtems-fdt: Fix node property access on 64bitChris Johns2023-12-141-1/+1
|
* libmisc/rtems-fdt: Support prop map items up to the size of uintptr_tChris Johns2022-11-251-2/+17
| | | | Updates #4729
* cpukit/rtems-fdt: Avoid use of malloc/errnoKinsey Moore2022-11-181-7/+6
| | | | | | Use of malloc implies errno which adds TLS dependencies and prevents use of this FDT wrapper library in BSP initialization code. This change makes use of rtems_malloc and rtems_calloc which avoid TLS dependencies.
* libmisc/rtems-fdt: Fix return error valuesChris Johns2022-10-141-2/+2
| | | | Updates #4729
* libmisc/rtems-fdt: Fix missing error stringChris Johns2022-10-111-1/+2
| | | | | | - Coverity CID 1515930 issue Updates #4729
* libmisc/rtems-fdt: Update to support 64bit addressesChris Johns2022-10-102-130/+434
| | | | | | | | | | | | - Add support to get the parent address and size cells - Provide support to get a reg prop address map - Change getting a set of properties to uintptr_t - Improve the debug mode of the ls command to print all props Closes #4729
* cpukit/fdt: Free index before containerKinsey Moore2022-10-031-2/+2
| | | | | | | Ensure that the index is released before the structure containing it is freed and NULLed. Updates #4460
* cpukit/fdt: Check correct allocationKinsey Moore2022-10-031-1/+1
| | | | | | | | The second allocation check was mistakenly rechecking the first allocation. It now checks the correct allocation and ensures that names is not NULL. Updates #4462
* cpukit/libmisc/rtems-fdt: Change license to BSD-2Joel Sherrill2022-03-222-6/+44
| | | | Updates #3053.
* libmisc/rtems-fdt: close() file 'bf'Ryan Long2021-12-171-0/+1
| | | | | | | | close() file 'bf' to avoid leaking descriptor. CID 1437645: Resource leak in rtems_fdt_load(). Closes #4297
* libmisc/fdt: fix node initialise error with RTEMS_DEBUGChris Johns2021-08-211-0/+2
|
* rtems-fdt: Fixed 32bit pointersStephen Clark2021-05-051-2/+2
| | | | | | Using 32bit types like uint32_t for pointers creates issues on 64 bit architectures like AArch64. Replaced occurrences of these with uintptr_t, which will work for both 32 and 64 bit architectures.
* rtems-fdt/rtems-fdt.c: Fix bug in loop terminationG S Niteesh Babu2021-03-211-1/+1
| | | | | The while loop, loops infinitely in case of raw FDT data. The loop condition (size) is not modified during iterations.
* rtems-fdt / shell - Fix string truncation warningFrank Kühndel2020-10-201-21/+19
| | | | | | | | | | | | | | The compiler warning was: ../../../cpukit/libmisc/rtems-fdt/rtems-fdt.c:267:5: warning: 'strncpy' specified bound depends on the length of the source argument 267 | strncpy(path, name, namelen); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ It turns out that the `strncpy()` nor the buffer `path` is needed when one uses `strncmp()` instead of `strcmp()`. This needs some change to the algorithm but has the advantage that `name` is never truncated to the size of the buffer `path`.
* Revert "rtems-fdt / shell - Fix string truncation warning"Sebastian Huber2020-10-161-19/+21
| | | | This reverts commit 355bc37ad35a7d67a7209130171febe805c67f62.
* rtems-fdt / shell - Fix string truncation warningFrank Kühndel2020-10-151-21/+19
| | | | | | | | | | | | | | | | | | | | | The compiler warning was: ../../../cpukit/libmisc/rtems-fdt/rtems-fdt.c:267:5: warning: 'strncpy' specified bound depends on the length of the source argument 267 | strncpy(path, name, namelen); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ It turns out that the `strncpy()` nor the buffer `path` is needed when one uses `strncmp()` instead of `strcmp()`. This needs some change to the algorithm but has the advantage that `name` is never truncated to the size of the buffer `path`. Note: rtems-fdt.c, rtems-fdt-shell.c and cpukit/include/rtems/rtems-fdt.h seem to be dead code. They implement a shell command `fdt` but that command is not part of the shell nor of any macro in cpukit/include/rtems/shellconfig.h.
* Fix -Wchar-subscripts warningsAschref Ben Thabet2020-08-201-4/+4
| | | | | | | The argument to the ctype functions must be an int and the value of the character must be representable as an unsigned char or equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
* Fix format warningsSebastian Huber2019-01-071-2/+2
|
* fdt: Use self-contained mutexSebastian Huber2018-02-081-119/+29
| | | | Update #2843.
* Remove make preinstallChris Johns2018-01-252-663/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* Include missing <string.h>Sebastian Huber2017-08-251-0/+1
| | | | Update #2133.
* libmisc/rtems-fdt: Add RTEMS FDT wrapper and shell command to libmisc.Chris Johns2017-08-204-0/+2493
- Provide application support for handling FDT blobs in RTEMS. This is useful when interfacing FPGA fabrics. - Provide a shell command to list a blob as well as provide read and write access to addresses in the FTB. Closes #3099.