When a callback does not exist, the Flashdev API should return error
where possible instead of success. When the API returns success for
missing callbacks, the Flashdev API client code may end up using
uninitialized variables as if they were filled by the API.
Closes#5391
Move variable assignments after the setjmp() call where possible and
move macros that contain setjmp into an if() clause since assigning the
return value to a variable is undefined.
Updates #5364
Set BSP_INTERRUPT_VECTOR_COUNT to 1 to avoid type limits and array
bounds warnings.
Make sure all functions using the default interrupt controller
implementation return a status of RTEMS_UNSATISFIED.
Update #5298.
Close#5377.
All but ~50 warnings have been fixed if you account for unmerged
MRs. These settings should give a warning free build given the
current state.
Warnings by Type
=================================
2 -Wshift-negative-value
3 -Wenum-conversion
7 -Wcast-function-type
7 -Wmissing-field-initializers
8 -Wclobbered
32 -Wtype-limits
GCC generates type limit warnings when comparison is always true or
always false due to the limited range of the data type, This was in a
termios structure. For most of the cases in RTEMS, this was when
a variable of an unsigned type was compared to be < or <= 0.
GCC generates type limit warnings when comparison is always true or
always false due to the limited range of the data type, This was in a
termios structure. For most of the cases in RTEMS, this was when
a variable of an unsigned type was compared to be < or <= 0.
GCC generates type limit warnings when comparison is always true or
always false due to the limited range of the data type, This was in a
termios structure. For most of the cases in RTEMS, this was when
a variable of an unsigned type was compared to be < or <= 0.
Return the actual out of bounds size per page instead of the ioctl
return status. JFFS2 will happily operate with an OOB size of 0 and
instead put cleanmarkers in the normal page space of the flash.
The error was referencing a field in the rtems_irq_connect_data
structure which only existed when BSP_SHARED_HANDLER_SUPPORT is
enabled.
Updates #5325.
Address missing field initializer warnings.
These were rtems_extensions_table declarations with initialization.
The initialization was changed to using named fields.
Updates #5325.
Address missing field initializer warnings. Since this is third party
code and the structure initialization in question is large, the
warning was disabled.
Updates #5325.
Address missing field initializer warnings.
These were rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization. The initialization was changed to using named
fields.
Updates #5325.
Address missing field initializer warnings.
These were rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization. The initialization was changed to using named
fields.
Updates #5325.
Address missing field initializer warnings.
These were all rtems_shell_cmd_t or rtems_shell_alias_t declarations
with initialization. The initialization was changed to using named
fields.
Updates #5325.
Address missing field initializer warnings.
These were all rtems_irq_connect_data declarations with initialization.
The initialization was changed to using named fields and specifying an
initializer for each field.
Address missing field initializer warnings.
This code originated from FreeBSD and only some initializers are
missing the last field. It is best to avoid modifying the code so
the warning is disabled for this array initialization.
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-parameter.
The ACPI change set includes two headers which define debug macros. When
not building for debug, the instantiated inline functions generate
unused parameter warnings from every file they are included in. The
warning was disabled around the macro instantiations.
This commit adds support for the sem_clockwait() system call.
It also refactors code to avoid duplicating by implementing
_Semaphore_Wait_timed_clock() used in
sem_clockwait() and sem_timedwait()
The MR includes tests.
Updates
rtems/programs/gsoc#69
rtems#24
While doing relicensing, I noticed that Yang Xi's submissions were
inconsistent about including a copyright. This adds that and does
some associated clean up. If comments were in the
attribution/license comment, they were converted to the Doxygen
comment block. No attribution or license changes were made.
I have reached out to Yang Xi for relicensing but not heard back
but the need for this cleanup was noticed.
Updates #3053
Code should not rely on the contents of local variables set before
setjmp() after the longjmp() returns. In this case, it was notpossible
to reset events after the return. But analysis determined that the
longjmp() should always returns to the same stack frame. Thus local
variables should be preserved. The warning was disabled.
This case was not addressed by adding the "returns_twice" attribute
to setjmp() in setjmp.h.
Updates #5364.
Code should not rely on the contents of local variables set before
setjmp() after the longjmp() returns. In this case, it was possible
to set cpu_self after the return from setjmp().
This case was not addressed by adding the "returns_twice" attribute
to setjmp() in setjmp.h.
Updates #5364.
In some cases a file read is not completed in a single call into the
JFFS2 layer and the inode is left in the READING state. When this
happens, it's possible for a garbage collection pass to be initiated
before completion of the read. In some such cases, the garbage
collection pass is executed in a tight loop that expects granular
locking to allow forward progress of the read between collection passes.
With RTEMS monolithic locking of the JFFS2 layer, forward progress is
not possible in this situation since the monolithic lock is never
released inside the loop.
The solution is to have the garbage collection pass return failure when
no progress is possible due to a bad inode state. This allows the read
to complete and the collection pass can be attempted at a later time.
This extends the flashdev API to support the additional calls required
by NAND device backends. This also adds region-relative IOCTLs to
prevent reimplementation of offset logic in top-end flashdev/filesystem
adapters.
Add "(void) param;" annotation to address unused parameter warnings.
Found with GCC's warning -Wunused-paramter.
libmisc/shell was in a previous patch.
The case did not have a break because it was calling a function
which should have been marked as "__dead". It was calling a
function which was marked "__dead". Apparently the analysis
did not see through the extra layer.
These files are included or compiled multiple times. Any warning
in these results in many warning instances. Found with GCC's warning
-Wunused-paramter.
Fixed many warnings for unused parameters. Some cases were
a simple matter of adding "(void) param" at the beginning
of the function, while others required ensuring that addition
was inside the proper conditional section. Found with GCC's
warning -Wunused-paramter.
The files impacted by this change are part of the RTEMS specific
port and do not need to be conditional on RTEMS. Found with GCC's
warning -Wunused-paramter.
This is a third party file and the debug macros create unused
parameter warnings when debugging is not enabled. There are
multiple macros with layers. Rather than attempt to unwind all
this, disabled the -Wunused-parameter GCC warning around the
short block of code causing these warnings.
The maximum size of JFFS2 is 4GB minus the block size of the flash.
Enforce this limitation when setting up a filesystem on a flashdev
region that is larger than the maximum.
This also resolves some off-nominal memory leaks.
This adds an API call allowing for unregistration to include destruction
of private data that is not managed by the flashdev framework. This also
updates the existing consumers of flashdev to use the new private data
destructor callback.
Using abs() on unsigned integers leads to GCC warning -Wabsolute-value.
This commit removes the calls to abs() and replaces them with ternary
conditional operator. This keeps the correct error calculation
previously ensured by abs() call.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This adds the Xilinx compatibility layer for use with various Xilinx
libraries. The first consumer of this will be lwIP support for the
Zynq7000 platform.
If someone manages to open a file before rtems_libio_post_driver is run,
open() may allocate a file number other than 0 for stdin. This leads to
a silent failure of the logic in rtems_libio_post_driver, and confusing
behavior because your BSP behaves as if it doesn't have a console.
Instead of failing silently, raise an internal error if open() succeeds
but gives us an unexpected file number for stdin.
Previously this RTC was using the file system-based i2c interface in
/dev. Since the RTC is initialized pretty early on during system init,
we call open() before stdin/stdout/stderr have been opened. RTEMS
assumes that stdin == 0, stdout == 1, etc., and fails when that isn't
the case. In particular, when stdin != 0, RTEMS assumes that it wasn't
configured with a console driver and skips opening stdout/stderr,
leading to confusing issues with the standard I/O streams.
The RTEMS_FALL_THROUGH macro was needed to provide a portable
way to annotate that a case in a switch statement intentionally
does not have a break statement. It is known as "falling through"
and a common bug.
Adding this macro enabled addressing -Wimplicit-fallthrough warnings.
On the genmcf548x BSP variants, the "request" local variable was
flagged as having a pointer taken and passed to subroutines. GCC
is unable to detect that the "request" variable is removed from
the chain in an ISR. Disabled -Wdangling-pointer for the single
test function CallWithinISR().
The ACPI source has multiple tables where a Name field is defined.
The name field is a character array with a length of 4. All of the
string initializers are four characters plus a NUL. The code is
careful to use strn*() functions and intentionally avoids assuming
there is space for the NUL. With lots of entries in the various
arrays, this was clearly a design decision to save space.
This was caught by GCC's -Wunterminated-string-initialization
warning. The solution used is to use the "nonstring" attribute
recommended by the GCC manual.
Closes#5329
The file tm27-default.h is considered an internal flag. Accidentally
copying and pasting this include in while fixing attribution headers
was a mistake. Removing the line.
The code in flashio.c had a special case for handling unaligned buffers
during writes. That code did roughly the following:
If the size or start address of the buffer is not aligned to a word:
* align the size up to the next word
* create a temp buffer on heap or stack with the new size
* copy the data from write buffer to this temp buffer
* write the temp buffer with the _new_ size to the flash
* tell the code above, that the original size has been written
That means, that in certain cases, one to three random bytes have been
written to the flash. That is definitively not correct.
The special cases that trigger the behaviour seem to happen quite often
when using the RTEMS functions to unpack a .tar.gz with files in the
range of a few megabytes stored on the JFFS2 file system to the same
file system.
The RTEMS interface for flash drivers doesn't define any alignment
requirements. Therefore that code is not necessary and can just be
removed to solve these issues.
These files were written by Joel Sherrill with some being based
on descriptions from user reports.
testsuites/sptests/sp34/changepri.c
testsuites/sptests/sp52/sp52impl.h
testsuites/sptests/sp67/init.c
Updates #3053.
The definition of NEEDS_THUMB_SWITCH was not portable and flagged by
the GCC -Wexpansion-to-defined. It is not portable to expand a macro
which uses futher cpp directives.
Closes#5328.
This change adds attribution as appropriate for Ray Xu, Jay Monkman,
and Philippe Simons. The attribution is based on git archeology and
current permissions to relicense. Some of the code given attribution
was from the gp32 BSP which required looking at the 4.8 branch to
get attribution.
- Work by Ray Xu and Jay Monkman is now 2-BSD
- Work by Philipe Simon is GPL 2.0 w/RTEMS exception
Updates #3053.
Added pthread_cond_clockwait(), pthread_mutex_clocklock()
pthread_rwlock_clockrdlock() and pthread_rwlock_clockwrlock()
that are new in POSIX Issue 8. Also added tests.
The implementation used the timed versions of these functions
as a reference.
Updates
rtems/programs/gsoc#69
This change reflects adding attribution based on the initial
submitter per git history. Most files were from Eric Norum
and he has given permission to relicense to 2-BSD. One file
was from Mike Bertosh whom we are still trying to contact.
That file is assumed to have been submitted under the GPL
w/exception as was the norm when it was submitted.
Many tm27.h implementations were one line with no attribution.
Some were simply including a default non-functional implementation.
Others were including a header file giving an implementation based
on a standard counter/timer. This patch gives attribution based on
the split out being done by Sebastian Huber in 2017.
Added new functions to thread queue infrastructure to support
clock-specific timeout operations, making it easier to integrate
POSIX Issue 8 clock functions.
Updates
rtems/programs/gsoc#69
rtems#24
These files did not have copyright, license, or SPDX. Per git log
these files were authored by Petr Benes who has other code in the
RTEMS source base and given permission to use BSD-2.
Updates #3053
Update the rtems_region_get_information() and
rtems_region_get_information() documentation with various more or less
minor wording fixes:
* "obtain a diagnostic information." ->
"obtain diagnostic information."
* "This method forms am O(n)" ->
"This directive performs an O(n)"
* "scan of the free in the region" ->
"scan of the free blocks in the region"
* "many used blocks and a much smaller number of used blocks" ->
"many used blocks and a much smaller number of free blocks"
These changes were generated from rtems-central.
Newer C versions require that the storage-class specifier like
static or _Thread_Local be the first thing in a declaration. Adding
this warning to the default set to let us eliminate violations.
These files are generated from specification items. The Markdown
formatting tool used for the documentation sources requires the use
of '-' for lists instead of '*'.
The Doxygen documentation for rtems_chain_get_with_wait() appears to be
incorrect based on a copy-paste from rtems_chain_get_with_notification().
Correct the documentation to describe the get and wait mechanism.
Now that RTEMS should be entirely warning free thanks largely to the
efforts of Joel, adding this flag should keep the codebase in a good
state for future compiler updates.
Closes#5317
Provide missing GCC atomics helpers as part of BSPs where GCC
does not know how to provide it since the CPU's ISA has no
atomic instructions. The implementation provided in
bsps/shared/atomics/__atomic_test_and_set.c should work
on any single core CPU.
The CLOCK_DRIVER_USE_FAST_IDLE configure option is implemented
in the shared clock driver implementation. Unfortunately, the spec
files scattered the yaml to enable it for a specific BSP. This
change adds the shared file spec/build/bsps/optclkfastidle.yml which
is now the only place the CLOCK_DRIVER_USE_FAST_IDLE is specified.
That file includes a master list of BSPs which are known to be able to
run on simulators that are slow enough to benefit from this option.
As a point of information, the entire riscv BSP family can run on
both spike and qemu. None had the option do use fast idle. With this
option enabled, the time taken for a full test run on spike for
rv32i and rv64imadfc dropped by ~45%.
The _VBR is a symbol defined by linker scripts. You cannot change this
value at runtime. The BSP initialization has to ensure that
m68k_set_vbr() is only set to _VBR.
Close#5210.
For the application configuration option
CONFIGURE_RECORD_INTERRUPTS_ENABLED, define
bsp_interrupt_get_dispatch_table_slot() in the application configuration
to avoid issues with the object link order within the RTEMS libraries.
Enable this option in an associated test.
Close#5244.
These four files had a copyright block with no license text.
The script to move the SPDX line to the top of the file ended
up deleting a line which was the end of the comment block.
Use numeric value of cr0 to fix the following warnings:
ppc_exc_asm_macros.h: Assembler messages:
ppc_exc_asm_macros.h:242: Warning: invalid register expression
ppc_exc_asm_macros.h:730: Info: macro invoked from here
ppc_exc.S:134: Info: macro invoked from here
ppc_exc_asm_macros.h:242: Warning: invalid register expression
ppc_exc_asm_macros.h:730: Info: macro invoked from here
ppc_exc.S:137: Info: macro invoked from here
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
The RTEMS Software Engineering Guide specifies that the SPDX license
annotation shouldbe the first line of the file and not part of the
copyright/license comment block.
When AArch64 exception support was first written, nested exceptions were
configured using the wrong stack. This happened to work since any
changes were unwound from the stack before dispatch occurred. This
implements correct behavior for all SP0 interrupt vectors.
Closes#5140
The sp0 IRQ and lel32 SError exception targets were left in a bad state
following the exception rework to avoid use of mutable code pages. The
lel32 SError exception is entirely unused by RTEMS. This points the two
erroneous exception vectors at the correct targets.
The block of embedded assembly language which creates a section
to add auto-loading of the Python pretty printing scripts was
getting this warning on all ARM BSPs.
/tmp/ccMGaqij.s: Assembler messages:
/tmp/ccMGaqij.s:19: missing merge / string entity size, 1 assumed
This was because the @ symbol is a comment on ARM. Changing to
a % as suggested on the binutils mailing list resolved the problem.
This resolves a missing prototype by making a file used in the arm/imx
BSP family shared so that it can be used by the arm/imxrt BSP family to
provide the missing prototypes.
ILP32 can't represent 4GB in uintptr_t. Avoid the warning that this
assignment generates and update MMU config processing to avoid overflow
when ILP32 is in use.
This addition is needed to account for utf8proc and uuid moving
from cpukit/include to contrib. Both include directories need
to stay globally available.
Fixed missing prototype for SystemInit_ExtMemCtl(). This file is
STM code and SystemInit_ExtMemCtl() is protyped for BSP use in
bsp.h. We do not want to include that in this file to avoid
potential conflicts.
The inport_[byte|word|long] and outport_[byte|word|long] methods
assume that the port is an address. The Beatnick definitions just
pass through the offset into IO Space. These are broken until they
do that. They do not appear to be used in anything this BSP actually
uses so disabling them works. Code is disabled with a lengthy comment
added if someone needs them to work in the future.
RCC_CFGR_PPRE2 was defined three times. Deleted the second and
third definitions. The second appeared to be wrong and the third
looked to be an alternate way to express the first.
STM32F4_FLASH was defined in two places. The first used a hard
coded full address while the second used a more appropriate
base address and offset. Kept the second.
I disabled yapf for the long list that was easier to read in its current form
the rest are trivial changes.
We want this as eventually we'll be doing yapf for CI.
GCC currently has issues with false positive warnings about array bounds
violations when the value used as the index is a pointer. This slightly
reworks the code to make it cleaner and to avoid this warning.
The use of an array of zero length at the end of a structure needs to
be careful to use RTEMS_ZERO_LENGTH_ARRAY since the accepted syntax
varies across C language versions.
This also moves the header from <utf8proc/utf8proc.h> to <utf8proc.h> This
follows what the upstream project uses and keeps us from having to modify
upstream source to put it in a subdirectory.
Remove changing utf8proc.h to its own subdirectory. Other operating systems
have it in include there is no sense in us carrying this change.
Unlike the situation with uuid which projects do have in a subdirectory this is
not.
URL
https://juliastrings.github.io/utf8proc/releases/
Hash
There is no repo until 1.1.6 the file archive used was utf8proc-v1.1.5.tar.gz
released on 2009-10-16 the sha512 is:
cd75a0aabdf7b331ce6cc210fe343e15804e5a097607e387ec0ab9c994ceecc\
f80aecbe25b06efb756d2989fd623b7a4d6de2c4d3416add20ac8692cf37912c6
* This software is Copyright (C) 1998 by T.sqware - all rights limited
* It is provided in to the public domain "as is", can be freely modified
* as far as this copyight notice is kept unchanged, but does not imply
* as far as this copyright notice is kept unchanged, but does not imply
* an endorsement by T.sqware of the product in which it is included.
*
* Copyright (c) Canon Research France SA.]
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.