[PATCH] bsps/arm: fix installation of core_cm4.h

2022-06-06 Thread Karel Gardas
---
 spec/build/bsps/arm/grp.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/spec/build/bsps/arm/grp.yml b/spec/build/bsps/arm/grp.yml
index a8ebe07f15..b45f9a8c12 100644
--- a/spec/build/bsps/arm/grp.yml
+++ b/spec/build/bsps/arm/grp.yml
@@ -9,6 +9,7 @@ install:
   source:
   - bsps/arm/include/cmsis_gcc.h
   - bsps/arm/include/core_cm7.h
+  - bsps/arm/include/core_cm4.h
   - bsps/arm/include/core_cmFunc.h
   - bsps/arm/include/core_cmInstr.h
   - bsps/arm/include/core_cmSimd.h
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 3/7] TFTPFS: Restore tftpDriver.c

2022-06-06 Thread Frank Kühndel
Hello Joel, 




From: "Joel Sherrill"  
To: "Frank Kühndel"  
Cc: "rtems-de...@rtems.org"  
Sent: Saturday, June 4, 2022 1:05:25 AM 
Subject: Re: [PATCH 3/7] TFTPFS: Restore tftpDriver.c 

> Is this really just a move/rename? Does it preserve the git blame info? 

This (PATCH 3/7) is really a file "copy/recreate" (git blame info will *NOT* be 
preserved). The move/rename is (at the very beginning of) PATCH 2/7. My 
understanding is, that the git blame info will be "moved" by PATCH 2/7 from 
original file tftpDriver.c to the "copied/moved" tftpfs.c file provided the 
person commiting the patches does not apply the trick described in the link I 
send in the cover letter of this patch set. If that trick is applied both files 
tftpDriver.c and tftpfs.c will have an intact git blame info - at least as long 
as nothing "surprising" like a git rebase happens. 

My feeling is that more original code survived in tftpfs.c than in 
tftpDriver.c. Therefore, in case the trick is not applied (i.e. only one file 
ends up with an intact git blame info) it is preferable that this be tftpfs.c. 

Greetings 
fk 


> --joel 

On Fri, Jun 3, 2022, 10:22 AM Frank Kuehndel < [ 
mailto:frank.kuehn...@embedded-brains.de | frank.kuehn...@embedded-brains.de ] 
> wrote: 


From: Frank Kühndel < [ mailto:frank.kuehn...@embedded-brains.de | 
frank.kuehn...@embedded-brains.de ] > 

--- 
cpukit/libfs/src/ftpfs/tftpDriver.c | 1088 +++ 
1 file changed, 1088 insertions(+) 
create mode 100644 cpukit/libfs/src/ftpfs/tftpDriver.c 

