[PATCH v3] bsps/shared/ofw: Fix coverity defects

2021-05-06 Thread G S Niteesh Babu
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. --- bs

[PATCH] bsps/raspberrypi/console: Fix default console device

2021-05-01 Thread G S Niteesh Babu
When no console argument is given, the driver defaults to pl011 this results in no output in case of Rpi3 whose primary uart is miniuart. This patch fixes that by defaulting to the primary uart when no console option is provided. --- bsps/arm/raspberrypi/console/console-config.c | 12 +---

[PATCH v2] bsps/shared/ofw: Fix coverity defects

2021-05-01 Thread G S Niteesh Babu
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. --- bs

[PATCH] bsps/shared/ofw: Fix coverity defects

2021-04-28 Thread G S Niteesh Babu
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. --- bs

[PATCH libBSD v2] iicbus/rtems-i2c.c: Add rtems, path as an additional bus path

2021-04-19 Thread G S Niteesh Babu
Adds "rtems,path" as an additional bus path for the i2c driver. Previously the bus path was provided in "rtems,i2c-path" property only. --- rtemsbsd/sys/dev/iicbus/rtems-i2c.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rtemsbsd/sys/dev/iicbus/rtems-i2c.c b/rtemsbs

[PATCH libBSD] iicbus/rtems-i2c.c: Add rtems, path as an additional bus path

2021-04-18 Thread G S Niteesh Babu
Adds "rtems,path" as an additional bus path for the i2c driver. Previously the bus path was provided in "rtems,i2c-path" property only. --- rtemsbsd/sys/dev/iicbus/rtems-i2c.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rtemsbsd/sys/dev/iicbus/rtems-i2c.c b/rtemsb

[PATCH RTEMS v2 0/1] bsp/beagle: Refactored i2c driver and Updated

2021-04-10 Thread G S Niteesh Babu
The following two patches update the Beagle BSP i2c driver to use device tree based initialization and the documentation related to it. G S Niteesh Babu (1): bsps/beagle: Refactored i2c driver bsps/arm/beagle/i2c/bbb-i2c.c | 122 ++ bsps/arm/beagle/include

[PATCH RTEMS v2 1/1] bsps/beagle: Refactored i2c driver

2021-04-10 Thread G S Niteesh Babu
Refactored the i2c driver to parse register values from the device tree rather than hardcoding them. But still the clocks have to initialized manually. --- bsps/arm/beagle/i2c/bbb-i2c.c | 122 ++ bsps/arm/beagle/include/bsp.h | 4 + bsps/arm/beagle/include/bsp

[PATCH RTEMS-docs] user/bsps/arm/beagle: Update i2c initialization instructions

2021-04-10 Thread G S Niteesh Babu
The new i2c driver in the beagle BSP uses FDT based initialization. This updates the documentation of the BSP about the same. --- user/bsps/arm/beagle.rst | 41 +++- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/user/bsps/arm/beagle.rst b/user/

[PATCH RTEMS] bsps/beagle: Refactored i2c driver

2021-03-22 Thread G S Niteesh Babu
Refactored the i2c driver to parse register values from the device tree rather than hardcoding them. But still the clocks have to initialized manually. --- bsps/arm/beagle/i2c/bbb-i2c.c | 100 -- bsps/arm/beagle/include/bsp.h | 4 ++ bsps/arm/beagle/include/bs

[PATCH] rtems-fdt/rtems-fdt.c: Fix bug in loop termination

2021-03-17 Thread G S Niteesh Babu
The while loop, loops infinitely in case of raw FDT data. The loop condition (size) is not modified during iterations. --- cpukit/libmisc/rtems-fdt/rtems-fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt.c b/cpukit/libmisc/rtems-fdt/rtems

[PATCH libBSD] arm/ti/ti_pinmux: Remove TI pinmux driver

2021-03-13 Thread G S Niteesh Babu
The TI driver has been moved to RTEMS so the driver can be removed from libBSD. The following files have been removed from libBSD and moved to RTEMS. 1) ti/am335x/am335x_scm_padconf.c 2) ti/am335x/am335x_scm_padconf.h 3) ti/ti_pinmux.c 4) ti/ti_pinmux.h Update #3784 --- .../sys/arm/ti/am335x/am3

[PATCH 3/4] bsps/beagle: Added SOC detection using FDT

2021-03-13 Thread G S Niteesh Babu
Detects the SOC type using FDT and also replaces the ti_cpuid.h header in FreeBSD with custom one. --- bsps/arm/beagle/start/bsp-soc-detect.c | 55 ++ bsps/arm/beagle/start/bsp-soc-detect.h | 38 ++ bsps/arm/beagle/start/bspstart.c | 23 --- bs

[PATCH 2/4] bsp/beagle: Import Beagle pinmux from FreeBSD

2021-03-13 Thread G S Niteesh Babu
This patch imports the beagle pinmux driver from FreeBSD into RTEMS. Previously this driver was placed in RTEMS-libBSD but this caused double initialization of few pins once during RTEMS initialization and second time during libBSD initialization. The following patches port the driver from FreeBSD

