arm64 support for libbsd

2021-12-14 Thread Sebastian Huber
Hello Kinsey, I didn't work with libbsd for a while and noticed now that there are changes after calling: ./freebsd-to-rtems.py -R ./freebsd-to-rtems.py git status modified: freebsd/sys/arm64/include/machine/in_cksum.h I don't know how you imported the in_cksum.h, but there should be no

Re: New validation test suites

2021-12-14 Thread Chris Johns
On 14/12/21 6:24 pm, Sebastian Huber wrote: > Hello Chris, > > On 13/12/2021 22:01, Chris Johns wrote: >> On 14/12/21 1:53 am, Sebastian Huber wrote: >>> Hello, >>> >>> the ESA activity to pre-qualify parts of RTEMS according to ECSS >>> requirements is >>> nearly complete. There is a short

Ten Years of Git

2021-12-14 Thread Joel Sherrill
Hi Had a memory pop up which noted that today is the tenth anniversary of when we made CVS ready only. That means today there are now 26 years, 7 months, and 4 days of RTEMS history to peruse online. This is the post and original in the RTEMS Users Facebook group.

[PATCH 27/35] Set last_comp_version correctly in new dtb and fix potential version issues in fdt_open_into

2021-12-14 Thread Sebastian Huber
From: Justin Covell Changes in v3: - Remove noop version sets - Set version correctly on loaded fdt in fdt_open_into Fixes: f1879e1a50eb ("Add limited read-only support for older (V2 and V3) device tree to libfdt.") Signed-off-by: Justin Covell Message-Id:

[PATCH 35/35] dtc: Update VERSION

2021-12-14 Thread Sebastian Huber
--- cpukit/dtc/VERSION | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpukit/dtc/VERSION b/cpukit/dtc/VERSION index a6f7720958..77198ab947 100644 --- a/cpukit/dtc/VERSION +++ b/cpukit/dtc/VERSION @@ -4,15 +4,15 @@ git://git.kernel.org/pub/scm/utils/dtc/dtc.git

[PATCH 33/35] libfdt: fix an incorrect integer promotion

2021-12-14 Thread Sebastian Huber
From: Elvira Khabirova UINT32_MAX is an integer of type unsigned int. UINT32_MAX + 1 overflows unless explicitly computed as unsigned long long. This led to some invalid addresses being treated as valid. Cast UINT32_MAX to uint64_t explicitly. Signed-off-by: Elvira Khabirova ---

[PATCH 30/35] Fix CID 1461557

2021-12-14 Thread Sebastian Huber
From: David Gibson Coverity gets a bit confused by loading fdt_size_dt_strings() and using it in a memmove(). In fact this is safe because the callers have verified this information (via FDT_RW_PROBE() in fdt_pack() or construction in fdt_open_into()). Passing in strings_size like we already

[PATCH 28/35] libfdt: Fix a possible "unchecked return value" warning

2021-12-14 Thread Sebastian Huber
From: David Gibson Apparently the unchecked return value of the first fdt_next_tag() call in fdt_add_subnode_namelen() is tripping Coverity Scan in some circumstances, although it appears not to for the scan on our project itself. This fdt_next_tag() should always return FDT_BEGIN_NODE, since

[PATCH 26/35] libfdt: Tweak description of assume-aligned load helpers

2021-12-14 Thread Sebastian Huber
From: David Gibson There's a small inaccuracy in the comment describing these new helpers. This corrects it, and reformats while we're there. Fixes: f98f28ab ("libfdt: Internally perform potentially unaligned loads") Signed-off-by: David Gibson --- cpukit/dtc/libfdt/libfdt_internal.h | 14

