[RPI BSP] zero length array in kernel and refactor of video char output

2015-06-23 Thread QIAO YANG
On Jun 23, 2015, at 07:15 AM, Gedare Bloom wrote: On Tue, Jun 23, 2015 at 7:43 AM, QIAO YANG wrote: Hi, As suggested by gedare, I think using zero length array to represent the mailbox buffer and tag data is a good way, much readable, clearer to abstract the structure of mailbox buffer, tag.

[PATCH] modified: waf_generator.py Fix incorrect encoding of NET_CFG_GATEWAY_IP and change _IP_IP ending to _IP. Remove _IP_IP ending from NET_TAP_INTERFACE.

2015-06-23 Thread Gene Smith
modified: wscript Re-generated from "./freebsd-to-rtems -m" based on waf_generator.py --- waf_generator.py | 6 +++--- wscript | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/waf_generator.py b/waf_generator.py index 0be3367..ff55031 100755 --- a/waf_generator

Re: [Patch] for libbsd wscript (derived from waf_generate.py)

2015-06-23 Thread Chris Johns
On 24/06/2015 7:56 am, Gene Smith wrote: > The main fix is for setting the value of NET_CFG_GATEWAY_IP which was > getting set to the net mask value. > > Others are _IP_IP instead of just _IP and look like typos. Otherwise, I > don't think they cause a problem. > Nice find. Can you please send

Re: RTEMS Source Builder newlib/iconv issues on OpenBSD/Solaris

2015-06-23 Thread Chris Johns
On 22/06/2015 11:46 pm, Karel Gardas wrote: > On 06/22/15 02:35 PM, Chris Johns wrote: >> On 22/06/2015 6:30 am, Karel Gardas wrote: >>> >>> Hello, >>> >>> on both Solaris 11 and OpenBSD 5.7 I do have an issue with source >>> builder which fails on newlib compilation. This shows as: >>> >>> checkin

Re: [PATCH 1/2] RTEMS GPIO API definition and implementation.

2015-06-23 Thread André Marques
On 23-06-2015 17:16, Gedare Bloom wrote: + uint32_t bank; + int handled_count; + int rv; + + gpio = (gpio_pin*) arg; + + bank = gpio->bank_number; Validate args for errors. These tasks are only created by the rtems_gpio_enable_interrupt() function, and all parameters are validated befor

[Patch] for libbsd wscript (derived from waf_generate.py)

2015-06-23 Thread Gene Smith
The main fix is for setting the value of NET_CFG_GATEWAY_IP which was getting set to the net mask value. Others are _IP_IP instead of just _IP and look like typos. Otherwise, I don't think they cause a problem. -gene diff --git a/waf_generator.py b/waf_generator.py index 0be3367..ff55031 1007

Re: Sendfile for Rtems

2015-06-23 Thread Joel Sherrill
On 6/23/2015 2:37 PM, Sebastian Huber wrote: I just had a quick look at kern_sendfile() in uipc_syscalls.c. It seems that it uses virtual memory for the file access, so this won't work on RTEMS. However it would be nice to have an optimized sendfile() which avoids one copy and uses mbufs dir

Re: Sendfile for Rtems

2015-06-23 Thread Sebastian Huber
I just had a quick look at kern_sendfile() in uipc_syscalls.c. It seems that it uses virtual memory for the file access, so this won't work on RTEMS. However it would be nice to have an optimized sendfile() which avoids one copy and uses mbufs directly. - Sujay Raj schrieb: >Okay, So I wil

Re: Sendfile for Rtems

2015-06-23 Thread Sujay Raj
Okay, So I will dig in to the details of the implementation of sendfile on freebsd to find if it does indeed use mmap, or if there is an implementation that doesn't. I will inform as soon as I figure it out if this is the correct way out. Thanks and Regards, Sujay Raj On Wed, Jun 24, 2015 at 12:

Re: Sendfile for Rtems