[PATCH 1/4] bsps/shared/ofw: Add rtems_ofw_is_node_compatible

2021-03-13 Thread G S Niteesh Babu
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/include/ofw/ofw.h | 17 + bsps/shared/ofw/ofw.c | 12 2 files changed, 29 insertions(+) diff --git a/bsps/inc

[PATCH 0/4] Import and Port Beagle pinmux driver

2021-03-13 Thread G S Niteesh Babu
The following series of patches import and port the beagle pinmux driver from FreeBSD to RTEMS. Porting this driver will avoid double initialization of pin multiplexers once during RTEMS initialization and second time during libBSD initialization. UPDATE #3782 G S Niteesh Babu (4): bsps

[PATCH v2 3/4] bsps/shared/ofw: Make rtems_ofw_get_effective_phandle iterative

2021-02-06 Thread G S Niteesh Babu
Refactored recursive rtems_ofw_get_effective_phandle into a iterative function. --- bsps/shared/ofw/ofw.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bsps/shared/ofw/ofw.c b/bsps/shared/ofw/ofw.c index 886ad0252b..78576ecf45 100644 --- a/bsps/shared/ofw/ofw.c +++ b

[PATCH v2 4/4] bsps/shared/ofw: Bug fixes

2021-02-06 Thread G S Niteesh Babu
Fixed bugs in rtems_ofw_get_prop, rtems_ofw_get_prop_len and removed hardcoded value. --- bsps/shared/ofw/ofw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsps/shared/ofw/ofw.c b/bsps/shared/ofw/ofw.c index 78576ecf45..1c3a81785d 100644 --- a/bsps/shared/ofw/ofw.c ++

[PATCH v2 0/4] bsps/shared/ofw: Bug and Coverity defect fixes

2021-02-06 Thread G S Niteesh Babu
Update since v1: Using strlcpy instead of memcpy The following series of patches fix bugs and coverity reported defect in bsps/shared/ofw.c. G S Niteesh Babu (4): bsps/shared/ofw: Fix coverity reported defects bsps/shared/ofw: Use strlcpy instead of strncpy bsps/shared/ofw: Make

[PATCH v2 1/4] bsps/shared/ofw: Fix coverity reported defects

2021-02-06 Thread G S Niteesh Babu
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_

[PATCH v2 2/4] bsps/shared/ofw: Use strlcpy instead of strncpy

2021-02-06 Thread G S Niteesh Babu
Changed rtems_ofw_get_prop to use strlcpy instead of strncpy to ensure the buffer is null terminated incase of overflow. --- bsps/shared/ofw/ofw.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bsps/shared/ofw/ofw.c b/bsps/shared/ofw/ofw.c index fa94bfbf05..886ad0252

[PATCH 4/4] bsps/shared/ofw: Bug fixes

2021-02-05 Thread G S Niteesh Babu
Fixed bugs in rtems_ofw_get_prop, rtems_ofw_get_prop_len and removed hardcoded value. --- bsps/shared/ofw/ofw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsps/shared/ofw/ofw.c b/bsps/shared/ofw/ofw.c index e3626747fa..8b7f77311d 100644 --- a/bsps/shared/ofw/ofw.c ++

[PATCH 3/4] bsps/shared/ofw: Make rtems_ofw_get_effective_phandle iterative

2021-02-05 Thread G S Niteesh Babu
Refactored recursive rtems_ofw_get_effective_phandle into a iterative function. --- bsps/shared/ofw/ofw.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bsps/shared/ofw/ofw.c b/bsps/shared/ofw/ofw.c index 9dec310247..e3626747fa 100644 --- a/bsps/shared/ofw/ofw.c +++ b

[PATCH 2/4] bsps/shared/ofw: Use memcpy instead of strncpy

2021-02-05 Thread G S Niteesh Babu
Changed rtems_ofw_get_prop to use memcpy instead of strncpy --- bsps/shared/ofw/ofw.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bsps/shared/ofw/ofw.c b/bsps/shared/ofw/ofw.c index fa94bfbf05..9dec310247 100644 --- a/bsps/shared/ofw/ofw.c +++ b/bsps/shared/ofw/of

[PATCH 1/4] bsps/shared/ofw: Fix coverity reported defects

2021-02-05 Thread G S Niteesh Babu
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_

[PATCH 0/4] bsps/shared/ofw: Bug and Coverity defect fixes

2021-02-05 Thread G S Niteesh Babu
The following series of patches fix bugs and coverity reported defect in bsps/shared/ofw.c. G S Niteesh Babu (4): bsps/shared/ofw: Fix coverity reported defects bsps/shared/ofw: Use memcpy instead of strncpy bsps/shared/ofw: Make rtems_ofw_get_effective_phandle iterative bsps/shared/ofw

[PATCH docs] user: remove old build system cmd

