Re: [PATCH v2 1/1] bsp/riscv: Work area size based on /memory node in fdt

2022-08-20 Thread Joel Sherrill
On Fri, Aug 19, 2022, 8:28 AM Hesham Almatary 
wrote:

>
>
> On Fri, 19 Aug 2022 at 13:36, Daniel Cederman 
> wrote:
>
>> On 2022-08-19 11:16, Hesham Almatary wrote:
>> > On Thu, 18 Aug 2022 at 13:55, Daniel Cederman 
>> wrote:
>> >> I missed your comment, but have made the change now. Are there any
>> instructions on how to run the RISCV BSP tests on QEMU or Spike? I could
>> not get it to work. Do I need a special version of QEMU or Spike?
>> >>
>> > Thanks! AFAIR, you need to run the "medany" RISC-V variants for QEMU,
>> > I'd use rtems-tester. No special QEMU version is needed.
>>
>> Thanks! I had to change "-m 64M -kernel" to "-m 128M -bios" to get it to
>> run. Got the same result both with and without the patch for
>> rv64imafd_medany:
>>
> Great! Thanks for testing. A patch to fix that in tester will be greatly
> appreciated. I thought I submitted the -bios change before but apparently
> not.
>

Include it as part of this patch sweep please. And make sure results from
the  OAR build machines are in the build@ mailing list archives. If not,
that will need to be looked into.

I'm glad this is coming together.

Make sure the license text formatting matches other files.