2015-06-23 Thread Joel Sherrill
On 6/23/2015 2:15 PM, Gedare Bloom wrote: On Tue, Jun 23, 2015 at 3:13 PM, Sujay Raj wrote: I agree with Sebastian. Using read write in a loop can only serve as a makeshift measure. If we have consensus here, then I can work on getting sendfile backed up in libbsd. (though, I have some seri

Re: Sendfile for Rtems

2015-06-23 Thread Gedare Bloom
On Tue, Jun 23, 2015 at 3:13 PM, Sujay Raj wrote: > I agree with Sebastian. > > Using read write in a loop can only serve as a makeshift measure. > > If we have consensus here, then I can work on getting sendfile backed up in > libbsd. (though, I have some serious background reading to do before I

Re: Sendfile for Rtems

2015-06-23 Thread Sujay Raj
I agree with Sebastian. Using read write in a loop can only serve as a makeshift measure. If we have consensus here, then I can work on getting sendfile backed up in libbsd. (though, I have some serious background reading to do before I am able to do it, but I think I can. ) Thanks and Regards,

Re: SMP on ARM

2015-06-23 Thread Sebastian Huber
See Doxygen comments of Per_CPU_State. The boot_card() must be called by exactly one processor. For the Cortex-A9 MPCore there is a branch in bsp_start_hook_0() according to the CPU index. - Rohini Kulkarni schrieb: >Hi all, I am trying to understand boot up for ARM BSPs so as to be able

Re: Sendfile for Rtems

2015-06-23 Thread Sebastian Huber
I would use the sendfile system call implementation from FreeBSD and add it to the libbsd. Its not a big win if you use read() and write() to implement sendfile(). This makes only sense if you can use kernel space zero-copy buffers. - Eduardo Silva schrieb: >Sujay, Monkey use conditiona

SMP on ARM

2015-06-23 Thread Rohini Kulkarni
Hi all, I am trying to understand boot up for ARM BSPs so as to be able to implement SMP support for Pi 2. Please correct me where I am wrong. (It is verbose. But I have tried to make things as clear as I could) [1] From start.S for ARM, all cores start together. They run the bsp_start hook 0 an

Re: libbsd Makefile issues

2015-06-23 Thread Gene Smith
On 06/23/2015 02:18 PM, Joel Sherrill wrote: On 6/23/2015 1:09 PM, Gene Smith wrote: Here's the things I did to fix the Makefile. I think you added the quotes (item 1) and maybe item 2. I think the error you are seeing is due to item 3 since it can't find pcap.h. 1) Everywhere the string "-D

Re: Sendfile for Rtems

2015-06-23 Thread Eduardo Silva
Sujay, Monkey use conditionals for each implementation: Linux, FreeBSD and OSX. My suggestion is that RTEMS may implement a sendfile based on FreeBSD format which can easily be emulated as a read() and further write() for socket operations. That will help not only Monkey, but also other software t

Re: libbsd Makefile issues

2015-06-23 Thread Joel Sherrill
On 6/23/2015 1:18 PM, Joel Sherrill wrote: On 6/23/2015 1:09 PM, Gene Smith wrote: On 06/23/2015 11:28 AM, Joel Sherrill wrote: Hi I decided to take a look at this and spotted what I think are at least two mistakes but when I fixed them, I got a build error. Help appreciated: Makefile.di

Re: [PATCH] Beagle BSP Improvements (GPIO driver)

2015-06-23 Thread Gedare Bloom
Try to get send-email to work. Split your patch into two, the generic GPIO code (that should overlap substantially with Andre's), and the BBB driver. Can the gpio.c test case be written without having to specify the BSP? I mean, does beagleboneblack.h need to be included there? We won't commit BSP-

Re: libbsd Makefile issues

2015-06-23 Thread Joel Sherrill
On 6/23/2015 1:09 PM, Gene Smith wrote: On 06/23/2015 11:28 AM, Joel Sherrill wrote: Hi I decided to take a look at this and spotted what I think are at least two mistakes but when I fixed them, I got a build error. Help appreciated: Makefile.diff attached. But it then fails like this: $ m

Re: [RPI BSP] zero length array in kernel and refactor of video char output

2015-06-23 Thread Gedare Bloom
On Tue, Jun 23, 2015 at 7:43 AM, QIAO YANG wrote: > Hi, > > As suggested by gedare, I think using zero length array to represent the > mailbox buffer and tag data is a good way, much readable, clearer to > abstract the structure of mailbox buffer, tag. > I've done an attemp, here is the scratch: >

Re: libbsd Makefile issues

2015-06-23 Thread Gene Smith
On 06/23/2015 11:28 AM, Joel Sherrill wrote: Hi I decided to take a look at this and spotted what I think are at least two mistakes but when I fixed them, I got a build error. Help appreciated: Makefile.diff attached. But it then fails like this: $ make i386-rtems4.11-gcc --pipe -B/home/joel/

Re: Sendfile for Rtems

2015-06-23 Thread Joel Sherrill
On 6/23/2015 12:49 PM, Sujay Raj wrote: I am working on porting Monkey HTTP server on rtems. Sendfile is not specified in POSIX.1-2001 or other standards and its implementations vary depending on the unix/linux system being used. Freebsd has sendfile in its libc. FreeBSD has a completely d

Sendfile for Rtems

2015-06-23 Thread Sujay Raj
I am working on porting Monkey HTTP server on rtems. Sendfile is not specified in POSIX.1-2001 or other standards and its implementations vary depending on the unix/linux system being used. Freebsd has sendfile in its libc. So I opened this thread to discuss how should we proceed with this matte

Fwd: GCC 4.8.5 Released

2015-06-23 Thread Joel Sherrill
I suppose if we have targets still on gcc 4.8.x, it is time to consider bumping them up. Forwarded Message Subject: GCC 4.8.5 Released Date: Tue, 23 Jun 2015 11:12:28 -0500 From: Richard Biener Reply-To: g...@gcc.gnu.org To: g...@gcc.gnu.org , gcc-annou...@gcc.gnu.org , info

pc386 libbsd test failures

2015-06-23 Thread Joel Sherrill
Hi Things are looking a better if I build with waf but there is still one failure. I built and ran all these: unix01 rwlock01 selectpollkqueue01 sleep01 syscalls01 commands01 loopback01 swi01 timeout01 init01 thread01 mutex01 commands01 failed with this. But it also has run to completion. Look

Re: [PATCH 1/2] RTEMS GPIO API definition and implementation.

2015-06-23 Thread Gedare Bloom
>> >> >>> + uint32_t bank; >>> + int handled_count; >>> + int rv; >>> + >>> + gpio = (gpio_pin*) arg; >>> + >>> + bank = gpio->bank_number; >> >> Validate args for errors. > > > These tasks are only created by the rtems_gpio_enable_interrupt() function, > and all parameters are validated befor

Re: testing order for rtems-libbsd

2015-06-23 Thread Joel Sherrill
On 6/23/2015 2:19 AM, Sebastian Huber wrote: On 23/06/15 08:28, Chris Johns wrote: On 23/06/2015 3:55 pm, Sebastian Huber wrote: On 23/06/15 01:56, Joel Sherrill wrote: Hi I have it built now for pc386 but some tests run and others don't. Any suggestions on the order to run tests in from

libbsd Makefile issues

2015-06-23 Thread Joel Sherrill
Hi I decided to take a look at this and spotted what I think are at least two mistakes but when I fixed them, I got a build error. Help appreciated: Makefile.diff attached. But it then fails like this: $ make i386-rtems4.11-gcc --pipe -B/home/joel/rtems-4.11-work/bsp-install/i386-rtems4.11/pc

Re: [PATCH] Beagle BSP Improvements (GPIO driver)

2015-06-23 Thread Ketul Shah
Sorry wrong attachment. Kindly review the recent one. Thanks. Best Regards, Ketul On 23 June 2015 at 20:20, Ketul Shah wrote: > Hello all, > > Sorry as I am updating you related to my GPIO API after a huge delay. > > I have developed it and tested it on my BBB. I did some big changes in the >

Re: [PATCH] Beagle BSP Improvements (GPIO driver)

2015-06-23 Thread Ketul Shah
Hello all, Sorry as I am updating you related to my GPIO API after a huge delay. I have developed it and tested it on my BBB. I did some big changes in the API taking in the account comment(s)/suggestion(s) from my respective mentors. I am also looking the API developed by Andre working for Rasp

[RPI BSP] zero length array in kernel and refactor of video char output

2015-06-23 Thread QIAO YANG
Hi, As suggested by gedare, I think using zero length array to represent the mailbox buffer and tag data is a good way, much readable, clearer to abstract the structure of mailbox buffer, tag. I've done an attemp, here is the scratch: https://github.com/yangqiao/rtems/commit/3ed7e9bde493bdc8e64

Re: [PATCH] GSoC: Cache configurations Raspberry Pi 2 support

2015-06-23 Thread Rohini Kulkarni
On Tue, Jun 23, 2015 at 1:44 PM, Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Please avoid unnecessary white-space changes and white-space at the end of > line. > > Something went wrong with the whitespace. I couldn't see that change in my code. I'll rectify it. > > On 22/06/15

Re: [PATCH] GSoC: Cache configurations Raspberry Pi 2 support

2015-06-23 Thread Sebastian Huber
Please avoid unnecessary white-space changes and white-space at the end of line. On 22/06/15 22:59, Rohini Kulkarni wrote: --- .../arm/raspberrypi/startup/mm_config_table.c | 18 +++ c/src/lib/libbsp/arm/shared/mminit.c | 23 2 files ch

Re: testing order for rtems-libbsd

2015-06-23 Thread Sebastian Huber
On 23/06/15 08:28, Chris Johns wrote: On 23/06/2015 3:55 pm, Sebastian Huber wrote: On 23/06/15 01:56, Joel Sherrill wrote: Hi I have it built now for pc386 but some tests run and others don't. Any suggestions on the order to run tests in from simplest to most complex? The ones covered by