2021-02-03 Thread G S Niteesh Babu
--- user/start/gsoc.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/start/gsoc.rst b/user/start/gsoc.rst index f8167b9..2c7df7c 100644 --- a/user/start/gsoc.rst +++ b/user/start/gsoc.rst @@ -114,8 +114,8 @@ running `make` in the BSP build directory. .. code-bloc

[PATCH v3] bsps/shared/ofw: Fix coverity reported defects

2021-02-03 Thread G S Niteesh Babu
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) 6) CID 1472597 (ARRAY_VS_SINGLETON) 7) CID 1472595 (ARRAY_VS_SINGLETON) ---

[PATCH v2] bsps/shared/ofw: Fix coverity reported defects

2021-02-03 Thread G S Niteesh Babu
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) 6) CID 1472597 (ARRAY_VS_SINGLETON) 7) CID 1472595 (ARRAY_VS_SINGLETON) ---

[PATCH] bsps/shared/ofw: Fix coverity reported defects

2021-01-28 Thread G S Niteesh Babu
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) --- bsps/shared/ofw/ofw.c | 10 +- 1 file changed, 5 insertions(+)

[patch libBSD] dev/ofw: Use RTEMS OFW FDT implementation

2021-01-20 Thread G S Niteesh Babu
This commit modifies the OFW interface to the RTEMS FDT implementation instead of the default FreeBSD. --- freebsd/sys/dev/ofw/openfirm.c| 2 ++ freebsd/sys/dev/ofw/openfirm.h| 9 .../machine/rtems-bsd-kernel-namespace.h | 22 --- 3 f

[PATCH] Implement FreeBSD helper structures

2021-01-19 Thread G S Niteesh Babu
The following structures and functions have been implemented to make porting of driver from FreeBSD easier. 1) struct resource_spec 2) struct device 3) struct resource 4) device_get_softc 5) bus_alloc_resources 6) bus_alloc_resource 7) bus_alloc_resource_any 8) bus_space_read_1 9) bus_spa

[PATCH v3 2/2] libtests/ofw01: Added a test for RTEMS OFW

2020-12-04 Thread G S Niteesh Babu
This commit adds a basic test that tests all the implemented RTEMS OFW functions. --- spec/build/testsuites/libtests/grp.yml | 2 + spec/build/testsuites/libtests/ofw01.yml | 21 +++ testsuites/libtests/ofw01/init.c | 197 +++ testsuites/libtests/ofw01/ofw01.doc

[PATCH v3 1/2] bsps/shared/ofw: Implement RTEMS OFW interface

2020-12-04 Thread G S Niteesh Babu
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

[PATCH v2 1/2] bsps/shared/ofw: Implement RTEMS OFW interface

2020-11-03 Thread G S Niteesh Babu
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

[PATCH v2 2/2] libtests/ofw01: Added a test for RTEMS OFW

2020-11-03 Thread G S Niteesh Babu
Added a basic test for the implemented RTEMS OFW API. --- spec/build/testsuites/libtests/grp.yml | 2 + spec/build/testsuites/libtests/ofw01.yml | 21 +++ testsuites/libtests/ofw01/init.c | 187 +++ testsuites/libtests/ofw01/ofw01.doc | 29 testsuites/li

[RTEMS-libBSD OFW v1] dev/ofw: Use RTEMS OFW FDT implementation

2020-09-16 Thread G S Niteesh Babu
This commit modifies the OFW interface to the RTEMS FDT implementation instead of the default FreeBSD. --- freebsd/sys/dev/ofw/openfirm.c| 2 ++ freebsd/sys/dev/ofw/openfirm.h| 9 .../machine/rtems-bsd-kernel-namespace.h | 22 --- 3 f

[PATCH v1 2/2] libtests/ofw01: Added a test for RTEMS OFW

2020-09-16 Thread G S Niteesh Babu
This commit adds a basic test that tests all the implemented RTEMS OFW functions. --- spec/build/testsuites/libtests/grp.yml | 2 + spec/build/testsuites/libtests/ofw01.yml | 21 +++ testsuites/libtests/ofw01/init.c | 187 +++ testsuites/libtests/ofw01/ofw01.doc

[PATCH v1 1/2] bsps/shared/ofw: Implement RTEMS OFW interface

2020-09-16 Thread G S Niteesh Babu
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

[PATCH v2] bsps/shared/ofw: Implement RTEMS OFW interface

2020-08-20 Thread G S Niteesh Babu
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

[PATCH] bsps/shared/ofw: Implement RTEMS OFW interface

2020-08-15 Thread G S Niteesh Babu
--- bsps/include/ofw/ofw.h | 534 bsps/shared/ofw/ofw.c | 654 spec/build/bsps/obj.yml | 4 + 3 files changed, 1192 insertions(+) create mode 100644 bsps/include/ofw/ofw.h create mode 100644 bsps/shared/ofw/ofw.c dif

[PATCH] bsps/shared/ofw: Added and Documented RTEMS OFW interface