>> Passed:653
>> Failed: 16
>> User Input:  5
>> Expected Fail:   0
>> Indeterminate:   0
>> Benchmark:   3
>> Timeout: 5
>> Test too long:   0
>> Invalid: 0
>> Wrong Version:   0
>> Wrong Build: 0
>> Wrong Tools: 0
>> Wrong Header:0
>> --
>> Total: 682
>> Failures:
>>   exit03.exe
>>   ttest02.exe
>>   psx12.exe
>>   smpirqs01.exe
>>   sp69.exe
>>   spintrcritical24.exe
>>   spsysinit01.exe
>>   ts-fatal-scheduler-requires-exactly-one-processor.exe
>>   ts-fatal-start-of-mandatory-processor-failed.exe
>>   ts-validation-1.exe
>>   ts-validation-one-cpu-0.exe
>>   minimum.exe
>>   smpstart01.exe
>>   ts-fatal-smp.exe
>>   ts-performance-no-clock-0.exe
>>   ts-validation-intr.exe
>> User Input:
>>   monitor.exe
>>   termios.exe
>>   top.exe
>>   fileio.exe
>>   capture.exe
>> Benchmark:
>>   dhrystone.exe
>>   linpack.exe
>>   whetstone.exe
>> Timeouts:
>>   ts-fatal-start-on-not-online-processor.exe
>>   ts-validation-0.exe
>>   ts-validation-no-clock-0.exe
>>   ts-validation-smp-only-0.exe
>>   ts-validation-timecounter-smp-0.exe
>>
>> >> On 2022-08-18 10:24, Hesham Almatary wrote:
>> >>
>> >> All good, I'd just replace the "end == 0" with "end == NULL" as per my
>> >> comment above. Also please test on other RISC-V QEMU platforms to make
>> >> sure nothing got broken.
>> >>
>> >> On Wed, 17 Aug 2022 at 14:10, Joel Sherrill  wrote:
>> >>
>> >> I'm ok with this if Hesham acks as well.
>> >>
>> >> --joel
>> >>
>> >> On Wed, Aug 17, 2022 at 6:35 AM Daniel Cederman 
>> wrote:
>> >>
>> >> Uses the first entry in the /memory node to determine the end of the
>> >> work area. Falls back on linker symbol if unable to parse the node.
>> >> ---
>> >>   bsps/riscv/shared/start/bspgetworkarea.c | 144
>> +++
>> >>   spec/build/bsps/riscv/riscv/obj.yml  |   1 +
>> >>   2 files changed, 145 insertions(+)
>> >>   create mode 100644 bsps/riscv/shared/start/bspgetworkarea.c
>> >>
>> >> diff --git a/bsps/riscv/shared/start/bspgetworkarea.c
>> b/bsps/riscv/shared/start/bspgetworkarea.c
>> >> new file mode 100644
>> >> index 00..1fa051d25e
>> >> --- /dev/null
>> >> +++ b/bsps/riscv/shared/start/bspgetworkarea.c
>> >> @@ -0,0 +1,144 @@
>> >> +/* SPDX-License-Identifier: BSD-2-Clause */
>> >> +
>> >> +/**
>> >> + * @file
>> >> + *
>> >> + * @brief BSP specific initialization support routines
>> >> + *
>> >> + */
>> >> +
>> >> +/*
>> >> + * COPYRIGHT (c) 1989-2020.
>> >> + * On-Line Applications Research Corporation (OAR).
>> >> + * Cobham Gaisler AB.
>> >> + *
>> >> + * Redistribution and use in source and binary forms, with or without
>> >> + * modification, are permitted provided that the following conditions
>> >> + * are met:
>> >> + * 1. Redistributions of source code must retain the above copyright
>> >> + *notice, this list of conditions and the following disclaimer.
>> >> + * 2. Redistributions in binary form must reproduce the above
>> copyright
>> >> + *notice, this list of conditions and the following disclaimer in
>> the
>> >> + *documentation and/or other materials provided with the
>> distribution.
>> >> + *
>> >> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
>> CONTRIBUTORS "AS IS"
>> >> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
>> TO, THE
>> >> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>> PURPOSE
>> >> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
>> CONTRIBUTORS BE
>> >> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> >> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
>> OF
>> >> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
>> BUSINESS
>> >> + * INTERRUPTION) HOWEVER 

Re: devel Digest, Vol 129, Issue 37

2022-08-20 Thread Prashanth S
Hi All,

This is a review request for DCAN and CAN support. The review comments
would be very helpful for stabilizing the source files.

https://gitlab.com/slpp95prashanth/gsoc-2022/-/tree/can-review-latest-squash-02-squash/

Regards
Prashanth S

On Mon, 15 Aug 2022 at 11:57, Prashanth S  wrote:
>
> Hi All,
>
> This is a review request for DCAN (Work in Progress) support.
>
> As the patch size exceeds the mail limit, I am attaching the patch in
> compressed format.
>
> Regards
> Prashanth S
>
> Prashanth S
>
> On Sun, 14 Aug 2022 at 13:56,  wrote:
> >
> > Send devel mailing list submissions to
> > devel@rtems.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://lists.rtems.org/mailman/listinfo/devel
> > or, via email, send a message with subject or body 'help' to
> > devel-requ...@rtems.org
> >
> > You can reach the person managing the list at
> > devel-ow...@rtems.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of devel digest..."
> >
> >
> > Today's Topics:
> >
> >1. [PATCH v4] cpukit/dev/can: Added CAN support (Prashanth S)
> >
> >
> > --
> >
> > Message: 1
> > Date: Sun, 14 Aug 2022 13:56:16 +0530
> > From: Prashanth S 
> > To: devel@rtems.org
> > Cc: Prashanth S 
> > Subject: [PATCH v4] cpukit/dev/can: Added CAN support
> > Message-ID: <20220814082616.7345-1-fishesprasha...@gmail.com>
> >
> > ---
> >  cpukit/dev/can/can.c | 521 +++
> >  cpukit/include/dev/can/can-msg.h | 105 +
> >  cpukit/include/dev/can/can-queue.h   | 219 ++
> >  cpukit/include/dev/can/can.h | 258 +++
> >  spec/build/cpukit/librtemscpu.yml|   6 +
> >  spec/build/testsuites/libtests/can01.yml |  19 +
> >  spec/build/testsuites/libtests/grp.yml   |   2 +
> >  testsuites/libtests/can01/init.c | 257 +++
> >  8 files changed, 1387 insertions(+)
> >  create mode 100644 cpukit/dev/can/can.c
> >  create mode 100644 cpukit/include/dev/can/can-msg.h
> >  create mode 100644 cpukit/include/dev/can/can-queue.h
> >  create mode 100644 cpukit/include/dev/can/can.h
> >  create mode 100644 spec/build/testsuites/libtests/can01.yml
> >  create mode 100644 testsuites/libtests/can01/init.c
> >
> > diff --git a/cpukit/dev/can/can.c b/cpukit/dev/can/can.c
> > new file mode 100644
> > index 00..02377a9098
> > --- /dev/null
> > +++ b/cpukit/dev/can/can.c
> > @@ -0,0 +1,521 @@
> > +/* SPDX-License-Identifier: BSD-2-Clause */
> > +
> > +/**
> > + * @file
> > + *
> > + * @ingroup CANBus
> > + *
> > + * @brief Controller Area Network (CAN) Bus Implementation
> > + *
> > + */
> > +
> > +/*
> > + * Copyright (C) 2022 Prashanth S (fishesprasha...@gmail.com)
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions
> > + * are met:
> > + * 1. Redistributions of source code must retain the above copyright
> > + * notice, this list of conditions and the following disclaimer.
> > + * 2. Redistributions in binary form must reproduce the above copyright
> > + * notice, this list of conditions and the following disclaimer in the
> > + * documentation and/or other materials provided with the distribution.
> > + *
> > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
> > IS"
> > + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
> > THE
> > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
> > PURPOSE
> > + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
> > + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
> > THE
> > + * POSSIBILITY OF SUCH DAMAGE.
> > + */
> > +
> > +#include 
> > +#include 
> > +
> > +#include 
> > +#include 
> > +
> > +#include 
> > +#include 
> > +
> > +#include 
> > +
> > +#define can_interrupt_lock_acquire(bus) \
> > +  do {  \
> > +   CAN_DEBUG_LOCK("acquiring lock %s:%d\n", 
> > __FILE__, __LINE__); \
> > +   real_can_interrupt_lock_acquire(bus);   
> >\
> > + } while (0);
> > +
> > +#define can_interrupt_lock_release(bus) \
> > +  do {  \
> > +   CAN_DEBUG_LOCK("releasing lock %s:%d\n", 
> > __FILE__, __LINE__); \
> > +   real_can_i