[PATCH 19/35] libfdt: fdt_create_with_flags(): Fix comparison warning

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in a comparison in fdt_create_with_flags(). By making hdrsize a signed integer (we are sure it's a very small number), we avoid all the casts and have matching types. Signed-off-by: Andre Przywara

[PATCH 22/35] libfdt: fdt_strerror(): Fix comparison warning

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in a comparison in fdt_strerror(). Force FDT_ERRTABSIZE to be signed (it's surely small enough to fit), so that the types match. Also move the minus sign to errval, as this is actually what we use in the

[PATCH 17/35] libfdt: fdt_add_string_(): Fix comparison warning

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in a comparison in fdt_add_string_(). Make all variables unsigned, and express the negative offset trick via subtractions in the code. Signed-off-by: Andre Przywara Message-Id:

[PATCH 16/35] libfdt: fdt_node_offset_by_phandle(): Fix comparison warning

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in a comparison in fdt_node_offset_by_phandle(). Uses a better suited bitwise NOT operator to denote the special value of -1, which automatically results in an unsigned type. Signed-off-by: Andre Przywara

[PATCH 32/35] libfdt: Add ALIGNMENT error string

2021-12-14 Thread Sebastian Huber
From: Georg Kotheimer The ALIGNMENT error was missing a string, leading to being returned. Signed-off-by: Georg Kotheimer Signed-off-by: David Gibson --- cpukit/dtc/libfdt/fdt_strerror.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cpukit/dtc/libfdt/fdt_strerror.c

[PATCH 34/35] libfdt: overlay: make overlay_get_target() public

2021-12-14 Thread Sebastian Huber
From: Vikram Garhwal This is done to get the target path for the overlay nodes which is very useful in many cases. For example, Xen hypervisor needs it when applying overlays because Xen needs to do further processing of the overlay nodes, e.g. mapping of resources(IRQs and IOMMUs) to other VMs,

[PATCH 29/35] libfdt: Add FDT alignment check to fdt_check_header()

2021-12-14 Thread Sebastian Huber
From: Rob Herring Only checking the FDT alignment in fdt_ro_probe_() means that fdt_check_header() can pass, but then subsequent API calls fail on alignment checks. Let's add an alignment check to fdt_check_header() so alignment errors are found up front. Cc: Tom Rini Cc: Frank Rowand

[PATCH 23/35] libfdt: Fix kernel-doc comments

2021-12-14 Thread Sebastian Huber
From: Andre Przywara The API documentation in libfdt.h seems to follow the Linux kernel's kernel-doc format[1]. Running "scripts/kernel-doc -v -none" on the file reports some problems, mostly missing return values and missing parameter descriptions. Fix those up by providing the missing bits,

[PATCH 25/35] libfdt: Internally perform potentially unaligned loads

2021-12-14 Thread Sebastian Huber
From: Tom Rini Commits 6dcb8ba4 "libfdt: Add helpers for accessing unaligned words" introduced changes to support unaligned reads for ARM platforms and 11738cf01f15 "libfdt: Don't use memcpy to handle unaligned reads on ARM" improved the performance of these helpers. On further discussion,

[PATCH 18/35] libfdt: fdt_move(): Fix comparison warnings

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in comparisons in fdt_move(). This stems from "bufsize" being passed in as a signed integer, even though we would expect a buffer size to be positive. Short of changing the prototype, check that bufsize is

[PATCH 21/35] libfdt: fdt_get_string(): Fix sequential write comparison warnings

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in comparisons in fdt_get_string(). Introduce a new usigned variable, which holds the actual (negated) stroffset value, so we avoid negating all the other variables and have proper types everywhere.

[PATCH 20/35] libfdt: libfdt_wip: Fix comparison warning

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in a comparison in fdt_setprop_inplace_namelen_partial(). fdt_getprop_namelen() will only return negative error values in "proplen" if the return value is NULL. So we can rely on "proplen" being positive in

[PATCH 14/35] libfdt: fdt_splice_(): Fix comparison warning

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in a comparison in fdt_splice_(). Since we just established that oldlen is not negative, we can safely cast it to an unsigned type. Signed-off-by: Andre Przywara Message-Id:

[PATCH 15/35] libfdt: fdt_resize(): Fix comparison warning

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in a comparison in fdt_resize(). A negative buffer size will surely do us no good, so let's rule this case out first. In the actual comparison we then know that a cast to an unsigned type is safe.

[PATCH 13/35] libfdt: fdt_get_string(): Fix comparison warnings

2021-12-14 Thread Sebastian Huber
From: Simon Glass With -Wsign-compare, compilers warn about a mismatching signedness in comparisons in fdt_get_string(). In the first two cases, we have just established that the signed values are not negative, so it's safe to cast the values to an unsigned type. Signed-off-by: Simon Glass

[PATCH 11/35] libfdt: fdt_mem_rsv(): Fix comparison warnings

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in comparisons in fdt_mem_rsv(). Since all involved values must be positive, change the used types to be unsigned. Signed-off-by: Andre Przywara Message-Id: <20200921165303.9115-3-andre.przyw...@arm.com>

[PATCH 09/35] libfdt: fix fdt_check_node_offset_ w/ VALID_INPUT

2021-12-14 Thread Sebastian Huber
From: Frank Mehnert fdt_check_node_offset_() checks for a valid offset but also changes the offset by calling fdt_next_tag(). Hence, do not skip this function if ASSUME_VALID_INPUT is set but only omit the initial offset check in that case. As this function works very similar to

[PATCH 10/35] libfdt: fdt_offset_ptr(): Fix comparison warnings

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about mismatching signedness in comparisons in fdt_offset_ptr(). This mostly stems from "offset" being passed in as a signed integer, even though the function would not really tolerate negative values. Short of changing the prototype,

[PATCH 08/35] libfdt: add extern "C" for C++

2021-12-14 Thread Sebastian Huber
From: Patrick Oppenlander Signed-off-by: Patrick Oppenlander Message-Id: <20200616011217.15253-1-patrick.oppenlan...@gmail.com> Signed-off-by: David Gibson --- cpukit/include/libfdt.h | 8 1 file changed, 8 insertions(+) diff --git a/cpukit/include/libfdt.h b/cpukit/include/libfdt.h

[PATCH 07/35] libfdt: trivial typo fix

2021-12-14 Thread Sebastian Huber
From: Patrick Oppenlander Signed-off-by: Patrick Oppenlander Message-Id: <20200618042117.131731-1-patrick.oppenlan...@gmail.com> Signed-off-by: David Gibson --- cpukit/dtc/libfdt/fdt_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/dtc/libfdt/fdt_sw.c

[PATCH 06/35] libfdt: Correct condition for reordering blocks

2021-12-14 Thread Sebastian Huber
From: Simon Glass This condition uses bitwise OR but should be logical OR. Fix it. Signed-off-by: Simon Glass Reported-by: kernel test robot Message-Id: <20200615160033.87328-1-...@chromium.org> Signed-off-by: David Gibson --- cpukit/dtc/libfdt/fdt_rw.c | 2 +- 1 file changed, 1

[PATCH 31/35] fdtget: Fix signedness comparisons warnings

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in the different legs of the conditional operator, in fdtget.c. In the questionable expression, we are constructing a 16-bit value out of two unsigned 8-bit values, however are relying on the compiler's

[PATCH 24/35] libfdt: Check for 8-byte address alignment in fdt_ro_probe_()

2021-12-14 Thread Sebastian Huber
From: Tom Rini The device tree must be loaded in to memory at an 8-byte aligned address. Add a check for this condition in fdt_ro_probe_() and a new error code to return if we are not. Signed-off-by: Tom Rini Message-Id: <20201104130605.28874-1-tr...@konsulko.com> Signed-off-by: David Gibson

[PATCH 03/35] libfdt: Add support for disabling internal checks

2021-12-14 Thread Sebastian Huber
From: Simon Glass If libfdt returns -FDT_ERR_INTERNAL that generally indicates a bug in the library. Add a new assumption for these cases since it should be save to disable these checks regardless of the input. Signed-off-by: Simon Glass Suggested-by: David Gibson Message-Id:

[PATCH 12/35] libfdt: fdt_grab_space_(): Fix comparison warning

2021-12-14 Thread Sebastian Huber
From: Andre Przywara With -Wsign-compare, compilers warn about a mismatching signedness in a comparison in fdt_grab_space_(). All the involved values cannot be negative, so let's switch the types of the local variables to unsigned to make the compiler happy. Signed-off-by: Andre Przywara

[PATCH 02/35] libfdt: Improve comments in some of the assumptions

2021-12-14 Thread Sebastian Huber
From: Simon Glass Add a little more detail in a few of these comments. Signed-off-by: Simon Glass Suggested-by: David Gibson Message-Id: <20200302190255.51426-2-...@chromium.org> Signed-off-by: David Gibson --- cpukit/dtc/libfdt/libfdt_internal.h | 15 --- 1 file changed, 12

[PATCH 04/35] libfdt: Use VALID_INPUT for FDT_ERR_BADSTATE checks

2021-12-14 Thread Sebastian Huber
From: Simon Glass This error indicates a logic bug in the code calling libfdt, so VALID_DTB is not really the right check. Update it to use VALID_INPUT instead. Signed-off-by: Simon Glass Suggested-by: David Gibson Message-Id: <20200302190255.51426-4-...@chromium.org> Signed-off-by: David

[PATCH 01/35] libfdt: Fix a few typos

2021-12-14 Thread Sebastian Huber
From: Simon Glass Fix 'saftey' and 'additional' typos noticed in the assumption series. Reword the ASSUME_NO_ROLLBACK slightly to improve clarity. Signed-off-by: Simon Glass Suggested-by: David Gibson Message-Id: <20200302190255.51426-1-...@chromium.org> Signed-off-by: David Gibson ---

[PATCH 05/35] libfdt: fix undefined behaviour in fdt_splice_()

2021-12-14 Thread Sebastian Huber
From: Jan Beulich libfdt: fix undefined behaviour in fdt_splice_() Along the lines of commit d0b3ab0a0f46 ("libfdt: Fix undefined behaviour in fdt_offset_ptr()"), fdt_splice_() similarly may not use pointer arithmetic to do overflow checks. (The left side of the checks added by d4c7c25c9ed1

[PATCH 00/35] Update libfdt

2021-12-14 Thread Sebastian Huber
This patch set updates libfdt (which is a part of the dtc repository) to the latest version. Andre Przywara (14): libfdt: fdt_offset_ptr(): Fix comparison warnings libfdt: fdt_mem_rsv(): Fix comparison warnings libfdt: fdt_grab_space_(): Fix comparison warning libfdt: fdt_splice_(): Fix

[PATCH] 6: Update GCC to fix PR100108

2021-12-14 Thread Sebastian Huber
This update fixes a GCC 10 regression which resulted in invalid code generation for some 32-bit powerpc targets: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100108 --- rtems/config/tools/rtems-gcc-10-newlib-head.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git