2020-08-12 Thread G S Niteesh Babu
--- bsps/shared/dev/ofw/ofw.c | 0 bsps/shared/dev/ofw/ofw.h | 437 ++ 2 files changed, 437 insertions(+) create mode 100644 bsps/shared/dev/ofw/ofw.c create mode 100644 bsps/shared/dev/ofw/ofw.h diff --git a/bsps/shared/dev/ofw/ofw.c b/bsps/shared/dev/ofw/

GSoC 2020 PATCH: Import OpenFirmWare API to RTEMS

2020-07-14 Thread G S Niteesh Babu
Hello, This series of patches import OpenFirmWare to RTEMS from FreeBSD. These patches are based on the new build system, so it will require the person building this patch to pull Sebastian's 'build' branch from his git repo. Sebastian's git repo: https://git.rtems.org/sebh/rtems.git/log/?h=build

[PATCH RTEMS 2/7] libfreebsd: Import OFW files from FreeBSD.

2020-07-14 Thread G S Niteesh Babu
freebsd head: b8c57b4 The following files have been imported from FreeBSD to implement OF_* functions into RTEMS. 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- cpukit/include/dev/ofw/openfirm.h| 187 cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c | 479 +++ cpukit/libfreebsd

[PATCH RTEMS 6/7] spec/build/cpukit: Added spec file for OpenFirmWare

2020-07-14 Thread G S Niteesh Babu
--- spec/build/cpukit/librtemscpu.yml | 5 + spec/build/cpukit/objfreebsd.yml | 17 + 2 files changed, 22 insertions(+) create mode 100644 spec/build/cpukit/objfreebsd.yml diff --git a/spec/build/cpukit/librtemscpu.yml b/spec/build/cpukit/librtemscpu.yml index 403662b97d..

[PATCH RTEMS 3/7] libfreebsd: Added ofw_if.h

2020-07-14 Thread G S Niteesh Babu
This file is the RTEMS implementation of ofw_if.h in FreeBSD. The ofw_if.h in FreeBSD is an autogenerated header file that maps the OF_function calls to their respective implementation. But in RTEMS this file maps the OF_functions directly to their FDT implementation. --- cpukit/libfreebsd/freebsd

[PATCH RTEMS 7/7] libtests/openfirmware: Added a testsuite for openfirmware

2020-07-14 Thread G S Niteesh Babu
--- spec/build/testsuites/libtests/grp.yml| 3 + .../testsuites/libtests/openfirmware01.yml| 20 +++ testsuites/libtests/openfirmware01/init.c | 147 ++ .../openfirmware01/openfirmware01.doc | 29 .../openfirmware01/openfirmware01.scn | 2

[PATCH RTEMS 1/7] bsp/fdt.h: Move bsp/fdt.h to cpukit

2020-07-14 Thread G S Niteesh Babu
This commit move the bsp/fdt.h header to cpukit/include/rtems. The reason for this is, with inclusion of libfreebsd there are cases where their is need for bsp_fdt_get(). And with this header under bsps directory it is not possible to include it under a cpukit directory. --- bsps/include/bsp/fdt.h

[PATCH RTEMS 4/7] libfreebsd: FreeBSD porting helper header

2020-07-14 Thread G S Niteesh Babu
This file serve the purpose as rtems-bsd-kernel-space.h in the rtems-libbsd. This file is intended to be included in every source file that is to imported from FreeBSD. This is to reduce the number of redefinitions for commonly used functions like malloc, free and KASSERT. --- cpukit/libfreebsd/rt

[PATCH RTEMS 5/7] libfreebsd: Port OFW to RTEMS

2020-07-14 Thread G S Niteesh Babu
The following files have been ported to RTEMS 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- cpukit/include/dev/ofw/openfirm.h| 16 ++ cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c | 149 ++- cpukit/libfreebsd/freebsd/dev/ofw/openfirm.c | 58 +++- 3 files changed, 22

[PATCH] eng: fix typo in coding-file-hdr.rst

2020-07-02 Thread G S Niteesh Babu
--- eng/coding-file-hdr.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/coding-file-hdr.rst b/eng/coding-file-hdr.rst index 6355173..cda631a 100644 --- a/eng/coding-file-hdr.rst +++ b/eng/coding-file-hdr.rst @@ -96,7 +96,7 @@ Use the following guidelines and template fo

[PATCH] bsp/fdt.h: Move bsp/fdt.h to cpukit

2020-07-02 Thread G S Niteesh Babu
This commit move the bsp/fdt.h header to cpukit/include/rtems. The reason for this is, with inclusion of libfreebsd there are cases where their is need for bsp_fdt_get(). And with this header under bsps directory it is not possible to include it under a cpukit directory. --- bsps/include/bsp/fdt.h

[PATCH RTEMS v2 1/6] libfreebsd: Import OFW files from FreeBSD.

2020-06-11 Thread G S Niteesh Babu
freebsd head: b8c57b4 The following files have been imported from FreeBSD to implement OF_* functions into RTEMS. 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- cpukit/libfreebsd/dev/ofw/ofw_fdt.c | 479 +++ cpukit/libfreebsd/dev/ofw/openfirm.c | 848 +++ cpukit