diff --git a/cpukit/libfs/src/ftpfs/tftpDriver.c 
b/cpukit/libfs/src/ftpfs/tftpDriver.c 
new file mode 100644 
index 00..d0eadcf99a 
--- /dev/null 
+++ b/cpukit/libfs/src/ftpfs/tftpDriver.c 
@@ -0,0 +1,1088 @@ 
+/* SPDX-License-Identifier: BSD-2-Clause */ 
+ 
+/** 
+ * @file 
+ * 
+ * Trivial File Transfer Protocol file system (TFTP client) for RFC 1350. 
+ * 
+ * Transfer file to/from remote host 
+ */ 
+ 
+/* 
+ * Copyright (c) 1998 Eric Norum < [ mailto:e...@norum.ca | e...@norum.ca ] > 
+ * 
+ * Modifications to support reference counting in the file system are 
+ * Copyright (c) 2012 embedded brains GmbH. 
+ * 
+ * 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. 
+ */ 
+ 
+#ifdef HAVE_CONFIG_H 
+#include "config.h" 
+#endif 
+ 
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+#include  
+ 
+#ifdef RTEMS_NETWORKING 
+#include  
+#endif 
+ 
+#ifdef RTEMS_TFTP_DRIVER_DEBUG 
+int rtems_tftp_driver_debug = 1; 
+#endif 
+ 
+/* 
+ * Range of UDP ports to try 
+ */ 
+#define UDP_PORT_BASE 3180 
+ 
+/* 
+ * Default limits 
+ */ 
+#define PACKET_FIRST_TIMEOUT_MILLISECONDS 400L 
+#define PACKET_TIMEOUT_MILLISECONDS 6000L 
+#define OPEN_RETRY_LIMIT 10 
+#define IO_RETRY_LIMIT 10 
+ 
+/* 
+ * TFTP opcodes 
+ */ 
+#define TFTP_OPCODE_RRQ 1 
+#define TFTP_OPCODE_WRQ 2 
+#define TFTP_OPCODE_DATA 3 
+#define TFTP_OPCODE_ACK 4 
+#define TFTP_OPCODE_ERROR 5 
+ 
+/* 
+ * Largest data transfer 
+ */ 
+#define TFTP_BUFSIZE 512 
+ 
+/* 
+ * Packets transferred between machines 
+ */ 
+union tftpPacket { 
+ /* 
+ * RRQ/WRQ packet 
+ */ 
+ struct tftpRWRQ { 
+ uint16_t opcode; 
+ char filename_mode[TFTP_BUFSIZE]; 
+ } tftpRWRQ; 
+ 
+ /* 
+ * DATA packet 
+ */ 
+ struct tftpDATA { 
+ uint16_t opcode; 
+ uint16_t blocknum; 
+ uint8_t data[TFTP_BUFSIZE]; 
+ } tftpDATA; 
+ 
+ /* 
+ * ACK packet 
+ */ 
+ struct tftpACK { 
+ uint16_t opcode; 
+ uint16_t blocknum; 
+ } tftpACK; 
+ 
+ /* 
+ * ERROR packet 
+ */ 
+ struct tftpERROR { 
+ uint16_t opcode; 
+ uint16_t errorCode; 
+ char errorMessage[TFTP_BUFSIZE]; 
+ } t

Re: [PATCH 3/7] TFTPFS: Restore tftpDriver.c

2022-06-06 Thread Joel Sherrill
On Mon, Jun 6, 2022 at 9:02 AM Frank Kühndel <
frank.kuehn...@embedded-brains.de> wrote:

> Hello Joel,
>
>
>
> --
> *From: *"Joel Sherrill" 
> *To: *"Frank Kühndel" 
> *Cc: *"rtems-de...@rtems.org" 
> *Sent: *Saturday, June 4, 2022 1:05:25 AM
> *Subject: *Re: [PATCH 3/7] TFTPFS: Restore tftpDriver.c
>
> > Is this really just a move/rename? Does it preserve the git blame info?
>
> This (PATCH 3/7) is really a file "copy/recreate" (git blame info will
> *NOT* be preserved). The move/rename is (at the very beginning of) PATCH
> 2/7. My understanding is, that the git blame info will be "moved" by PATCH
> 2/7 from original file tftpDriver.c to the "copied/moved" tftpfs.c file
> provided the person commiting the patches does not apply the trick
> described in the link I send in the cover letter of this patch set. If that
> trick is applied both files tftpDriver.c and tftpfs.c will have an intact
> git blame info - at least as long as nothing "surprising" like a git rebase
> happens.
>
> My feeling is that more original code survived in tftpfs.c than in
> tftpDriver.c. Therefore, in case the trick is not applied (i.e. only one
> file ends up with an intact git blame info) it is preferable that this be
> tftpfs.c.
>

OK. Work with Christian or Sebastian to make sure it gets committed
correctly.

--joel

>
> Greetings
> fk
>
>
> > --joel
>
> On Fri, Jun 3, 2022, 10:22 AM Frank Kuehndel <
> frank.kuehn...@embedded-brains.de> wrote:
>
>> From: Frank Kühndel 
>>
>> ---
>>  cpukit/libfs/src/ftpfs/tftpDriver.c | 1088 +++
>>  1 file changed, 1088 insertions(+)
>>  create mode 100644 cpukit/libfs/src/ftpfs/tftpDriver.c
>>
>> diff --git a/cpukit/libfs/src/ftpfs/tftpDriver.c
>> b/cpukit/libfs/src/ftpfs/tftpDriver.c
>> new file mode 100644
>> index 00..d0eadcf99a
>> --- /dev/null
>> +++ b/cpukit/libfs/src/ftpfs/tftpDriver.c
>> @@ -0,0 +1,1088 @@
>> +/* SPDX-License-Identifier: BSD-2-Clause */
>> +
>> +/**
>> + * @file
>> + *
>> + * Trivial File Transfer Protocol file system (TFTP client) for RFC 1350.
>> + *
>> + * Transfer file to/from remote host
>> + */
>> +
>> +/*
>> + * Copyright (c) 1998 Eric Norum 
>> + *
>> + * Modifications to support reference counting in the file system are
>> + * Copyright (c) 2012 embedded brains GmbH.
>> + *
>> + * 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.
>> + */
>> +
>> +#ifdef HAVE_CONFIG_H
>> +#include "config.h"
>> +#endif
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#ifdef RTEMS_NETWORKING
>> +#include 
>> +#endif
>> +
>> +#ifdef RTEMS_TFTP_DRIVER_DEBUG
>> +int rtems_tftp_driver_debug = 1;
>> +#endif
>> +
>> +/*
>> + * Range of UDP ports to try
>> + */
>> +#define UDP_PORT_BASE3180
>> +
>> +/*
>> + * Default limits
>> + */
>> +#define PACKET_FIRST_TIMEOUT_MILLISECONDS  400L
>> +#define PACKET_TIMEOUT_MILLISECONDS6000L
>> +#define OPEN_RETRY_LIMIT   10
>> +#define IO_RETRY_LIMIT 10
>> +
>> +/*
>> + * TFTP opcodes
>> + */
>> +#define TFTP_OPCODE_RRQ 1
>> +#define TFTP_OPCODE_WRQ 2
>> +#define TFTP_OPCODE_DATA3
>> +#define TFTP_OPCODE_ACK 4
>> +#define TFTP_OPCODE_ERROR   5
>> +
>> +/*
>> + * Largest data transfer
>> + */
>> +#define TFTP_BUFSIZE512
>> +
>> +/*
>> + * Packets transferred between machines
>> + */
>> +union tftpPacket {
>> +/*
>> + * RRQ/WRQ packet
>> + */
>> +struct tftpRWRQ {
>> +u

Re: [PATCH 2/2] arm: Fix PMSA regions for contiguous sections

2022-06-06 Thread Gedare Bloom
Looks good to me

On Fri, Jun 3, 2022 at 12:38 AM Sebastian Huber
 wrote:
>
> Sections with identical attributes may be contiguous with a respective
> begin and end address which is not on a minimum region boundary.  The
> begin address is aligned down to the region base address.  The end
> address is aligned up to the region end address.  Account for this in
> the check for contiguous sections.
> ---
>  cpukit/score/cpu/arm/aarch32-psma-init.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/cpukit/score/cpu/arm/aarch32-psma-init.c 
> b/cpukit/score/cpu/arm/aarch32-psma-init.c
> index 9edbb517fc..c6aebdc4be 100644
> --- a/cpukit/score/cpu/arm/aarch32-psma-init.c
> +++ b/cpukit/score/cpu/arm/aarch32-psma-init.c
> @@ -135,16 +135,16 @@ size_t _AArch32_PMSA_Map_sections_to_regions(
>if ( attr == region_attr ) {
>  uint32_t region_end;
>
> -if ( end == region_base ) {
> -  /* Extend the region region */
> +if ( end - region_base <= AARCH32_PMSA_MIN_REGION_ALIGN ) {
> +  /* Extend the region */
>regions[ ri ].base = base;
>break;
>  }
>
>  region_end = region_limit + AARCH32_PMSA_MIN_REGION_ALIGN;
>
> -if ( base == region_end ) {
> -  /* Extend the region region */
> +if ( region_end - base <= AARCH32_PMSA_MIN_REGION_ALIGN ) {
> +  /* Extend the region */
>regions[ ri ].limit = limit;
>break;
>  }
> --
> 2.35.3
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel