summaryrefslogtreecommitdiffstats
path: root/bsps/shared/ofw (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bsps/shared/ofw: Fix coverity defectsG S Niteesh Babu2021-05-061-1/+11
| | | | | | | | | | This patch adds asserts to fix coverity defects 1) CID 1474437 (Out-of-bounds access) 2) CID 1474436 (Out-of-bounds access) From manual inspection, out of bounds access cannot occur due to bounds checking but coverity fails to detect the checks. We are adding asserts as a secondary check.
* bsps/shared/ofw: Add rtems_ofw_is_node_compatibleG S Niteesh Babu2021-03-211-0/+12
| | | | | | | | This patch extends the RTEMS OFW API by adding rtems_ofw_find_device_by_compat This function checks if a node has the expected compatible property.
* bsps/shared/ofw: Bug fixesG S Niteesh Babu2021-02-081-3/+3
| | | | | Fixed bugs in rtems_ofw_get_prop, rtems_ofw_get_prop_len and removed hardcoded value.
* bsps/shared/ofw: Make rtems_ofw_get_effective_phandle iterativeG S Niteesh Babu2021-02-081-4/+5
| | | | | Refactored recursive rtems_ofw_get_effective_phandle into a iterative function.
* bsps/shared/ofw: Use strlcpy instead of strncpyG S Niteesh Babu2021-02-081-1/+9
| | | | | Changed rtems_ofw_get_prop to use strlcpy instead of strncpy to ensure the buffer is null terminated incase of overflow.
* bsps/shared/ofw: Fix coverity reported defectsG S Niteesh Babu2021-02-081-5/+5
| | | | | | | | | | | | | | | Fixed use after free and null pointer dereference defects FIXES: 1) CID 1472601 (NULL_RETURNS) 2) CID 1472600 (USE_AFTER_FREE) 3) CID 1472599 (USE_AFTER_FREE) 4) CID 1472598 (USE_AFTER_FREE) 5) CID 1472596 (USE_AFTER_FREE) The below two defects have to marked false positive 1) CID 1472597 (ARRAY_VS_SINGLETON) 2) CID 1472595 (ARRAY_VS_SINGLETON)
* bsps/shared/ofw: Implement RTEMS OFW interfaceG S Niteesh Babu2020-12-271-0/+683
RTEMS OFW is a FDT only implementation of the OpenFirmWare interface. This API is created to be compatible with FreeBSD OpenFirmWare interface. The main intention is to make porting of FreeBSD drivers to RTEMS easier. Most functions implemented have an direct one-one mapping with the original OFW API and some extra auxiliary functions were implemented to make working with device trees easier in RTEMS. Update #3784