[PATCH RTEMS v2 6/6] cpukit/Makefile: Add libfreebsd source files.

2020-06-11 Thread G S Niteesh Babu
--- cpukit/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am index 51f38c84c7..1335d41038 100644 --- a/cpukit/Makefile.am +++ b/cpukit/Makefile.am @@ -342,6 +342,8 @@ librtemscpu_a_SOURCES += libmisc/uuid/uuid_time.c librtemscpu_a_SOURCES +=

[PATCH RTEMS v2 5/6] libfreebsd: Port OFW to RTEMS

2020-06-11 Thread G S Niteesh Babu
The following files have been ported to RTEMS 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- cpukit/libfreebsd/dev/ofw/ofw_fdt.c | 146 ++- cpukit/libfreebsd/dev/ofw/openfirm.c | 58 ++- cpukit/libfreebsd/dev/ofw/openfirm.h | 17 3 files changed, 219 insertion

[PATCH RTEMS v2 3/6] libfreebsd: FreeBSD porting helper header

2020-06-11 Thread G S Niteesh Babu
This file serve the purpose as rtems-bsd-kernel-space.h in the rtems-libbsd. This file is intended to be included in every source file that is to imported from FreeBSD. This is to reduce the number of redefinitions for commonly used functions like malloc, free and KASSERT. --- cpukit/libfreebsd/rt

[PATCH RTEMS v2 2/6] libfreebsd: Added ofw_if.h

2020-06-11 Thread G S Niteesh Babu
This file is the RTEMS implementation of ofw_if.h in FreeBSD. The ofw_if.h in FreeBSD is an autogenerated header file that maps the OF_function calls to their respective implementation. But in RTEMS this file maps the OF_functions directly to their FDT implementation. --- cpukit/libfreebsd/dev/ofw

[PATCH RTEMS v2 4/6] bsp/fatal.h: Add FATAL codes for libfreebsd

2020-06-11 Thread G S Niteesh Babu
--- bsps/include/bsp/fatal.h | 4 1 file changed, 4 insertions(+) diff --git a/bsps/include/bsp/fatal.h b/bsps/include/bsp/fatal.h index 3f8e1eb591..c22f8a2f52 100644 --- a/bsps/include/bsp/fatal.h +++ b/bsps/include/bsp/fatal.h @@ -156,6 +156,10 @@ typedef enum { RISCV_FATAL_NO_TLCLOCK_F

[PATCH 4/5] libfreebsd: Port OFW to RTEMS

2020-06-04 Thread G S Niteesh Babu
The following files have been ported to RTEMS 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- cpukit/libfreebsd/dev/ofw/ofw_fdt.c | 117 ++- cpukit/libfreebsd/dev/ofw/openfirm.c | 59 +- cpukit/libfreebsd/dev/ofw/openfirm.h | 18 + 3 files changed, 191 inser

[PATCH 1/5] libfreebsd: Import OFW files from FreeBSD.

2020-06-04 Thread G S Niteesh Babu
freebsd head: b8c57b4 The following files have been imported from FreeBSD to implement OF_* functions into RTEMS. 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- cpukit/libfreebsd/dev/ofw/ofw_fdt.c | 479 +++ cpukit/libfreebsd/dev/ofw/openfirm.c | 848 +++ cpukit

[PATCH 3/5] libfreebsd: FreeBSD porting helper header

2020-06-04 Thread G S Niteesh Babu
This file serve the purpose as rtems-bsd-kernel-space.h in the rtems-libbsd. This file is intended to be included in every source file that is to imported from FreeBSD. This is to reduce the number of redefinitions for commonly used functions like malloc, free and KASSERT. --- cpukit/libfreebsd/rt

[PATCH 2/5] libfreebsd: Added ofw_if.h

2020-06-04 Thread G S Niteesh Babu
This file is the RTEMS implementation of ofw_if.h in FreeBSD. The ofw_if.h in FreeBSD is an autogenerated header file that maps the OF_function calls to their respective implementation. But in RTEMS this file maps the OF_functions directly to their FDT implementation. --- cpukit/libfreebsd/dev/ofw

[PATCH 5/5] cpukit/Makefile: Add libfreebsd source files.

2020-06-04 Thread G S Niteesh Babu
--- cpukit/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am index 51f38c84c7..1335d41038 100644 --- a/cpukit/Makefile.am +++ b/cpukit/Makefile.am @@ -342,6 +342,8 @@ librtemscpu_a_SOURCES += libmisc/uuid/uuid_time.c librtemscpu_a_SOURCES +=

[PATCH 0/5] OFW port to RTEMS

2020-06-04 Thread G S Niteesh Babu
Hello, The following series of patches port OFW from FreeBSD to RTEMS. This patch has been tested on a Raspberry Pi 3 with a small test application which retrives basic node properties. G S Niteesh Babu (5): libfreebsd: Import OFW files from FreeBSD. libfreebsd: Added ofw_if.h libfreebsd

[PATCH 5/5] bsps/shared/freebsd: Added OFW sources files to Makefile

2020-05-28 Thread G S Niteesh Babu
Added OFW source files to shared-sources.am under bsps/shared. --- bsps/shared/shared-sources.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bsps/shared/shared-sources.am b/bsps/shared/shared-sources.am index 3c07770bb2..445f7115b6 100644 --- a/bsps/shared/shared-sources.am +++ b/bsps/sh

[PATCH 3/5] bsps/shared/freebsd: RTEMS to FreeBSD porting helper header

2020-05-28 Thread G S Niteesh Babu
This file serve the purpose as rtems-bsd-kernel-space.h in the rtems-libbsd. This file is intended to be included in every source file that is to imported from FreeBSD. This is to reduce the number of redefinitions for commonly used functions like malloc, free and KASSERT. --- bsps/shared/freebsd/

[PATCH 2/5] bsps/shared/freebsd: Added ofw_if.h

2020-05-28 Thread G S Niteesh Babu
This file is the RTEMS implementation of ofw_if.h in FreeBSD. The ofw_if.h in FreeBSD is an autogenerated header file that maps the OF_function calls to their respective implementation. But in RTEMS this file maps the OF_functions directly to their FDT implementation. --- bsps/shared/freebsd/dev/o

[PATCH 4/5] bsps/shared/freebsd: Port OFW to RTEMS

2020-05-28 Thread G S Niteesh Babu
The following files have been ported to RTEMS 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- bsps/shared/freebsd/dev/ofw/ofw_fdt.c | 116 - bsps/shared/freebsd/dev/ofw/openfirm.c | 59 - bsps/shared/freebsd/dev/ofw/openfirm.h | 18 3 files changed, 190 ins

[PATCH 1/5] bsps/shared/freebsd: Import OFW files from FreeBSD.

2020-05-28 Thread G S Niteesh Babu
freebsd head: b8c57b4 The following files have been imported from FreeBSD to implement OF_* functions into RTEMS. 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- bsps/shared/freebsd/dev/ofw/ofw_fdt.c | 479 ++ bsps/shared/freebsd/dev/ofw/openfirm.c | 848 + bsps/

[PATCH rtems] libfreebsd: RTEMS to FreeBSD porting helper header

2020-05-27 Thread G S Niteesh Babu
This file serve the purpose as rtems-bsd-kernel-space.h in the rtems-libbsd. This file is intended to be included in every source file that is to imported from FreeBSD. This is to reduce the number of redefinitions for commonly used functions like malloc, free and KASSERT. --- cpukit/libfreebsd/rt

[PATCH 0/2 rtems-release] Add script to branch repositories.

2020-05-01 Thread G S Niteesh Babu
The following patches add a script to rtems-release to automate branching of repositories for rtems release. G S Niteesh Babu (2): rtems-release-defaults: Added rtems_repos to rtems-release-defaults. rtems-release-branch: Added a script file to branch repositories. rtems-release-branch

[PATCH 2/2] rtems-release-branch: Added a script file to branch repositories.

2020-05-01 Thread G S Niteesh Babu
--- rtems-release-branch | 146 +++ 1 file changed, 146 insertions(+) create mode 100755 rtems-release-branch diff --git a/rtems-release-branch b/rtems-release-branch new file mode 100755 index 000..ae8e06c --- /dev/null +++ b/rtems-release-branch @@ -

[PATCH 1/2] rtems-release-defaults: Added rtems_repos to rtems-release-defaults.

2020-05-01 Thread G S Niteesh Babu
rtems_repos is variable which contains all rtems_repositories. For eg: rtems_repos="rtems.git rtems-examples.git etc." --- rtems-release-defaults | 11 +++ 1 file changed, 11 insertions(+) diff --git a/rtems-release-defaults b/rtems-release-defaults index 60d9721..fc30157 100755 --- a/rte

Re: rtems-boot-image tool: Raspberry Pi

2020-04-04 Thread G. S. Niteesh
t; some time ago. A lot of us are quite busy right now but that shouldn't > happen. If you don't get a response for some question: Please give it > about a week of time and then just ping the thread. > > On 05/03/2020 11:06, G. S. Niteesh wrote: > > On Wed, Feb 26, 20

[PATCH docs] start/gsoc: GSoC Getting started instructions.

2020-04-02 Thread G S Niteesh Babu
Added instructions to setup development environment for students interested in GSoC. --- user/index.rst | 1 + user/start/gsoc.rst | 132 +++ user/start/index.rst | 1 + 3 files changed, 134 insertions(+) create mode 100644 user/start/gsoc.rst d

[PATCH docs] user/bsp-build: Fix broken cross references.

2020-04-02 Thread G S Niteesh Babu
The QuickStartBSPBuild_Manual and QuickStartBSPBuild_RSB are missing the underscore in front. This breaks any reference to them from other sections. --- user/start/bsp-build.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/start/bsp-build.rst b/user/start/bsp-build.

[PATCH v2] bsp/raspberrypi: Fix build warnings.

2020-03-28 Thread G S Niteesh Babu
1) _Memory_Initialize makes pointer from integer without a cast. 2) printf format error, expects %u but %lu provided. --- bsps/arm/raspberrypi/irq/irq.c | 4 +++- bsps/arm/raspberrypi/start/bspstarthooks.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bs

[PATCH 2/2] gpio/gpio-support: Fix build warnings.

2020-03-28 Thread G S Niteesh Babu
Fixes "array subscript is outside array bounds" in gpio-support.c --- bsps/shared/dev/gpio/gpio-support.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bsps/shared/dev/gpio/gpio-support.c b/bsps/shared/dev/gpio/gpio-support.c index 9c053dc151..04f1c8ca90 100644 --- a/bsps/shared/dev/gpio/gp

[PATCH 1/2] bsp/raspberrypi: Fix build warnings.

2020-03-28 Thread G S Niteesh Babu
1) _Memory_Initialize makes pointer from integer w ithout a cast. 2) printf format error, expects %u but %lu provided. --- bsps/arm/raspberrypi/irq/irq.c | 2 +- bsps/arm/raspberrypi/start/bspstarthooks.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bsps/arm/ra

[PATCH v3] bsp/beagle: Update console to new Termios API.

2020-03-23 Thread G S Niteesh Babu
This patch updates the console driver to new Termios API. Update #3034 --- bsps/arm/beagle/console/console-config.c | 117 +-- c/src/lib/libbsp/arm/beagle/Makefile.am | 4 +- 2 files changed, 69 insertions(+), 52 deletions(-) diff --git a/bsps/arm/beagle/console/console-co

[PATCH docs] user/bsps: Remove gdbarmsim

2020-03-19 Thread G S Niteesh Babu
Remove gdbarmsim from list of BSPs in docs. Since, the BSPs has been removed from RTEMS by Joel. --- user/bsps/arm/gdbarmsim.rst | 8 1 file changed, 8 deletions(-) delete mode 100644 user/bsps/arm/gdbarmsim.rst diff --git a/user/bsps/arm/gdbarmsim.rst b/user/bsps/arm/gdbarmsim.rst dele

[PATCH] user/gsoc: GSoC Getting Started Instructions

2020-03-17 Thread G S Niteesh Babu
--- user/index.rst | 1 + user/start/gsoc.rst | 453 +++ user/start/index.rst | 1 + 3 files changed, 455 insertions(+) create mode 100644 user/start/gsoc.rst diff --git a/user/index.rst b/user/index.rst index 0e644c9..f253ea6 100644 --- a/user/

[PATCH rtems-docs] user/raspberrypi: Fix typo

2020-03-16 Thread G S Niteesh Babu
enable-uart should be enable_uart in config.txt --- user/bsps/arm/raspberrypi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/bsps/arm/raspberrypi.rst b/user/bsps/arm/raspberrypi.rst index 72889a5..c26f4b5 100644 --- a/user/bsps/arm/raspberrypi.rst +++ b/user/bsps/arm/

[PATCH v2] bsp/beagle: Update console to new Termios device API.

2020-03-15 Thread G S Niteesh Babu
This patch updates the console to use new Termios device API. Update #3034 --- bsps/arm/beagle/console/console-config.c | 66 +++- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/bsps/arm/beagle/console/console-config.c b/bsps/arm/beagle/console/console-config.

[PATCH] bsp/beagle: Update console to new Termios device API.

2020-03-15 Thread G S Niteesh Babu
This patch updates the console to use new Termios device API. Update #3034 --- bsps/arm/beagle/console/console-config.c | 66 +++- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/bsps/arm/beagle/console/console-config.c b/bsps/arm/beagle/console/console-config.

Re: GSoC 2020 Proposal | Beagle BSP: Add a flattened device tree based initialization

2020-03-15 Thread G. S. Niteesh
Hii, I have modified the proposal as per your suggestions. Please have a look again. Thank you, Niteesh. On Mon, Feb 17, 2020 at 11:46 PM Vijay Kumar Banerjee < vijaykumar9...@gmail.com> wrote: > > > On Mon, Feb 17, 2020 at 1:32 PM G. S. Niteesh wrote: > >> Hi everyone

Any short projects available?

2020-03-10 Thread G. S. Niteesh
Hii, I interested in taking up small tasks/projects as a primer for GSoC. I am mostly interested in drivers, build system, core (Schedulers, MPU, etc) part of RTEMS. I am also okay with large projects if small ones aren't available. I'll start learning about them and will start working after GSoC.

Re: rtems-boot-image tool: Raspberry Pi

2020-03-05 Thread G. S. Niteesh
On Wed, Feb 26, 2020 at 8:39 AM Chris Johns wrote: > On 22/2/20 1:45 am, G. S. Niteesh wrote: > > Hi, > > > > This is regarding adding RPi support to the boot image generation tool. > > > > The boot process for Raspberry Pi is very unconventional. The GPU starts

Re: rtems-boot-image tool: Raspberry Pi

2020-02-25 Thread G. S. Niteesh
On Wed, Feb 26, 2020 at 8:39 AM Chris Johns wrote: > On 22/2/20 1:45 am, G. S. Niteesh wrote: > > Hi, > > > > This is regarding adding RPi support to the boot image generation tool. > > > > The boot process for Raspberry Pi is very unconventional. The GPU starts

Re: RTEMS test

2020-02-25 Thread G. S. Niteesh
> > > Hello, > I'm trying to run the rtems-test after closing my computer and switching > operating systems(dual booted computer), but weirdly enough, I received the > message > rtems-test: command not found > So I attempted running the command for rtems-tools, but then the message I > received was

Re: rtems-boot-image tool: Raspberry Pi

2020-02-24 Thread G. S. Niteesh
I am sorry. I'll make sure it doesn't happen again. On Mon, Feb 24, 2020 at 9:18 PM Gedare Bloom wrote: > Hi Niteesh, > > On Sun, Feb 23, 2020 at 11:34 PM G. S. Niteesh wrote: > > > > Hii, > > > > This is a follow-up message since this thread has been

Re: rtems-boot-image tool: Raspberry Pi

2020-02-23 Thread G. S. Niteesh
Hii, This is a follow-up message since this thread has been unnoticed for a while. Thank you, Niteesh On Fri, Feb 21, 2020 at 8:15 PM G. S. Niteesh wrote: > Hi, > > This is regarding adding RPi support to the boot image generation tool. > > The boot process for Raspb

[PATCH] RTEMS Docs: Fix search field

2020-02-22 Thread G S Niteesh Babu
This patch fixes the search field which previously was not working due to this commit 71dd8bfbf94417ad55b2444e1dbd219db266f335 in sphinx. --- common/sphinx_rtd_theme_rtems/layout.html | 3 ++- common/sphinx_rtd_theme_rtems/layout_old.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(

rtems-boot-image tool: Raspberry Pi

2020-02-21 Thread G. S. Niteesh
Hi, This is regarding adding RPi support to the boot image generation tool. The boot process for Raspberry Pi is very unconventional. The GPU starts first, initializes RAM, other hardware, loads the bootloaders and then starts the ARM CPU. The minimum files that are required to boot an RPi are b

GSoC 2020 Proposal | Beagle BSP: Add a flattened device tree based initialization

2020-02-17 Thread G. S. Niteesh
Hi everyone, I have completed my proposal for GSoC 2020 for the project https://devel.rtems.org/ticket/3784. I would like to get suggestions from the community regarding the proposal. Below is the link to my proposal please have a look. https://docs.google.com/document/d/1V2RitYJOvWOvfow99hPUFB034i

Re: [PATCH v3 2/2] bsp/raspberrypi: Mini UART driver

2020-02-16 Thread G. S. Niteesh
Can someone please push these patches? Thanks, Niteesh On Sun, Feb 16, 2020 at 11:05 PM Alan Cudmore wrote: > Awesome! The Pi Zero W is a bonus too! I think we can run RTEMS on all > models except the Pi 4 now. > > On Sun, Feb 16, 2020 at 12:30 PM G. S. Niteesh wrote: >

Re: [PATCH v3 2/2] bsp/raspberrypi: Mini UART driver

2020-02-16 Thread G. S. Niteesh
2020 at 11:44 AM Christian Mauderer > wrote: > > > > On 16/02/2020 17:31, G. S. Niteesh wrote: > > > Can you please share your config.txt for Pi3. > > > > +1 > > > > It's interesting that it seems to work without an adapted config.txt. It &g

Re: [PATCH v3 2/2] bsp/raspberrypi: Mini UART driver

2020-02-16 Thread G. S. Niteesh
bly wont get a chance to try u-boot until later today or tomorrow. > > But these patches are great for enabling the Pi Zero W and Pi 3 models! > Thanks, > Alan > > On Sun, Feb 16, 2020 at 10:58 AM G. S. Niteesh wrote: > > > > On Sun, Feb 16, 2020 at 8:37 PM Alan Cudmore

Re: [PATCH v3 2/2] bsp/raspberrypi: Mini UART driver

2020-02-16 Thread G. S. Niteesh
build process simpler I have uploaded my u-boot.bin to my github, please use it :) https://github.com/gs-niteesh/rpi3_RTEMS And sorry for the delay, I tested all these instructions again before sending them. Thanks Niteesh. On Sun, Feb 16, 2020 at 2:35 AM G. S. Niteesh wrote: > > >

Re: [PATCH v3 2/2] bsp/raspberrypi: Mini UART driver

2020-02-15 Thread G. S. Niteesh
, 2020 at 12:52 AM G S Niteesh wrote: > This patch adds driver for Mini UART present in Raspberry Pi 3 > and above, this UART is currently used as the primary UART in > these models. > The Mini UART is similar to ns16550, this driver is built > upon libchip/ns16550. > --- >

  1   2   >