wiki:Release/6/6.1

Version 1 (modified by Chris Johns, on 06/26/20 at 01:23:23) (diff)

Add RTEM 6.1 milestone

6.1 (open)

Statistics

Total579
Fixed483
Invalid13
Works for me6
Duplicate10
Won't fix23

Distribution

defect

376 / 408

enhancement

117 / 126

task

38 / 40

project

5 / 5

Summary

#550
fcntl() fails to put a non-blocking socket into blocking mode
#1318
libcpu/shared is not helpful
#1459
Add rtems_shell_main_monitor to cpukit/libmisc/shell/shell.h?
#1593
RTEMS Sequenced Initialization API
#1712
Add LWIP Support to RTEMS
#1728
Patch for RTEMS-BSP m68k/mcf5225x
#1815
_ISR_Nest_level should be protected with interrupts disabled in function _Watchdog_Insert
#1820
sptests/sp36: Improper buildsystem integration
#2000
Re-add removed LINK_OBJS to MP tests
#2071
The object-file suffixes for default-bsp-post-link in leaf.cfg don't work with make-exe...
#2111
AVR needs avr-libc to compile RTEMS.
#2114
statvfs for MS-DOS filesystem and 'df' coomand for shell
#2189
Insufficient documentation for rtems_clock_get_tod()
#2215
Duplicate code for TAR support
#2269
x86 Context Switch Synchronization and SMP
#2301
cpukit is built in BSP, and BSP custom, specific part of build tree but isnt built using BSP's spec file
#2330
nios2 missing atomics, fails to link C++
#2348
Timecounter: Add NTP support
#2349
Timecounter: Add PPS support
#2365
Task pre-emption disable is broken due to pseudo ISR tasks
#2778
Error building RTEMS Source Builder recipe for libxml
#2828
Remove libmisc/serdbg
#2869
Remove support for 16-bit object identifiers
#2871
Use bibtex references thoughout the documentation
#2872
Get rid of CONFIGURE_MAXIMUM_PTYS
#2902
Port RTEMS to Microblaze
#2971
Add fenv.h to newlib
#2985
Add documentation for printk()
#3143
Remove obsolete rtems_gxx_*() implementation
#3199
New test framework
#3230
RSB does not report --rsb-file for patches correctly.
#3250
Remove Use of bsp_specs
#3269
Make the IRQ extensions API a standard API
#3321
Improve console driver documentation
#3414
Remove Makefiles from rtems-examples?
#3420
Deprecate/obsolete rtems_io_lookup_name
#3456
Add support for CPU counter timestamps
#3566
Remove checks for Newlib features introduced during the RTEMS 5 development
#3584
Remove types which are only available if RTEMS_DEPRECATED_TYPES is defined
#3586
Remove deprecated proc_ptr definition
#3588
Remove deprecated rtems_context
#3590
Remove deprecated rtems_context_fp
#3592
Remove deprecated region_information_block
#3594
Remove deprecated rtems_thread_cpu_usage_t
#3596
Remove deprecated rtems_rate_monotonic_period_time_t
#3613
Remove m32c architecture port from upstream tools
#3615
Convert Tools_Used Wiki page into Support Tools Selection with Criteria
#3657
Add support for poll.h method - poll
#3659
LEON3 kernel entry point is overwritten - secondary processors may enter into spurious handler
#3689
bdbuf: Replace automatic read-ahead with rtems_bdbuf_peek()
#3698
libdl failure on many PowerPC BSPs
#3702
Space profile for RTEMS SMP
#3704
Review and update Doxygen recommendations
#3705
Software Design Document (SDD) for space profile
#3706
Create a hierarchy of RTEMS software components using Doxygen groups
#3707
Assign each code file to a Doxygen group
#3715
Add Requirements Engineering chapter to RTEMS Software Engineering Handbook
#3717
Add test guidelines chapter to RTEMS Software Engineering Handbook
#3718
Add support for test plans
#3719
Update libcrypt to latest FreeBSD to address Coverity Scan Issues
#3726
Select a requirements engineering tool
#3818
New build system
#3828
Switch over to new build system
#3846
Build system does not track the dependencies of start.o files
#3847
Test programs are not re-linked if a start.o or linker command file changes
#3853
Add and use project-wide glossary to documentation
#3866
Add support for GCC 10 noinit attribute
#3878
rtems06: All BSPs Fail to build with BSP Builder on rtems 6
#3883
Trace linker is broken on small-data area targets
#3886
Fail an RSB build with --mail option if a repo is not clean
#3897
Dhcpcd does not daemonize
#3910
Add BSP for STM32H7
#3924
Test the application configuration options
#3925
Optimize work area initialization
#3929
Document use of virtualenv
#3935
Remove use of RTEMS_INLINE_ROUTINE in the RTEMS sources
#3937
Move content of bsp_specs to GCC
#3941
Remove epiphany architecture support
#3942
multiple definition of `pci_indirect_functions'
#3947
fdt_rw.c: Unchecked return value (CID #1047324)
#3951
Remove obsolete powerpc BSPs
#3957
Review wiki/Developer for deletion
#3959
Add rtems_task_construct()
#3962
Licensing Requirements for Submissions Poorly Documented
#3977
Add unexplained-failure as option for Test Configuration Files
#3978
Move _RTEMS_version to implementation header file
#3979
Remove RTEMS_MAXIMUM_NAME_LENGTH
#3980
Remove deprecated <rtems/system.h>
#3981
Remove _Copyright_Notice from API header file
#3982
Test failures on BSPs with sbrk() support
#3988
Remove deprecated rtems_extension
#3989
Remove deprecated rtems_get_current_processor()
#3990
Remove deprecated rtems_get_processor_count()
#3991
Remove deprecated Thread typedef
#3993
Specify the RTEMS Classic API
#3994
Generate Doxygen markup for the application configuration options
#3996
fenv support is missing on powerpc
#3997
fenv support is missing on sparc
#3998
fenv support is missing on arm
#4007
Add rtems_message_queue_construct()
#4018
libcpusupport: Architecture defines are present outside CPU port
#4020
Change all version numbers to RTEMS 6 on the master branches
#4025
NFS Client is broken on 64-bit targets
#4029
i386: SMP-System hangs with non-consecutive APIC IDs
#4031
i386: ISR can overwrite its own stack during system initialization (cloned)
#4032
Make deferred free in malloc() support optional
#4034
Add rtems_interrupt_server_create() and rtems_interrupt_server_destroy() (cloned)
#4036
Track dependency command for the RSB
#4037
Python script distribution standardisation
#4039
arm/atsam/SC16IS752: Make interrupt server configurable (cloned)
#4040
coverhd.h remnants left to remove
#4043
Update software eng manual to rtems-central
#4044
Add RSB Track command
#4045
Remove RSB sb-builder command
#4046
Remove RSB sb-bootstrap command
#4048
Move RTEMS 5 BSP and package build sets and configs to RTEMS 6
#4052
[libbsd] e1000 driver not working for i386 based BSP in current rtems-libbsd master
#4054
RTEMS_BARRIER_AUTOMATIC_RELEASE and RTEMS_BINARY_SEMAPHORE options have the same value
#4055
bsps/xilinx-zynq: Flush TX-Buffer before initializing the zynq-uart
#4061
The reworked <rtems/confdefs.h> has a cyclic dependency with RTEMS_MULTIPROCESSING enabled (cloned)
#4063
Change to a simpler TFTP server for rtems-test
#4065
Typo in rtems-boot.ini "ubootdior" should be "ubootdir"
#4066
test running for too long
#4067
Libbsd build system does not separate kernel and user land include paths
#4069
dl06 does not link on RISCV
#4070
RISC-V Multiple Definition Error (many BSPs)
#4072
testsuite: Add ticket ids for expected-fail and indeterminate states, add annotations
#4074
Add CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE
#4076
i386: bad asm in smp mode
#4077
Implement LibBSD module dependencies in the build system
#4078
GCC C++ compiler for powerpc defines _GNU_SOURCE as a built-in
#4079
build: i386/pc686/appstart.o is created more than once
#4080
build: Add start.o dependency to the executable link step
#4081
Remove Autoconf/Automake based build system
#4084
throwing std::runtime on PC BSP fails
#4093
bsps/pc386: Add missing license header
#4095
Remove doc from rtems-tools
#4097
shell: CRTL-U sets the cursor to the wrong position (cloned)
#4098
All BSP bsets fail to build on master
#4100
arm/edb7312 Build Failure When SMP is Enabled
#4101
atsamv fails to build on master
#4103
BeagleBoard BSPs Fail to Build
#4105
Add RTEMS_PARTITION_ALIGNMENT
#4107
waf -j24 fails on powerpc/psim -- probable dependency issue
#4108
Review minimum and ensure it really is a minimum configuration
#4110
Ubuntu package list is broken
#4115
Cortex-A9 MPCore based BSPs should include the workaround for Errata 794072 and 845369
#4116
raspberrypi fails to build on waf and autoconf
#4117
lpc1768_mbed_ahb_ram_eth sp01 and others fail to link
#4118
Add clang variants for sparc BSPs
#4120
altcycv_devkit and imx7 fail to build all tests on master
#4121
lm3s3749 fails to build all tests on master
#4122
Change RTEMS_NO_RETURN to use C11 and C++11 standard means
#4123
rtems-bsps needs to be switched to look at waf info for BSPs
#4124
rtems-bsp-builder needs to be switched to waf builds
#4125
Update wiki pages to reference waf not autoconf based build
#4126
Remove legacy networking stack from rtems.git and place in a new repo
#4127
x86_64/amd64 fails to build
#4128
all griscv variants fail to build on master
#4129
x86_64 not listed as architecture in components in Trac
#4131
"fdisk DISK_NAME mount" in bdpart-mount.c uses non-existing file system type "msdos"
#4134
rtemsspec: Support user-defined ordering of directives in header files (Doxygen)
#4140
waf install of RTEMS breaks Makefile system in rtems-examples
#4142
Sparse disk destroys data when it grows
#4143
fileio - Stack too small for login with password
#4145
rtems-source-builder: Update RTEMS Kernel Recipe to Use waf for RTEMS
#4148
RFS bit map search buffer overflow
#4155
Add a workaround for the LEON3FT RETT Restart errata: TN-0018
#4157
pthread_spin_unlock() may corrupt the thread stack if RTEMS_PROFILING and RTEMS_SMP is enabled
#4158
rtems_interrupt_server_delete() does not destroy the ISR lock of the server control
#4164
Fix NVMe disk synchronization and media block handling
#4166
rtems-bsp-builder: Add way to select rtems version (6 vs 7)
#4167
Coverity Scan Does Not Run on rtems6
#4175
Resolve warning during AArch64 build
#4180
Add BSP for i.MXRT1050
#4181
Add CONFIGURE_INIT_TASK_STORAGE_SIZE
#4184
arm/bsps: Small MMU pages are rounded to 1 MiB
#4192
bsp/xilinx_zynq: Enable support for small MMU pages
#4193
devctl.h does not compile from C++ (cloned)
#4194
RSB failed with mail subject: Build Linux: PASSED 6/rtems-arm on x86_64-linux-gnu
#4195
Add gr740 support available in SIS 2.25 to the RTEMS Tester
#4196
Improve gcov support provided by GCC for RTEMS
#4197
testsuite: ts-validation-0 broken on AArch64 due to SIZE_MAX issues in the test design
#4198
arm: Add multilib for Cortex-R52 processor
#4200
Build system doco link in the User Guide is broken
#4201
waf building out of source tree does not find all configured bsps
#4202
Add BSP for ARM Fixed Virtual Platform with a Cortex-R52
#4204
Make Termination Handler which Prints Exit Information Less Scary
#4206
aarch64/xilinx_zynqmp_lp64 does not run with RTEMS_DEBUG enabled
#4207
PZERO define in RTEMS is wrong
#4209
STM32H743ZI Nucleo Consle support not working without workaround
#4212
libio leaks location clones
#4214
nios2: Add thread-local storage support
#4215
nios2: Add multilib with all custom floating-point instructions supported by GCC
#4217
Change status code for nested obtain of MrsP semaphores
#4218
aarch64 as internal error with spconfig01
#4219
gdb master does not compile on CentOS 7
#4221
dtc recipe issue -- dependency on yaml.h
#4222
Add a per mount flag to not create a node on O_CREAT in open
#4223
Missing "extern" in RTEMS_LINKER_ROSET_ITEM_ORDERED_DECLARE()
#4225
Cobham Gaisler NOEL-V RISC-V 32- and 64-bit processor BSP
#4226
Buildbot needs a tool chain update
#4228
rtems_build_name() depends on the signedness of char type
#4229
conf.py files need updated for sphinxcontrib-bibtex ver. 2.0.0 and greater
#4230
Timeout for automatic barriers is broken
#4231
MVME 2600/2700 has no console output
#4237
consolesimpletask.c: Two Unchecked Return Values Spotted by Coverity
#4238
Change motorola_powerpc bsp to support irq-generic
#4239
PowerPC shared ISA IRQ support is broken
#4240
rtems-debugger-target.c: Dereference before null check spotted by Coverity
#4241
rtems-debugger-threads.c: Three Dereference before null check errors spotted by Coverity
#4242
rtems-debugger-threads.c: Three Dereference before null check errors spotted by Coverity
#4244
Possible infinite recursion in Classic API Signal handling
#4245
Add PCI regions support to RTEMS nexus bus support
#4246
Add libbsd DC NIC support to mvme2700 board
#4250
b1553brm.c: Dereference before null check error spotted by Coverity
#4251
b1553rt.c: Dereference before null check error spotted by Coverity
#4252
grtc.c: Dereference before null check error spotted by Coverity
#4253
grspw_pkt.c: Dereference before null check error spotted by Coverity
#4254
shell.c: Dereference before null check error spotted by Coverity
#4258
printertask.c: Unchecked return value errors spotted by Coverity
#4259
grspw.c: Unchecked return value error spotted by Coverity
#4260
record-client.c: Unchecked return value error spotted by Coverity
#4261
getgrent.c: Unchecked return value error spotted by Coverity
#4262
rtems-debugger-threads.c: Unchecked return value error spotted by Coverity
#4264
Activate ehci_pci in rtems-libbsd (cloned)
#4265
Add rtems_get_build_hash()
#4267
Add rtems_get_target_hash()
#4269
Add rtems_get_build_label()
#4270
A failing task extension produces zombi objects and resource leaks
#4277
grtc.c: Missing break in switch errors spotted by Coverity
#4278
cpuusagetop.c: Missing break in switch errors spotted by Coverity
#4279
pci_cfg_read.c: Missing break in switch error spotted by Coverity
#4280
gen_uuid.c: Unchecked return value from library errors spotted by Coverity
#4281
main_chmod.c: Unchecked return value from library error spotted by Coverity
#4282
pwdgrp.c: Unchecked return value from library error spotted by Coverity
#4283
gr_rasta_spw_router.c: Unchecked return value from library error spotted by Coverity
#4284
gr_rasta_io.c: Unchecked return value from library error spotted by Coverity
#4285
gr_leon4_n2x.c: Unchecked return value error from library error spotted by Coverity
#4286
gr_rasta_tmtc.c: Unchecked return value from library error spotted by Coverity
#4287
gr_rasta_adcdac.c: Unchecked return value from library error spotted by Coverity
#4288
gr_701.c: Unchecked return value from library error spotted by Coverity
#4289
gr_tmtc_1553.c: Unchecked return value from library error spotted by Coverity
#4290
gr_cpci_gr740.c: Unchecked return value from library error spotted by Coverity
#4291
main_help.c: Unchecked return value from library error spotted by Coverity
#4292
rtems-rfs-bitmaps.c: Useless call (CID 1399749)
#4294
satcan.c: Unsigned compared against 0 error spotted by Coverity
#4295
b1553brm.c: Unsigned compared against 0 error spotted by Coverity
#4301
grcan.c: Unused value error spotted by Coverity
#4302
Obsolete powerpc/haleakala board
#4320
Add driver for cadence-spi device for xilinx based BSPs
#4321
Add spi driver for AXI SPI ip core from Xilinx
#4323
grlib,can: introduce a new common CAN baud-rate timing calculating functions
#4324
grlib,grcanfd: extend the GRCAN driver with GRCANFD support
#4326
objectextendinformation.c: Dereference after null check error spotted by Coverity
#4329
main_rtrace.c: Dereference after null check error spotted by Coverity
#4331
main_pci.c: Dereference after null check error spotted by Coverity
#4336
Improve the workaround for the LEON3FT store-store errata: TN-0009 on master
#4338
rtems_clock_set(): Cannot set future dates later than approximately 2105
#4339
main_cp.c: Unused value error spotted by Coverity
#4340
print-ls.c: Unused value error spotted by Coverity
#4341
fastlz.c: Unused value error spotted by Coverity
#4342
disp_hcms29xx.c: Unused value error spotted by Coverity
#4345
Nexus Driver for Marvell mv643xx Ethernet Adapter (powerpc/beatnik BSP, MVME6100 board)
#4346
Require RTEMS_PRIORITY for MrsP semaphores
#4355
Remove leon3 test configurations which assume sis is built into gdb from rtems-test
#4356
rtems_semaphore_set_priority() uses an invalid SMP lock
#4358
Priority discipline is broken for semaphores and message queues in SMP configurations
#4363
GDB does not build on Windows for MSYS2
#4364
rtems-test Fails to list failed tests to user
#4365
main_cp.c: Ignore return value from stat()
#4368
rtems--tools tool kit temp file constructor does nothing
#4374
Handle symbol sets in covoar
#4375
Add futimens() and utimensat()
#4376
covoar/ReportsBase Coverage::GenerateReports() uses raw pointer to std::list
#4377
covoar/Explanations Explanations::writeNotFound() NULL check of wrong variable
#4378
covoar/symbol-sets add libuuid to symbol-sets.ini
#4380
Update RTEMS POSIX Compliance Spreadsheet
#4382
mingw - add flex to packages needed
#4383
covoar keeps DWARF info in memory too long
#4384
Add SMTP login to rtems-tools mailer
#4386
covoar missing conditional branch instructions on ARM
#4387
covoar marks taken/not taken incorrectly for AArch64
#4388
Copy improved mailer.py from rtems-tools
#4389
Undefined behaviour if the area size calculation in calloc() and rtems_calloc() overflows
#4390
Make zero size allocation result consistent across directives
#4391
SPARC GCC no longer needs sysconf(515) (_SC_STACK_PROT)
#4392
rtems: Constify timer fire when directives
#4393
rtems: Change rtems_task_get_affinity() status
#4395
Workspace initialization is broken for arm/imx7 and arm/raspberrypi
#4396
Add futimens() and utimensat()
#4397
Make utime() use utimensat()
#4398
Make utimes() use utimensat()
#4399
Add tests for futimens() and utimensat()
#4400
Change filesystem utime_h to utimens_h to support nanosecond granularity
#4401
rtems: Change rtems_scheduler_get_processor_set() status
#4402
rtemstoolkit/mailer.py option added twice
#4403
rtems_timer_fire_when() returns wrong status code when wall_time argument is NULL
#4406
rtems: Constify rtems_task_wake_when()
#4410
rtems_task_start() does not check that the entry point is not equal to NULL (cloned)
#4411
rtems_task_restart() should set the real priority to the initial priority
#4412
Unexpected rtems_task_restart() behaviour if called from within interrrupt context
#4413
Allow pthread_cancel() from within interrupt context
#4414
Return RTEMS_CALLED_FROM_ISR in rtems_task_delete()
#4415
ReportsBase.cc: Division or modulo by float zero error spotted by Coverity
#4416
rtems-exeinfo.cpp: Division or modulo by zero errors spotted by Coverity
#4417
Explanations.cc: Resource leak error spotted by Coverity
#4418
GcovData.cc: Resource leak error spotted by Coverity
#4419
TraceReaderLogQEMU.cc: Resource leak error spotted by Coverity
#4420
TraceWriterQEMU.cc: Resource leak error spotted by Coverity
#4421
DesiredSymbols.cc: Resource leak error spotted by Coverity
#4422
ReportsBase.cc: Resource leak error spotted by Coverity
#4423
record-client.c: Unchecked return value error spotted by Coverity
#4424
rtems-bin2c.c: Copy into fixed size buffer spotted by Coverity
#4425
GcovFunctionData.cc: Copy into fixed size buffer errors spotted by Coverity
#4426
clock_nanosleep() may use wrong clock for relative times
#4427
GcovData.cc: Dereference after null check error spotted by Coverity
#4428
ReportsBase.cc: Dereference after null check error spotted by Coverity
#4430
DesiredSymbols.cc: Uninitialized pointer read error spotted by Coverity
#4432
GcovFunctionData.cc: Uninitialized pointer field error spotted by coverity
#4433
DesiredSymbols.h: Uninitialized pointer field error spotted by coverity
#4434
record-filter-zlib.cc: Uninitialized pointer field error spotted by Coverity
#4435
Thread cancellation may produce ready threads with an active thread timer
#4437
powerpc/shared/sbrk.c: Do not reference errno
#4438
powerpc/shared/irq/ppc-irq-legacy.c: Use rtems_malloc() not malloc()
#4439
Open of /dev/console should only be in SysInit List if Console Enabled
#4442
CID 1399721: Copy into fixed size buffer
#4444
CID 1399727: Copy into fixed size buffer
#4445
CID 1468684: Uninitialized scalar variable
#4448
covoar reports uncovered ranges of size 1
#4451
DesiredSymbols: Implement move assignment operator
#4453
Global vs Local Attribute Unclear for SMP/Distributed MP
#4454
bsps/i386: TSC calibration inaccurate
#4455
bsps/i386: TSC calibration inaccurate
#4458
Simplify trap table initialization
#4460
CID 1437647: Explicit null dereferenced
#4461
grlib: Register system console as "/dev/console"
#4462
CID 1437638: Logically dead code
#4463
rtems_condition_variable_signal() is implemented as a broadcast
#4468
waf build system does not generate the same bspopts.h
#4469
rtems-exeinfo.cpp: Not restoring ostream format errors spotted by Coverity
#4470
CoverageMapBase.cc: Not restoring ostream format error spotted by Coverity
#4471
ReportsHtml.cc: Not restoring ostream format error spotted by Coverity
#4472
ReportsText.cc: Not restoring ostream format error spotted by Coverity
#4473
AddressToLineMapper.h: Pointer to local outside scope error spotted by Coverity
#4475
Add NFSv4 client support to libbsd
#4482
Document kernel character I/O support in Classic API Guide
#4483
GcovData.cc: Not restoring ostream format error spotted by Coverity
#4484
GcovFunctionData.cc: Not restoring ostream format error spotted by Coverity
#4485
GcovData.cc: Out-of-bounds acces errors spotted by Coverity
#4486
TraceWriterQEMU.cc: String not null terminated issue spotted by Coverity
#4487
GcovData.cc: Uninitialized scalar field error spotted by Coverity
#4488
TraceWriterQEMU.cc: Uninitialized scalar variable issue spotted by Coverity
#4489
waf configure's --rtems-config and build create an error
#4490
rtems_partition_return_buffer() wrongly accepts buffers which are exactly at the buffer area end
#4491
TraceWriterQEMU.cc: Buffer not null terminated issue spotted by Coverity
#4492
ObjdumpProcessor.cc: Uninitialized pointer field
#4499
rtems-exeinfo.cpp: Uninitialized scalar field error spotted by Coverity
#4500
rld-dwarf.cpp: Uninitialized scalar field
#4501
TraceConverter.cc: Uncaught exception issue spotted by Coverity
#4502
rld-rap.cpp: Uncaught exception issue spotted by Coverity
#4506
posix_devctl() should return the errno directly not -1 and set errno
#4507
mount call retruns error number and it should return -1
#4508
rtems_message_queue_receive(): flush() does not release waiting tasks
#4509
Message queue priority dicipline is broken in SMP configurations
#4510
Fix ILP32 multilib variant in newlib for AArch64
#4511
Count of postponed jobs is not set to zero for a newly created rate-monotonic period object
#4513
Document parts of the Cache Manager in the Classic API Guide
#4517
Build failures for MacOS
#4518
RTEMS and LibBSD both provide competing pipe() interfaces
#4519
record-main-lttng.cc: Out-of-bounds access
#4522
Optimize red-black tree insert/extract
#4524
Re-add lost capability for custom stack allocator to allocate IDLE thread stacks
#4525
rtems-tld.cpp: Logically dead code error spotted by Coverity
#4527
Add new directives to get all time values provided by the timehands
#4528
rate monotonic: reset of CPU usage time not always detected
#4531
Data corruption in SMP schedulers
#4532
Priority inversion issues with MrsP locking protocol implementation
#4533
libdebugger should only build for archs with a backend
#4534
SMP EDF scheduler violates priority group ordering
#4543
cannot build multiprocessor application on eclipse
#4544
The last processor must not be removed if it is owned by a helping scheduler
#4545
The SMP EDF scheduler can only support more restricted affinity sets of a thread
#4546
A thread restart does not update the priority of related threads
#4547
dtc build failure on msys2 - all rtems6 target tools fail to build on Windows 10
#4548
Add RTEMS version option to waf configure
#4550
Add --rtems-version to rtems-test
#4551
Workaround for GRLIB-TN-0011 required for sparc/leon3 BSPs in SMP configuration
#4556
rtems_shell_main_mmove problem
#4557
medit problem in RTEMS6 (was 4.11/5.1)
#4560
Use thread-local storage for Newlib reentrancy objects
#4566
Atomic store does not use the order parameter for C++
#4569
aarch64 cache support does not provide rtems_cache_disable_data()
#4572
Improve Clarity for New Clock Manager Directives
#4581
Add AArch64 to Tier 1 BSPs
#4583
rtems-bsp-builder: Do not vary on network
#4585
Multiple Prototype Issues/Mismatches in rtems-examples from trace linker
#4588
RTEMS Stack Checker Report Bad Access When Not Enabled
#4607
support for SATA(AHCI) drives
#4613
Deprecate sparc64 port in rtems6 and remove in rtems7
#4614
Deprecate sh port in rtems6 and remove in rtems7
#4615
Deprecate v850 port in rtems6 and remove in rtems7
#4617
Potential non-monotonic CLOCK_MONOTONIC
#4619
riscv/rv32iac: minimum sample test fails to build
#4627
Multitasking start is broken on SMP targets which do not restore the interrupt state during context switching
#4629
shell: Potential stack corruption in rtems_shell_init()
#4631
RSB fails to build gdb with Python 3.10 (and newer)
#4632
Error in rtems/thread.hpp with GCC 12
#4634
Fix hash for glib-2.48
#4635
untar on JFFS slow down
#4639
Error in imfs memfile when device is full
#4641
x86_64 elf_machdep header file missing body
#4644
wkspace "failed allocations" increase with heap protection enabled (cloned)
#4646
Control buildsets using the --with-* command line option
#4648
Documentation Needs to Use Version Variables not Hard-Coded Numbers
#4650
tcpdump: Fix dumping to file and reading from file (cloned)
#4652
if_atsam: Fix checksum offload, add multicast and VLAN support (cloned)
#4654
pfctl: Fix global state initialization (cloned)
#4656
sync() whould synchronize all file descriptors (cloned)
#4658
Fix build issue with riscv sample test
#4661
GCC 12 generates wrong code
#4662
Fix GCC 12 warnings
#4666
TFTP: Implement block and window size options
#4667
include/sys/_bitset.h defines struct bitset, pollutes namespace
#4668
Use thread-local storage in libstdc++
#4669
clock_nanosleep() uses the wrong clock to determine the start time point
#4670
Add option to build RTEMS with coverage instrumentation
#4672
Thread-local storage should be usable once an idle thread exists
#4673
Runtime loader exported symbols address size not consistent
#4675
sleep should be a thread cancellation point
#4677
incorrect handling of "inactive_per_block" from "Objects_Information" structure (cloned)
#4678
System initialization time increased compared to RTEMS 4.11
#4679
Use priority inheritance for thread join
#4680
POSIX tasks cancelled through rtems_task_delete() should have an exit value of PTHREAD_CANCELED
#4682
Add AArch64 support to libdl
#4684
Support Versal DDRMC0 regions 0 and 1
#4686
Refactor shared code in Arm and AArch64
#4689
mips/jmr3904 Massive Number of Test Failures
#4690
CLOCK_REALTIME thread queue not updated as part of clock_settime call
#4691
Add support for FACE Technical Standard Restriction on POSIX Absolute Timers
#4693
Remove ILP32 aarch64/xilinx_versal_* BSPs
#4694
sptests/sp37 fails to compile if RTEMS_SMP is not defined
#4695
Automatic version numbers in the documentation
#4697
Documentation for libbsd Configure options
#4700
Fix instances of "is" operator used with literals
#4701
Relocatable write data is placed in read-only region on some BSPs
#4702
Fix warnings for indexing past array bounds (primarily validation tests)
#4703
NetSNMP 5.7.2.1 Patch
#4705
Installed header clean up
#4706
Installed header break C++
#4710
RSB does not expand dir type macros correctly
#4712
powerpc: Add AltiVec VRSAVE support
#4713
Make pthread_atfork follow FACE Technical Standard Behavior for Single Process Environments
#4714
Use waf for LwIP walk sources
#4718
Coverity issues in cpukit/libfs/src/ftpfs/tftpDriver.c
#4724
Git commit message format instructions
#4726
RSB decode exception stops build
#4729
Add 64bit address support to RTEMS FDT
#4730
rtems-source-builder doesn't generate tar archives for all packages any more
#4732
Set top in RSB version.py
#4736
RISC-V - ISR_stack allocation and usage by harts > CONFIGURE_MAXIMUM_PROCESSORS
#4741
Fix GCC PR 107248
#4744
libdebugger arm backend does not single step
#4746
Armv7-M SysTick clock driver uses off by one reload value
#4750
Linker discards RTEMS_SYSINIT_ITEM object
#4751
chmod problem in shell of RTEMS 6
#4756
Docs build system does not build singlehtml (cloned)
#4759
TLS support is broken for ARMv6
#4760
RSB fatal error on missing hash checksums
#4762
Add Versal SDHCI Arasan driver to libbsd
#4763
Detect terminal size
#4766
Classic API User Guide Index has Functions without Parentheses
#4767
Add rtems-lwip to release packages
#4768
Use tarballs for stable versions development tools
#4769
config: Add CONFIGURE_RECORD_INTERRUPTS_ENABLED
#4771
Versal UART issues
#4772
Remove use of interval from rtems_task_wake_after() documentation
#4775
RISC-V: Default RV64 BSPs to medany
#4778
Deployed RSB does not find release version config
#4782
Correct Issues in Rate Monotonic Manager Background Section
#4783
Fix issues when compiling dtc with Cygwin
#4803
Revert or Mark CAN API as experimental
#4818
Incomplete Statement in “cpu->heir”
#4820
Hazardous cast
#4821
Ubuntu Host Instructions Wrong
#4822
Function returning unchanged function input
#4826
Software Engineering Guide has broken Reference
#4828
Macro defined but magic number used instead
#4832
CLANG flagged error
#4833
grlib/pci/grpci2dma.c Warnings Require Insight to Resolve Properly
#4834
close_editor problem of RTEMS4.13/5.1 (cloned)
#4835
medit malloc problem of RTEMS (cloned)
#4838
Fix for UART interrupt on aarch64 Versal
#4842
SPARC/grlib - Registers definitions wrongly defined when there are reserved bits
#4843
Output value not assigned
#4844
Unchecked boundaries
#4845
Global variable declared/defined in the wrong file
#4847
Goto statements
#4850
LEON3 - Variable not initialized in any file / missing #ifdefs
#4855
Input validity unchecked
#4857
RSB Recipe Missing %hash Does Not Fail
#4858
GDB fails to build on any host with readline 8.2 or newer
#4859
Update gdb to 12.1
#4860
Waf Failure on CentOS 8 Stream
#4861
"Single HTML" links on docs.rtems.org lead to empty pages
#4862
score/ & bsps/: Unused input parameters
#4863
Operations evaluation order.
#4867
Clean up rtems-lwip uLan directory
#4869
Add QSPI Flash Device API
#4870
Add features for QSPI Flash on Xilinx Versal
#4872
GDB 13.1 does not build on FreeBSD 13.1
#4874
Undefined behaviour
#4875
LEON3FT - Power-down workaround
#4878
sptests/spsysinit01 sem_open call only has 3 parameters with O_CREAT flag (cloned)
#4881
powerpc gas and ld warnings
#4882
mvme2703 legacy network build failure
#4884
I2C default ioctl handler does not handle set clock
#4887
RTEMS Net Legacy does not build as a package in the RSB
#4889
Remove file scanning from rtems-lwip
#4892
MacOS tools build failures on Ventura and M series processors
#4896
Makefile.inc exported BSP include path not a system include path
#4899
BSP powerpc/qoriq_e6500_64 and powerpc/qoriq_e6500_32 fail to build
#4900
PowerPC score warnings in score headers
#4901
rtems_task_construct Documentation Missing Some Details
#4902
Update zlib to version 1.2.13
#4905
SuperCore _TOD_Adjust No Longer Referenced and Should be Removed
#4906
libbsd not working on nucleo-h743ZI
#4909
Multiple Protected Heap Functions are Ununused
#4910
RSB options for python selection
#4912
Collect Compression Library Source in Single Place
#4913
libbsd/ipsec-tools: Problems with more than 64 open files
#4915
Building sphinx 7.0.1 fails
#4920
libdl does not support TLS
#4921
Tool versions for RTEMS 6.1 release
#4923
FPU context init/switch not working well on more than 2 tasks on Cortex-Mx/ARMv7-M platform
#4924
Add Regulator Helper to RTEMS
#4925
Deal with GR740 errata: Level-2 Cache Issues H1 2023 (GRLIB-TN-0021)
#4929
RTEMS tools installs into $PREFIX/share/rtems and not $PREFIX/share/rtems6
#4931
User manual RSB BSP build examples need updating
#4934
Update STM32 H7 HAL/LL drivers code
#4935
7/rtems-mips get source fails
#4940
Fix cache support for ARM926EJ-S processor
#4942
Regulator warnings
#4943
ARM unwind register is not being hooked
#4944
libdl test dl09 fails on arm and aarch64
#4945
rtems-test SIS support is broken
#4947
Testsuite libtest tests not built with optimise or debug flags
#4950
libdl test dl07 fails on PowerPC
#4951
rtems-tools fail on FreeBSD to get number of cores
#4953
Use of symbol addresses for arbitrary values may not work for some code models
#4954
sparc: Simplify the clock driver and CPU counter support
#4955
sparc: Potential stack corruption in uniprocessor configurations during start multitasking
#4956
Deadlock caused by locking inversion in JFFS2
#4957
spstdc17 warnings building i386/pc686
#4959
rtems-test tftp does not a session timeout
#4960
User manual test documentation update
#4961
Document and test CONFIGURE_JFFS2_DELAYED_WRITE_TASK_PRIORITY
#4962
MicroBlaze BSPs modify carry flag before MSR is saved
#4967
strtof leaks memory
#4968
Python 3.12 fix escape sequences and remove SafeConfigParser
#4969
Update libibery sources in rtems-tools
#4970
Fix C++ 17 deprecated functionality in rtems-tools
#4971
Report that nested validation test cases did run
#4973
Add RSB options to control a specific python
#4974
rtems-tools buid failed with '--host=x86_64-w64-mingw32'
#4975
Terminal row/col probe timeout too fast
#4977
tmux bug swaps lines and columns
#4980
Build documentation using sphinx 7.2
#4982
Add support for TMS570LC4357 for the arm/tms570 BSP
#4986
Improve CONFIGURE_TICKS_PER_TIMESLICE configuration and documentation
#4991
RSB source and patch checksum updates
#4993
Increase FD_SETSIZE to 256
#4994
Documentation Sphinx theme broken for HTML
#4995
powerpc/qoriq_e6500_64 rtems-syms unknown machine type (cloned)
#4996
libdl: Add 64-bit PowerPC ELFv2 support
#4997
GMP not building when not installed
#4999
missing bsp's in rtems 6.1 rc2
#5002
Add API to get and set interrupt priorities for interrupt vectors
#5003
Make GCC ARM Cortex-A53 errata workarounds available

Details

Ticket Created Resolution Component Reporter Owner Modified
#550 20 years ago wontfix network/legacy Thomas Rauscher Joel Sherrill 17 months ago
Summary

fcntl() fails to put a non-blocking socket into blocking mode

Description

A socket cannot be put into blocking mode using fcntl() once it has been put into non-blocking mode.

ioctl() is working fine, so the problem is not in the IP stack.

The problem occurs in real life with the GoAhead? webserver on high-latency connections as its non-blocking write socket remains non-blocking and a web page can be truncated when websDone() is called.

In newlib (1.10, 1.11) there are several non-blocking flags. The following is defined in sys/fcntl.h

#define _FNBIO 0x1000 /* non blocking I/O (sys5 style) */ #define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */ ... #define _FNDELAY _FNONBLOCK /* non blocking I/O (4.2 style) */ /* O_NDELAY _FNDELAY set in include/fcntl.h */ /* O_NDELAY _FNBIO set in 5include/fcntl.h */ #define O_NONBLOCK _FNONBLOCK

So O_NDELAY is never defined. sys/fcntl.h is not patched by the rtems-newlib patch.

In RTEMS, libio.c and libio_.h both contain the following code

#if ! defined(O_NDELAY) # if defined(solaris2) # define O_NDELAY O_NONBLOCK # elif defined(RTEMS_NEWLIB) # define O_NDELAY _FNBIO # endif #endif

As O_NDELAY is undefined and RTEMS_NEWLIB is defined, O_NDELAY is defined to 0x1000.

Thus, using O_NONBLOCK in fcntl() (this was suggested in the mailing list some time ago) doesn't seem to work.

Release: RTEMS-4.5

Environment: rtems-4.5.0, newlib-1.10 or newlib-1.11

#1318 16 years ago wontfix bsps Ralf Corsepius Joel Sherrill 6 years ago
Summary

libcpu/shared is not helpful

Description

IMO, libcpu/shared is not helpful

Either something is

  • cpu-specific, then it should go into cpukit/score/cpu,
  • general, then in should go into cpukit/
  • bsp-dependent, then it should go into libbsp.

I would strongly suggest to reconsider libcpu/shared.

#1459 14 years ago fixed shell Ralf Corsepius Chris Johns 17 months ago
Summary

Add rtems_shell_main_monitor to cpukit/libmisc/shell/shell.h?

Description

rtems_shell_main_monitor is a private function of cpukit/libmisc/shell/cmds.c

However, the way testsuites/libtests/monitor02/init.c uses it (as a public/exported function) to me reads as a strong indication that rtems_shell_main_monitor() should be "made public" by declaring/prototyping it in cpukit/libmisc/shell/shell.h

#1593 14 years ago wontfix score zhangwenjie Joel Sherrill 6 years ago
Summary

RTEMS Sequenced Initialization API

Description

This is a part of GSOC2010 project RTEMS Sequenced Initialization. The attachment is the implement of RTEMS Sequenced Initialization API. More details are placed on the wiki http://www.rtems.com/wiki/index.php/RTEMSSequencedInitialization.

#1712 13 years ago fixed network/legacy Joel Sherrill Joel Sherrill 2 years ago
Summary

Add LWIP Support to RTEMS

Description

This port was done by Marcello Presulli <m.presulli@…> and has been in my inbox for a while. I think I have merged most of their BSP specific work but the lwip has been pending. They managed to run LWIP+SNMP and an application in something like 128K RAM

Here are some email fragments about it.

For now we have just finished to port the latest lwip-1.3.2 based on the latest rtems 4.9.4 version successfully including a test_app for pings. We have stressed the stack with ping floods (packetsize 1400 Bytes interval ~150ms) about 250.000 sequences or more without packet losses and an average latency of 2ms. Additional we have adopted a new bsp target for the mcf5225x platform.

To lwip now:

we integrated it directly via the autoconfigure/automake process under the rtems cpukit/liblwip subtree and therefore it gets built with rtems when u configure it with --enable-networking=lwip appropriately. The driver on the other side we put it in libcpu/m68k/mcf5225x and it got built in the library context of the librtemsbsp.a. The driver has only 2 references on lwip headers ...

To the bsp:

The bsp we have adopted from mcf52223 and have created it as a own bsp-target=mcf5225x also via the autoconfig/automake mechanism. In the bsp itself i have modified the bsp_get_CPU_clock_speed() and some improvements in the console driver and PIT2 timer interrupt. The bsp_start() we have defined as weak symbol so we don't have to touch the "empty" bsp_start() of rtems coz it's platform-circuit specific you know.

#1728 13 years ago invalid bsps Marcello Presulli Joel Sherrill 6 years ago
Summary

Patch for RTEMS-BSP m68k/mcf5225x

Description

This patch is based on a "clean" RTEMS 4.9.4 and offers some modifications/enhancements for the BSP.

  • Generic Exception Handler can be used instead of _uhoh
  • Flash Driver for the onboard flash including flash security
  • DMA initializations can be used to substitute the whole termios, so we saved alot of code/memory size
  • Bugfixes in fec for the lwip-port, the fec driver works now "optimized" with the lwip-port
  • RTC driver routines which configures the RTC clock and time
  • generic software trap handler capable of return values
  • Bugfix in "old" bsp with MASKALL_BIT when use RTEMS without console
  • bugfixes and extensions in bsp header file "mcf5225x.h"
  • generic dbg_printk() which prints debug outputs directly via a dma channel

I hope someone have the time to merge it into the CVS head, it shouldn't be a real task i think.

#1815 13 years ago invalid score Helder Silva Joel Sherrill 6 years ago
Summary

_ISR_Nest_level should be protected with interrupts disabled in function _Watchdog_Insert

Description

_ISR_Nest_level should be protected with interrupts disabled in function _Watchdog_Insert, because another interrupt can occur after _ISR_Nest_level is saved, causing inconsistency in the global variable.

#1820 13 years ago wontfix unspecified Ralf Corsepius Joel Sherrill 6 years ago
Summary

sptests/sp36: Improper buildsystem integration

Description

sptests/sp36 is improperly integrated into the rtems buildsystem.

sp36 is missing from SUBDIRS in sptests/Makefile.am, but is referenced in sptests/configure.ac, as well as the code is present in sp36/

sp36/ either should be activated (== added to SUBDIRS) or be fully removed.

#2000 12 years ago wontfix build Marta Rybczynska Ralf Corsepius 3 years ago
Summary

Re-add removed LINK_OBJS to MP tests

Description

PR1589 commit: 2011-12-08 Joel Sherrill <joel.sherrill@…>

PR 1589/build

  • base_mp/node1/Makefile.am, base_mp/node2/Makefile.am, base_sp/Makefile.am, capture/Makefile.am, cdtest/Makefile.am, fileio/Makefile.am, hello/Makefile.am, iostream/Makefile.am, loopback/Makefile.am, minimum/Makefile.am, nsecs/Makefile.am, paranoia/Makefile.am, pppd/Makefile.am, ticker/Makefile.am, unlimited/Makefile.am: Remove obsolete optional manager capability.

and 2011-12-08 Joel Sherrill <joel.sherrill@…>

PR 1589/build

  • mp01/node1/Makefile.am, mp01/node2/Makefile.am, mp02/node1/Makefile.am, mp02/node2/Makefile.am, mp03/node1/Makefile.am, mp03/node2/Makefile.am, mp04/node1/Makefile.am, mp04/node2/Makefile.am, mp05/node1/Makefile.am, mp05/node2/Makefile.am, mp06/node1/Makefile.am, mp06/node2/Makefile.am, mp07/node1/Makefile.am, mp07/node2/Makefile.am, mp08/node1/Makefile.am, mp08/node2/Makefile.am, mp09/node1/Makefile.am, mp09/node2/Makefile.am, mp10/node1/Makefile.am, mp10/node2/Makefile.am, mp11/node1/Makefile.am, mp11/node2/Makefile.am, mp12/node1/Makefile.am, mp12/node2/Makefile.am, mp13/node1/Makefile.am, mp13/node2/Makefile.am, mp14/node1/Makefile.am, mp14/node2/Makefile.am: Remove obsolete optional manager capability.

remove LINK_OBJS from the MP tests. They do no compile anymore. This patch re-adds them.

#2071 12 years ago wontfix build cynt6007 Ralf Corsepius 6 years ago
Summary

The object-file suffixes for default-bsp-post-link in leaf.cfg don't work with make-exe...

Description

Would it be proper to change the suffix of the input in default-bsp-post-link in rtems/make/leaf.cfg ?

Namely changing:

define default-bsp-post-link

  • $(NM) -g -n $@ > $(basename $@).num
  • $(SIZE) $@

endef

define default-bsp-post-link + $(NM) -g -n $@.o > $(basename $@).num + $(SIZE) $@.o endef

I'm working on the application side of RTEMS (as opposed to the source), but here are the errors I encountered, what I did to find the problem, and the results.

I kept getting errors when I ran the BuildTests?.sh...

~/rtems-addon-packages/examples/openldap$ ... i386-rtems4.11-nm o-optimize/slapd-addel i386-rtems4.11-nm: 'o-optimize/slapd-addel': No such file ... ~/rtems-addon-packages/examples/openldap$ ... i386-rtems4.11-size o-optimize/slapd-addel i386-rtems4.11-size: 'o-optimize/slapd-addel': No such file

After looking at the Makefile it looks like they were called by: “make-exe”.

Doing

grep -r “make-exe” /opt

revealed “make-exe” is defined in /opt/rtems-4.11/make/leaf.cfg, which calls bsp-post-link, (which is exactly the stage of the build process giving errors).

According to man, nm and size work on object files. So, I changed the suffixes in /opt/rtems-4.11/make/leaf.cfg and the errors went away. After making the change, the following additional objects appeared in o-optimize:

*.bin and *.ralf, with an approximate size of 570,000. The sizes vary slightly...

If changing the suffixes in /opt/rtems-4.11/make/leaf.cfg makes sense, would it make sense to change them for rtems/make/leaf.cfg ? Also, there are other target.cfg's in the different bsp s that may have similar problems.

Thanks, Cynthia Rempel

#2111 11 years ago config cynt6007 Joel Sherrill 6 years ago
Summary

AVR needs avr-libc to compile RTEMS.

Description

The avr io.h header gives a warning that if not doing avr-libc, that if not heeded leads to many errors.

Need an avr-libc configuration file... should be a place-holding stub that states this is a problematic build.

Anyway, these are just some cans of worms... FYI

AVR has issues so deep it requires ~50 patches for binutils, ~60 patches for gcc, and has ~14 patches for avr-libc.

I suspect getting ONE functional AVR-RTEMS a major undertaking... I wonder if it might be worth exploring using ATMEL's prepatched toolchain for non-Ada builds... For Ada-builds, that's going to be another major undertaking...

Eric Weddington (at ATMEL) is recommending the use of their source for C, C++ builds... http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.1/avr/

Although the Rolf Ebert (at AVR-Ada) have their own patch-set (using different tool versions) etc, which is making updating the AVR port so challenging... http://sourceforge.net/projects/avr-ada/files/avr-ada/Source%20Dist/

Their source-builder is located at: avr-ada/tools/build/build-avr-ada.sh

#2114 11 years ago invalid fs Andrey Mozzhuhin Chris Johns 6 years ago
Summary

statvfs for MS-DOS filesystem and 'df' coomand for shell

Description

I need statvfs for MS-DOS filesystem in my project. Share implementation and example shell command 'df' - like in GNU coreutils, but very simplified.

#2189 10 years ago fixed doc Sebastian Huber Needs Funding 3 years ago
Summary

Insufficient documentation for rtems_clock_get_tod()

Description

It is not clear which date and time is returned by rtems_clock_get_tod(). For example which time zone is used. Is there a relation to UTC?

#2215 9 years ago duplicate fs Sebastian Huber 6 years ago
Summary

Duplicate code for TAR support

Description

We have similar code in rtems_tarfs_load(), Untar_FromMemory() and Untar_FromFile(). These functions should instead use a common TAR archive iterator with specific visitor functions.

#2269 9 years ago duplicate score Joel Sherrill 6 years ago
Summary

x86 Context Switch Synchronization and SMP

Description

The x86 context switch code does not implement the "is executing" hand-off protocol used on the other ports. It should.

#2301 9 years ago wontfix build Jeffrey Hill Needs Funding 3 years ago
Summary

cpukit is built in BSP, and BSP custom, specific part of build tree but isnt built using BSP's spec file

Description

The nios2 soft-core processor is probably a bit of a different beast because it has many options when the FPGA programming is configured. It is probably therefore not a good context for the use of multilibs, although it is possible to enable them.

For the nios2 RTEMS automated system configuration I must interrogate the Altera sopcinfo file to properly specify some of the nios2 cpu instance specific compiler flags such as {-mhw-div, -mhw-mul, -mhw-mulx}.

An easy way to do this is to build some custom tools that need to run _only_on_the_host_ during the build. The source code for these BSP instance custom tools are easy to write if they include header files from the Altera generated HAL {system.h, linker.h}, when they are built. The Altera HAL needs to also be generated, but not installed, during the gnu build. It seems that this is the way that Altera intends for users to learn about system configuration based on how often their file formats evolve, and also based on lack of documentation for their sopcinfo file. Nevertheless, for many reasons we don't include Altera generated header files into any RTEMS BSP or cpukit source code.

Currently this approach is difficult to fully implement because I must finish the interrogation for the CPU flags during the gnu build system configure phase when CFLAGS_OPTIMIZE_V and CPU_FLAGS are fetched from the custom .cfg file, and so I am unable to build some custom tools that need to run _only_on_the_host_ during the build at that time.

However, during the preinstall phase it is easy to create a custom "bsp_specs_cpu" file like this.

*[cpuspecs]: *[cpuspecs]: %(cpuspecs) -mhw-div *[cpuspecs]: %(cpuspecs) -mhw-mul *[cpuspecs]: %(cpuspecs) -mhw-mulx

Which could be used in "bsp_specs" like this.

%rename cc1 old_cc1 %rename cc1plus old_cc1plus %rename lib old_lib %rename endfile old_endfile %rename startfile old_startfile %rename link old_link

%include <bsp_specs_cpu>

*cc1: %{!qrtems: %{old_cc1} } \ %{qrtems*: %{old_cc1} %{cpuspecs} }

*cc1plus: %{!qrtems: %{old_cc1plus} } \ %{qrtems*: %{old_cc1plus} %{cpuspecs} }

*lib: %{!qrtems: %(old_lib)} \ %{!nostdlib: %{qrtems: --start-group -lrtemsbsp -lrtemscpu -lc -lgcc --end-group \ %{!qnolinkcmds: -T linkcmds%s}}}

*startfile: %{!qrtems: %(old_startfile)} \ %{!nostdlib: %{qrtems: start0.o%s start1.o%s crti.o%s \

crtbegin.o%s -e start -u exception_vector }}

*link: %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}

*endfile: %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}

This works very nicely excepting that the cpukit isn't built specifying a spec file and so it could use the wrong instructions when generating code. Therefore its tempting to modify the RTEMS build like this.

cpukit/aclocal/gcc-specs.m4 | 20 ++++++++++++++++++++ cpukit/aclocal/prog-cc.m4 | 8 ++++++++ cpukit/automake/compile.am | 5 +++++ 3 files changed, 33 insertions(+)

diff --git a/cpukit/aclocal/gcc-specs.m4 b/cpukit/aclocal/gcc-specs.m4 new file mode 100644 index 0000000..dd49bb9 --- /dev/null +++ b/cpukit/aclocal/gcc-specs.m4 @@ -0,0 +1,20 @@ +dnl +dnl $Id$ +dnl +dnl Check whether the target compiler accepts -specs +dnl + +AC_DEFUN([RTEMS_GCC_SPECS], +[AC_REQUIRE([RTEMS_PROG_CC]) +AC_CACHE_CHECK(whether $CC accepts -specs,rtems_cv_gcc_specs, +[ +rtems_cv_gcc_specs=no +if test x"$GCC" = x"yes"; then + touch confspec + echo 'void f(){}' >conftest.c + if test -z "${CC} -specs confspec -c conftest.c 2>&1";then + rtems_cv_gcc_specs=yes + fi +fi +rm -f confspec conftest* +])]) diff --git a/cpukit/aclocal/prog-cc.m4 b/cpukit/aclocal/prog-cc.m4 index e8b27b5..8dae5de 100644 --- a/cpukit/aclocal/prog-cc.m4 +++ b/cpukit/aclocal/prog-cc.m4 @@ -27,6 +27,14 @@ dnl check if the target compiler may use --pipe

RTEMS_GCC_PIPE test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"

+dnl check if the compiler supports --specs +RTEMS_GCC_SPECS + +AS_IF([test x"$rtems_cv_gcc_specs" = xyes],[ +GCCSPECS="-B\$(PROJECT_ROOT)/lib/ -B\$(PROJECT_ROOT)/$RTEMS_BSP/lib/" +GCCSPECS="${GCCSPECS} -specs bsp_specs -qrtems_cpukit"]) +AC_SUBST(GCCSPECS) +

# Append warning flags if CFLAGS wasn't set. AS_IF([test "$GCC" = yes && test "$rtems_cv_CFLAGS_set" != set], [CFLAGS="$CFLAGS -Wall"])

diff --git a/cpukit/automake/compile.am b/cpukit/automake/compile.am index 3d81426..0e43494 100644 --- a/cpukit/automake/compile.am +++ b/cpukit/automake/compile.am @@ -2,6 +2,11 @@

## $Id$ ##

+CC = @CC@ $(GCCSPECS) +CXX = @CXX@ $(GCCSPECS) +CPP = @CPP@ $(GCCSPECS) +CCAS = @CCAS@ $(GCCSPECS) +

AM_CPPFLAGS = @RTEMS_CPPFLAGS@ AM_CFLAGS = AM_CCASFLAGS = @RTEMS_CCASFLAGS@

I am thinking that hopefully this wont break any existing CPU architecture and or BSP because of several reasons.

1) Perhaps typical BSPs included in RTEMS are only modifying the way that executables are linked, and we probably don't create executables during the cpukit build.

2) Probably most of the spec files are noop implementation if qrtems isnt specified, and for the cpu kit I specify -qrtems_cpukit

3) I am specifying -qrtems_cpukit so its easy to write a spec file that does different things when it is and isnt a cpukit build. We could I suppose also define -qrtems_cpukit_multilib in that specific situation, if it were important to break that situation out.

In any case this is what I currently have implemented and I will need to look for plan B before I can merge my nios2 support if this type of change looks like a bad idea.

I am therefore writing to the relevant RTEMS wizards for some guidance.

Thanks for your consideration.

#2330 9 years ago fixed unspecified Joel Sherrill Needs Funding 3 years ago
Summary

nios2 missing atomics, fails to link C++

Description

nios2-rtems4.11-g++ -B../../../../../nios2_iss/lib/ -specs bsp_specs -qrtems -mno-hw-mul -mno-hw-div -O0 -g -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -mno-hw-mul -mno-hw-div -o cxx_iostream.exe init.o /users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(ios-inst.o): In function `atomic_add': /users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:53: undefined reference to `sync_fetch_and_add_4' /users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:53: undefined reference to `sync_fetch_and_add_4' /users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(ios_init.o): In function `exchange_and_add_dispatch': /users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:49: undefined reference to `sync_fetch_and_add_4' /users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(ios_init.o): In function `atomic_add_dispatch': /users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:53: undefined reference to `sync_fetch_and_add_4' /users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(ios_init.o): In function `exchange_and_add_dispatch': /users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:49: undefined reference to `sync_fetch_and_add_4' /users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(locale-inst.o):/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:49: more undefined references to `sync_fetch_and_add_4' follow

#2348 9 years ago fixed score Sebastian Huber 6 months ago
Summary

Timecounter: Add NTP support

Description

The FreeBSD timecounter implementation supports the NTP. This support is currently disabled in RTEMS.

#2349 9 years ago fixed score Sebastian Huber Sebastian Huber <sebastian.huber@…> 6 months ago
Summary

Timecounter: Add PPS support

Description

The FreeBSD timecounter implementation supports the RFC 2783 PPS-API. This support is currently disabled in RTEMS.

#2365 9 years ago fixed score Sebastian Huber Sebastian Huber 21 months ago
Summary

Task pre-emption disable is broken due to pseudo ISR tasks

Description

We have for example:

Scheduler_Void_or_thread _Scheduler_priority_Unblock (
  const Scheduler_Control *scheduler,
  Thread_Control          *the_thread
)
{
  Scheduler_priority_Context *context =
    _Scheduler_priority_Get_context( scheduler );
  Scheduler_priority_Node *node = _Scheduler_priority_Thread_get_node( the_thread );

  _Scheduler_priority_Ready_queue_enqueue(
    &the_thread->Object.Node,
    &node->Ready_queue,
    &context->Bit_map
  );

  /* TODO: flash critical section? */

  /*
   *  If the thread that was unblocked is more important than the heir,
   *  then we have a new heir.  This may or may not result in a
   *  context switch.
   *
   *  Normal case:
   *    If the current thread is preemptible, then we need to do
   *    a context switch.
   *  Pseudo-ISR case:
   *    Even if the thread isn't preemptible, if the new heir is
   *    a pseudo-ISR system task, we need to do a context switch.
   */
  if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
    _Scheduler_Update_heir(
      the_thread,
      the_thread->current_priority == PRIORITY_PSEUDO_ISR
    );
  }

  SCHEDULER_RETURN_VOID_OR_NULL;
}

So the unblock event of a pseudo ISR task (MPCI or timer server) may pre-empt a task with disabled pre-emption. Suppose a higher priority task than the non-preemptible task is ready. Then this task gets scheduled once the pseudo ISR task blocks again.

#2778 8 years ago worksforme unspecified Sambeet Panigrahi Chris Johns 17 months ago
Summary

Error building RTEMS Source Builder recipe for libxml

Description

I wrote the three essential files for cross build of libxml for RTEMS, i.e. the .bset file (libxml.bset), the version specific configuration file (libxml2-2.7.8.cfg) and the build configuration file (libxml2-2.7.8.cfg).As per the FreeBSD ports I have placed it under textproc.However when the build configuration script is run, an error "config file is not found" occurs. I tried to cd into the directory by providing a bash script but that is also not working,an error "can't cd to ..<config directory>" appears.

#2828 7 years ago fixed lib Joel Sherrill Needs Funding 14 months ago
Summary

Remove libmisc/serdbg

Description

This is old code which should be replaced by the new debug server. Any hints or reusable in this for termios/serial port support can be retrieved from an old branch.

#2869 7 years ago fixed score Sebastian Huber 2 years ago
Summary

Remove support for 16-bit object identifiers

Description

The only target using 16-bit object identifiers is M32C. This optimization is not worth the trouble. Self-contained objects are much more attractive for low end systems.

#2871 7 years ago fixed doc Sebastian Huber 18 months ago
Summary

Use bibtex references thoughout the documentation

#2872 7 years ago fixed score Sebastian Huber 2 years ago
Summary

Get rid of CONFIGURE_MAXIMUM_PTYS

Description

Change the Termios PTY driver for Telnet to use the new Termios device API. This why the CONFIGURE_MAXIMUM_PTYS gets superfluous.

#2902 7 years ago fixed bsps Tanu Hari Dixit Joel Sherrill 2 years ago
Summary

Port RTEMS to Microblaze

Description

Port RTEMS to Microblaze

Students: Past, Present, and Potential Students

Status: The tools build from RSB properly, but GDB is not compatible with current XDM (Xilinx Debugging Module), Xilinx GDB version is working fine.

Introduction: A new architecture port, not just BSP. Include a BSP for GDB simulator. Also needs BSP for more complete HW on simulator.

Goal: Update the preliminary Microblaze port, complete clock timer support, merge into RTEMS, and continue to improve the BSP/port.

Some work has been initiated here [1] (By Joel Sherrill and Hesham ALMatary) to get hello world working. It has been tested on Atlys FPGA board [2]. The BSP can run virtually on every FPGA board the Xilinx tools support building MicroBlaze? on.

The work will need to be updated against the current RTEMS version and tools and then completed. There are multiple boards supported by qemu-system-microblaze. One of these should be suitable for completing the port including interrupts. It will require investigation to know if qemu includes networking support for the Microblaze but this is likely.

References

#2971 7 years ago fixed unspecified Joel Sherrill Needs Funding 2 years ago
Summary

Add fenv.h to newlib

Description

fenv.h is not present.

  • http://pubs.opengroup.org/onlinepubs/9699919799/
  • feclearexcept, fegetenv, fegetexceptflag, fegetround, feholdexcept, feraiseexcept, fesetenv, fesetexceptflag, fesetround, fetestexcept, feupdateenv
  • Cygwin has x86 implementation. FreeBSD should be source for ARM and some other architectures. The implementation is architecture specific.

When completed, see psxtests/Makefile.am and enable the fenv.h POSIX API Compliance Tests.

#2985 7 years ago fixed doc Joel Sherrill chrisj@… 3 years ago
Summary

Add documentation for printk()

Description

printk() and its variants should be documented in the Classic API User's Guide. I am not sure where though.

#3143 7 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

Remove obsolete rtems_gxx_*() implementation

Description

GCC versions prior to 6.1 used a RTEMS thread model based on rtems_gxx_*() functions. GCC version 6.1 or later uses the self-contained synchronization objects of Newlib <sys/lock.h> for the RTEMS thread model.

Remove the obsolete implementation.

#3199 7 years ago fixed lib Sebastian Huber Sebastian Huber 3 years ago
Summary

New test framework

Description

Requirements:

  • Support for RTEMS and general POSIX systems such as Linux or FreeBSD
  • Test output functions
    • printf() like
    • No floating point support by default
    • Optional floating point support
    • Non-blocking
    • Arbitrary context, e.g. during system start, before device drivers, in interrupt context
  • Automatic test case registrations (constructors, linker set)
  • Standard test case output, e.g. begin/end of test case message
  • Ability to sort test cases at run-time
  • Safe assert functions, e.g. assert(a == b) vs. assert(a = b) vs. assert_eq(a, b)
  • Easy to write, e.g. avoid long namespace prefix rtems_test_*
  • Support multiple threads
  • No dependency on C++
  • Context validation, context invariant validation (e.g. thread dispatch disable level, interrupt state, heap state)
  • Test pattern support (e.g. spintercritical*, parallel tests on SMP)

No ready to use framework exists which fulfils these requirements. We have to write something for RTEMS.

API proposal (header file <T.h>):

T_eq(a, b)
T_gt(a, b)
T_printf(fmt, ...)
T_output_printf(putchar, fmt, ...)
T_output_string(putchar, s, n)
T_output_add_format_handler(handler, arg)

Example for T_output_add_format():

#include <stdio.h>
#include <string.h>

typedef void (*T_putchar)(char c);

typedef size_t (*T_format_handler)(void *arg, T_putchar putchar, const char *fmt, const char *s, int *out);

int T_printf(const char *fmt, ...);

void T_output_printf(T_putchar putchar, const char *fmt, ...);

void T_output_string(T_putchar putchar, const char *s, size_t n);

void T_output_add_format_handler(T_format_handler handler, void *arg);

size_t T_output_float_handler(void *arg, T_putchar putchar, const char *fmt, const char *s, int *out)
{
  char buf[32];

  if (strncmp(fmt, "%f", 2) != 0) {
    return 0;
  }

  *out = snprintf(buf, sizeof(buf), "%f", s);

  if (*out > 0) {
    T_output_string(putchar, s, (size_t) *out);
  }

  return 2;
}

void f(void)
{
  T_output_add_format_handler(T_output_float_handler, NULL);
}
#3250 6 years ago fixed build Joel Sherrill Sebastian Huber <sebastian.huber@…> 20 months ago
Summary

Remove Use of bsp_specs

Description

The bsp_specs file in each BSP directory is GCC specific and a barrier to supporting other compilers including clang/llvm. The bsp_specs file is used in a variety of ways including some odd build system dependencies and this ticket is to track eliminating those uses and the direct use of bsp_specs themselves for extending GCC options.

The primary use of the bsp_specs file is to extend GCC's notion of what to link with. The bsp_specs itself commonly specifies:

  • start.o file
  • program entry point
  • crt[in].o or crtbegin.o/crtend.o
  • linker script
  • Frequently, arguments which are implicitly passed to ld.

This is typical and from a recently added BSP:

%rename endfile old_endfile
%rename startfile old_startfile
%rename link old_link

*startfile:
%{!qrtems: %(old_startfile)} \
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}

*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}

*endfile:
%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }

Note that it has the implicit "-dc -dp -N" arguments which are passed to ld. The -dc and -dp options are equivalent and assign space to common symbols even with linking with -r. Why these two options are included is a mystery lost to time. Similarly the -N sets the .text and .data sections to be readable and writable and do NOT page align the data segment. This option is also a blast from the ancient past and likely should not be used.

The "-qrtems" option is used with this pattern when compiling and linking RTEMS programs:

-B${PREFIX}/${BSP}/lib/ -specs bsp_specs -qrtems

The -B says that the following directory is a system directory. It is treated as a "lib" directory and is also assumed to have an include/ subdirectory. They are added to the linker and include search paths, respectfully. The -specs option references the bsp_specs and adds the -qrtems options which are then tripped by specifying -qrtems. Every part of this must be eliminated and performed in a manner that is more amenable to using a compiler other than GCC.

In order to eliminate the bsp_specs, the arguments used in each BSP's version will have to be reviewed, made common, and then eliminated. A similar effort was performed when the BSP specific make-exe rules were eliminated from the "make/custom" files and a common pattern was put in place.

In addition to using the bsp_specs to specify details about linking and include files, the build system has quite a few odd dependencies on the presence of bsp_specs:

  • all BSP configure.ac use bsp_specs like this:
AC_CONFIG_SRCDIR([bsp_specs])

The idea was that this was a unique file to ensure the script was in the right directory. This can be changed to use a specfic make/custom/*.cfg file and not lose any integrity checking.

  • all BSP Makefile.am have this:
dist_project_lib_DATA = bsp_specs

That can just be removed when we don't use the file.

  • ./aclocal/check-bsps.m4 uses it to see if it is BSP directory
  • bootstrap uses it generate the list of BSP directories for the libbsp/*/acinclude.m4 files
  • Other references are either comments or obvious uses of it in

some invocation of GCC.

#3269 6 years ago fixed rtems Sebastian Huber Sebastian Huber 10 months ago
Summary

Make the IRQ extensions API a standard API

Description

The IRQ extensions API defined by <rtems/irq-extensions.h> is currently only implemented by some BSPs and not covered by test cases. It is not documented in the RTEMS Classic API Guide. Change the BSPs so that every BSP implements this API at least as a stub so that we can write tests for this API. Specify and document the API.

Extend the API to enable/disable specific interrupt vectors. The proposed functions for this are rtems_interrupt_mask() and rtems_interrupt_unmask().

Extend the API to raise/clear specific interrupt vectors. This allows to test specific interrupts. The proposed functions are rtems_interrupt_raise() and rtems_interrupt_clear().

Extend the API to set/get the interrupt vector priority.

Extend the API to get some information about a particular interrupt vector, e.g. if the raise/clear functions work, if it is possible to change the priority, etc.

#3321 6 years ago fixed doc Sebastian Huber Sebastian Huber 2 years ago
Summary

Improve console driver documentation

Description

We have now three different standard console drivers. Improve the console driver configuration documentation to assist the user to select the right one.

#3414 6 years ago invalid unspecified Joel Sherrill 17 months ago
Summary

Remove Makefiles from rtems-examples?

Description

It seems to be time to remove Makefile build support from examples-v2

#3420 6 years ago fixed rtems Joel Sherrill joel 18 months ago
Summary

Deprecate/obsolete rtems_io_lookup_name

Description

I have noted in the RTEMS Class that this method is only kept for legacy purposes for many years now. There is no real use in the tree now. Only the following:

$ grep -rl rtems_io_lookup_name .
./cpukit/include/adainclude/rtems-io.adb
./cpukit/include/rtems/io.h
./cpukit/libfs/src/imfs/ioman.c
./testsuites/sptests/sp21/sp21.scn
./testsuites/sptests/sp21/init.c

Deprecate in 5.1 and remove in 6.x or obsolete and just remove now?

#3456 6 years ago fixed score Sebastian Huber Sebastian Huber 6 months ago
Summary

Add support for CPU counter timestamps

Description

The original use case for the CPU counter was low level profiling of SMP synchronization primitives and busy wait loops for device drivers.

For low overhead timestamps the CPU counter may be also used, e.g. for tracing. To support timestamps, the CPU counter must increment monotonically within the whole range of the CPU counter data type, e.g. 32-bit unsigned integer. In addition, it should not be affected by power saving states of the processor.

#3566 5 years ago fixed build Sebastian Huber Sebastian Huber 2 years ago
Summary

Remove checks for Newlib features introduced during the RTEMS 5 development

Description

Remove checks for O_DIRECTORY, O_CLOEXEC and O_NOFOLLOW.

#3584 5 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove types which are only available if RTEMS_DEPRECATED_TYPES is defined

Description

The types

  • boolean,
  • single_precision,
  • double_precision,
  • rtems_single,
  • rtems_double, and
  • rtems_boolean.

are only available if RTEMS_DEPRECATED_TYPES is defined. They are deprecated for a long time. Remove them in this release.

#3586 5 years ago fixed score Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated proc_ptr definition

#3588 5 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated rtems_context

#3590 5 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated rtems_context_fp

#3592 5 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated region_information_block

#3594 5 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated rtems_thread_cpu_usage_t

#3596 5 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated rtems_rate_monotonic_period_time_t

#3613 5 years ago fixed arch/m32c Sebastian Huber Sebastian Huber 2 years ago
Summary

Remove m32c architecture port from upstream tools

Description

The m32c architecture port was removed in RTEMS 5.1. Remove RTEMS-specific support in the upstream tools, e.g. Binutils and GCC.

#3615 5 years ago wontfix admin shashvat jain Chris Johns 17 months ago
Summary

Convert Tools_Used Wiki page into Support Tools Selection with Criteria

Description

Originally, this ticket requested that ToolStatus? and Tools_Used wiki pages be addressed. ToolsStatus? was horribly out of date and removed. This leaves Tools_Used as a list of the tools used at a point in time. This list needs to be updated and grown into a Support Tools section of the Software Engineering Guide. Beyond a list of the tools and their use with RTEMS, it should discuss the attribute(s) that led to the tools selection.

Original ticket description below:


https://devel.rtems.org/wiki/TBR/Review/ToolStatus This page's data is very old and needs to be updated so that it can be added to the wiki with a link to the home page name "Development Tools".

All the data about the tools on the page must be updated to the latest used by RTEMS 5 , this new page can either be added to the page https://devel.rtems.org/wiki/Tools_Used or be made into a separate page altogether . Advice on the placement of the new page is needed.

#3657 5 years ago fixed posix Marçal Comajoan Cara 2 years ago
Summary

Add support for poll.h method - poll

Description

According to the RTEMS POSIX 1003.1 Compliance Guide, poll() from poll.h is not supported (https://docs.rtems.org/branches/master/posix-compliance/posix-compliance.html#poll-h)

PS: I wrote the test for POSIX API Signature Compliance Test and it compiled correctly but I suppose that some things are still not fully supported.

#3659 5 years ago fixed arch/sparc Martin Aberg 3 years ago
Summary

LEON3 kernel entry point is overwritten - secondary processors may enter into spurious handler

Description

When linking a LEON3 RTEMS SMP application, the entry point in the ELF output file is set to the symbol "start".

"start" is the first entry in the trap table and directly jumps to "hard_reset".

The boot CPU does the following in the boot_card():

  1. Release other CPUs from power-down (but does not wait here)
  2. Some other initializations
  3. Overwrite trap entry 0 with spurious interrupt handler
  4. The rest

It means that the entry point is guaranteed to be valid for the first CPU entering the RTEMS kernel. But 1. and 3. above gives a race. non-first CPU:s will either enter the kernel properly or end up in the spurious interrupt handler depending on how quick it reaches the "start" label.

One example where this has been an issue is when secondary processors run for some time (self-tests) in a ROM boot loader before entering the RTEMS (ELF) entry point. It is convenient to use the ELF file entry point for all processors.

Possible solutions:

a. Do not install spurious handler on trap table entry 0. For example by changing bsps/sparc/leon3/start/spurious.c:

    -  for ( trap=1 ; trap<256 ; trap++ ) {
    +  for ( trap=0 ; trap<256 ; trap++ ) {

(This changes address 0 on GR740. So following a null function pointer may not end up in spurious trap anymore.)

b. Change the SPARC ELF entry point. For example to the symbol hard_reset.

c. Document that the entry point for boot processor is "start" and entry point for other processors is "hard_reset".

#3689 5 years ago fixed lib/block Sebastian Huber Sebastian Huber 3 years ago
Summary

bdbuf: Replace automatic read-ahead with rtems_bdbuf_peek()

Description

The block device cache (bdbuf) tries to deduce a read ahead opportunity from the read access pattern. Using real world FAT file systems showed that this is not very reliable and the read ahead seldom happens. One way to fix this issue is let file systems give a hint to the block device cache that they will likely read a certain block in the future, e.g. the next block in a sequential file read. Remove the existing read ahead logic and add a new function rtems_bdbuf_peek() instead.

#3698 5 years ago worksforme lib/dl Joel Sherrill 2 years ago
Summary

libdl failure on many PowerPC BSPs

Description

The following BSPs do not build dl09:

powerpc-beatnik powerpc-brs5l powerpc-brs6l powerpc-dp2 powerpc-haleakala powerpc-icecube powerpc-mcp750 powerpc-mpc8260ads powerpc-mtx603e powerpc-mvme2100 powerpc-mvme2307 powerpc-mvme3100 powerpc-mvme5500 powerpc-pm520_cr825 powerpc-pm520_ze30 powerpc-qemuprep-altivec powerpc-qemuprep powerpc-qoriq_e6500_64 powerpc-ss555 powerpc-virtex4 powerpc-virtex5

They fail with this:

gmake[5]: Entering directory `/home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qemuprep-rtems/powerpc-rtems5/c/qemuprep/testsuites/libtests'
powerpc-rtems5-gcc -mcpu=powerpc -mmultiple -mstring -mstrict-align -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs  -Wl,--gc-sections  -mcpu=powerpc -mmultiple -mstring -mstrict-align  -B./../../lib/libbsp/powerpc/motorola_powerpc -B/home/joel/rtems-work/rtems-testing/rtems/rtems/bsps/powerpc/motorola_powerpc/start -specs bsp_specs -qrtems -L./../../cpukit -L/home/joel/rtems-work/rtems-testing/rtems/rtems/bsps/powerpc/shared/start -Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar -o dl01.pre dl01/dl01-init.o dl01/dl01-dl-load.o dl01-dl01-tar.o ../../lib/libbsp/powerpc/motorola_powerpc/librtemsbsp.a ../../cpukit/librtemscpu.a
/home/joel/rtems-work/tools/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bin/ld: ../../cpukit/librtemscpu.a(rtl-mdreloc-powerpc.o): in function `get_sdata_libdl_size':
/home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qemuprep-rtems/powerpc-rtems5/c/qemuprep/cpukit/../../../../../rtems/c/src/../../cpukit/libdl/rtl-mdreloc-powerpc.c:73: undefined reference to `bsp_section_sdata_libdl_begin'
/home/joel/rtems-work/tools/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bin/ld: /home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qemuprep-rtems/powerpc-rtems5/c/qemuprep/cpukit/../../../../../rtems/c/src/../../cpukit/libdl/rtl-mdreloc-powerpc.c:73: undefined reference to `bsp_section_sdata_libdl_begin'
/home/joel/rtems-work/tools/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bin/ld: /home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qemuprep-rtems/powerpc-rtems5/c/qemuprep/cpukit/../../../../../rtems/c/src/../../cpukit/libdl/rtl-mdreloc-powerpc.c:74: undefined reference to `bsp_section_sdata_libdl_end'
/home/joel/rtems-work/tools/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bin/ld: /home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qemuprep-rtems/powerpc-rtems5/c/qemuprep/cpukit/../../../../../rtems/c/src/../../cpukit/libdl/rtl-mdreloc-powerpc.c:74: undefined reference to `bsp_section_sdata_libdl_end'
/home/joel/rtems-work/tools/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bin/ld: ../../cpukit/librtemscpu.a(rtl-mdreloc-powerpc.o): in function `get_sdata_sbss_size':
/home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qemuprep-rtems/powerpc-rtems5/c/qemuprep/cpukit/../../../../../rtems/c/src/../../cpukit/libdl/rtl-mdreloc-powerpc.c:63: undefined reference to `bsp_section_sdata_begin'
/home/joel/rtems-work/tools/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bin/ld: /home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qemuprep-rtems/powerpc-rtems5/c/qemuprep/cpukit/../../../../../rtems/c/src/../../cpukit/libdl/rtl-mdreloc-powerpc.c:63: undefined reference to `bsp_section_sdata_begin'
/home/joel/rtems-work/tools/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bin/ld: /home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qemuprep-rtems/powerpc-rtems5/c/qemuprep/cpukit/../../../../../rtems/c/src/../../cpukit/libdl/rtl-mdreloc-powerpc.c:64: undefined reference to `bsp_section_sbss_end'
/home/joel/rtems-work/tools/5/lib/gcc/powerpc-rtems5/7.4.0/../../../../powerpc-rtems5/bin/ld: /home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qemuprep-rtems/powerpc-rtems5/c/qemuprep/cpukit/../../../../../rtems/c/src/../../cpukit/libdl/rtl-mdreloc-powerpc.c:64: undefined reference to `bsp_section_sbss_end'
collect2: error: ld returned 1 exit status
#3702 5 years ago fixed doc Sebastian Huber Sebastian Huber 2 years ago
Summary

Space profile for RTEMS SMP

Description

Define a subset of RTEMS SMP functionality which is

  • useful for space applications, and
  • can be pre-qualified by project #3701.

To figure out the feature set carry out an online survey. In addition, do a workshop at ESA / ESTEC premises (also accessible on-line via Skype for Business).

The space profile needs to be documented.

#3704 5 years ago fixed doc Sebastian Huber Sebastian Huber 9 months ago
Summary

Review and update Doxygen recommendations

Description

Review and update the Doxygen recommendations.

Due to the removal of the pre-install build step we can now use Doxygen directly with header files in the source tree. It should be possible to generate documentation for all architectures and BSPs.

All code files (headers, C source, assembler) should have an @file entry belong to at least one Doxygen group (@ingroup).

There are a lot of source file in RTEMS (excluding test code and legacy network stack):

find bsps cpukit -name '*.[chsS]' | grep -v libnetworking | wc
   4898    4898  187167

Creating the groups and categorizing all code file is a labour intensive work package. Therefore it should be discussed if the @brief and descriptions for files should be removed. The file content will be covered by groups and individual documentation.

The use of @param should be clarified. It is not clear if the [in], [out] or [in,out] should be used. If they should be used, what they mean exactly.

#3705 5 years ago fixed doc Sebastian Huber Sebastian Huber 6 months ago
Summary

Software Design Document (SDD) for space profile

Description

A Software Design Document (SDD) is required by ECSS-E-ST-40C specified by Annex F. The plan is to use Doxygen for the software

  • architecture, and
  • detailed design.

How should links to from a software component (Doxygen group) to requirements be handled?

#3706 5 years ago fixed doc Sebastian Huber Sebastian Huber 9 months ago
Summary

Create a hierarchy of RTEMS software components using Doxygen groups

Description

Create a hierarchy of RTEMS software components using Doxygen groups. Review the existing Doxygen groups (software components) first.

https://docs.rtems.org/doxygen/branches/master/modules.html

Grouping should be done by at BSP level architecture and then by BSP.

There should be a device driver group with subgroups for each device class and specific device drivers, e.g. a BSP-specific device driver belongs to a device class and BSP.

There should be groups for APIs, file systems, support libraries, super core, etc.

  • Board Support Packages
  • Device Drivers
    • Block Devices
      • Block Device Buffer Management
      • Block Device Disk Management
      • Block Device Management
        • XYZ Block Device
      • Block Device Partition Management
    • Cache
      • XYZ Cache Support
    • Console
      • Termios
        • XYZ Driver
    • Framebuffer
      • XYZ Driver
    • I2C
      • Bus Driver
        • XYZ Driver
      • Device Driver
        • XYZ Driver
    • Legacy I2C
    • Legacy Network
    • RTC
      • XYZ Driver
    • Serial Mouse
      • XYZ Driver
    • SPI
      • Bus Driver
        • XYZ Driver
      • Device Driver
        • XYZ Driver
  • API
    • Classic
      • Tasks
    • Dynamic Loading
    • File Systems
    • Memory Management
    • Shell
    • Tracing
      • Event Recording
      • Capture Engine
  • Internal
    • C Library Support
    • POSIX
    • Shell
    • Super Core
      • Thread Handler
      • CPU
        • ARM
#3707 5 years ago fixed doc Sebastian Huber Sebastian Huber 3 months ago
Summary

Assign each code file to a Doxygen group

Description

Assign each code file (header, C source, assembler) to a Doxygen group. Exclude the legacy network stack and test suites. For third-party code decide case by case. Use this template and place it at the top of the file:

/**
 * @file
 *
 * @ingroup RTEMSClassicTasks
 */

Do not use @brief and a file description.

#3715 5 years ago fixed doc Sebastian Huber Sebastian Huber 11 months ago
Summary

Add Requirements Engineering chapter to RTEMS Software Engineering Handbook

Description

The chapter should cover the following topics:

  • Overview and introduction
  • Evaluation of tools for requirements management
  • Selected tool for requirements management
  • Evaluation of data models and formats for the requirements
  • Definition of data model and format actually used for the project (may overlap with tool)
  • Requirements management workflow used in the project
  • Requirements on requirements, e.g. derived from standards such as ECSS-E-ST-10-06C
  • Requirement identifiers used to ensure traceability
#3717 5 years ago fixed doc Sebastian Huber Sebastian Huber 6 months ago
Summary

Add test guidelines chapter to RTEMS Software Engineering Handbook

Description

The test guidelines chapter should cover the following topics:

  • tools involved in testing
  • test classification
  • test organization
  • how to plan tests
  • how to write tests
  • how to run tests
  • how to report tests
#3718 5 years ago fixed test Sebastian Huber Sebastian Huber 3 years ago
Summary

Add support for test plans

Description

Test plans are required by ECSS-Q-ST-40C:

  • 5.5.3.2, Software unit testing, a.
  • 5.5.4.1, Software integration test plan development
  • 5.6.3.1, Development and documentation of a software validation specification with respect to the technical specification, a.

The test plans are a content of several documentation sets. Test plans are subject to verification activities:

  • 5.8.3.6, Verification of software unit testing (plan and results)
  • 5.8.3.7, Verification of software integration
  • 5.8.3.8, Verification of software validation with respect to the technical specifications and the requirements baseline

It should be possible to create documents from individual test plan fragments for a particular test case. There are two approaches possible:

  1. Add the test plan directly to the test code in form of a specially formatted comment.
  1. Use separate files with a specific format for test plans.

The test plans should include a

  • test identifier,
  • test classification (unit, integration, validation),
  • test steps,
  • links to requirements, design, architecture, unit, component, etc.

It should be possible to verify that a test is executed according to the plan from the test output. For example the test plan could specify test steps. The test output could print the test steps. A tool could check that the test steps in the output and the plan are consistent.

#3719 5 years ago fixed lib Joel Sherrill Sebastian Huber 6 months ago
Summary

Update libcrypt to latest FreeBSD to address Coverity Scan Issues

Description

Coverity issues 1018087, 1018088, 1018089, and 1018090 all appear to be addressed in the latest source code for libcrypt from FreeBSD. This code needs to be updated. This is one of the issues (1018087) in crypt-sha512.c from Scan but the same issues are in sha256.c

275        if (copied_key != NULL)
   	CID 1018088: &#39;Constant&#39; variable guards dead code (DEADCODE) [select issue]
276                memset(copied_key, '\0', key_len);
   	null: At condition copied_salt != NULL, the value of copied_salt must be NULL.
   	dead_error_condition: The condition copied_salt != NULL cannot be true.
277        if (copied_salt != NULL)
   	
CID 1018087 (#1 of 1): 'Constant' variable guards dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: memset(copied_salt, 0, salt....
   	Local variable copied_salt is assigned only once, to a constant value, making it effectively constant throughout its scope. If this is not the intent, examine the logic to see if there is a missing assignment that would make copied_salt not remain constant.
278                memset(copied_salt, '\0', salt_len);
#3726 5 years ago fixed doc Sebastian Huber Sebastian Huber 3 years ago
Summary

Select a requirements engineering tool

Description

In order to ease the requirements engineering process (such a process doesn't exist currently, see #3715) select a supporting tool (or tools). Define tool selection criteria. Do a market survey. Use the following wiki page for this work:

Developer/RequirementsEngineering

#3818 4 years ago fixed build Sebastian Huber Sebastian Huber 3 years ago
Summary

New build system

Description

Replace the existing Autoconf and Automake based build system with something new. Goals:

  • Easier configuration of BSPs (BSP options)
  • Easier to maintain (nobody understands the details of the existing build system)
  • Faster builds (especially on Windows)
  • Reusable build specifications (e.g. generate documentation for BSP options for the user manual)
  • Validation of built artefacts (e.g. ensure that the objects are built as specified using the DWARF debug information)
  • Support building of BSPs external to the project
  • Customization of the build (e.g. build only a subset of the RTEMS functions)
  • Support alternative compilers such as clang instead of GCC

Proposed solution:

  • Use waf for the build system
  • Specify the build through build specification items maintained by Doorstop
#3828 4 years ago fixed build Sebastian Huber Sebastian Huber 2 years ago
Summary

Switch over to new build system

Description

During a four month period every RTEMS user is encouraged to test its BSPs of interest with the new build system. The user should use the following check list. Issues should be reported on devel@… or this ticket.

  1. Review the build system specification in the user manual. If something is unclear, please complain.
  1. Use "./waf bsp_defaults" to get a list of options with default values for the BSPs of interest. Check that all options are present. Check the type of the options in the build specification (e.g. actions get-integer, get-boolean, get-string). Review the description of the options. Review the default values. Add sanity checks to options (e.g. actions assert-*).
  1. Build the BSPs of interest with all tests enabled (BUILD_TESTS = True). Review the ABI and linker options. Review the linker command files. Run the test on the boards.
  1. Build the BSPs of interest with different permutations of build options. Make sure a sample set of tests runs for each permutation.
  1. Check that all artefacts (libraries, header files, start files, linker command files, etc.) are properly installed.
  1. Check that you can build your applications and third-party libraries with the installed BSPs of interest.
#3846 4 years ago fixed build Sebastian Huber Sebastian Huber 3 years ago
Summary

Build system does not track the dependencies of start.o files

Description

This defect relates to the new waf based build system.

Most start.o are generated from start.S files which use the C preprocessor. The start.o files are not re-generated if header files (e.g. cpuopts.h, bspopts.h) change. The problem is that the automatic dependency generation via the GCC -MMD flags doesn't work with the current asm rule:

    def asm(self, bld, bic, source, target=None, deps=[], cppflags=[]):
        if target is None:
            target = os.path.splitext(source)[0] + ".o"
        bld(
            asflags=self.data["asflags"],
            before=["cstlib"],
            cppflags=cppflags + self.data["cppflags"],
            features="asm c",
            includes=bic.includes + self.data["includes"],
            rule="${CC} ${ASFLAGS} ${CPPFLAGS} ${DEFINES_ST:DEFINES} ${CPPPATH_ST:INCPATHS} -c ${SRC[0]} -o ${TGT}",
            source=[source] + deps,
            target=target,
        )
        return target
#3847 4 years ago duplicate build Sebastian Huber Sebastian Huber 21 months ago
Summary

Test programs are not re-linked if a start.o or linker command file changes

Description

The test programs are not re-linked if a start.o or linker command file changes. The dependency tracking doesn't know anything about the linker command files or GCC specification files. The start files are normally included through the linker command file START() directive. Somehow these dependencies must be manually added to the test programs.

#3853 4 years ago fixed doc Sebastian Huber Sebastian Huber 3 years ago
Summary

Add and use project-wide glossary to documentation

Description

See discussion:

https://lists.rtems.org/pipermail/devel/2020-January/056728.html

Approach A

Use c-user/glossary.rst as the project-wide glossary. Generate document-specific glossaries from this file and the use of :term: in the specific document. Add new waf target "./waf regenerate" to carry out the glossary generation.

Approach B

Move the glossary terms to the RTEMS specification (e.g. in the RTEMS sources "spec/glossary/*.yml") and generate the glossary.rst for the documents with a script. This gives us more flexibility and removes the need for the special parser code, see:

https://lists.rtems.org/pipermail/devel/2020-January/056811.html

The AV-2 mentioned of the DoD Architecture Framework (DoDAF) wants the glossary terms in categories. We could add categories to the glossary specification items. This would be difficult with a master glossary in reST.

#3866 4 years ago fixed bsps Sebastian Huber Sebastian Huber 3 years ago
Summary

Add support for GCC 10 noinit attribute

Description

In GCC 10 there is a new common variable attribute noinit:

https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-noinit-variable-attribute

https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=commit;h=f0033821c1c9ba386a1983499a666d5759cdd943

To support this, a change in the linker command files is necessary.

#3878 4 years ago worksforme rtems Joel Sherrill 2 years ago
Summary

rtems06: All BSPs Fail to build with BSP Builder on rtems 6

Description

I think there are a couple of places in an rtems6 build of RTEMS itself where rtems5 is being used from some hard-coded. Not sure what's up but here's the message to the build@ list.

https://lists.rtems.org/pipermail/build/2020-February/010431.html

From the post above, you only see that all failed. Looking at the build log from a single BSP, I see is early which doesn't cause a visible failure

gmake[4]: Entering directory `/home/joel/rtems-cron-6/b-jmr3904/mips-rtems6/c/jmr3904/make' sed \ -e "s|[@]prefix[@]|/home/joel/rtems-cron-6/tools/6/bsp-install|" \ -e "s|[@]exec_prefix[@]|/home/joel/rtems-cron-6/tools/6/bsp-install/mips-rtems6|" \ -e "s|[@]pkgdatadir[@]|/home/joel/rtems-cron-6/tools/6/bsp-install/share/rtems5|" \

and this one which is error inducing.

: error trying to exec 'mips-rtems5-gcc': execvp: No such file or directory error: compiling wrapper: Compiler error gmake[5]: * [dl08-sym.o] Error 10

The first looks like a typo that isn't breaking anything but needs to be fixed.

The latter is some issue during the dl tests using rtems5 or it is hard-coded in a tool somewhere.

#3883 4 years ago fixed tool Sebastian Huber Sebastian Huber 4 years ago
Summary

Trace linker is broken on small-data area targets

Description

The trace linker generates some data, e.g. __rtld_trace_names. The arrays are not declared in a header file as arrays of unspecified size. So, in rtems-trace-buffer-vars.c the compiler assumes that the size one weakly defined defaults reside in the small-data area. This leads to linker errors with the strong definitions:

Waf: Entering directory `/scratch/git-rtems-examples/build/powerpc-rtems5-qoriq_e6500_32'
[22/29] Processing rtrace: build/powerpc-rtems5-qoriq_e6500_32/filesystem/fat_ramdisk/init.c.6.o build/powerpc-rtems5-qoriq_e6500_32/filesystem/fat_ramdisk/fs-root-tar.c.6.o -> build/powerpc-rtems5-qoriq_e6500_32/filesystem/fat_ramdisk/fat_ramdisk.texe
/opt/rtems/5/bin/powerpc-rtems5-gcc: /opt/rtems/5/lib64/gcc/powerpc-rtems5/7.5.0/../../../../powerpc-rtems5/bin/ld: /opt/rtems/5/powerpc-rtems5/qoriq_e6500_32/lib/librtemscpu.a(rtems-trace-buffer-vars.o): the target (__rtld_trace_names) of a R_PPC_SDAREL16 relocation is in the wrong output section (.data)
/opt/rtems/5/bin/powerpc-rtems5-gcc: /opt/rtems/5/powerpc-rtems5/qoriq_e6500_32/lib/librtemscpu.a(rtems-trace-buffer-vars.o): in function `rtems_trace_names':
/opt/rtems/5/bin/powerpc-rtems5-gcc: /home/EB/sebastian_h/git-rtems-5/c/src/../../cpukit/libmisc/capture/rtems-trace-buffer-vars.c:51:(.text.rtems_trace_names+0x2): relocation truncated to fit: R_PPC_SDAREL16 against symbol `__rtld_trace_names' defined in .data.__rtld_trace_names section in /tmp/ccu6uaaa.o
/opt/rtems/5/bin/powerpc-rtems5-gcc: /opt/rtems/5/lib64/gcc/powerpc-rtems5/7.5.0/../../../../powerpc-rtems5/bin/ld: /opt/rtems/5/powerpc-rtems5/qoriq_e6500_32/lib/librtemscpu.a(rtems-trace-buffer-vars.o): the target (__rtld_trace_signatures) of a R_PPC_SDAREL16 relocation is in the wrong output section (.rodata)
/opt/rtems/5/bin/powerpc-rtems5-gcc: /opt/rtems/5/powerpc-rtems5/qoriq_e6500_32/lib/librtemscpu.a(rtems-trace-buffer-vars.o): in function `rtems_trace_signatures':
/opt/rtems/5/bin/powerpc-rtems5-gcc: /home/EB/sebastian_h/git-rtems-5/c/src/../../cpukit/libmisc/capture/rtems-trace-buffer-vars.c:81:(.text.rtems_trace_signatures+0x2): relocation truncated to fit: R_PPC_SDAREL16 against symbol `__rtld_trace_signatures' defined in .rodata.__rtld_trace_signatures section in /tmp/ccu6uaaa.o
#3886 4 years ago fixed tool/rsb Chris Johns Chris Johns 4 years ago
Summary

Fail an RSB build with --mail option if a repo is not clean

Description

Fail a build if a user has the --mail option to post the build results and repo is not clean. Public postings of results with local changes has no public value. Users cannot replicate the results if changes are not publicaly available.

What about a repo that is clean but has changes that are not pushed?

#3897 4 years ago wontfix network/libbsd Ionut Vilsan Sebastian Huber 20 months ago
Summary

Dhcpcd does not daemonize

Description

Background: the DCHP client is started using the rc.conf script. In the background a new task dedicated to the dhcp client is created and then the dhcp client takes over this task. This works fine, we can get IP form the dhcp server and then take part in network communication based on IPv4.

Problem: The dhcp client cannot be stopped any time. Any shell commands will never reach the dhcpcd task, but rather it will instantiate a new dhcpd task which will take over the current task. E.g: in rtems console if you enter dhcpd -x, instead of killing the dhcpcd task a new dhcpcd task will be created which will run from the console. This means that the console cannot be used anymore.

There seems to be noway to communicate with the already created dhcpcd task.

I took a look over the dhcpcd in libbsd code and some of the features are turned off. Can someone give more details regarding this ?

#3910 4 years ago fixed bsps Sebastian Huber Sebastian Huber 9 months ago
Summary

Add BSP for STM32H7

Description

Add a BSP for the STM32H7 series. Import the HAL from https://github.com/STMicroelectronics/stm32h7xx_hal_driver. Add a VERSION file to allow future updates similar to https://git.rtems.org/rtems/tree/cpukit/dtc/VERSION. Add standard clock and console drivers.

#3924 4 years ago fixed doc Sebastian Huber Sebastian Huber 20 months ago
Summary

Test the application configuration options

Description

There exists a specification of the application configuration options (work in progress) here:

https://git.rtems.org/sebh/rtems-qual.git/tree/spec/acfg/opt/

For the RTEMS Qualification project we have to test the implementation according to the specification (validation and unit tests).

A test plan needs to be developed. The tests should use the RTEMS Test Framework. Add C preprocessor error tests to the new build system, e.g. test #error and #warning directives.

#3925 4 years ago fixed bsps Sebastian Huber Sebastian Huber 2 years ago
Summary

Optimize work area initialization

Description

The new work area initialization introduced by #3838 introduces a dependency on _Heap_Extend() for all BSPs. The BSP knows how many memory areas it delivers to the system. It should provide also the RTEMS Workspace and C Program Heap initialization functions to the system so that an unnecessary pull in of _Heap_Extend() can be avoided.

#3929 4 years ago fixed doc Gedare Bloom Needs Funding 17 months ago
Summary

Document use of virtualenv

Description

The use of python virtualenv to build docs or use RSB has been suggested a few times. We should provide a brief sketch in our documentation about that utility.

For example, in modern versions of Arch Linux, python is now a shortcut to python3 from the python package. For tools that do not yet function in Python 3, users can set up a virtual environment with Python 2 as follows:

At a root terminal, install python2-virtualenv with pacman.

# pacman -S python2-virtualenv

Examples of other architectures and uses for virtualenv would round out a reasonable section in the user manual for Preparation.

#3935 4 years ago fixed unspecified Sebastian Huber Sebastian Huber 6 months ago
Summary

Remove use of RTEMS_INLINE_ROUTINE in the RTEMS sources

Description

Replace all uses of RTEMS_INLINE_ROUTINE with "static inline". This makes it a bit easier for third-party tools to parse the RTEMS sources.

#3937 4 years ago fixed tool/gcc Sebastian Huber Sebastian Huber <sebastian.huber@…> 2 years ago
Summary

Move content of bsp_specs to GCC

Description

Move content of the bsp_specs to GCC 10. Once this is done, update the tools and delete the bsp_specs.

On powerpc this means we have to move the content of rtems_crti.S to GCC. It may not be possible to back port this to GCC 10 and we may have to maintain this as a patch until GCC 11 is released.

Add support for nostartfiles and nodefaultlibs.

#3941 4 years ago fixed arch/epiphany Sebastian Huber Hesham Almatary 4 years ago
Summary

Remove epiphany architecture support

Description

I tried to build the epiphany BSP with GCC 10 recently and a lot internal compiler errors appeared. If it is not possible to build the BSP with a released GCC 10.1, then I suggest to remove this architecture. The GDB was never supported by the FSF upstream. To me this looks like an unmaintained architecture.

#3942 4 years ago fixed arch/mips Sebastian Huber Joel Sherrill 17 months ago
Summary

multiple definition of `pci_indirect_functions'

Description

Building with GCC 10 showed a multiple definition error:

/build/rtems/6/lib/gcc/mips-rtems6/10.0.1/../../../../mips-rtems6/bin/ld: ./librtemsbsp.a(i8259.c.19.o):/ramdisk/git-rtems-5/build/mips/malta/../../../bsps/mips/malta/include/bsp/pci.h:113: multiple definition of `pci_indirect_functions'; ./librtemsbsp.a(vectorisrs.c.19.o):/ramdisk/git-rtems-5/build/mips/malta/../../../bsps/mips/malta/include/bsp/pci.h:113: first defined here
/build/rtems/6/lib/gcc/mips-rtems6/10.0.1/../../../../mips-rtems6/bin/ld: 
./librtemsbsp.a(simple_access.c.19.o):/ramdisk/git-rtems-5/build/mips/malta/../../../bsps/mips/malta/include/bsp/pci.h:113: multiple definition of `pci_indirect_functions'; ./librtemsbsp.a(vectorisrs.c.19.o):/ramdisk/git-rtems-5/build/mips/malta/../../../bsps/mips/malta/include/bsp/pci.h:113: first defined here
/build/rtems/6/lib/gcc/mips-rtems6/10.0.1/../../../../mips-rtems6/bin/ld: ./librtemsbsp.a(pci.c.19.o):/ramdisk/git-rtems-5/build/mips/malta/../../../bsps/mips/malta/include/bsp/pci.h:113: multiple definition of `pci_indirect_functions'; ./librtemsbsp.a(vectorisrs.c.19.o):/ramdisk/git-rtems-5/build/mips/malta/../../../bsps/mips/malta/include/bsp/pci.h:113: first defined here
#3947 4 years ago fixed lib Joel Sherrill Sebastian Huber 21 months ago
Summary

fdt_rw.c: Unchecked return value (CID #1047324)

Description

git blams says Sebastian.

*** CID 1047324:  Error handling issues  (CHECKED_RETURN)
/home/joel/rtems-work/rtems/cpukit/dtc/libfdt/fdt_rw.c: 351 in fdt_add_subnode_namelen()
345             if (offset >= 0)
346                     return -FDT_ERR_EXISTS;
347             else if (offset != -FDT_ERR_NOTFOUND)
348                     return offset;
349     
350             /* Try to place the new node after the parent's properties */
>>>     CID 1047324:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "fdt_next_tag" without checking return value (as is done elsewhere 7 out of 8 times).
351             fdt_next_tag(fdt, parentoffset, &nextoffset); /* skip the BEGIN_NODE */
352             do {
353                     offset = nextoffset;
354                     tag = fdt_next_tag(fdt, offset, &nextoffset);
355             } while ((tag == FDT_PROP) || (tag == FDT_NOP));
356     

#3951 4 years ago fixed arch/powerpc Sebastian Huber Sebastian Huber 2 years ago
Summary

Remove obsolete powerpc BSPs

Description

Remove powerpc BSPs for unsupported ISA variants (e.g. SPE and the embedded FPU). Remove powerpc BSPs for dead projects. This includes:

  • brs5l
  • brs6l
  • dp2
  • mpc5566evb_spe
  • mpc5643l_dpu
  • mpc5643l_evb
  • mpc5674f_ecu508_app
  • mpc5674f_ecu508_boot
  • mpc5674fevb_spe
  • mpc5674f_rsm6
#3957 4 years ago fixed doc Joel Sherrill 16 months ago
Summary

Review wiki/Developer for deletion

Description

https://devel.rtems.org/wiki/Developer has minimal content. All should likely point to somewhere in the Users Guide now rather than the Wiki.

Also this page is a candidate for deletion. Verify the references and delete it. Check rtems.org also.

#3959 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Add rtems_task_construct()

Description

In RTEMS 5 a lot of development was done to allow a static allocation of resources provided by RTEMS and avoid the use of a heap. One missing piece is the support for statically allocated RTEMS tasks. The rtems_task_create() function allocates the task stack from a heap. We need an alternative function which allocates an RTEMS tasks with a user provided stack (similar to the POSIX threads).

There does need to be documentation on the allocation strategies, when to use, limitations, and particularly the use of rtems-exeinfo to get the TLS size. This is one case for sure where an RTEMS Tool needs explicit mention in both the API and configure option sections.

Proposed API:

/**
 * @brief This structure defines the configuration of a task constructed by
 *   rtems_task_construct().
 */
typedef struct {
  /**
   * @brief This member defines the name of the task.
   */
  rtems_name name;

  /**
   * @brief This member defines the initial priority of the task.
   */
  rtems_task_priority initial_priority;

  /**
   * @brief This member shall point to the task storage area begin.
   *
   * The task storage area will contain the task stack, the thread-local storage,
   * and the floating-point context on architectures with a separate
   * floating-point context.
   *
   * The task storage area begin address and size should be aligned by
   * #RTEMS_TASK_STORAGE_ALIGNMENT.  To avoid memory waste, use RTEMS_ALIGNED()
   * and #RTEMS_TASK_STORAGE_ALIGNMENT to enforce the recommended alignment of a
   * statically allocated task storage area.
   */
  void *storage_area;

  /**
   * @brief This member defines size of the task storage area in bytes.
   *
   * Use the RTEMS_TASK_STORAGE_SIZE() macro to determine the recommended task
   * storage area size.
   */
  size_t storage_size;

  /**
   * @brief This member defines the maximum thread-local storage size supported
   *   by the task storage area.
   *
   * Use RTEMS_ALIGN_UP() and #RTEMS_TASK_STORAGE_ALIGNMENT to adjust the size to
   * meet the minimum alignment requirement of a thread-local storage area used
   * to construct a task.
   *
   * If the value is less than the actual thread-local storage size, then the
   * task construction by rtems_task_construct() fails.
   *
   * If the is less than the task storage area size, then the task construction
   * by rtems_task_construct() fails.
   *
   * The actual thread-local storage size is determined when the application
   * executable is linked.  The ``rtems-exeinfo`` command line tool included in
   * the RTEMS Tools can be used to obtain the thread-local storage size and
   * alignment of an application executable.
   *
   * The application may configure the maximum thread-local storage size for all
   * threads explicitly through the #CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE
   * configuration option.
   */
  size_t maximum_thread_local_storage_size;

  /**
   * @brief This member defines the optional handler to free the task storage
   *   area.
   *
   * It is called on exactly two mutually exclusive occasions.  Firstly, when the
   * task construction aborts due to a failed task create extension, or secondly,
   * when the task is deleted.  It is called from task context under protection
   * of the object allocator lock.  It is allowed to call free() in this handler.
   * If handler is NULL, then no action will be performed.
   */
  void ( *storage_free )( void * );

  /**
   * @brief This member defines the initial modes of the task.
   */
  rtems_mode initial_modes;

  /**
   * @brief This member defines the attributes of the task.
   */
  rtems_attribute attributes;
} rtems_task_config;

/**
 * @brief Constructs a task from the specified the task configuration.
 *
 * In contrast to tasks created by rtems_task_create(), the tasks constructed
 * by this directive use a user-provided task storage area.  The task storage
 * area contains the task stack, the thread-local storage, and the
 * floating-point context on architectures with a separate floating-point
 * context.
 *
 * This directive is intended for applications which do not want to use the
 * RTEMS Workspace and instead statically allocate all operating system
 * resources.  It is not recommended to use rtems_task_create() and
 * rtems_task_construct() together in an application.  It is also not
 * recommended to use rtems_task_construct() for drivers or general purpose
 * libraries.  The reason for these recommendations is that the task
 * configuration needs settings which can be only given with a through
 * knowledge of the application resources.
 *
 * An application based solely on static allocation can avoid any runtime
 * memory allocators.  This can simplfiy the application architecture as well
 * as any analysis that may be required.
 *
 * The stack space estimate done by <rtems/confdefs.h> assumes that all tasks
 * are created by rtems_task_create().  The estimate can be adjusted to take
 * user-provided task storage areas into account through the
 * #CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE application
 * configuration option.
 *
 * The #CONFIGURE_MAXIMUM_TASKS should include tasks constructed by
 * rtems_task_construct().
 *
 * @param config is the task configuration.
 *
 * @param[out] id is the pointer to an object identifier variable.  The
 *   identifier of the constructed task object will be stored in this variable,
 *   in case of a successful operation.
 *
 * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
 *
 * @retval ::RTEMS_INVALID_ADDRESS The id parameter was NULL.
 *
 * @retval ::RTEMS_INVALID_NAME The task name was invalid.
 *
 * @retval ::RTEMS_INVALID_PRIORITY The initial task priority was invalid.
 *
 * @retval ::RTEMS_INVALID_SIZE The thread-local storage size is greater than
 *   the maximum thread-local storage size specified in the task configuration.
 *   The thread-local storage size is determined by the thread-local variables
 *   used by the application and #CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE.
 *
 * @retval ::RTEMS_INVALID_SIZE The task storage area was too small to provide
 *   a task stack of the configured minimum size, see
 *   #CONFIGURE_MINIMUM_TASK_STACK_SIZE. The task storage area contains the
 *   task stack, the thread-local storage, and the floating-point context on
 *   architectures with a separate floating-point context.
 *
 * @retval ::RTEMS_TOO_MANY There was no inactive task object available to
 *   construct a task.
 *
 * @retval ::RTEMS_TOO_MANY In multiprocessing configurations, there was no
 *   inactive global object available to construct a global task.
 *
 * @retval ::RTEMS_UNSATISFIED One of the task create extensions failed during
 *   the task construction.
 *
 * @retval ::RTEMS_UNSATISFIED In SMP configurations, the non-preemption mode
 *   was not supported.
 *
 * @retval ::RTEMS_UNSATISFIED In SMP configurations, the interrupt level mode
 *   was not supported.
 */
rtems_status_code rtems_task_construct(
  const rtems_task_config *config,
  rtems_id                *id
);
#3962 4 years ago fixed doc Joel Sherrill Gedare Bloom 4 years ago
Summary

Licensing Requirements for Submissions Poorly Documented

Description

The discussion of licensing for code/docs in RTEMS is a bit of a mess right now. After posting this issue to the mailing list (https://lists.rtems.org/pipermail/devel/2020-April/059489.html), Sebastian pointed out where the actual recommended text for code/docs was located.

SW Engineering Guide sections 6.3.1.2 (Licenses) and 11 (Licensing Requirements) are somewhat overlapping and duplicative. In addition, Gedare's old blog http://gedare-csphd.blogspot.com/2013/05/software-licenses-with-rtems.html is still a decent discussion of the underlying issues and goals even though we have moved to BSD-2 and Creative Commons for documentation since he wrote that in 2013.

The above references just describe the rationale and cite the licenses. For an example of what to put in the code, you have to visit https://docs.rtems.org/branches/master/eng/coding-file-hdr.html#copyright-and-license-block

I THINK a good solution would be to reference the Chapter 11 Licensing Requirements from the Coding Conventions chapter. And incorporate an updated version of Gedare's blog text.

#3977 4 years ago invalid test Joel Sherrill joel@… 17 months ago
Summary

Add unexplained-failure as option for Test Configuration Files

Description

RTEMS has many BSPs and it is a large amount of work to investigate each test execution that has an unexpected result. The tcfg files were initially created to just avoid trying build tests where the executable did not fit into target memory. That has grown to incorporate knowledge about which tests require human input and are not automated. This ticket is to add a new test state for "unexplained failure".

If a test has been investigated and has an explanation, it is a known failure. This could be associated with a ticket (e.g. dynamic loading or fenv not supported on an architecture) or just a comment explaining it (e.g. mips jmr3904 simulator trapping invalid memory accesses before the trap handler is tripped).

But many tests are currently just marked as failures because they do fail but no one has investigated and explained it. The addition of "unexplained failure" is to capture those. This will make it possible for someone looking to know they need investigating but are known to fail. Marking these are "known failure" permanently puts them in a category where they will not get looked at again.

This has two side-effects. The first is that we can have test results with no "unexpected failures." They are either known and explained or known and need investigation. This helps anyone looking at test results since there should be no unexpected failures. The second side-effect is that it hopefully captures the set of repeatedly failing tests and encourages us to investigate and file tickets or explain.

The milestone for this is NOT 5.x because this is moving the goalpost for test results. Release 5.x is the first with the body of test results data we have. The build@ mailing list has them and can be compared by any user interested. We also do not have a way to machine check results yet which would ease checking the test results for deviations.

Note: As an odd case, there are multiple BSPs where the executables can run on hardware or 1+ simulators. Sometimes the results vary across the target environment even for the same executable. This is at least something to consider as we want to have a trustworthy and checkable set of test results available.

#3978 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Move _RTEMS_version to implementation header file

Description

The global variable _RTEMS_version was declared via <rtems.h> and may be used directly by application code. Applications should use rtems_get_version_string() instead. Move it to an implementation header file in RTEMS 6.

#3979 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove RTEMS_MAXIMUM_NAME_LENGTH

Description

Remove this deprecated define.

#3980 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated <rtems/system.h>

Description

This header file is included by <rtems.h> and contains only deprecated or internal content. Remove this deprecated header file.

#3981 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove _Copyright_Notice from API header file

Description

Remove _Copyright_Notice from API header file. Applications should use rtems_get_copyright_notice() which is available since RTEMS 5.

#3982 4 years ago fixed test Sebastian Huber Sebastian Huber 3 years ago
Summary

Test failures on BSPs with sbrk() support

Description

There are some test failures on BSPs with sbrk() support such as psim, for example psxpipe01:

#0  rtems_heap_extend_via_sbrk (heap=0x30468 <_Malloc_Heap>, alloc_size=5) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c:41
#1  0x00005b48 in rtems_heap_allocate_aligned_with_boundary (size=size@entry=5, alignment=alignment@entry=0, boundary=boundary@entry=0) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/malloc_deferred.c:116
#2  0x00005930 in malloc (size=size@entry=5) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/malloc.c:39
#3  0x0001b720 in _malloc_r (ignored=ignored@entry=0x2fa68 <_RTEMS_tasks_Objects+736>, size=size@entry=5) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/_malloc_r.c:26
#4  0x00015ff4 in _strdup_r (reent_ptr=0x2fa68 <_RTEMS_tasks_Objects+736>, str=str@entry=0x1ce94 "/tmp") at ../../../../../../gcc-7.5.0/newlib/libc/string/strdup_r.c:10
#5  0x00015fbc in strdup (str=str@entry=0x1ce94 "/tmp") at ../../../../../../gcc-7.5.0/newlib/libc/string/strdup.c:10
#6  0x00011470 in rtems_mkdir (path=path@entry=0x1ce94 "/tmp", mode=mode@entry=511) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libcsupport/src/rtems_mkdir.c:133
#7  0x0000a7c8 in pipe (filsdes=filsdes@entry=0x36ce8) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/libfs/src/pipe/pipe.c:42
#8  0x000004a0 in Init (ignored=<optimized out>) at /home/EB/sebastian_h/src/rtems/c/src/../../testsuites/psxtests/psxpipe01/init.c:65
#9  0x0000c828 in _Thread_Handler () at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/score/src/threadhandler.c:139
#10 0x0000c77c in _Thread_Get (id=<optimized out>, lock_context=<optimized out>) at /home/EB/sebastian_h/src/rtems/c/src/../../cpukit/score/src/threadget.c:43

The problem is that an rtems_heap_greedy_allocate() is ineffective due to the automatic heap extension.

#3988 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated rtems_extension

Description
#3989 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated rtems_get_current_processor()

#3990 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated rtems_get_processor_count()

#3991 4 years ago fixed score Sebastian Huber Sebastian Huber 3 years ago
Summary

Remove deprecated Thread typedef

#3993 4 years ago fixed rtems Sebastian Huber Sebastian Huber 19 months ago
Summary

Specify the RTEMS Classic API

Description

For the RTEMS Qualification project we need a specification of the RTEMS Classic API. This specification can be used to generate an Interface Control Document (ICD), header files with Doxygen markup and content for the RTEMS Classic API Guide. The RTEMS Classic API is mainly defined in the following header files:

  • <rtems.h>
  • <rtems/config.h>
  • <rtems/extension.h>
  • <rtems/fatal.h>
  • <rtems/init.h>
  • <rtems/io.h>
  • <rtems/rtems/barrier.h>
  • <rtems/rtems/cache.h>
  • <rtems/rtems/clock.h>
  • <rtems/rtems/config.h>
  • <rtems/rtems/dpmem.h>
  • <rtems/rtems/event.h>
  • <rtems/rtems/intr.h>
  • <rtems/rtems/message.h>
  • <rtems/rtems/modes.h>
  • <rtems/rtems/mp.h>
  • <rtems/rtems/object.h>
  • <rtems/rtems/options.h>
  • <rtems/rtems/part.h>
  • <rtems/rtems/ratemon.h>
  • <rtems/rtems/region.h>
  • <rtems/rtems/sem.h>
  • <rtems/rtems/signal.h>
  • <rtems/rtems/status.h>
  • <rtems/rtems/support.h>
  • <rtems/rtems/tasks.h>
  • <rtems/rtems/timer.h>
  • <rtems/rtems/types.h>
  • <rtems/score/stack.h>

Examples for interface specification items are available here:

https://git.rtems.org/sebh/rtems-qual.git/tree/spec/if/rtems/status

You find an example for a generated header file here:

https://git.rtems.org/sebh/rtems.git/tree/cpukit/include/rtems/rtems/status.h?h=qual

The header files are generated by this script:

https://git.rtems.org/sebh/rtems-qual.git/tree/spec2rtems.py

As preliminary work, remove all RTEMS APIs deprecated in RTEMS 5.1.

Use and improve the Interface Specification How-To during the work on this ticket.

Carry out the following tasks for each header file:

  1. Add a interface specification item for each variable, typedef, enum, enumerator, define, macro, function, struct, and union.
  1. For each item analyse the change history using git log -p --follow to determine the copyright holders of the Doxygen markup. Use only Doxygen markup for the specification items from contributors which agreed on a dual-licensing (CC-BY-SA-4.0 OR BSD-2-Clause) in #3899. Use this information to provide copyright statements for the items. The API parts alone (e.g. function names, parameter names, type names, etc.) are not considered to be copyrightable information.
  1. Use the RTEMS documentation sources to document the API. Use only content from contributors which agreed on a dual-licensing (CC-BY-SA-4.0 OR BSD-2-Clause) in #3899.
  1. Add unspecified interface items for interfaces to the implementation, C language, compiler, user provided defines, build system provided defines, etc.
  1. Run the RTEMS test suite with all tests enabled and check for regressions (in particular new warnings).
  1. Create a commit for each header file and send it to the RTEMS mailing list for review.
#3994 4 years ago fixed doc Sebastian Huber Sebastian Huber 3 years ago
Summary

Generate Doxygen markup for the application configuration options

Description

The application configuration options are now available as specification items. From these items, the documentation in the RTEMS Classic API Guide is generated. The same approach can be used to generate Doxygen markup.

#3996 4 years ago fixed arch/powerpc Sebastian Huber Joel Sherrill 17 months ago
Summary

fenv support is missing on powerpc

Description

The test program psxfenv01 fails on powerpc.

#3997 4 years ago fixed arch/sparc Sebastian Huber Joel Sherrill 17 months ago
Summary

fenv support is missing on sparc

Description

The test program psxfenv01 fails on sparc.

#3998 4 years ago fixed arch/arm Sebastian Huber Joel Sherrill 17 months ago
Summary

fenv support is missing on arm

Description

The test program psxfenv01 fails on arm.

#4007 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Add rtems_message_queue_construct()

Description

In RTEMS 5 a lot of development was done to allow a static allocation of resources provided by RTEMS and avoid the use of a heap. Similar to #3959 a new directive to build Classic API message queues without using the workspace is proposed:

/**
 * @brief The message queue configuration to construct a message queue.
 */
typedef struct {
  /**
   * @brief The name of the message queue.
   */
  rtems_name name;

  /**
   * @brief The count of the provided buffers.
   *
   * This value defines the maximum number of pending messages.
   */
  size_t buffer_count;

  /**
   * @brief The size of the provided buffers in bytes.
   */
  size_t buffer_size;

  /**
   * @brief The array of count message buffers.
   *
   * Each buffer shall have the size of the buffer_size member.  The maximum
   * message size is buffer_size minus sizeof( rtems_message_queue_buffer ).
   */
  rtems_message_queue_buffer *buffers;

  /**
   * @brief The attribute set of the message queue.
   */
  rtems_attribute attributes;
} rtems_message_queue_config;

/**
 * @brief Constructs a message queue according to the specified configuration.
 *
 * @param config The message queue configuration.
 * @param[out] id The message queue identifier of the new message queue.
 *
 * @retval RTEMS_SUCCESSFUL Successful operation.
 * @retval RTEMS_INVALID_ADDRESS The id parameter is @c NULL.
 * @retval RTEMS_INVALID_NAME The message queue name is invalid.
 * @retval RTEMS_TOO_MANY No message queue is available.
 */
rtems_status_code rtems_message_queue_construct(
  const rtems_message_queue_config *config,
  rtems_id                         *id
);
#4018 4 years ago fixed admin Kinsey Moore Kinsey Moore <kinsey.moore@…> 4 years ago
Summary

libcpusupport: Architecture defines are present outside CPU port

Description

The handler code for global constructors (threadhandler.c) and destructors (newlibc_exit.c) uses compiler-provided architecture defines which should be limited to the CPU port as they are in other locations.

#4020 4 years ago fixed build Sebastian Huber Sebastian Huber 2 years ago
Summary

Change all version numbers to RTEMS 6 on the master branches

#4025 4 years ago fixed network/libbsd Sebastian Huber Sebastian Huber 2 years ago
Summary

NFS Client is broken on 64-bit targets

Description

Cloned from #4024.

#4029 4 years ago fixed arch/i386 Jan Sommer Jan Sommer <jan.sommer@…> 4 years ago
Summary

i386: SMP-System hangs with non-consecutive APIC IDs

Description

If a processor enumerates its cores non-consecutively (e.g. 0,2,4,8 for a tested Intel Atom) the target cpu for IPIs is mapped wrongly.

#4031 4 years ago fixed arch/i386 Jan Sommer Jan Sommer <jan.sommer@…> 4 years ago
Summary

i386: ISR can overwrite its own stack during system initialization (cloned)

Description

Cloned from #4030:


During testing the rtems-libbsd examples, we experienced GP exceptions from within the ISR from time to time during initalization.

When the init task is restored for the first time and the a pending interrupt is available, an ISR could overwrite its own return address if it is spawned between restoring the eflags register and restoring the esp register.

#4032 4 years ago fixed lib Sebastian Huber Sebastian Huber 3 years ago
Summary

Make deferred free in malloc() support optional

Description

The free() implementation in RTEMS supports that allocated memory is freed in interrupt context. Since the heap is protected by a mutex, the frees issued in interrupt context cannot immediately be freed to the heap, instead they are placed on a deferred free list. This list is emptied by the core allocation function rtems_heap_allocate_aligned_with_boundary(). This adds a dependency to free() in rtems_heap_allocate_aligned_with_boundary(). In order to better support applications which only allocate memory an never free it, this dependency should be avoided. This can be done with a weak default implementation of _Malloc_Process_deferred_frees(). In the free() module a strong implementation can be provided.

#4034 4 years ago fixed lib Sebastian Huber Sebastian Huber 4 years ago
Summary

Add rtems_interrupt_server_create() and rtems_interrupt_server_destroy() (cloned)

Description

Cloned from #4033. In addition to the implementation add also unit tests.

#4036 4 years ago fixed tool/rsb Chris Johns Chris Johns 4 years ago
Summary

Track dependency command for the RSB

Description

Add a command to track dependencies in the RSB. Scan all the bset files and see what they include. Build a list of dependencies and also a list of those configs that are not referenced. The configs not references can be removed.

Errors in build sets can result in an invalid list so the scan needs to be clean. This is difficult when some build sets like rtems-defaults.bset are designed to be included and not used from the command line. As a result it generates an error. A list of these could be maintained or a tag added to the bset file to indicate it is not a top level build set file.

Removal of unreferenced configs can occur in the RBS because we use a branch model for releases.

#4037 4 years ago fixed tool Chris Johns Chris Johns 17 months ago
Summary

Python script distribution standardisation

Description

The RSB and Tools wrap python scripts in a shell script based wrapper that detects the installed version and uses it. Other python scripts in RTEMS do not. I would like to have a consistent model for all scripts.

PEP0394 discusses the issues and says a distro can decide not to provide a python command by default. It also says a virtualenv can be used to provide a consistent default environment.

Do we assume #! /usr/bin/env python will always work in our script and we make sure we are python2 and python3 clean for user installed commands?

If a user does not have a python command installed by default do we document how to install one or do we document using a virtualenv?

A simple shebang is cleaner for us to maintain however it added an extra dependency we need to document.

Note, development script and tools should follow the same model we decide on however they only need to support python3.

#4039 4 years ago fixed arch/arm Sebastian Huber Sebastian Huber 4 years ago
Summary

arm/atsam/SC16IS752: Make interrupt server configurable (cloned)

Description

Cloned from #4038.

#4040 4 years ago fixed test Joel Sherrill joel@… 4 years ago
Summary

coverhd.h remnants left to remove

Description

coverhd.h has been removed but there are as least two remnants to address:

  • tmoverhd is not needed and still is present.
  • (done) m68k/mcf52235/README references coverhd.h
$ grep -r coverhd ..
../rtems/bsps/m68k/mcf52235/README:*) Update the coverhd.h (calling overheads) page 21 of the BSP guide
../rtems/bsps/m68k/mcf5225x/README:*) Update the coverhd.h (calling overheads) page 21 of the BSP guide
#4043 4 years ago fixed doc Chris Johns Sebastian Huber 4 years ago
Summary

Update software eng manual to rtems-central

Description

https://docs.rtems.org/branches/master/eng/req/howto.html

Update to rtems-central

#4044 4 years ago duplicate tool/rsb Chris Johns Chris Johns 4 years ago
Summary

Add RSB Track command

Description

Add a comment to track the RSB build set and configuration files.

#4045 4 years ago fixed tool/rsb Chris Johns Chris Johns 4 years ago
Summary

Remove RSB sb-builder command

Description

This command is now always wrapped bu the set builder. There is no need to use the command line with configuration files.

#4046 4 years ago fixed tool/rsb Chris Johns Chris Johns 4 years ago
Summary

Remove RSB sb-bootstrap command

Description

Bootstrapping is going away with the new build system and until then the command in rtems.git should be used.

#4048 4 years ago wontfix tool/rsb Chris Johns Chris Johns 17 months ago
Summary

Move RTEMS 5 BSP and package build sets and configs to RTEMS 6

Description

Move the BSP build sets with the related packages to RTEMS 6. Update the kernel and libbsd to point to RTEMS 6 commits.

Drop the tier build sets as these are not being used. They can be brought back if we need them.

#4052 4 years ago wontfix network/libbsd Jan Sommer 17 months ago
Summary

[libbsd] e1000 driver not working for i386 based BSP in current rtems-libbsd master

Description

Current rtems-libbsd master branch fails to compile the e1000 driver for i386 based BSPs.

The corresponding patches from the 5-freebsd-12 branch need to be ported to master.

#4054 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

RTEMS_BARRIER_AUTOMATIC_RELEASE and RTEMS_BINARY_SEMAPHORE options have the same value

Description

The RTEMS_BARRIER_AUTOMATIC_RELEASE and RTEMS_BINARY_SEMAPHORE options have the same value. In order to better detect a misuse of option values (for example using RTEMS_BINARY_SEMAPHORE for rtems_barrier_create()), the options should have unique values.

#4055 4 years ago fixed bsps Jan Sommer Jan Sommer <jan.sommer@…> 4 years ago
Summary

bsps/xilinx-zynq: Flush TX-Buffer before initializing the zynq-uart

Description

We experienced that u-boot (at least from Xilinx repositories) does not wait until all its output has left the TX Buffer of the stdout uart, before handing over to the RTEMS application

This causes some garbage output at the begin of the RTEMS application in some cases and corrupts the test begin marker prohibiting rtems-test to recognize the test correctly.

Proposed fix is to let RTEMS wait until the TX Buffer of the uart is empty before configuring and using it.

#4061 4 years ago fixed config Sebastian Huber Sebastian Huber 4 years ago
Summary

The reworked <rtems/confdefs.h> has a cyclic dependency with RTEMS_MULTIPROCESSING enabled (cloned)

Description

Cloned from #4060:


The changes for #3875 introduced a cyclic dependency between <rtems/confdefs/mpci.h> and <rtems/confdefs/threads.h>.

#4063 4 years ago fixed test Chris Johns Chris Johns 4 years ago
Summary

Change to a simpler TFTP server for rtems-test

Description

Add a simpler TFTP server that can have multiple instances on different ports running at once. Allowing more than one TFTP server to run at once is the first step to letting rtems-test run parallel hardware test jobs if the user has more one piece of hardware available for testing. Parallel hardware testing will speed up the time it takes to run the tests on target hardware.

This feature combined with the rtems-tftp-proxy lets a standard bootloader configuration be integrated into a parallel hardware test set up.

#4065 4 years ago fixed tool Heinz Junkes Joel Sherrill <joel@…> 17 months ago
Summary

Typo in rtems-boot.ini "ubootdior" should be "ubootdir"

Description

Typo in rtems-tools misc/tools/config/rtems-boot.ini

diff rtems-boot.ini ./tools/misc/tools/config/rtems-boot.ini 55c55 < first_stage = %{ubootdir}/spl/boot.bin ---

first_stage = %{ubootdior}/spl/boot.bin

#4066 4 years ago fixed test Chris Johns Chris Johns 4 years ago
Summary

test running for too long

Description

The spcache01 test on my PC test hardware is not finishing. It is looping generating output. Add a Test too long error count and end the test after 5 minutes.

#4067 4 years ago fixed network/libbsd Chris Johns Chris Johns 4 years ago
Summary

Libbsd build system does not separate kernel and user land include paths

Description

FreeBSD has duplicates kernel and user land header files. LibBSD build system currently supports only one set of header include and the kernel and user land include paths.

#4069 4 years ago fixed tool Chris Johns Hesham Almatary <Hesham.Almatary@…> 17 months ago
Summary

dl06 does not link on RISCV

Description
rtems-ld -r /home/jiri/src/rtems/riscvmp/riscv-rtems6/c/griscv \
  -C riscv-rtems6-gcc -c "-march=rv32imafd -mabi=ilp32d" \
  -O rap -b dl06.pre -e rtems_main -s \
  -o dl06.rap dl06-o1.o dl06-o2.o -lm
error: rap::object: Section index '0' not found: dl06-o1.o
Makefile:8528: recipe for target 'dl06.rap' failed
make[5]: *** [dl06.rap] Error 10
#4070 4 years ago fixed arch/riscv Joel Sherrill 2 years ago
Summary

RISC-V Multiple Definition Error (many BSPs)

Description

This error appears to occur on all RISC-V BSPs which do not fail at the dynamic loading rap section 0 error. I assume that eventually they may all hit this. List of BSPs failing below message.

/home/joel/rtems-cron-6/tools/6/lib/gcc/riscv-rtems6/10.2.1/../../../../riscv-rtems6/bin/ld: ./../../lib/libbsp/riscv/riscv/librtemsbsp.a(htif.o):/home/joel/rtems-cron-6/rtems/bsps/riscv/riscv/include/dev/serial/htif.h:48: multiple definition of `htif_console_handler'; ./../../lib/libbsp/riscv/riscv/librtemsbsp.a(console-config.o):/home/joel/rtems-cron-6/rtems/bsps/riscv/riscv/include/dev/serial/htif.h:48: first defined here /home/joel/rtems-cron-6/tools/6/lib/gcc/riscv-rtems6/10.2.1/../../../../riscv-rtems6/bin/ld: ./../../lib/libbsp/riscv/riscv/librtemsbsp.a(htif.o):/home/joel/rtems-cron-6/rtems/bsps/riscv/riscv/include/dev/serial/htif.h:48: multiple definition of `htif_console_handler'; ./../../lib/libbsp/riscv/riscv/librtemsbsp.a(console-config.o):/home/joel/rtems-cron-6/rtems/bsps/riscv/riscv/include/dev/serial/htif.h:48: first defined here mv -f cdtest/.deps/cdtest-init.Tpo cdtest/.deps/cdtest-init.Po

rv32iac_spike rv32imac_spike rv32imafc_spike rv32imafdc_spike rv32imafd_spike rv32im_spike rv32i_spike rv64imac_medany_spike rv64imac_spike rv64imafdc_medany_spike rv64imafdc_spike rv64imafd_medany_spike rv64imafd_spike

#4074 4 years ago fixed config Sebastian Huber Sebastian Huber 3 years ago
Summary

Add CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE

Description

This configuration option can be used to reserve space for the dynamic linking of modules with thread-local storage objects. See also:

https://lists.rtems.org/pipermail/devel/2020-September/061867.html

#4076 4 years ago fixed arch/i386 Gedare Bloom Gedare Bloom 4 years ago
Summary

i386: bad asm in smp mode

Description

A note for me (or someone) to make the fix outlined on the mailing list.

cpukit/score/cpu/i386/include/rtems/asm.h:157   movb imps_apic_cpu_map(\REG),\REG        /* CPU ID in REG */

The assembler is right to complain. movb has to target one of the 1-byte mnemonics, so this should be %al for the LSB of %eax. One needs to check through this logic carefully, but I think the right thing to do here is: movzbl     imps_apic_cpu_map(\REG),\REG

That should do the trick. Can you test it locally?

Sure! Builds fine and testsuite testing reveals:

#4077 4 years ago fixed network/libbsd Chris Johns Chris Johns 4 years ago
Summary

Implement LibBSD module dependencies in the build system

Description

The build system has a partially implemented module dependency system. Complete the implementation. Control tests being built. If a test depends on a module and the module is disabled do not build the test.

Add dependency checking to the freebsd-to-rtems.py command. If the module definition is not consistent generate an error.

#4078 4 years ago fixed arch/powerpc Sebastian Huber Sebastian Huber 20 months ago
Summary

GCC C++ compiler for powerpc defines _GNU_SOURCE as a built-in

Description

For example:

powerpc-rtems6-g++ -E -P -v -dD empty.cc 2>&1 | grep GNU_SOURCE

Yields:

 /opt/rtems/6/libexec/gcc/powerpc-rtems6/10.2.1/cc1plus -E -quiet -v -P -D_GNU_SOURCE -Dmpc750 empty.cc -dD
#define _GNU_SOURCE 1

This is a GCC configuration bug. The reason is that the RTEMS GCC configuration includes gnu-user.h.

#4079 4 years ago fixed build Sebastian Huber Sebastian Huber <sebastian.huber@…> 4 years ago
Summary

build: i386/pc686/appstart.o is created more than once

Description

In this build specification item

https://git.rtems.org/rtems/tree/spec/build/bsps/i386/pc386/objsmpstart.yml

is an error:

* Node /home/EB/sebastian_h/git-rtems-6/build/i386/pc686/appstart.o is created more than once. The task generators are:
  1. bld(target=['appstart.o'], idx=14, tg_idx_count=14, meths=['check_err_features', 'check_err_order', 'process_rule', 'process_source'], rule='${OBJCOPY} -I binary -O elf32-i386 -B i386 ${SRC} ${TGT}', _name='appstart.o', source=[], path=/home/EB/sebastian_h/git-rtems-6, posted=True, features=[]) in /home/EB/sebastian_h/git-rtems-6
  2. bld(target='/bsps/i386/pc386/objsmpstart', idx=15, tmp_use_objects=False, tg_idx_count=15, meths=['check_err_features', 'check_err_order', 'process_rule', 'process_source'], tmp_use_stlib=True, _name='/bsps/i386/pc386/objsmpstart', source=[/home/EB/sebastian_h/git-rtems-6/build/i386/pc686/appstart.o], tmp_use_var='', path=/home/EB/sebastian_h/git-rtems-6, posted=True, typ='objects', features=[]) in /home/EB/sebastian_h/git-rtems-6
If you think that this is an error, set no_errcheck_out on the task instance

All what we have to do is to add a specially produced appstart.o to librtemsbsp.a.

#4080 4 years ago fixed build Sebastian Huber Sebastian Huber 3 years ago
Summary

build: Add start.o dependency to the executable link step

Description

RTEMS is a real-time operating system and the applications using RTEMS end up in a single executable which contains also the full system initialization. The linker uses a start file to determine what should be linked into the executable. The start file is also built by the build system, however, it is only indirectly referenced via a linker script, for example:

https://git.rtems.org/rtems/tree/bsps/arm/shared/start/linkcmds.base#n28

So, every executable depends on the start file (start.o usually). If start.o changes, then the executable needs to be re-linked. Also the start file needs the name expected by the linker script, for example not start.S.17.o.

The start files are build with this commands:

https://git.rtems.org/rtems/tree/wscript#n535

https://git.rtems.org/rtems/tree/wscript#n244

Somehow we have to add a dependency on start.o to every executable.

To experiment with the build system use the following commands to set it up:

cd $HOME
mkdir rtems-sdk
mkdir rtems-sdk/src
cd rtems-sdk/src
git clone git://git.rtems.org/rtems.git
git clone git://git.rtems.org/rtems-source-builder.git rsb
cd rsb/rtems
../source-builder/sb-set-builder --prefix=$HOME/rtems-sdk/6 6/rtems-sparc
cd ../../rtems
echo "[sparc/leon3]" > config.ini
./waf configure --prefix=$HOME/rtems-sdk/6
./waf

The host must be capable to build GCC and needs the Python development support (header files) installed.

#4081 4 years ago fixed build Sebastian Huber Sebastian Huber 2 years ago
Summary

Remove Autoconf/Automake? based build system

Description

Remove Autoconf/Automake? based build system after a testing phase of the waf based build system. The planned date to remove the old build system is 1st November 2020.

For a status of the new build system see:

https://devel.rtems.org/wiki/Release/6/Waf%20BSP%20Checklist

#4084 4 years ago fixed tool/gcc Joel Sherrill 4 years ago
Summary

throwing std::runtime on PC BSP fails

Description

Copied from #2830 for new release milestone. The solution is to update gcc/config/i386/t-rtems. Whether for gcc 10 or gcc master is the difference on this CR versus #2830 which had to be to gcc 7 as a patch via the RSB.

Throwing a std::runtime() exception locks up.

The lock up is in the exception clean up handler where the exception object is destructed. The destructor loops distructing the std::string object. The path ends up in libstdc++-v3/include/ext/atomicity.h line 48 or exchange_and_add.

At a guess it would seem like the C++ atomics on i386 is broken or fragile.

UPDATE: This was broken when gcc i386 eliminated -mcpu in favor of -march/-mtune. The multilibs were built with -mtune and not -march.

#4093 4 years ago fixed bsps Joel Sherrill Jan Sommer <jan.sommer@…> 4 years ago
Summary

bsps/pc386: Add missing license header

Description

bspsmp.c is missing a licence header.

#4097 4 years ago fixed shell Frank Kuehndel Sebastian Huber 4 years ago
Summary

shell: CRTL-U sets the cursor to the wrong position (cloned)

Description

Cloned from #4096:


This patch fixes a tiny bug in the command line editing of the RTEMS shell. Typing CTRL-U in the shell should remove all characters left of the cursor. After pressing CTRL-U, the current implementation does wrongly place the cursor at the end of the line instead at its beginning. To reproduce the bug, start the shell and type 'abc123' (no <RETURN>):

~/src/rtems $ qemu-system-arm -net none -nographic -M realview-pbx-a9 -m 256M -kernel build/arm/realview_pbx_a9_qemu/testsuites/libtests/dl10.exe
*** BEGIN OF TEST libdl (RTL) 10 ***                                            
*** TEST VERSION: 6.0.0.d9bdf166644f612dd628fe4951c12c6f8e94ba5f                   
*** TEST STATE: USER_INPUT                                                         
*** TEST BUILD: RTEMS_DEBUG RTEMS_NETWORKING RTEMS_POSIX_API RTEMS_SMP             
*** TEST TOOLS: 10.2.1 20200904 \                                                  
(RTEMS 6, RSB 31f936a7b74d60bda609a9960c6e1a705ba54974, Newlib a0d7982)            
RTL (libdl) commands: dl, rtl                                                      
                                                                                   
                                                                                   
RTEMS Shell on /dev/foobar. Use 'help' to list commands.                           
SHLL [/] # abc123                                                                  

Then move the cursor onto the '1' by hitting three times the <ARROW-LEFT> key. Next type <CTRL>-U:

SHLL [/] # 123                                                                     

Note that the cursor is at the end of the line (after '3') instead of correctly at the beginning (on the '1'), now. Continuing typing 'echo ' incorrectly results in the output:

SHLL [/] # 123echo 123                                                             

The patch changes this behavior so that the cursor in the second last step will be on the '1' and typing 'echo ' will then correctly reflected as:

SHLL [/] # echo 123                                                                
#4098 4 years ago fixed tool/rsb Joel Sherrill 2 years ago
Summary

All BSP bsets fail to build on master

Description

On the master building for RTEMS 6, all of the BSP bsets fail like this:

RTEMS Source Builder - Set Builder, 6 (ed5030bc24db)
Build Set: 6/bsps/xilinx_zynq_zedboard
error: no build set file found: 6/bsps/xilinx_zynq_zedboard.bset
Mailing report: build@rtems.org
Traceback (most recent call last):
  File "../source-builder/sb-set-builder", line 25, in <module>
    sb.setbuilder.run()
  File "/home/joel/rtems-cron-6/rtems-source-builder/source-builder/sb/setbuilder.py", line 735, in run
    b.build(deps, mail = mail)
  File "/home/joel/rtems-cron-6/rtems-source-builder/source-builder/sb/setbuilder.py", line 633, in build
    if sizes_valid:
UnboundLocalError: local variable 'sizes_valid' referenced before assignment
#4100 4 years ago fixed arch/arm Joel Sherrill 4 years ago
Summary

arm/edb7312 Build Failure When SMP is Enabled

Description

This is from the edb7312 but may apply to others. Build is still underway and this is a common file.

''''gmake[4]: Entering directory `/home/joel/rtems-cron-6/b-edb7312/arm-rtems6/c/edb7312/cpukit'
depbase=`echo score/src/percpu.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
arm-rtems6-gcc --pipe -DHAVE_CONFIG_H   -I. -I/home/joel/rtems-cron-6/b-edb7312/arm-rtems6/c/edb7312/include -I/home/joel/rtems-cron-6/rtems/cpukit/include -I/home/joel/rtems-cron-6/rtems/cpukit/score/cpu/arm/include   -mcpu=arm7tdmi -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT score/src/percpu.o -MD -MP -MF $depbase.Tpo -c -o score/src/percpu.o ../../../../../rtems/c/src/../../cpukit/score/src/percpu.c &&\
mv -f $depbase.Tpo $depbase.Po
{standard input}: Assembler messages:
{standard input}:157: Error: selected processor does not support `sev' in ARM mode
{standard input}:347: Error: selected processor does not support `wfe' in ARM mode
{standard input}:525: Error: selected processor does not support `wfe' in ARM mode
gmake[4]: *** [score/src/percpu.o] Error 1
#4101 4 years ago fixed arch/arm Joel Sherrill 4 years ago
Summary

atsamv fails to build on master

Description

This may also fail on 5.

$ ../rtems/configure --target=arm-rtems6 --enable-rtemsbsp=atsamv --prefix=/home/joel/rtems-cron-6/tools/6/bsp-install --disable-networking --enable-posix --enable-smp --disable-multiprocessing --disable-rtems-debug --disable-profiling --enable-tests --enable-cxx --enable-maintainer-mode

rm-rtems6-gcc --pipe -DHAVE_CONFIG_H   -I. -I/home/joel/rtems-cron-6/b-atsamv/arm-rtems6/c/atsamv/include -I/home/joel/rtems-cron-6/rtems/cpukit/include -I/home/joel/rtems-cron-6/rtems/cpukit/score/cpu/arm/include   -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT libcsupport/src/error.o -MD -MP -MF $depbase.Tpo -c -o libcsupport/src/error.o ../../../../../rtems/c/src/../../cpukit/libcsupport/src/error.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from /home/joel/rtems-cron-6/rtems/cpukit/include/rtems/score/threaddispatch.h:21,
                 from /home/joel/rtems-cron-6/rtems/cpukit/include/rtems/score/objectimpl.h:29,
                 from /home/joel/rtems-cron-6/rtems/cpukit/include/rtems/score/threadimpl.h:31,
                 from ../../../../../rtems/c/src/../../cpukit/libcsupport/src/error.c:16:
/home/joel/rtems-cron-6/rtems/cpukit/include/rtems/score/percpu.h:439:3: error: unknown type name 'CPU_Interrupt_frame'
  439 |   CPU_Interrupt_frame Interrupt_frame;
      |   ^~~~~~~~~~~~~~~~~~~

#4103 4 years ago fixed admin Joel Sherrill 4 years ago
Summary

BeagleBoard? BSPs Fail to Build

Description

This may also fail on 5.

../rtems/configure --target=arm-rtems6 --enable-rtemsbsp=beagleboardorig --prefix=/home/joel/rtems-cron-6/tools/6/bsp-install --disable-networking --enable-posix --enable-smp --disable-multiprocessing --disable-rtems-debug --disable-profiling --enable-tests --enable-cxx --enable-maintainer-mode

arm-rtems6-gcc  -mcpu=cortex-a8 -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -B./../../lib/libbsp/arm/beagle -B/home/joel/rtems-cron-6/rtems/bsps/arm/beagle/start -specs bsp_specs -qrtems -L./../../cpukit -L/home/joel/rtems-cron-6/rtems/bsps/arm/shared/start -Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar -Wl,--gc-sections -o base_sp.exe base_sp/base_sp-init.o base_sp/base_sp-apptask.o ./../../lib/libbsp/arm/beagle/librtemsbsp.a ./../../cpukit/librtemscpu.a ./../../cpukit/librtemstest.a 
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: ./../../cpukit/librtemscpu.a(threadrestart.o): in function `_Thread_Dispatch_request':
/home/joel/rtems-cron-6/rtems/cpukit/include/rtems/score/threaddispatch.h:245: undefined reference to `_CPU_SMP_Send_interrupt'
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: ./../../cpukit/librtemscpu.a(smp.o): in function `_SMP_Handler_initialize':
/home/joel/rtems-cron-6/b-beagleboardorig/arm-rtems6/c/beagleboardorig/cpukit/../../../../../rtems/c/src/../../cpukit/score/src/smp.c:135: undefined reference to `_CPU_SMP_Initialize'
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: ./../../cpukit/librtemscpu.a(smp.o): in function `_SMP_Start_processors':
/home/joel/rtems-cron-6/b-beagleboardorig/arm-rtems6/c/beagleboardorig/cpukit/../../../../../rtems/c/src/../../cpukit/score/src/smp.c:78: undefined reference to `_CPU_SMP_Start_processor'
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: ./../../cpukit/librtemscpu.a(smp.o): in function `_SMP_Handler_initialize':
/home/joel/rtems-cron-6/b-beagleboardorig/arm-rtems6/c/beagleboardorig/cpukit/../../../../../rtems/c/src/../../cpukit/score/src/smp.c:151: undefined reference to `_CPU_SMP_Finalize_initialization'
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: /home/joel/rtems-cron-6/b-beagleboardorig/arm-rtems6/c/beagleboardorig/cpukit/../../../../../rtems/c/src/../../cpukit/score/src/smp.c:135: undefined reference to `_CPU_SMP_Initialize'
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: ./../../cpukit/librtemscpu.a(smp.o): in function `_SMP_Send_message':
/home/joel/rtems-cron-6/b-beagleboardorig/arm-rtems6/c/beagleboardorig/cpukit/../../../../../rtems/c/src/../../cpukit/score/src/smp.c:221: undefined reference to `_CPU_SMP_Send_interrupt'
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: ./../../cpukit/librtemscpu.a(threadstartmultitasking.o): in function `_Thread_Start_multitasking':
/home/joel/rtems-cron-6/b-beagleboardorig/arm-rtems6/c/beagleboardorig/cpukit/../../../../../rtems/c/src/../../cpukit/score/src/threadstartmultitasking.c:44: undefined reference to `_CPU_SMP_Prepare_start_multitasking'
collect2: error: ld returned 1 exit status
gmake[5]: *** [base_sp.exe] Error 1
#4105 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Add RTEMS_PARTITION_ALIGNMENT

Description

The storage area for partitions is usually statically allocated. Add RTEMS_PARTITION_ALIGNMENT so that these areas can meet the minimum alignment required by rtems_partition_create().

This is related to #4013.

#4107 4 years ago fixed build Joel Sherrill Sebastian Huber 4 years ago
Summary

waf -j24 fails on powerpc/psim -- probable dependency issue

Description

While experimenting with -j options since waf defaults to fewer jobs than I have been using with make, I tripped across this failure on powerpc/psim which I assume is a missing dependency somewhere:

1561/4127] Linking build/powerpc/psim/testsuites/fstests/fsjffs2gc01.exe
[1562/4127] Linking build/powerpc/psim/testsuites/fstests/fsclose01.exe
[1563/4127] Linking build/powerpc/psim/libdebugger.a
[1564/4127] Linking build/powerpc/psim/libz.a
[1565/4127] Compiling testsuites/fstests/fslink/test.c
/home/joel/rtems-work/tools/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld: cannot find -ljffs2
collect2: error: ld returned 1 exit status

../../../testsuites/fstests/fsdosfsname01/init.c: In function 'test_creating_invalid_directories':
../../../testsuites/fstests/fsdosfsname01/init.c:430:19: warning: '%s' directive output may be truncated writing up to 6424 bytes into a region of size 257 [-Wformat-truncation=]
  430 |               "%s/%s",
      |                   ^~
../../../testsuites/fstests/fsdosfsname01/init.c:428:5: note: 'snprintf' output between 6 and 6430 bytes into a destination of size 262
  428 |     snprintf( dirname,
      |     ^~~~~~~~~~~~~~~~~~
  429 |               sizeof( dirname ),
      |               ~~~~~~~~~~~~~~~~~~
  430 |               "%s/%s",
      |               ~~~~~~~~
  431 |               MOUNT_DIR,
      |               ~~~~~~~~~~
  432 |               DIRECTORY_NAMES_INVALID[index] );
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../../../cpukit/mghttpd/mongoose.c: In function 'handle_request':
../../../cpukit/mghttpd/mongoose.c:1919:45: warning: '.gz' directive output may be truncated writing 3 bytes into a region of size between 1 and 255 [-Wformat-truncation=]
 1919 |       snprintf(gz_path, sizeof(gz_path), "%s.gz", buf);
      |                                             ^~~
../../../cpukit/mghttpd/mongoose.c:1919:7: note: 'snprintf' output between 4 and 258 bytes into a destination of size 255
 1919 |       snprintf(gz_path, sizeof(gz_path), "%s.gz", buf);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Waf: Leaving directory `/home/joel/rtems-work/rtems/build/powerpc/psim'
Build failed
 -> task in 'testsuites/fstests/fsjffs2gc01.exe' failed with exit status 1 (run with -v to display more information)

INI file was:

[powerpc/psim]
# Selects the compiler used to build the BSP (allowed values are "gcc" and
# "clang").  Please note that the values of some options depend on the compiler
# selection and changing the compiler may lead to unpredictable behaviour if
# these options are not adjusted as well.  Use the --rtems-compiler command line
# option to get the default values for a particular compiler via
# ./waf bsp_defaults.
COMPILER = gcc
# Flags passed to the library archiver
ARFLAGS = crD
# Warning flags passed to the C and C++ compiler
WARNING_FLAGS = -Wall
# Warning flags passed to the C compiler
CC_WARNING_FLAGS = -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs
# Warning flags passed to the C++ compiler
CXX_WARNING_FLAGS = 
# Enable the Ada support
__RTEMS_ADA__ = False
# Enable the RTEMS internal debug support
RTEMS_DEBUG = False
# Enable the Driver Manager startup
RTEMS_DRVMGR_STARTUP = False
# Enable the message passing based multiprocessing support (MPCI); do
# not confuse this with the SMP support
RTEMS_MULTIPROCESSING = False
# Enable the legacy TCP/IP network support
RTEMS_NETWORKING = False
# Enable the Newlib C library support
RTEMS_NEWLIB = True
# Enable the para-virtualization support
RTEMS_PARAVIRT = False
# Enable support for POSIX signals
RTEMS_POSIX_API = True
# Enable the SMP lock profiling support
RTEMS_PROFILING = False
# Enable the Symmetric Multiprocessing (SMP) support
RTEMS_SMP = False
# Build the Ada test programs (may be also enabled by BUILD_TESTS)
BUILD_ADATESTS = False
# Build the test programs
BUILD_TESTS = True
# Build the benchmark programs (may be also enabled by BUILD_TESTS)
BUILD_BENCHMARKS = False
# Build the file system test programs (may be also enabled by
# BUILD_TESTS)
BUILD_FSTESTS = False
# Build the library test programs (may be also enabled by BUILD_TESTS)
BUILD_LIBTESTS = False
# Build the MPCI test programs (may be also enabled by BUILD_TESTS)
BUILD_MPTESTS = False
# Build the POSIX test programs (may be also enabled by BUILD_TESTS)
BUILD_PSXTESTS = False
# Build the POSIX timing test programs (may be also enabled by
# BUILD_TESTS)
BUILD_PSXTMTESTS = False
# Build the Rhealstone benchmark programs (may be also enabled by
# BUILD_TESTS)
BUILD_RHEALSTONE = False
# Build the sample programs (may be also enabled by BUILD_TESTS)
BUILD_SAMPLES = True
# Build the SMP test programs (may be also enabled by BUILD_TESTS)
BUILD_SMPTESTS = False
# Build the single-processor test programs (may be also enabled by
# BUILD_TESTS)
BUILD_SPTESTS = False
# Build the timing test programs (may be also enabled by BUILD_TESTS)
BUILD_TMTESTS = False
# Build the validation test programs (may be also enabled by
# BUILD_TESTS)
BUILD_VALIDATIONTESTS = False
# Optimization flags passed to the C and C++ compiler
OPTIMIZATION_FLAGS = -O2 -g -fdata-sections -ffunction-sections
# ABI flags
ABI_FLAGS = -Dppc603e -meabi -mcpu=603e -msdata=sysv
# This sets a mode where the time runs as fast as possible when a
# clock ISR occurs while the IDLE thread is executing.  This can
# significantly reduce simulation times.
CLOCK_DRIVER_USE_FAST_IDLE = True
# If defined then the BSP may reduce the available memory size
# initially. This can be useful for debugging (reduce the core size)
# or dynamic loading (std gcc text offsets/jumps are < +/-32M).  Note
# that the policy can still be defined by the application (see sbrk.c,
# BSP_sbrk_policy). By undefining CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
# this feature is removed and a little memory is saved.
CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK = True
# If defined, then the PowerPC specific code in RTEMS will use some of
# the special purpose registers to slightly optimize interrupt
# response time.  The use of these registers can conflict with other
# tools like debuggers.
PPC_USE_SPRG = False
# This defines the base address of the exception table.  NOTE: Vectors
# are actually at 0xFFF00000 but file starts at offset.
PPC_VECTOR_FILE_BASE = 0xfff00100
# If defined to a non-zero value, prints the some information in case
# of a fatal error.
BSP_VERBOSE_FATAL_EXTENSION = 1
# Flags passed to the linker (GNU ld)
LDFLAGS = -Wl,--gc-sections
# Install the legacy application Makefile framework.
INSTALL_LEGACY_MAKEFILES = True
# If defined to a non-zero value, prints the exception context when an
# unexpected exception occurs.
BSP_PRINT_EXCEPTION_CONTEXT = 1
# If defined to a non-zero value, reset the board when the application
# exits.
BSP_RESET_BOARD_AT_EXIT = 1
# If defined to a non-zero value, print a message and wait until
# pressed before resetting board when application exits.
BSP_PRESS_KEY_FOR_RESET = 0
#4108 4 years ago fixed test Joel Sherrill Sebastian Huber 20 months ago
Summary

Review minimum and ensure it really is a minimum configuration

Description

Does minimum actually reflect what you think is the smallest possible configuration now? That as always the test's purpose -- to have a single that was the smallest we thought we could produce. It seems all your changes that it needs a review for tweaks to the configuration.

Inspecting the size of this test should tell you the smallest executable possible on this BSP with the current configuration settings.

There is a version in rtems-examples/misc which will either need to be synchronized or deleted.

This needs to be checked on 5 and 6.

#4110 4 years ago fixed unspecified Chris Johns Ryan Long <ryan.long@…> 2 years ago
Summary

Ubuntu package list is broken

Description

The list found here:

https://docs.rtems.org/branches/master/user/hosts/posix.html#xubuntu

failed with libpython-dev. A Linux user needs to check this and update the list.

#4115 4 years ago fixed arch/arm Sebastian Huber Sebastian Huber 4 years ago
Summary

Cortex-A9 MPCore based BSPs should include the workaround for Errata 794072 and 845369

Description

Cloned from #4114:


The workaround may be already set up by the bootloader. Not having the workaround applied may lead to system crashes, so make sure the BSP does it during system startup.

#4116 4 years ago fixed arch/arm Joel Sherrill Sebastian Huber 4 years ago
Summary

raspberrypi fails to build on waf and autoconf

Description

This may apply to 5 as well but I didn't check.

The following configurations for pi didn't build:

FAILED (2)  autoconf build of arm raspberrypi (SMP/NOMP/DEBUG/PROFILE)
FAILED (1)  waf build of arm raspberrypi (SMP/NOMP/DEBUG/PROFILE)
FAILED (2)  autoconf build of arm raspberrypi (SMP/NOMP/DEBUG/NOPROFILE)
FAILED (1)  waf build of arm raspberrypi (SMP/NOMP/DEBUG/NOPROFILE)
FAILED (2)  autoconf build of arm raspberrypi (SMP/NOMP/NODEBUG/PROFILE)
FAILED (1)  waf build of arm raspberrypi (SMP/NOMP/NODEBUG/PROFILE)
FAILED (2)  autoconf build of arm raspberrypi (SMP/NOMP/NODEBUG/NOPROFILE)
FAILED (1)  waf build of arm raspberrypi (SMP/NOMP/NODEBUG/NOPROFILE)

This one of the configure commands:

 ../rtems/configure --target=arm-rtems6 --enable-rtemsbsp=raspberrypi --prefix=/home/joel/rtems-cron-6/tools/6/bsp-install --disable-networking --enable-posix --enable-smp --disable-multiprocessing --enable-rtems-debug --enable-profiling --enable-tests --enable-cxx --enable-maintainer-mode

And this is the failure:

gmake[4]: Entering directory `/home/joel/rtems-cron-6/b-raspberrypi/arm-rtems6/c/raspberrypi/cpukit'
depbase=`echo score/cpu/arm/cpu_asm.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
arm-rtems6-gcc --pipe -DHAVE_CONFIG_H   -I. -I/home/joel/rtems-cron-6/b-raspberrypi/arm-rtems6/c/raspberrypi/include -I/home/joel/rtems-cron-6/rtems/cpukit/include -I/home/joel/rtems-cron-6/rtems/cpukit/score/cpu/arm/include  -DASM -mcpu=arm1176jzf-s -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -mcpu=arm1176jzf-s -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT score/cpu/arm/cpu_asm.o -MD -MP -MF $depbase.Tpo -c -o score/cpu/arm/cpu_asm.o ../../../../../rtems/c/src/../../cpukit/score/cpu/arm/cpu_asm.S &&\
mv -f $depbase.Tpo $depbase.Po
../../../../../rtems/c/src/../../cpukit/score/cpu/arm/cpu_asm.S: Assembler messages:
../../../../../rtems/c/src/../../cpukit/score/cpu/arm/cpu_asm.S:75: Error: selected processor does not support `dmb' in ARM mode
../../../../../rtems/c/src/../../cpukit/score/cpu/arm/cpu_asm.S:93: Error: selected processor does not support `dmb' in ARM mode
gmake[4]: *** [score/cpu/arm/cpu_asm.o] Error 1
#4117 4 years ago fixed arch/arm Joel Sherrill Sebastian Huber 4 years ago
Summary

lpc1768_mbed_ahb_ram_eth sp01 and others fail to link

Description

This fails on both waf and autoconf. This is troubling because the test is sp01 which should build and link.

Did not check if this also applies to 5 branch.

../rtems/configure --target=arm-rtems6 --enable-rtemsbsp=lpc1768_mbed_ahb_ram_eth --prefix=/home/joel/rtems-cron-6/tools/6/bsp-install --disable-networking --enable-posix --disable-smp --disable-multiprocessing --disable-rtems-debug --disable-profiling --enable-tests --enable-cxx --enable-maintainer-mode

Fails with:

arm-rtems6-gcc  -mthumb -mcpu=cortex-m3 -O2 -ggdb3 -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -B./../../lib/libbsp/arm/lpc176x -B/home/joel/rtems-cron-6/rtems/bsps/arm/lpc176x/start -specs bsp_specs -qrtems -L./../../cpukit -L/home/joel/rtems-cron-6/rtems/bsps/arm/shared/start -Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar -Wl,--gc-sections -o sp01.exe sp01/sp01-init.o sp01/sp01-task1.o ./../../lib/libbsp/arm/lpc176x/librtemsbsp.a ./../../cpukit/librtemscpu.a ./../../cpukit/librtemstest.a 
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: sp01.exe section `.bss' will not fit in region `RAM_AHB1'
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: region `RAM_AHB1' overflowed by 2324 bytes
collect2: error: ld returned 1 exit status
gmake[5]: *** [sp01.exe] Error 1

#4118 4 years ago wontfix arch/sparc Joel Sherrill 4 years ago
Summary

Add clang variants for sparc BSPs

Description

There are clang variants for RISV-V BSPs but not SPARC BSPs even though clang is supported on them.

If there are other architectures with clang support, I don't know.

#4120 4 years ago fixed arch/arm Joel Sherrill Sebastian Huber 4 years ago
Summary

altcycv_devkit and imx7 fail to build all tests on master

Description

This appears to not happen with waf but it needs to be resolved or we don't have parity to achieve a switchover.

Happens to at least two BSPs. Not sure if more until all arm BSP configurations finish.

Configuration:

../rtems/configure --target=arm-rtems6 --enable-rtemsbsp=altcycv_devkit --prefix=/home/joel/rtems-cron-6/tools/6/bsp-install --disable-networking --enable-posix --enable-smp --disable-multiprocessing --enable-rtems-debug --enable-profiling --enable-tests --enable-cxx --enable-maintainer-mode

Results in:

arm-rtems6-gcc -DHAVE_CONFIG_H -I. -I../../../../../../rtems/c/src/../../testsuites/smptests   -I. -I/home/joel/rtems-cron-6/b-altcycv_devkit/arm-rtems6/c/altcycv_devkit/include -I/home/joel/rtems-cron-6/rtems/cpukit/include -I/home/joel/rtems-cron-6/rtems/cpukit/score/cpu/arm/include -I/home/joel/rtems-cron-6/b-altcycv_devkit/arm-rtems6/c/altcycv_devkit/lib/libbsp/arm/altera-cyclone-v/include -I/home/joel/rtems-cron-6/rtems/bsps/include -I/home/joel/rtems-cron-6/rtems/bsps/arm/include -I/home/joel/rtems-cron-6/rtems/bsps/arm/altera-cyclone-v/include -DT_FILE_NAME='"init.c"'  -I../../../../../../rtems/c/src/../../testsuites/smptests/../support/include   -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9 -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT smpmulticast01/smpmulticast01-init.o -MD -MP -MF smpmulticast01/.deps/smpmulticast01-init.Tpo -c -o smpmulticast01/smpmulticast01-init.o `test -f 'smpmulticast01/init.c' || echo '../../../../../../rtems/c/src/../../testsuites/smptests/'`smpmulticast01/init.c
../../../../../../rtems/c/src/../../testsuites/smptests/smpmulticast01/init.c:37:10: fatal error: rtems/testopts.h: No such file or directory
   37 | #include <rtems/testopts.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[5]: *** [smpmulticast01/smpmulticast01-init.o] Error 1

#4121 4 years ago fixed arch/arm Joel Sherrill Sebastian Huber 4 years ago
Summary

lm3s3749 fails to build all tests on master

Description

FAILED (2) autoconf build of arm lm3s3749 (NOSMP/NOMP/DEBUG/PROFILE) FAILED (1) waf build of arm lm3s3749 (NOSMP/NOMP/DEBUG/PROFILE) FAILED (2) autoconf build of arm lm3s3749 (NOSMP/NOMP/DEBUG/NOPROFILE) FAILED (1) waf build of arm lm3s3749 (NOSMP/NOMP/DEBUG/NOPROFILE)

../rtems/configure --target=arm-rtems6 --enable-rtemsbsp=lm3s3749 OPERATION_COUNT=10 --prefix=/home/joel/rtems-cron-6/tools/6/bsp-install --disable-networking --enable-posix --disable-smp --disable-multiprocessing --enable-rtems-debug --enable-profiling --enable-tests --enable-cxx --enable-maintainer-mode
arm-rtems6-gcc  -mthumb -mcpu=cortex-m3 -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -B./../../lib/libbsp/arm/lm3s69xx -B/home/joel/rtems-cron-6/rtems/bsps/arm/lm3s69xx/start -specs bsp_specs -qrtems -L./../../cpukit -L/home/joel/rtems-cron-6/rtems/bsps/arm/shared/start -Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar -Wl,--gc-sections -o math.exe math/math-init.o math/math-domath.o -lm ./../../lib/libbsp/arm/lm3s69xx/librtemsbsp.a ./../../cpukit/librtemscpu.a ./../../cpukit/librtemstest.a 
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: math.exe section `.rodata' will not fit in region `ROM_INT'
/home/joel/rtems-cron-6/tools/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: region `ROM_INT' overflowed by 2872 bytes

#4122 4 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Change RTEMS_NO_RETURN to use C11 and C++11 standard means

Description

C11 has a _Noreturn keyword and C++11 has a noreturn? attribute. The standards are a bit less flexible than the GNU attribute with respect to the position of the attribute.

#4123 4 years ago fixed tool Joel Sherrill Sebastian Huber <sebastian.huber@…> 3 years ago
Summary

rtems-bsps needs to be switched to look at waf info for BSPs

Description

rtems-bsps depends on autoconf. It must be fixed to depend on waf BSP configuration information before we can switch from autoconf.

#4124 4 years ago fixed tool Joel Sherrill Ryan Long <ryan.long@…> 3 years ago
Summary

rtems-bsp-builder needs to be switched to waf builds

Description

rtems-bsp-tester depends on autoconf. It must be fixed to depend on waf BSP configuration information before we can switch from autoconf.

#4126 4 years ago fixed network/legacy Chris Johns 2 years ago
Summary

Remove legacy networking stack from rtems.git and place in a new repo

Description

Remove the legacy networking stack from rtems.git and place it in new top level repo rtems-legacy-network.git.

The initial tasks are:

  1. Move the code to a new repo
  1. Add rtems_waf support to build it
  1. Clean out BSP references to network interfaces or drivers
  1. Merge in the network demos repo
#4127 4 years ago fixed test Joel Sherrill Sebastian Huber 4 years ago
Summary

x86_64/amd64 fails to build

Description

This is with waf and autoconf on master.

Short versions of failing configurations:

FAILED (2)  autoconf build of x86_64 amd64 (NOSMP/NOMP/DEBUG/PROFILE)
FAILED (1)  waf build of x86_64 amd64 (NOSMP/NOMP/DEBUG/PROFILE)
FAILED (2)  autoconf build of x86_64 amd64 (NOSMP/NOMP/DEBUG/NOPROFILE)
FAILED (1)  waf build of x86_64 amd64 (NOSMP/NOMP/DEBUG/NOPROFILE)

This is the error:

In file included from ../../../testsuites/libtests/termios11/init.c:2:
../../../testsuites/libtests/termios11/../termios10/termios10impl.h: In function 'POSIX_Init':
../../../testsuites/libtests/termios11/../termios10/termios10impl.h:171:1: error: no return statement in function returning non-void [-Werror=return-type]
  171 | }
      | ^
cc1: some warnings being treated as errors

In file included from ../../../testsuites/libtests/termios10/init.c:1:
../../../testsuites/libtests/termios10/termios10impl.h: In function 'POSIX_Init':
../../../testsuites/libtests/termios10/termios10impl.h:171:1: error: no return statement in function returning non-void [-Werror=return-type]
  171 | }
      | ^

This is the waf ini file for this specific build:

[x86_64/amd64]
# Selects the compiler used to build the BSP (allowed values are "gcc" and
# "clang").  Please note that the values of some options depend on the compiler
# selection and changing the compiler may lead to unpredictable behaviour if
# these options are not adjusted as well.  Use the --rtems-compiler command line
# option to get the default values for a particular compiler via
# ./waf bsp_defaults.
COMPILER = gcc
# Flags passed to the library archiver
ARFLAGS = crD
# Warning flags passed to the C and C++ compiler
WARNING_FLAGS = -Wall
# Warning flags passed to the C compiler
CC_WARNING_FLAGS = -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs
# Warning flags passed to the C++ compiler
CXX_WARNING_FLAGS = 
# Enable the Ada support
__RTEMS_ADA__ = False
# Enable the RTEMS internal debug support
RTEMS_DEBUG = True
# Enable the Driver Manager startup
RTEMS_DRVMGR_STARTUP = False
# Enable the legacy TCP/IP network support
RTEMS_NETWORKING = False
# Enable the Newlib C library support
RTEMS_NEWLIB = True
# Enable the para-virtualization support
RTEMS_PARAVIRT = False
# Enable support for POSIX signals
RTEMS_POSIX_API = True
# Enable the SMP lock profiling support
RTEMS_PROFILING = False
# Build the Ada test programs (may be also enabled by BUILD_TESTS)
BUILD_ADATESTS = False
# Build the test programs
BUILD_TESTS = True
# Build the benchmark programs (may be also enabled by BUILD_TESTS)
BUILD_BENCHMARKS = False
# Build the file system test programs (may be also enabled by
# BUILD_TESTS)
BUILD_FSTESTS = False
# Build the library test programs (may be also enabled by BUILD_TESTS)
BUILD_LIBTESTS = False
# Build the MPCI test programs (may be also enabled by BUILD_TESTS)
BUILD_MPTESTS = False
# Build the POSIX test programs (may be also enabled by BUILD_TESTS)
BUILD_PSXTESTS = False
# Build the POSIX timing test programs (may be also enabled by
# BUILD_TESTS)
BUILD_PSXTMTESTS = False
# Build the Rhealstone benchmark programs (may be also enabled by
# BUILD_TESTS)
BUILD_RHEALSTONE = False
# Build the sample programs (may be also enabled by BUILD_TESTS)
BUILD_SAMPLES = True
# Build the SMP test programs (may be also enabled by BUILD_TESTS)
BUILD_SMPTESTS = False
# Build the single-processor test programs (may be also enabled by
# BUILD_TESTS)
BUILD_SPTESTS = False
# Build the timing test programs (may be also enabled by BUILD_TESTS)
BUILD_TMTESTS = False
# Build the validation test programs (may be also enabled by
# BUILD_TESTS)
BUILD_VALIDATIONTESTS = False
# Sets the test verbosity of the RTEMS Test Framework.  Valid values
# are "Verbose", "Normal", and "Quiet".  For normal test runs you can
# use a verbosity of "Normal".  If you need a more detailed output,
# then you can set it to "Verbose".  For example, in case a regression
# ocurred.  Reducing the verbosity level can significantly reduce the
# test duration especially on targets with a slow serial output
# device.  All verbosity levels produce enough output to notice failed
# test cases.  In particular, the begin and end of test information is
# not affected by the verbosity level.
RTEMS_TEST_VERBOSITY = Normal
# Optimization flags passed to the C and C++ compiler
OPTIMIZATION_FLAGS = -O2 -g -fdata-sections -ffunction-sections
# ABI flags
ABI_FLAGS = -mno-red-zone -mcmodel=large -Werror=return-type
# If defined to a non-zero value, prints the some information in case
# of a fatal error.
BSP_VERBOSE_FATAL_EXTENSION = 1
# Flags passed to the linker (GNU ld)
LDFLAGS = -Wl,--gc-sections
# Install the legacy application Makefile framework.
INSTALL_LEGACY_MAKEFILES = True
# If defined to a non-zero value, prints the exception context when an
# unexpected exception occurs.
BSP_PRINT_EXCEPTION_CONTEXT = 1
# If defined to a non-zero value, reset the board when the application
# exits.
BSP_RESET_BOARD_AT_EXIT = 1
# If defined to a non-zero value, print a message and wait until
# pressed before resetting board when application exits.
BSP_PRESS_KEY_FOR_RESET = 0

#4128 4 years ago fixed bsps Joel Sherrill Jiri Gaisler 4 years ago
Summary

all griscv variants fail to build on master

Description

Looks to be independent of waf or autoconf or configuration settings since a code issue in the BSP:

./../../../../../../../rtems/c/src/lib/libbsp/riscv/griscv/../../../../../../bsps/riscv/griscv/clock/clockdrv.c: In function 'grlib_clock_initialize':
../../../../../../../../rtems/c/src/lib/libbsp/riscv/griscv/../../../../../../bsps/riscv/griscv/clock/clockdrv.c:174:10: warning: implicit declaration of function 'grlib_irqmp_has_timestamp' [-Wimplicit-function-declaration]
  174 |     if (!grlib_irqmp_has_timestamp(irqmp_ts)) {
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../rtems/c/src/lib/libbsp/riscv/griscv/../../../../../../bsps/riscv/griscv/clock/clockdrv.c:174:10: warning: nested extern declaration of 'grlib_irqmp_has_timestamp' [-Wnested-externs]
../../../../../../../../rtems/c/src/lib/libbsp/riscv/griscv/../../../../../../bsps/riscv/griscv/clock/clockdrv.c:175:17: error: 'GRLIB_FATAL_CLOCK_NO_IRQMP_TIMESTAMP_SUPPORT' undeclared (first use in this function); did you mean 'LEON3_FATAL_CLOCK_NO_IRQMP_TIMESTAMP_SUPPORT'?
  175 |       bsp_fatal(GRLIB_FATAL_CLOCK_NO_IRQMP_TIMESTAMP_SUPPORT);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 LEON3_FATAL_CLOCK_NO_IRQMP_TIMESTAMP_SUPPORT
../../../../../../../../rtems/c/src/lib/libbsp/riscv/griscv/../../../../../../bsps/riscv/griscv/clock/clockdrv.c:175:17: note: each undeclared identifier is reported only once for each function it appears in
gmake[6]: *** [clockdrv.o] Error 1

#4129 4 years ago fixed tool/website Joel Sherrill 2 years ago
Summary

x86_64 not listed as architecture in components in Trac

Description

Just needs to be added.

#4131 4 years ago fixed shell Frank Kuehndel Frank Kühndel <frank.kuehndel@…> 4 years ago
Summary

"fdisk DISK_NAME mount" in bdpart-mount.c uses non-existing file system type "msdos"

Description

The function rtems_bdpart_mount() seems to be only used by the 'fdisk' shell command to mount all partitions of a disk with a single command:

fdisk DISK_NAME mount
        mounts the file system of each partition of the disk

fdisk DISK_NAME unmount
        unmounts the file system of each partition of the disk

The whole command does not work because in file cpukit/libblock/src/bdpart-mount.c line 103 specifies the file system type of each partition to be "msdos". Yet, "msdos" does not exist. The name must be "dosfs".

Beside of this fundamental problem, there are more issues with the code in bdpart-mount.c:

1) The function returns RTEMS_SUCCESSFUL despite the mount always fails.

2) The reason for errors is not written to the terminal.

3) The directory '/mnt' is created but not deleted later on (failure or not).

3) There is no documentation about this special 'fdisk' feature in the RTEMS Shell Guide. ('fdisk' is mentioned but its documentation is a bit short).

4) Only "msdos" formatted partitions can be mounted and all partitions are mounted read only. This is hard coded and cannot be changed by options. Moreover, there is no information about this to the user of the shell (i.e. using 'fdisk' mount requires insider knowledge).

How to reproduce:

1) For testing I use the 'testsuites/samples/fileio/init.c' sample and since I do not know the 'root' password, the password must be removed from that file to login as 'root' without password:

index 86b34b99dd..51507f9a53 100644
--- a/testsuites/samples/fileio/init.c
+++ b/testsuites/samples/fileio/init.c
@@ -563,8 +563,7 @@ static void fileio_start_shell(void)
   writeFile(
     "/etc/passwd",
     0644,
-    "root:$6$$FuPOhnllx6lhW2qqlnmWvZQLJ8Thr/09I7ESTdb9VbnTOn5.65"
-      "/Vh2Mqa6FoKXwT0nHS/O7F0KfrDc6Svb/sH.:0:0:root::/:/bin/sh\n"
+    "root::0:0:root::/:/bin/sh\n"
     "rtems::1:1:RTEMS Application::/:/bin/sh\n"
     "test:$1$$oPu1Xt2Pw0ngIc7LyDHqu1:2:2:test account::/:/bin/sh\n"
     "tty:*:3:3:tty owner::/:/bin/false\n"

2) I run the fileio sample using qemu:

cd rtems
env QEMU_AUDIO_DRV="none" qemu-system-arm -net none -nographic -M realview-pbx-a9 -m 256M -kernel build/arm/realview_pbx_a9_qemu/testsuites/samples/fileio.exe

3) Type any key to stop the timer and enter the sample tool. Type 's' to enter the shell, login as 'root' with empty password.

4) Type the following shell commands (they create a RAM disk, partition it, regsiter it, format it and try to mount it):

mkrd
fdisk /dev/rda fat32 16 write mbr
fdisk /dev/rda register
mkdos /dev/rda1
fdisk /dev/rda mount

5) The last line above is the command which fails - without an error message. There exists a '/mnt' directory but no '/mnt/rda1' directory as it shoud be:

ls -la /mnt

6) If you change line 103 of 'cpukit/libblock/src/bdpart-mount.c' from "msdos" to "dosfs", compile and build the executable and re-run the above test, '/mnt/rda1' exists (but the file system is mounted read-only).

#4134 4 years ago fixed tool Sebastian Huber Sebastian Huber 4 years ago
Summary

rtemsspec: Support user-defined ordering of directives in header files (Doxygen)

Description

Currently, the generated interfaces in header files are defined by their dependencies and a topological sorting (alphabetical order is applied to unrelated interfaces). In order to be in line with the Sphinx documentation it would be nice to apply also the user-defined ordering specified in groups.

#4140 4 years ago fixed build Joel Sherrill Sebastian Huber <sebastian.huber@…> 4 years ago
Summary

waf install of RTEMS breaks Makefile system in rtems-examples

Description

This boils down to bsp_specs being referenced in Makefile.inc and it no longer being at the install point. This can be worked around by copying an empty file to the install location for bsp_specs enough to compile the programs but I assume that the -B... list of arguments needs to be replaced

Properly the BSP compile flags need to be processed into the installed target.cfg and the line with -B.. modified as needed in gcc-target-default.cfg.

i386-rtems6-gcc --pipe -B/home/joel/rtems-work/tools/6/bsp-install/i386-rtems6/pc686/lib/ -specs bsp_specs -qrtems   -Wall      -mtune=pentiumpro -march=pentium       -c   -o o-optimize/test.o test.c
i386-rtems6-gcc: fatal error: cannot read spec file 'bsp_specs': No such file or directory
compilation terminated.
make: *** [o-optimize/test.o] Error 1
[joel@localhost hello_world_c]$ cp /dev/null /home/joel/rtems-work/tools/6/bsp-install/i386-rtems6/pc686/lib/bsp_specs
[joel@localhost hello_world_c]$ RTEMS_MAKEFILE_PATH=/home/joel/rtems-work/tools/6/bsp-install/i386-rtems6/pc686/ make clean all
rm -f a.out core mon.out gmon.out
rm -f -r 
rm -f -r  a.out *.o *.BAK Depends-o-optimize.tmp
rm -f -r o-optimize o-debug
test -d o-optimize || mkdir o-optimize
i386-rtems6-gcc --pipe -B/home/joel/rtems-work/tools/6/bsp-install/i386-rtems6/pc686/lib/ -specs bsp_specs -qrtems   -Wall      -mtune=pentiumpro -march=pentium       -c   -o o-optimize/test.o test.c
i386-rtems6-gcc --pipe -B/home/joel/rtems-work/tools/6/bsp-install/i386-rtems6/pc686/lib/ -specs bsp_specs -qrtems   -Wall      -mtune=pentiumpro -march=pentium      -qrtems -Wl,-Ttext,0x00100000 -mtune=pentiumpro -march=pentium -Wl,--gc-sections -L/home/joel/rtems-work/rtems/bsps/i386/shared/start -L/home/joel/rtems-work/rtems/bsps/i386/pc386/start   -mtune=pentiumpro -march=pentium   -o o-optimize/hello.exe  o-optimize/test.o       
i386-rtems6-nm -g -n o-optimize/hello.exe > o-optimize/hello.num
i386-rtems6-size o-optimize/hello.exe
   text    data     bss     dec     hex filename
 151790    9628   33056  194474   2f7aa o-optimize/hello.exe

#4142 4 years ago fixed lib/block Sebastian Huber Sebastian Huber 4 years ago
Summary

Sparse disk destroys data when it grows

Description

The qsort() in sparse_disk_get_new_block() may move the appended key which invalidates the pointer.

#4143 4 years ago fixed test Frank Kuehndel joel@… 4 years ago
Summary

fileio - Stack too small for login with password

Description

When I use the 'shell' from the fileio sample with the command below:

   env QEMU_AUDIO_DRV="none" \
   qemu-system-arm -no-reboot -net none -nographic -M realview-pbx-a9 -m 256M \
   -kernel build/arm/realview_pbx_a9_qemu/testsuites/samples/fileio.exe

The executable crashes with an "BLOWN STACK!!!" as soon as I try to login as 'root' with password. (The logins without password work fine.) Increasing the stack size of the affected thread a bit (to 5 times RTEMS_MINIMUM_STACK_SIZE) solves the issue.

How to reproduce:

  1. Start the fileio sample in QEMU with the above command.
  1. Type a key to stop the timer.
  1. Type "s" <return> to enter the shell.
  1. Login as "root" with the password printed to the terminal.
  1. In the line with the first shell prompt, the text "BLOWN STACK!!!" appears unexpectedly followed by further crash information.
[...]
/dev/foobar login: root
Password: 

RTEMS Shell on /dev/foobar. Use 'help' to list commands.
SHLL [/] # BLOWN STACK!!!
task control block: 0x00205278
[...]

My config.ini was

[arm/realview_pbx_a9_qemu] RTEMS_DEBUG = True RTEMS_NETWORKING = True RTEMS_POSIX_API = True RTEMS_SMP = True BUILD_TESTS = True

RTEMS origin.master at 558a19d3adff6a3ecf678f94408b48beccbbc9fb

#4145 4 years ago fixed tool/rsb Joel Sherrill Ryan Long <ryan.long@…> 2 years ago
Summary

rtems-source-builder: Update RTEMS Kernel Recipe to Use waf for RTEMS

Description

kernel configuration builds using autoconf-based build system. Needs to be switched to waf. Hopefully contained to rtems-kernel-common.cfg.

#4148 4 years ago fixed fs/rfs Chris Johns Chris Johns 4 years ago
Summary

RFS bit map search buffer overflow

Description

The bit search create writes past the end of its buffer. See:

https://lists.rtems.org/pipermail/devel/2020-October/062701.html

#4155 4 years ago fixed arch/sparc Sebastian Huber Daniel Hellstrom 3 years ago
Summary

Add a workaround for the LEON3FT RETT Restart errata: TN-0018

Description

See also:

https://www.gaisler.com/doc/antn/GRLIB-TN-0018.pdf

#4157 4 years ago fixed posix Sebastian Huber Sebastian Huber 3 years ago
Summary

pthread_spin_unlock() may corrupt the thread stack if RTEMS_PROFILING and RTEMS_SMP is enabled

Description

The call to _SMP_lock_Stats_register_or_max_section_time() registers a dummy statistics block which resides on the thread stack.

#4158 4 years ago fixed bsps Sebastian Huber Sebastian Huber 4 years ago
Summary

rtems_interrupt_server_delete() does not destroy the ISR lock of the server control

Description

This leads to memory corruption if RTEMS_PROFILING and RTEMS_SMP is enabled.

#4164 3 years ago fixed network/libbsd Sebastian Huber Sebastian Huber 3 years ago
Summary

Fix NVMe disk synchronization and media block handling

#4166 3 years ago duplicate tool Joel Sherrill 17 months ago
Summary

rtems-bsp-builder: Add way to select rtems version (6 vs 7)

Description

When testing the RTEMS master, one can use the rtems6 or rtems7 tools. The rtems-bsp-builder is hard-coded to rtems6.

As part of doing this, the version should be in the email subject and report so that similar reports can be distinguished.

#4167 3 years ago fixed tool Joel Sherrill Joel Sherrill 2 years ago
Summary

Coverity Scan Does Not Run on rtems6

Description

This is a ticket to note that Coverity does not appear to like the gcc version going from one to two digits. Since the Coverity Scan support for free users is minimal, I asked on the GCC mailing list if anyone had insight (https://gcc.gnu.org/pipermail/gcc/2020-October/234073.html).

This is completely outside our control and this is just a tracking ticket to note that Coverity Scan reports will be run against the 5 branch until this is fixed. This will likely be of limited use since rtems 5 is stable and changes are minimal compared to the rtems master.

If it really is a two digit major issue (unconfirmed if this works for gcc 9), I could do Coverity builds using a special toolchain based on gcc 9.

#4175 3 years ago fixed arch/aarch64 Kinsey Moore 3 years ago
Summary

Resolve warning during AArch64 build

Description

When compiling under the ILP32 mulitilib variant, the build generates a warning related to the saved stack pointer. This resolves the warning by sizing the saved stack pointer appropriately instead of it always being 64bits long.

#4180 3 years ago fixed bsps Christian Mauderer Christian Mauderer 2 years ago
Summary

Add BSP for i.MXRT1050

Description

Add a BSP for the ​i.MXRT1050 series. The default settings for the BSP will run on the IMXRT1050-EVKB evaluation board.

#4181 3 years ago fixed admin Sebastian Huber Sebastian Huber 3 years ago
Summary

Add CONFIGURE_INIT_TASK_STORAGE_SIZE

Description

Currently, the Classic API initialization task is created with rtems_task_create(). In order to better support applications which use the new rtems_task_construct() directive add a configuration options which constructs the Classic API initialization task with rtems_task_construct():

/* Generated from spec:/acfg/if/init-task-storage-size */

/**
 * @brief This configuration option is an integer define.
 *
 * The value of this configuration option defines the task storage size of the
 * Classic API initialization task.  If this configuration option is specified,
 * then the Classic API initialization task is constructed by
 * rtems_task_construct() instead of using rtems_task_create().
 *
 * @par Default Value
 * The default value is 0.
 *
 * @par Value Constraints
 * @parblock
 * The value of this configuration option shall satisfy all of the following
 * constraints:
 *
 * * It shall be greater than or equal to #CONFIGURE_MINIMUM_TASK_STACK_SIZE.
 *
 * * It shall be defined using RTEMS_TASK_STORAGE_SIZE().
 * @endparblock
 *
 * @par Notes
 * @parblock
 * A task storage area of the specified size is defined by the configuration
 * for the Classic API initialization task.  The
 *
 * * #CONFIGURE_INIT_TASK_STACK_SIZE and
 *
 * * ``CONFIGURE_INIT_TASK_STORAGE_SIZE``
 *
 * configuration options are mutually exclusive.
 * @endparblock
 */
#define CONFIGURE_INIT_TASK_STORAGE_SIZE
#4184 3 years ago fixed bsps Jan Sommer Jan Sommer <jan.sommer@…> 3 years ago
Summary

arm/bsps: Small MMU pages are rounded to 1 MiB

Description

The function arm_cp15_start_set_translation_table_entries rounds the end address of a section up to 1 MiB even if small 4kiB pages are used (i.e. ARM_MMU_USE_SMALL_PAGES enabled).

Will submit a patch which only rounds the end address to 4kiB boundary.

#4192 3 years ago fixed bsps Jan Sommer 2 years ago
Summary

bsp/xilinx_zynq: Enable support for small MMU pages

Description

Enable the xilinx_zynq based BSPs to support the configuration of the MMU to use small 4 kiB pages.

By default 1 MB pages will be used. The 4 kiB pages have to be enabled with the ARM_MMU_USE_SMALL_PAGES configuration option.

#4193 3 years ago fixed tool/newlib Joel Sherrill Sebastian Huber <sebastian.huber@…> 3 years ago
Summary

devctl.h does not compile from C++ (cloned)

Description

Cloned from #4174:


The closing boilerplate of the C++ extern C wrapper is out of order with another #endif and the resulting code does not compile.

The attached patch addresses this but it needs to be merged to newlib and the RSB updated before this ticket closed.

#4194 3 years ago worksforme tool/rsb Sebastian Huber 2 years ago
Summary

RSB failed with mail subject: Build Linux: PASSED 6/rtems-arm on x86_64-linux-gnu

Description
error: config error: gdb-common-1.cfg:99: "gdb: python: header file not found: python2.7/Python.h, please install"
Build FAILED
Mailing report: build@rtems.org

The mail subject should indicated that the build failed.

#4195 3 years ago fixed tool Sebastian Huber Sebastian Huber 3 years ago
Summary

Add gr740 support available in SIS 2.25 to the RTEMS Tester

#4196 3 years ago fixed tool/gcc Sebastian Huber Sebastian Huber 22 months ago
Summary

Improve gcov support provided by GCC for RTEMS

Description

If we want to use gcov in RTEMS to get code coverage in all system states, then we need some tweaks in GCC:

https://gcc.gnu.org/pipermail/gcc/2020-November/234164.html

The linker set based gcov information registration is already included in GCC:

https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-info-section

There is a discussion about how the gcov information can be transferred from the embedded system to the host:

https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559342.html

The following patch set was integrated in GCC 13:

https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593536.html

https://gcc.gnu.org/onlinedocs/gcc/Freestanding-Environments.html#Freestanding-Environments

#4197 3 years ago fixed arch/aarch64 Kinsey Moore 3 years ago
Summary

testsuite: ts-validation-0 broken on AArch64 due to SIZE_MAX issues in the test design

Description

The ts-validation-0 test is broken on AArch64 LP64 ABI due to issues with unexpected values of SIZE_MAX. I was not familiar enough with the test architecture in use to debug it properly. This test passes under the ILP32 ABI due to the 32bit pointers and differing value of SIZE_MAX.

#4198 3 years ago fixed arch/arm Sebastian Huber Sebastian Huber 2 years ago
Summary

arm: Add multilib for Cortex-R52 processor

Description

This processor uses the ARMv8-R instruction set.

#4200 3 years ago fixed doc Chris Johns 17 months ago
Summary

Build system doco link in the User Guide is broken

Description

https://docs.rtems.org/branches/master/user/bld/index.html#commands

The "RTEMS Software Engineering" guide link at the end of this section is to a .rst file.

I think cross-doc links is broken no matter how you attempt to solve this, ie PDF files will never work.

#4201 3 years ago fixed build Chris Johns 17 months ago
Summary

waf building out of source tree does not find all configured bsps

Description

config.ini is:

[DEFAULT]
BUILD_TESTS = False
RTEMS_DEBUG = True
RTEMS_POSIX_API = True

[arm/beagleboneblack]

[arm/xilinx_zynq_a9_qemu]

[i386/pc686]

[powerpc/mvme2307]

And configure is:

$ /opt/work/chris/rtems/kernel/rtems.git/waf \
    --top=/opt/work/chris/rtems/kernel/rtems.git \
    --out=build configure \
    --rtems-config=config.ini \
    --prefix=/opt/work/chris/rtems/nfs/6
Setting top to                           : /opt/work/chris/rtems/kernel/rtems.git 
Setting out to                           : /opt/work/chris/rtems/nfs/bsps/build 
Configure board support package (BSP)    : powerpc/mvme2307 
Checking for program 'powerpc-rtems6-gcc' : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-gcc 
Checking for program 'powerpc-rtems6-g++' : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-g++ 
Checking for program 'powerpc-rtems6-ar'  : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-ar 
Checking for program 'powerpc-rtems6-ld'  : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-ld 
Checking for program 'ar'                 : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-ar 
Checking for program 'g++, c++'           : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-g++ 
Checking for program 'ar'                 : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-ar 
Checking for program 'gas, gcc'           : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-gcc 
Checking for program 'ar'                 : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-ar 
Checking for program 'gcc, cc'            : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-gcc 
Checking for program 'ar'                 : /opt/work/chris/rtems/nfs/6/bin/powerpc-rtems6-ar 
Checking for asm flags '-MMD'             : yes 
Checking for c flags '-MMD'               : yes 
Checking for cxx flags '-MMD'             : yes 
Checking for program 'rtems-bin2c'        : /opt/work/chris/rtems/nfs/6/bin/rtems-bin2c 
Checking for program 'gzip'               : /usr/bin/gzip 
Checking for program 'rtems-ld'           : /opt/work/chris/rtems/nfs/6/bin/rtems-ld 
Checking for program 'rtems-syms'         : /opt/work/chris/rtems/nfs/6/bin/rtems-syms 
Checking for program 'xz'                 : /usr/bin/xz 
'configure' finished successfully (0.245s)

The same config.ini in the source tree finds all configured bsps.

Being able to cleanly sandbox builds is a feature of the autotools build system.

#4202 3 years ago fixed arch/arm Sebastian Huber Sebastian Huber 19 months ago
Summary

Add BSP for ARM Fixed Virtual Platform with a Cortex-R52

#4204 3 years ago fixed bsps Joel Sherrill 2 years ago
Summary

Make Termination Handler which Prints Exit Information Less Scary

Description

This task is change the default termination handler to print successful exit when the cause was exit(0). It scares users to see it and requires explanation.

#4206 3 years ago fixed arch/aarch64 Sebastian Huber Joel Sherrill 3 years ago
Summary

aarch64/xilinx_zynqmp_lp64 does not run with RTEMS_DEBUG enabled

Description

qemu-system-aarch64 -serial null -serial mon:stdio -machine xlnx-zcu102 -m 4096 -kernel build/aarch64/xilinx_zynqmp_lp64/testsuites/samples/ticker.exe -nographic

*** FATAL ***
fatal source: 7 (RTEMS_FATAL_SOURCE_ASSERT)
fatal code: 1074874896 (0x40114a10)
RTEMS version: 6.0.0.644cd68d8ce0044f78f095a648bfe4c1567f351b
RTEMS tools: 10.2.1 20201215 (RTEMS 6, RSB 6d0bff0eb6ed35d180491614b976277d5469a302, Newlib 6cc47c4)
executing thread ID: 0x08a010001
executing thread name: UI1
assertion "cpu_self->thread_dispatch_disable_level == 1" failed: file "/home/EB/sebastian_h/src/rtems/cpukit/score/src/threadhandler.c", line 120, function: _Thread_Handler
#4207 3 years ago fixed network/libbsd Chris Johns Chris Johns <chrisj@…> 3 years ago
Summary

PZERO define in RTEMS is wrong

Description

Our libbsd support in RTEMS defines PZERO to be zero. FreeBSD defines PZERO to be (PRI_MIN_KERN + 20) and PRI_MIN_KERN is 80.

The __sleep() call uses bits allocated above the bits used to hold the highest priority to signal things to do. The PDROP (0x200) bit causes a lock to be dropped before sleeping and not reclaimed after.

Setting PZERO to 0 breaks FreeBSD code in libbsd because calls that end up in __sleep() can incorrectly have the PDROP bit set. A grep of FreeBSD shows how this happens:

   (void) nfsmsleep(&lp->nfslock_lock, mutex,
      PZERO - 1, "nfsv4gr", NULL);
   error = msleep(msqkptr, &msq_mtx, (PZERO - 4) | PCATCH,
     msgsnd", hz);

This examples shows how either side is used...

   selwakeuppri(&tp->tun_rsel, PZERO + 1);
#4209 3 years ago invalid arch/arm rmueller Joel Sherrill 17 months ago
Summary

STM32H743ZI Nucleo Consle support not working without workaround

Description

I think here is still some issue with the HUART3 console support, at least for the STM32H743ZI-Nucleo board.

I solves the issue by calling some hardware initializaton functions and override void HAL_UART_MspInit(UART_HandleTypeDef* huart) like this:

#include "hardware_init.h"
#include <stm32h7xx_hal_rcc.h>
#include <stdio.h>

void hardware_init() {
	MX_USART3_UART_Init(115200);
}


/**
 * ST-LINK UART3
 * CN5 pins on board
 */
UART_HandleTypeDef huart3;
GPIO_InitTypeDef gpio_uart_init_struct;

void MX_USART3_UART_Init(uint32_t baudRate)
{
	__HAL_RCC_USART3_CONFIG(RCC_USART3CLKSOURCE_HSI);
	__HAL_RCC_GPIOD_CLK_ENABLE();
	__HAL_RCC_USART3_CLK_ENABLE();

	int result;
	huart3.Instance = USART3;
	huart3.Init.BaudRate = baudRate;
	huart3.Init.WordLength = UART_WORDLENGTH_8B;
	huart3.Init.StopBits = UART_STOPBITS_1;
	huart3.Init.Parity = UART_PARITY_NONE;
	huart3.Init.Mode = UART_MODE_TX_RX;
	huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
	huart3.Init.OverSampling = UART_OVERSAMPLING_16;
	huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
	huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1;
    //huart3.Init.FIFOMode = UART_FIFOMODE_DISABLE;
	//huart3.Init.TXFIFOThreshold = UART_TXFIFO_THRESHOLD_1_8;
	//huart3.Init.RXFIFOThreshold = UART_RXFIFO_THRESHOLD_1_8;
	huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
	// we can't do error handling (simple print out first) here because UART3 is our print interface
	result = HAL_UART_Init(&huart3);
	if(result == HAL_OK) {
		printf("\rUART3 configured successfully!\r\n");
	}
}

// Will be called by HAL_UART_Init
void HAL_UART_MspInit(UART_HandleTypeDef* huart) {
	/*Configure GPIO pins : PD8 PD9 */
	gpio_uart_init_struct.Pin = GPIO_PIN_8|GPIO_PIN_9;
	gpio_uart_init_struct.Mode = GPIO_MODE_AF_PP;
	gpio_uart_init_struct.Pull = GPIO_NOPULL;
	gpio_uart_init_struct.Speed = GPIO_SPEED_FREQ_LOW;
	gpio_uart_init_struct.Alternate = GPIO_AF7_USART3;
	HAL_GPIO_Init(GPIOD, &gpio_uart_init_struct);
}

I then call hardware_init() from my main application and after that, printf is working properly. Maybe the problem is also related to using the Nucleo board?

Kind Regards Robin

#4212 3 years ago invalid fs Chris Johns Chris Johns 17 months ago
Summary

libio leaks location clones

Description

rtems_filesystem_location_copy overwrites a location that may have been cloned via the ops handler leaking the destination node. If a file system has allocated resources in a location node when cloned it will leak. I assume there is a free for every clone?

An example of a leak is to mount of file system under IMFS and then open a file under the mounted file system. The path eval restart in the IMFS will clone a node and then open will:

  rtems_filesystem_eval_path_extract_currentloc( &ctx, &iop->pathinfo );
  rtems_filesystem_eval_path_cleanup( &ctx );

The ctx contains a cloned location.

Allocating resources to a location may be required because of the limited available file system fields and the opaque nature of the fields or a file system may have data it locks or reference counts and that needs to be managed.

I do not fully understand the semantics around the location object and while I could guess at a fix there are a number functions related to locations and a large number of use cases that I would not know if my fix is OK. For example should the copy function free the destination location and then clone the source location or should it just free the destination location or should all the places a copy is done be updated to manage the free and cloning based on the context? Or is the issue in the open call and the lines pasted here be swapped?

#4214 3 years ago fixed arch/nios2 Sebastian Huber Sebastian Huber 23 months ago
Summary

nios2: Add thread-local storage support

#4215 3 years ago fixed arch/nios2 Sebastian Huber Sebastian Huber 22 months ago
Summary

nios2: Add multilib with all custom floating-point instructions supported by GCC

Description

See Table 13. "Floating Point Custom Instruction 2 Operation Summary" in the Nios II Custom Instruction User Guide:

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_nios2_custom_instruction.pdf

#4217 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Change status code for nested obtain of MrsP semaphores

Description

Return RTEMS_INCORRECT_STATE to indicate a nested obtain since this is a kind of deadlock. This status code is also used for other deadlocks.

#4218 3 years ago fixed tool/binutils Joel Sherrill Ryan Long <ryan.long@…> 3 years ago
Summary

aarch64 as internal error with spconfig01

Description

This is to track https://sourceware.org/bugzilla/show_bug.cgi?id=27217 where there are more details on the actual failure.

This impacts spconfig01 and spmisc01 on all aarch64 BSPs.

#4219 3 years ago fixed tool/gdb Joel Sherrill 3 years ago
Summary

gdb master does not compile on CentOS 7

Description

There is a enumerated type and method with the same name. The CentOS 7 gdb does not like this. This ticket is to track the upstream ticket https://sourceware.org/bugzilla/show_bug.cgi?id=27219

#4221 3 years ago fixed tool Joel Sherrill kgardas 2 years ago
Summary

dtc recipe issue -- dependency on yaml.h

Description

This shows up on FreeBSD and may just be a matter of me not knowing the right package to install. Which yaml development package should be loaded. But it does fail.

         CC fstree.o
         CC livetree.o
         CC treesource.o
gmake: *** No rule to make target 'yaml.h', needed by 'yamltree.o'.  Stop.
shell cmd failed: /bin/sh -ex  /usr/home/joel/rtems-cron-6/rtems-source-builder/rtems/build/dtc-1.6.0-x86_64-freebsd12.2-1/do-build
error: building dtc-1.6.0-x86_64-freebsd12.2-1

Suggestions appreciated.
  See error report: rsb-report-dtc-1.6.0-x86_64-freebsd12.2-1.txt
#4222 3 years ago fixed fs Chris Johns Chris Johns 3 years ago
Summary

Add a per mount flag to not create a node on O_CREAT in open

Description

The libio rtems_filesystem_eval_path_context_t context uses a token left after a path evaluation to indicate the path to the leaf node is valid and the path leaf does not exist. System calls such as mknod, mkdir and open uses this to return EEXIST or in the case of open to create a S_IFREG node for a file. Some file systems do not support creating an S_IFREG node and the open handler is required to do this.

[ An aside, libio should leave the EEXIST detection to the file system and its evaluation handlers. The EEXIST error is one of many that could be returned yet it is specifically singled out using a fragile interface of a path token remaining. Anyway back to the change ... ]

The open call has:

  if ( rtems_filesystem_eval_path_has_token( &ctx ) ) {
    create_regular_file( &ctx, mode );
  }

and create_regular_file makes a node:

  rv = rtems_filesystem_mknod(
    currentloc,
    token,
    tokenlen,
    S_IFREG | mode,
    0
  );

then wipes the evaluation context of any real and valid flags and settings:

    rtems_filesystem_eval_path_set_flags( ctx, 0 );
    rtems_filesystem_eval_path_set_path( ctx, token, tokenlen );
    rtems_filesystem_eval_path_continue( ctx );

then continues the path evaluation. The continues path evaluation is suppose to find the new node. If a file system does not support making a regular file node and the mknod call is stubbed out to lie about making the node continuing the path evaluation fails with a not found error. I cannot see a way to code around this with the current libio code.

I propose adding a bool flag called no_reg_make_node to the rtems_filesystem_mount_table_entry_t struct that defaults to false. If true open does not call create_regular_file.

#4223 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Missing "extern" in RTEMS_LINKER_ROSET_ITEM_ORDERED_DECLARE()

Description

The fix for #3865 contains a typo. In RTEMS_LINKER_ROSET_ITEM_ORDERED_DECLARE() there is a missing "extern".

#4225 3 years ago fixed bsps Daniel Hellstrom Daniel Hellstrom 20 months ago
Summary

Cobham Gaisler NOEL-V RISC-V 32- and 64-bit processor BSP

Description

To add a BSP configurations for Cobham Gaisler's NOEL-V processor IP. The NOEL-V processor is compliant with the open RISC-V 32/64-bit ISA. Depending on the soft-core IP configuration different RISC-V extensions may or may not be available, a matching RTEMS BSP build configuration must be selected accordingly. Similar to Cobham Gaisler's LEON3/4/5 processor designs, the NOEL-V is also a part of GRLIB providing building blocks such as I/O peripherals and L2-cache etc. that is typically used with the processor in SoC solutions. For more information about GRLIB and the current state and road-map of NOEL-V:

The NOEL-V and GRLIB are available either under open-source GPL or commercial license. Demonstration designs with pre-built bit-streams, DTS/DTB, user's manuals, quick-start guides, etc. are freely available for the FPGA development boards listed under the NOEL-V page above. For example:

All the above demonstration designs have the same base memory layout and peripherals based on GRLIB. A DTS/DTB is needed to describe the system for RTEMS. The first BSP implementation targets only a minimal system with Memory Controller, Processor, IRQ Controller and Timer (RISC-V plic, clint, mtime). Thus the GRLIB drivers based on the driver manager is not needed to run RTEMS on NOEL-V.

The free GRMON eval hardware debugger can be used with the above demonstration designs to initialize, upload RTEMS images, execute RTEMS and debug the new NOEL-V BSPs.

#4226 3 years ago invalid admin Sebastian Huber Amar Takhar 17 months ago
Summary

Buildbot needs a tool chain update

Description

On 28/01/2021 06:37, buildbot@… wrote:

The Buildbot has detected a failed build on builder CHECK sparc/erc32 FreeBSD 10.1-STABLE GCC 7.3.0 POSIX while building rtems. Full details are available at:

https://buildbot.rtems.org/#builders/20/builds/440

Buildbot URL: https://buildbot.rtems.org/

Worker for this Build: build-1

Build Reason: <unknown> Blamelist: Sebastian Huber <sebastian.huber@…>

BUILD FAILED: make (failure)

Sincerely,

-The Buildbot

The Buildbot needs a tool chain update. It still uses GCC 7.5. For RTEMS 6, GCC 10 is required (RSB ade089253e70d75105a8311844f82f6d20cc30a8).

#4228 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

rtems_build_name() depends on the signedness of char type

Description

The rtems_build_name() is implemented by: {{{!c #define _Objects_Build_name( _C1, _C2, _C3, _C4 ) \

( (uint32_t)(_C1) << 24 | \

(uint32_t)(_C2) << 16 | \ (uint32_t)(_C3) << 8 | \ (uint32_t)(_C4) )

}}} If the name is build from four "char" components, then the result depends on the signedness of the char type. The macro should first cast the chars to uint8_t.

#4229 3 years ago fixed doc Ryan Long Gedare Bloom <gedare@…> 3 years ago
Summary

conf.py files need updated for sphinxcontrib-bibtex ver. 2.0.0 and greater

Description

I followed the instructions in the README, but I still ran across this error. I was able to get around it by specifying the version ofsphinxcontrib-bibtex to be 1.0.0. This fix might probably needs to be applied to the 5 release branch as well.

Command line output

Checking for 'sphinxcontrib.bibtex'      : not found (see README.txt) 
The configuration failed
(complete log in /home/rlong/nta-workspace/nta-docs/build/config.log)

Output in ${TOP}/build/config.log

err: WARNING: Since v2.0, Sphinx uses "index" as master_doc by default. Please add "master_doc = 'contents'" to your conf.py.
 
 found
 ----------------------------------------
 Checking for 'sphinxcontrib.bibtex'
 [1/1] Processing ^[[01;34mbuild/.conf_check_70571fadfd25a3c4e29a4087f18cfa38/testbuild/contents.rst^[[0m
 
  /home/rlong/nta-workspace/nta-docs/sphinx/bin/sphinx-build -b html -D extensions=sphinxcontrib.bibtex -C . out
 out: Running Sphinx v3.4.3
 making output directory... done
 
 err:
 Extension error:
 You must configure the bibtex_bibfiles setting
                                                                                                                                                                                           
 from /home/rlong/nta-workspace/nta-docs/user: Test does not build: Traceback (most recent call last):
   File "/home/rlong/nta-workspace/nta-docs/.waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Configure.py", line 333, in run_build
     bld.compile()                                                              
   File "/home/rlong/nta-workspace/nta-docs/.waf3-2.0.19-1f3c580272b15a03d2566843c5fe872a/waflib/Build.py", line 176, in compile
     raise Errors.BuildError(self.producer.error)                               
 waflib.Errors.BuildError: Build failed                                         
  -> task in '' failed with exit status 2 (run with -v to display more information)                                                                                
not found (see README.txt)                                                     
from /home/rlong/nta-workspace/nta-docs/user: The configuration failed
#4230 3 years ago fixed score Sebastian Huber Sebastian Huber 3 years ago
Summary

Timeout for automatic barriers is broken

Description

A barrier wait timeout at an automatic barrier doesn't decrement the count of waiting threads.

#4231 3 years ago fixed bsps Chris Johns Chris Johns 3 years ago
Summary

MVME 2600/2700 has no console output

Description

A single character is output then nothing further. Tests output using the printk but spconsole01 fails.

It seems there is a problem with the UART driver interrupts.

#4237 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

consolesimpletask.c: Two Unchecked Return Values Spotted by Coverity

Description

CID 1437625: Unchecked return value from call to rtems_task_create(). CID 1472765: Unchecked return value from call to rtems_task_start().

Snippet from Coverity output.

234  IMFS_add_node( "/dev", &cons->Node, NULL );
235
   	
CID 1437625 (#1 of 1): Unchecked return value (CHECKED_RETURN)
1. check_return: Calling rtems_task_create without checking return value (as is done elsewhere 22 out of 25 times).
236  rtems_task_create(
237    rtems_build_name('C', 'O', 'N', 'S'),
238    RTEMS_MAXIMUM_PRIORITY - 1,
239    RTEMS_MINIMUM_STACK_SIZE,
240    RTEMS_DEFAULT_ATTRIBUTES,
241    RTEMS_DEFAULT_MODES,
242    &cons->task
243  );
244
   	CID 1472765: Unchecked return value (CHECKED_RETURN) [select issue]
245  rtems_task_start(
246    cons->task,
247    _Console_simple_task_Task,
248    (rtems_task_argument) cons
249  );
250}
#4238 3 years ago fixed bsps Chris Johns Chris Johns 3 years ago
Summary

Change motorola_powerpc bsp to support irq-generic

Description

Update the motorola_powerpc to support irq-generic moving the IRQ management to the IRQ server. This enables libbsd support for interrupts.

#4239 3 years ago fixed bsps Chris Johns Chris Johns 3 years ago
Summary

PowerPC shared ISA IRQ support is broken

Description

The PowerPC shared ISA IRQ management in i8259s.c is broken. It fails to handle:

  • Interrupt acknowledgements for the slave controller when the master has a lower priority pending interrupt acknowledge the slave and the master controllers
  • The nesting support to suspend and resume an interrupt does not correctly handle the enable/disable
  • The initialise of an interrupt does not handle any pending request
  • Locks up when using with the IRQ server which is executing the handler in a task context

All these issues have been fixed in the i386 BSP however the code between is not shared as the i386 BSP has BSP specific IRQ management code as well.

#4240 3 years ago fixed lib/debugger Ryan Long Chris Johns 3 years ago
Summary

rtems-debugger-target.c: Dereference before null check spotted by Coverity

Description

CID 1468682: swbreaks is assigned a value dereferenced from target before it has been verified that target is not null.

173  rtems_debugger_target*         target = rtems_debugger->target;
   deref_ptr: Directly dereferencing pointer target.
174  rtems_debugger_target_swbreak* swbreaks = target->swbreaks.block;
175  size_t                         swbreak_size;
176  uint8_t*                       loc = (void*) addr;
177  size_t                         i;
178  int                            r;
179
   CID 1468682 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking target suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
180  if (target == NULL || swbreaks == NULL || kind != target->breakpoint_size) {
181    errno = EIO;
182    return -1;
183  }
#4241 3 years ago fixed lib/debugger Ryan Long Chris Johns 3 years ago
Summary

rtems-debugger-threads.c: Three Dereference before null check errors spotted by Coverity

Description

CID 1468681: Dereference before null check in rtems_debugger_thread_continue(). CID 1468690: Dereference before null check in rtems_debugger_thread_system_resume(). CID 1468694: Dereference before null check in rtems_debugger_thread_find_index().

430  rtems_debugger_threads* threads = rtems_debugger->threads;
431  rtems_debugger_thread*  current;
432  int                     r = 0;
   deref_ptr_in_call: Dereferencing pointer threads. [show details]
433  current = rtems_debugger_thread_current(threads);
   CID 1468681 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking threads suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
434  if (threads != NULL && current != NULL) {
347  rtems_debugger_threads* threads = rtems_debugger->threads;
348  rtems_debugger_thread*  current;
349  int                     r = 0;
   deref_ptr_in_call: Dereferencing pointer threads. [show details]
350  current = rtems_debugger_thread_current(threads);
   CID 1468690 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking threads suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
351  if (threads != NULL && current != NULL) {
150  rtems_debugger_threads* threads = rtems_debugger->threads;
   deref_ptr_in_call: Dereferencing pointer threads. [show details]
151  rtems_debugger_thread*  current = rtems_debugger_thread_current(threads);
152  int                     r = -1;
   CID 1468694 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking threads suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
153  if (threads != NULL) {
#4242 3 years ago duplicate lib/debugger Ryan Long Chris Johns 3 years ago
Summary

rtems-debugger-threads.c: Three Dereference before null check errors spotted by Coverity

Description

CID 1468681: Dereference before null check in rtems_debugger_thread_continue(). CID 1468690: Dereference before null check in rtems_debugger_thread_system_resume(). CID 1468694: Dereference before null check in rtems_debugger_thread_find_index().

430  rtems_debugger_threads* threads = rtems_debugger->threads;
431  rtems_debugger_thread*  current;
432  int                     r = 0;
   deref_ptr_in_call: Dereferencing pointer threads. [show details]
433  current = rtems_debugger_thread_current(threads);
   CID 1468681 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking threads suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
434  if (threads != NULL && current != NULL) {
347  rtems_debugger_threads* threads = rtems_debugger->threads;
348  rtems_debugger_thread*  current;
349  int                     r = 0;
   deref_ptr_in_call: Dereferencing pointer threads. [show details]
350  current = rtems_debugger_thread_current(threads);
   CID 1468690 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking threads suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
351  if (threads != NULL && current != NULL) {
150  rtems_debugger_threads* threads = rtems_debugger->threads;
   deref_ptr_in_call: Dereferencing pointer threads. [show details]
151  rtems_debugger_thread*  current = rtems_debugger_thread_current(threads);
152  int                     r = -1;
   CID 1468694 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking threads suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
153  if (threads != NULL) {
#4244 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Possible infinite recursion in Classic API Signal handling

Description

Due to implementation flaws, there may be an infinite recursion in the signal processing even if ASR mode is disabled during signal processing. The problem is that rtems_task_mode() is used to set up and tear down the ASR-specific task mode. This needs to be changed to set the modes under protection of the right locks and using a loop instead of recursion to schedule the next ASR processing step if needed.

#4245 3 years ago fixed bsps Chris Johns Chris Johns 3 years ago
Summary

Add PCI regions support to RTEMS nexus bus support

Description

The RTEMS Nexus bus support in LibBSD assumes a linear address map with a !:1 address mapping between the PCI bus master and CPU. Some target hardware has a different PCI bus master address space to the CPU memory address space.

  • Provide a BSP means to enable PCI support in machine/bus.h in LibBSD
  • Update powerpc/motorola_powerpc to support cache coherent memory
  • Change any PowerPC internal calls that clash with the Linux IO interface used in LibBSD. The PowerPC shared BSP calls have a different call signature
#4246 3 years ago fixed network/libbsd Chris Johns Chris Johns 17 months ago
Summary

Add libbsd DC NIC support to mvme2700 board

Description

Add support for the Tulip NIC to LibBSD for the MVME 2700 (the mvme2307 bsp).

#4250 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

b1553brm.c: Dereference before null check error spotted by Coverity

Description

CID 1399829: Dereference before null check in brm_control().

rtems_libio_ioctl_args_t *ioarg = (rtems_libio_ioctl_args_t *) arg;
    deref_ptr: Directly dereferencing pointer ioarg.
 997        unsigned int *data = ioarg->buffer;
 998        struct bc_msg *cmd_list = (struct bc_msg *) ioarg->buffer;
 999        brm_priv *brm;
1000        struct drvmgr_dev *dev;
1001        rtems_device_driver ret;
1002        int len, msglen;
1003
1004        FUNCDBG("brm_control[%d]: [%i,%i]\n", minor, major, minor);
1005
1006        if ( drvmgr_get_dev(&b1553brm_drv_info.general, minor, &dev) ) {
1007                return RTEMS_UNSATISFIED;
1008        }
1009        brm = (brm_priv *)dev->priv;
1010
    CID 1399829 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking ioarg suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1011        if (!ioarg) {
#4251 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

b1553rt.c: Dereference before null check error spotted by Coverity

Description

CID 1399830: Dereference before null check in rt_control().

621    rtems_libio_ioctl_args_t *ioarg = (rtems_libio_ioctl_args_t *) arg;
   deref_ptr: Directly dereferencing pointer ioarg.
622    unsigned int *data = ioarg->buffer;
623
624    rt_priv *rt;
625    struct drvmgr_dev *dev;
626
627    FUNCDBG("rt_control[%d]: [%i,%i]\n", minor, major, minor);
628
629    if ( drvmgr_get_dev(&b1553rt_drv_info.general, minor, &dev) ) {
630        return RTEMS_UNSATISFIED;
631    }
632    rt = (rt_priv *)dev->priv;
633
   CID 1399830 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking ioarg suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
634    if (!ioarg) {
#4252 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

grtc.c: Dereference before null check error spotted by Coverity

Description

CID 1399840: Dereference before null check in grtc_ioctl().

1534        rtems_libio_ioctl_args_t *ioarg = (rtems_libio_ioctl_args_t *)arg;
    deref_ptr: Directly dereferencing pointer ioarg.
1535        unsigned int *data = ioarg->buffer;
1536        int status,frm_len,i,ret;
1537        struct grtc_ioc_buf_params *buf_arg;
1538        struct grtc_ioc_config *cfg;
1539        struct grtc_ioc_hw_status *hwregs;
1540        struct grtc_ioc_pools_setup *pocfg;
1541        struct grtc_ioc_assign_frm_pool *poassign;
1542        struct grtc_frame *frm, *frms;
1543        struct grtc_frame_pool *pool;
1544        struct grtc_list *frmlist;
1545        struct grtc_ioc_stats *stats;
1546        unsigned int mem;
1547        IRQ_LOCAL_DECLARE(oldLevel);
1548
1549        FUNCDBG();
1550
1551        if ( drvmgr_get_dev(&grtc_drv_info.general, minor, &dev) ) {
1552                return RTEMS_INVALID_NUMBER;
1553        }
1554        pDev = (struct grtc_priv *)dev->priv;
1555
    CID 1399840 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking ioarg suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1556        if (!ioarg)
#4253 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

grspw_pkt.c: Dereference before null check error spotted by Coverity

Description

CID 1399846: Dereference before null check in grspw_addr_ctrl().

657        struct grspw_priv *priv = d;
   deref_ptr: Directly dereferencing pointer priv.
658        struct grspw_regs *regs = priv->regs;
659        unsigned int ctrl, nodeaddr;
660        SPIN_IRQFLAGS(irqflags);
661        int i;
662
   CID 1399846 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking priv suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
663        if (!priv || !cfg)
#4254 3 years ago fixed lib Ryan Long Ryan Long <thisisryanlong@…> 3 years ago
Summary

shell.c: Dereference before null check error spotted by Coverity

Description

CID 1467420: Dereference before null check in rtems_shell_line_editor().

322  int          in_fileno = fileno(in);
   deref_ptr_in_call: Dereferencing pointer out.
323  int          out_fileno = fileno(out);
324
325  /*
326   * Only this task can use this file descriptor because calling
327   * fileno will block if another thread call made a call on this
328   * descriptor.
329   */
   CID 1467420 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking out suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
330  output = (out && isatty(in_fileno));
#4258 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

printertask.c: Unchecked return value errors spotted by Coverity

Description

CID 1399710: Unchecked return value in printer_task().

138      switch ( buffer->action_kind ) {
139        case ACTION_WRITE:
140          write( fd, &buffer->data[ 0 ], buffer->action_data.size );
141          printer_task_append_buffer( ctx, &ctx->free_buffers, buffer );
   4. Breaking from switch.
   8. Breaking from switch.
   15. Breaking from switch.
142          break;
143        case ACTION_DRAIN:
   CID 1399710 (#1 of 1): Unchecked return value (CHECKED_RETURN)19. check_return: Calling fsync without checking return value (as is done elsewhere 4 out of 5 times).
144          fsync(fd);
#4259 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

grspw.c: Unchecked return value error spotted by Coverity

Description

CID 1399781: Unchecked return value in grspw_device_init().

551        if ( value )
552                pDev->bd_dma_area = value->i;
553
   13. Condition grspw_buffer_alloc(pDev), taking false branch.
554        if (grspw_buffer_alloc(pDev)) 
555                return RTEMS_NO_MEMORY;
556
557        /* Create semaphores */
   CID 1399781 (#2 of 2): Unchecked return value (CHECKED_RETURN)14. check_return: Calling rtems_semaphore_create without checking return value (as is done elsewhere 15 out of 17 times).
558        rtems_semaphore_create(
#4260 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

record-client.c: Unchecked return value error spotted by Coverity

Description

CID 1456677: Unchecked return value in resolve_hold_back().

191    for ( index = begin_index; index < per_cpu->item_index; ++index ) {
192      const rtems_record_item_64 *item;
193
194      item = &per_cpu->items[ index ];
   CID 1456677 (#1 of 1): Unchecked return value (CHECKED_RETURN)12. check_return: Calling visit without checking return value (as is done elsewhere 4 out of 5 times).
195      visit( ctx, item->event, item->data );
#4261 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

getgrent.c: Unchecked return value error spotted by Coverity

Description

CID 1459004: Unchecked return value in endgrent().

102  if (ctx->fp != NULL) {
103    fclose(ctx->fp);
104  }
105
106  free(ctx);
   CID 1459004 (#1 of 1): Unchecked return value (CHECKED_RETURN)3. check_return: Calling pthread_setspecific without checking return value (as is done elsewhere 5 out of 6 times).
107  pthread_setspecific(grp_key, NULL);
#4262 3 years ago fixed lib/debugger Ryan Long Chris Johns 3 years ago
Summary

rtems-debugger-threads.c: Unchecked return value error spotted by Coverity

Description

CID 1468688: Unchecked return value in snapshot_thread().

262    else {
263      rtems_status_code sc;
264      sc = rtems_task_suspend(id);
265      if (sc != RTEMS_SUCCESSFUL && sc != RTEMS_ALREADY_SUSPENDED) {
266        rtems_debugger_printf("error: rtems-db: thread: suspend: %08" PRIx32 ": %s\n",
267                              id, rtems_status_text(sc));
268        r = -1;
269      }
270    }
271
272    /*
273     * Read the target registers into the thread register array.
274     */
   CID 1468688 (#1 of 1): Unchecked return value (CHECKED_RETURN)17. check_return: Calling rtems_debugger_target_read_regs without checking return value (as is done elsewhere 4 out of 5 times).
275    rtems_debugger_target_read_regs(thread);
#4264 3 years ago fixed network/libbsd GabrielMoyano Jan Sommer 3 years ago
Summary

Activate ehci_pci in rtems-libbsd (cloned)

Description

Cloned from #4263:


Import ehci_pci from freebsd-org using freebsd-to-rtems.py

#4265 3 years ago wontfix rtems Sebastian Huber Sebastian Huber 2 years ago
Summary

Add rtems_get_build_hash()

Description

Add a function to report a hash value of the build environment in the test suite results.

/* Generated from spec:/rtems/config/if/get-build-hash */

/**
 * @ingroup RTEMSAPIConfig
 *
 * @brief Gets the RTEMS build hash.
 *
 * The build hash is calculated from all key-value pairs of the build
 * environment.  Local file system paths in the values do not contribute to the
 * hash value.
 *
 * @return Returns the pointer to the RTEMS build hash.
 *
 * @par Notes
 * The build hash can be used to distinguish test suite results obtained from
 * different build environments.
 *
 * @par Constraints
 * @parblock
 * The following constraints apply to this directive:
 *
 * * The directive may be called from within any runtime context.
 *
 * * The directive will not cause the calling task to be preempted.
 * @endparblock
 */
const char *rtems_get_build_hash( void );
#4267 3 years ago fixed rtems Sebastian Huber Sebastian Huber 19 months ago
Summary

Add rtems_get_target_hash()

Description

Add a function to report a hash value characterizing the target system in the test suite results.

/* Generated from spec:/rtems/config/if/get-target-hash */

/**
 * @ingroup RTEMSAPIConfig
 *
 * @brief Gets the RTEMS target hash.
 *
 * The target hash is calculated from BSP-specific values which characterize a
 * target system.
 *
 * @return Returns the pointer to the RTEMS target hash.
 *
 * @par Notes
 * @parblock
 * For example, the device tree, settings of the memory controller, a serial
 * number of a chip may be used to calculate the target hash.
 *
 * The target hash can be used to distinguish test suite results obtained from
 * different target systems.
 * @endparblock
 *
 * @par Constraints
 * @parblock
 * The following constraints apply to this directive:
 *
 * * The directive may be called from within any runtime context.
 *
 * * The directive will not cause the calling task to be preempted.
 * @endparblock
 */
const char *rtems_get_target_hash( void );
#4269 3 years ago fixed rtems Sebastian Huber Sebastian Huber 19 months ago
Summary

Add rtems_get_build_label()

Description

Add the following directive:

/* Generated from spec:/rtems/config/if/get-build-label */

/**
 * @ingroup RTEMSAPIConfig
 *
 * @brief Gets the RTEMS build label.
 *
 * The build label is a user-provided string defined by the build
 * configuration.
 *
 * @return Returns the pointer to the RTEMS build label.
 *
 * @par Notes
 * The build label can be used to distinguish test suite results obtained from
 * different build configurations.  A use case is to record test results with
 * performance data to track performance regressions.  For this a database of
 * performance limits is required.  The build label and the target hash
 * obtained from rtems_get_target_hash() can be used as a key to obtain
 * performance limits.
 *
 * @par Constraints
 * @parblock
 * The following constraints apply to this directive:
 *
 * * The directive may be called from within any runtime context.
 *
 * * The directive will not cause the calling task to be preempted.
 * @endparblock
 */
const char *rtems_get_build_label( void );
#4270 3 years ago fixed score Sebastian Huber Sebastian Huber 3 years ago
Summary

A failing task extension produces zombi objects and resource leaks

Description

In _Thread_Initialize() we have this code:

  _Objects_Open_u32( &information->Objects, &the_thread->Object, config->name );

  /*
   *  We assume the Allocator Mutex is locked and dispatching is
   *  enabled when we get here.  We want to be able to run the
   *  user extensions with dispatching enabled.  The Allocator
   *  Mutex provides sufficient protection to let the user extensions
   *  run safely.
   */
  extension_status = _User_extensions_Thread_create( the_thread );
  if ( extension_status )
    return true;

If an extension fails, then the thread object is not closed. Also the delete extensions are not called. If a later create extension fails, the earlier create extensions may have allocated resources which could be freed by a corresponding delete extension.

#4277 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

grtc.c: Missing break in switch errors spotted by Coverity

Description

CID 1399761: Missing break in switch in process_dma(). CID 1399765: Missing break in switch in process_dma(). CID 1399766: Missing break in switch in process_dma(). CID 1399777: Missing break in switch in process_dma().

CID 1399761

1366                pDev->frm = NULL;
1367                pDev->frame_state = FRM_STATE_HDR;
1368
    CID 1399761: Missing break in switch (MISSING_BREAK) [select issue]
    fallthrough: The above case falls through to this one.
1369                case FRM_STATE_HDR:
1370                DBG2("FRAME_STATE_HDR\n");

CID 1399765

1450                pDev->frame_state = FRM_STATE_PAYLOAD;
1451                pDev->frm = frm;
1452
1453                case FRM_STATE_PAYLOAD:
1454                DBG2("FRAME_STATE_PAYLOAD\n");

CID 1399766

1450                pDev->frame_state = FRM_STATE_PAYLOAD;
1451                pDev->frm = frm;
1452
    CID 1399766 (#1 of 1): Missing break in switch (MISSING_BREAK)unterminated_case: The case for value FRM_STATE_PAYLOAD is not terminated by a break statement.
1453                case FRM_STATE_PAYLOAD:
1454                DBG2("FRAME_STATE_PAYLOAD\n");

CID 1399767

1354        switch( pDev->frame_state ) {
    CID 1399777 (#1 of 1): Missing break in switch (MISSING_BREAK)unterminated_case: The case for value FRM_STATE_NONE is not terminated by a break statement.
1355                case FRM_STATE_NONE:
1356                DBG2("FRAME_STATE_NONE\n");
1357        
1358                /* Find Start of next frame by searching for 0x01 */
1359                ret = grtc_hw_find_frm(pDev);
1360                if ( ret != 0 ) {
1361                        /* Frame start not found */
1362                        return 0;
1363                }
1364                
1365                /* Start of frame found, Try to copy header */
1366                pDev->frm = NULL;
1367                pDev->frame_state = FRM_STATE_HDR;
#4278 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

cpuusagetop.c: Missing break in switch errors spotted by Coverity

Description

CID 1399726: Missing break in switch in task_usage(). CID 1399728: Missing break in switch in task_usage(). CID 1399742: Missing break in switch in task_usage().

CID 1399726

233            continue;
   CID 1399726 (#1 of 1): Missing break in switch (MISSING_BREAK)unterminated_case: The case for value 2U is not terminated by a break statement.
234        case RTEMS_TOP_SORT_CURRENT_PRI:
235          if (
236            _Thread_Get_priority( thread )
237              > _Thread_Get_priority( data->tasks[j] )
238          ) {
239            continue;
240          }
   fallthrough: The above case falls through to this one.

CID 1399728

230            continue;
   CID 1399728 (#1 of 1): Missing break in switch (MISSING_BREAK)unterminated_case: The case for value 1U is not terminated by a break statement.
231        case RTEMS_TOP_SORT_REAL_PRI:
232          if (thread->Real_priority.priority > data->tasks[j]->Real_priority.priority)
233            continue;
   fallthrough: The above case falls through to this one.
234        case RTEMS_TOP_SORT_CURRENT_PRI:

CID 1399742

226            continue;
   CID 1399742 (#1 of 1): Missing break in switch (MISSING_BREAK)unterminated_case: The case for value 3U is not terminated by a break statement.
227        case RTEMS_TOP_SORT_TOTAL:
228          if (CPU_usage_Equal_to(&usage, &data->zero) ||
229              CPU_usage_Less_than(&usage, &data->usage[j]))
230            continue;
   fallthrough: The above case falls through to this one.
231        case RTEMS_TOP_SORT_REAL_PRI:
#4279 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

pci_cfg_read.c: Missing break in switch error spotted by Coverity

Description

CID 1399723: Missing break in switch in pci_read_addressable().

 70        switch (type) {
 71        case PCI_RES_IO:
 72                range0 = &bus->dev.resources[BRIDGE_RES_IO];
 73                break;
   CID 1399723 (#1 of 1): Missing break in switch (MISSING_BREAK)unterminated_case: The case for value 3 is not terminated by a break statement.
 74        case PCI_RES_MEM:
 75                range1 = &bus->dev.resources[BRIDGE_RES_MEM];
   fallthrough: The above case falls through to this one.
 76        default:
 77        case PCI_RES_MEMIO:
#4280 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

gen_uuid.c: Unchecked return value from library errors spotted by Coverity

Description

CID 1049146: Unchecked return value from library in get_clock(). CID 1049147: Unchecked return value from library in get_random_fd().

CID 1049146

427                rewind(state_f);
428                fl.l_type = F_UNLCK;
   CID 1049146 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)18. check_return: Calling fcntl(state_fd, 8, &fl) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
429                fcntl(state_fd, F_SETLK, &fl);
430        }
431
432        *clock_high = clock_reg >> 32;

CID 1049147

167                        if (i >= 0)
   CID 1049147 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)5. check_return: Calling fcntl(fd, 2, i | 1) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
168                                fcntl(fd, F_SETFD, i | FD_CLOEXEC);
169                }
#4281 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

main_chmod.c: Unchecked return value from library error spotted by Coverity

Description

CID 1063856: Unchecked return value from library in rtems_shell_main_chmod().

55  for (n=2 ; n < argc ; n++)
  CID 1063856 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)4. check_return: Calling chmod(argv[n++], mode) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
56    chmod(argv[n++], mode);
57
58  return 0;
59}
#4282 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

pwdgrp.c: Unchecked return value from library error spotted by Coverity

Description

CID 1255518: Unchecked return value from library in pwdgrp_init().

 65  /*
 66   * Do the best to create this directory.
 67   */
   CID 1255518 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)1. check_return: Calling mkdir("/etc", 493U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
 68  mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
#4283 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

gr_rasta_spw_router.c: Unchecked return value from library error spotted by Coverity

Description

CID 1399760: Unchecked return value from library in gr_rasta_spw_router_init1().

412        priv->prefix[14] += dev->minor_drv;
   CID 1399760 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling mkdir(priv->prefix, 511U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
413        mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
414        priv->prefix[15] = '/';
415        priv->prefix[16] = '\0';
416
#4284 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

gr_rasta_io.c: Unchecked return value from library error spotted by Coverity

Description

CID 1399763: Unchecked return value from library in gr_rasta_io_init1().

575        strcpy(priv->prefix, "/dev/rastaio0");
576        priv->prefix[12] += dev->minor_drv;
   CID 1399763 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling mkdir(priv->prefix, 511U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
577        mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
578        priv->prefix[13] = '/';
579        priv->prefix[14] = '\0';
#4285 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

gr_leon4_n2x.c: Unchecked return value error from library error spotted by Coverity

Description

CID 1399767: Unchecked return value error from library in gr_cpci_leon4_n2x_init1().

495        strcpy(priv->prefix, "/dev/leon4n2x0");
496        priv->prefix[13] += dev->minor_drv;
   CID 1399767 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling mkdir(priv->prefix, 511U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
497        mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
498        priv->prefix[14] = '/';
499        priv->prefix[15] = '\0';
#4286 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

gr_rasta_tmtc.c: Unchecked return value from library error spotted by Coverity

Description

CID 1399771: Unchecked return value from library in gr_rasta_tmtc_init1().

588        strcpy(priv->prefix, "/dev/rastatmtc0");
589        priv->prefix[14] += dev->minor_drv;
   CID 1399771 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling mkdir(priv->prefix, 511U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
590        mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
591        priv->prefix[15] = '/';
592        priv->prefix[16] = '\0';
#4287 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

gr_rasta_adcdac.c: Unchecked return value from library error spotted by Coverity

Description

CID 1399780: Unchecked return value from library in gr_rasta_adcdac_init1().

396        strcpy(priv->prefix, "/dev/rastaadcdac0");
397        priv->prefix[16] += dev->minor_drv;
   CID 1399780 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling mkdir(priv->prefix, 511U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
398        mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
399        priv->prefix[17] = '/';
400        priv->prefix[18] = '\0';
#4288 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

gr_701.c: Unchecked return value from library error spotted by Coverity

Description

CID 1399783: Unchecked return value from library in gr701_init1().

331        strcpy(priv->prefix, "/dev/gr701_0");
332        priv->prefix[11] += dev->minor_drv;
   CID 1399783 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling mkdir(priv->prefix, 511U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
333        mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
334        priv->prefix[12] = '/';
335        priv->prefix[13] = '\0';
#4289 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

gr_tmtc_1553.c: Unchecked return value from library error spotted by Coverity

Description

CID 1399785: Unchecked return value from library in gr_tmtc_1553_init1().

315        strcpy(priv->prefix, "/dev/tmtc1553_0");
316        priv->prefix[14] += dev->minor_drv;
   CID 1399785 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling mkdir(priv->prefix, 511U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
317        mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
318        priv->prefix[15] = '/';
319        priv->prefix[16] = '\0';
#4290 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

gr_cpci_gr740.c: Unchecked return value from library error spotted by Coverity

Description

CID 1437630: Unchecked return value from library in gr_cpci_gr740_inti1().

472        strcpy(priv->prefix, "/dev/gr740_0");
473        priv->prefix[11] += dev->minor_drv;
   CID 1437630 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling mkdir(priv->prefix, 511U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
474        mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
475        priv->prefix[12] = '/';
476        priv->prefix[13] = '\0';
#4291 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

main_help.c: Unchecked return value from library error spotted by Coverity

Description

CID 1437650: Unchecked return value from library in rtems_shell_help().

472        strcpy(priv->prefix, "/dev/gr740_0");
473        priv->prefix[11] += dev->minor_drv;
   CID 1437630 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)2. check_return: Calling mkdir(priv->prefix, 511U) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
474        mkdir(priv->prefix, S_IRWXU | S_IRWXG | S_IRWXO);
475        priv->prefix[12] = '/';
476        priv->prefix[13] = '\0';
#4294 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

satcan.c: Unsigned compared against 0 error spotted by Coverity

Description

CID 1399768: Unsigned compared against 0 in satcan_ioctl().

303                DBG("SatCAN: ioctl: masking register %d, with value %x\n\r",
304                    regmod->reg, regmod->val);
   unsigned_compare: This less-than-zero comparison of an unsigned value is never true. regmod->reg < 0U.
305                if (regmod->reg < 0)
306                        return RTEMS_INVALID_NAME;
307                else if (regmod->reg <= SATCAN_FILTER_STOP)
#4295 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

b1553brm.c: Unsigned compared against 0 error spotted by Coverity

Description

CID 1399773: Unsigned compared against 0 in brm_write().

983        rw_args->bytes_moved = count; 
984
    CID 1399773 (#1 of 1): Unsigned compared against 0 (NO_EFFECT)unsigned_compare: This greater-than-or-equal-to-zero comparison of an unsigned value is always true. count >= 0U.
 985        if (count >= 0) {
 986                return RTEMS_SUCCESSFUL;
 987        }
#4301 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

grcan.c: Unused value error spotted by Coverity

Description

CID 1437613: Unused value in grcan_set_sfilter().

1788                /* disable TX/RX SYNC filtering */
    CID 1437613 (#1 of 1): Unused value (UNUSED_VALUE)assigned_value: Assigning value 4294967295ULL to pDev->sfilter.mask here, but that stored value is overwritten before it can be used.
1789                pDev->sfilter.mask = 0xffffffff;
    value_overwrite: Overwriting previous write to pDev->sfilter.mask with value 0ULL.
1790                pDev->sfilter.mask = 0;
#4302 3 years ago fixed arch/powerpc Joel Sherrill Joel Sherrill <joel@…> 2 years ago
Summary

Obsolete powerpc/haleakala board

Description

This BSP was merged in 1995 and there has been no mention of it recently. There do not appear to be any recent modifications to this BSP that are not part of a generic sweep of BSPs.

Removing this will reduce the number of BSPs which need modification to account for changes being introduced to support libbsd bus interface properly on PowerPC.

#4320 3 years ago fixed bsps Jan Sommer Jan Sommer 3 years ago
Summary

Add driver for cadence-spi device for xilinx based BSPs

Description

Implement a spidev compatible driver for using the cadence-spi device of the Zynq devices in standard SPI mode.

#4321 3 years ago fixed bsps Jan Sommer Jan Sommer 3 years ago
Summary

Add spi driver for AXI SPI ip core from Xilinx

Description

Add a spidev compatible driver for the xilinx axi quad spi ip core for standard SPI mode

#4323 3 years ago fixed bsps Daniel Hellstrom Daniel Hellstrom 3 years ago
Summary

grlib,can: introduce a new common CAN baud-rate timing calculating functions

Description

There is no point in having two different implementations specific per GRLIB CAN device driver (OCCAN and GRCAN). Instead we can use the common CAN timing definitions and translate that into the device specific parameters using a new common calculation function.

#4324 3 years ago fixed bsps Daniel Hellstrom Daniel Hellstrom 3 years ago
Summary

grlib,grcanfd: extend the GRCAN driver with GRCANFD support

Description

The new GRCAN_FD IP supports CAN FD standard and is mostly backwards compatible with GRCAN SW interface. It introduces support for CAN-FD frames and a new bit-rate timing registers for new baud-rate.

The GRCAN driver have been extended to support the GRCANFD IP using the same API. Device IP-core specific functions are split into different files (grcanstd.c and grcanfd.c).

(this was fixed in 5 branch, see ticket #4307).

#4326 3 years ago fixed score Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

objectextendinformation.c: Dereference after null check error spotted by Coverity

Description

CID 26033: Dereference after null check in _Objects_Extend_information().

172    if ( old_maximum > extend_count ) {
173      /*
174       *  Copy each section of the table over. This has to be performed as
175       *  separate parts as size of each block has changed.
176       */
   CID 26033 (#1 of 1): Dereference after null check (FORWARD_NULL)11. var_deref_model: Passing null pointer information->object_blocks to memcpy, which dereferences it.
177      memcpy(
178        object_blocks,
179        information->object_blocks,
180        block_count * sizeof( *object_blocks )
181      );
#4329 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

main_rtrace.c: Dereference after null check error spotted by Coverity

Description

CID 1399709: Dereference after null check in rtems_trace_buffering_shell_save().

   6. var_compare_op: Comparing buf to null implies that buf might be null.
472  if (!buf)
473  {
474    close (out);
475    printf ("error: no memory\n");
476  }
477
   CID 1399709 (#1 of 1): Dereference after null check (FORWARD_NULL)7. var_deref_model: Passing null pointer buf to memset, which dereferences it.
478  memset (buf, 0, SAVE_BUF_SIZE);
#4331 3 years ago fixed lib Ryan Long Daniel Hellstrom 14 months ago
Summary

main_pci.c: Dereference after null check error spotted by Coverity

Description

CID 1399716: Dereference after null check in shell_pci_infodev().

   10. var_compare_op: Comparing bus to null implies that bus might be null.
358  if (!bus) {
   CID 1399716 (#1 of 1): Dereference after null check (FORWARD_NULL)11. var_deref_op: Dereferencing null pointer bus.
359    printf(" AT BUS:        0x%x via Host Bridge\n", bus->num);
360  } else {
#4336 3 years ago fixed arch/sparc Daniel Hellstrom Daniel Hellstrom 3 years ago
Summary

Improve the workaround for the LEON3FT store-store errata: TN-0009 on master

Description

See also:

https://www.gaisler.com/doc/antn/GRLIB-TN-0009.pdf

Some areas were already fixed by #3057. RTEMS-5 branch ticket #4154.

#4338 3 years ago fixed rtems Frank Kuehndel Sebastian Huber 21 months ago
Summary

rtems_clock_set(): Cannot set future dates later than approximately 2105

Description

Short Problem Description

RTEMS Classic API Guide says:

RTEMS can represent time points of this clock in nanoseconds ranging from 1988-01-01T00:00:00.000000000Z to 2514-05-31T01:53:03.999999999Z.

  • Yet, years larger than roughly 2105 to 2110 cannot be set (or at least the date should be wrong but this never occured in my tests).

The possible RETURN VALUES are RTEMS_SUCCESSFUL, RTEMS_INVALID_ADDRESS, RTEMS_INVALID_CLOCK

  • Yet, rtems_clock_set() can return status RTEMS_INVALID_NUMBER, too. (Only for such dates in the far future.)

How To Replicate?

Call rtems_clock_set() with this time_of-day: {

year = 2514, month = 5, day = 31, hour = 1, minute = 53, second = 3, ticks = 995

} The return value will be RTEMS_INVALID_NUMBER.

Bugs in _TOD_To_seconds()

cpukit/rtems/src/clockset.c: rtems_clock_set() calls

  • cpukit/rtems/src/clocktodvalidate.c: _TOD_Validate() and
  • cpukit/rtems/src/clocktodtoseconds.c: _TOD_To_seconds() and
  • cpukit/score/src/coretodset.c: _TOD_Set()

First issue:

_TOD_To_seconds() converts the time_of_day structure into seconds using a variable time of type uint32_t. This simply overflows when in comes close to year 2110.

Debugger output at the end of _TOD_To_seconds():

(gdb) print the_tod->year
$16 = 2104
(gdb) print time
$17 = 4233686400

with a higher year:

(gdb) print the_tod->year
$28 = 2514
(gdb) print *the_tod
$31 = {
  year = 2514,
  month = 5,
  day = 31,
  hour = 1,
  minute = 53,
  second = 3,
  ticks = 995
}
(gdb) print time
$29 = 192272

Second issue:

_TOD_To_seconds() can (most likely) not handle the leap year issues of the years 2200, 2300, 2400, 2500 because it has dedicated code for the 2100 case only:

  /* The year 2100 is not a leap year */
  if ( time
      >= (TOD_SECONDS_AT_2100_03_01_00_00 - TOD_SECONDS_1970_THROUGH_1988)) {
    time -= TOD_SECONDS_PER_DAY;
  }

_TOD_Check_time_of_day_and_run_hooks() causes STATUS_INVALID_NUMBER

cpukit/score/src/coretodset.c: _TOD_Set() calls

  • cpukit/score/src/coretodset.c: _TOD_Check_time_of_day_and_run_hooks()

in this code snippet (note return status):

  status = _TOD_Check_time_of_day_and_run_hooks( tod );
  if ( status != STATUS_SUCCESSFUL ) {
    _TOD_Release( lock_context );
    return status;
  }

_TOD_Check_time_of_day_and_run_hooks( tod ) can return status STATUS_INVALID_NUMBER which is not documented for rtems_clock_set(). The small time in seconds value 192272 from the integer overrun discussed above triggers the middle if clause:

static Status_Control _TOD_Check_time_of_day_and_run_hooks(
  const struct timespec *tod
)
{
  if ( !_Watchdog_Is_valid_timespec( tod ) ) {
    return STATUS_INVALID_NUMBER;
  }

  if ( tod->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) {
    return STATUS_INVALID_NUMBER;
  }

  if ( _Watchdog_Is_far_future_timespec( tod ) ) {
    return STATUS_INVALID_NUMBER;
  }

  return _TOD_Hook_Run( TOD_ACTION_SET_CLOCK, tod );
}

Final Notes

  • I found #2665 and #2548 but I do not say these are relevant here.
  • #define WATCHDOG_MAX_SECONDS 0x3ffffffff in cpukit/include/rtems/score/watchdogimpl.h covers 17179869183 seconds which are some 544 years
  • _TOD_Check_time_of_day_and_run_hooks() seems to be only used by _TOD_Set() but _TOD_Set() has three users.
  • I did not check whether the invers conversation (rtems_clock_get_tod()) works for dates which are centuries in the future.
#4339 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

main_cp.c: Unused value error spotted by Coverity

Description

CID 1255344: Unused value in copy().

315                case FTS_DC:                    /* Warn, continue. */
316                        warnx("%s: directory causes a cycle", curr->fts_path);
   CID 1255344 (#5 of 5): Unused value (UNUSED_VALUE)assigned_value: Assigning value from rval to badcp here, but that stored value is overwritten before it can be used.
317                        badcp = rval = 1;
318                        continue;
#4340 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

print-ls.c: Unused value error spotted by Coverity

Description

CID 1255346: Unused value in rtems_shell_ls_printacol

327                if (col >= numcols) {
   CID 1255346 (#1 of 1): Unused value (UNUSED_VALUE)assigned_value: Assigning value from col to chcnt here, but that stored value is overwritten before it can be used.
328                        chcnt = col = 0;
329                        (void)putchar('\n');
330                }
   value_overwrite: Overwriting previous write to chcnt with value from printaname(globals, p, dp->s_inode, ((globals->f_humanize && 0) ? dp->s_size : dp->s_block)).
331                chcnt = printaname(globals, p, dp->s_inode,
#4341 3 years ago fixed lib/dl Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

fastlz.c: Unused value error spotted by Coverity

Description

CID 1399751: Unused value in fastlz2_compress().

219    if(ip[0] == ip[-1] && FASTLZ_READU16(ip-1)==FASTLZ_READU16(ip+1))
220    {
221      distance = 1;
   CID 1399751 (#1 of 1): Unused value (UNUSED_VALUE)assigned_pointer: Assigning value from ip + 3 to ip here, but that stored value is overwritten before it can be used.
222      ip += 3;
#4342 3 years ago fixed bsps Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

disp_hcms29xx.c: Unused value error spotted by Coverity

Description

CID 1399752: Unused value in disp_hcms29xx_update_task().

598      if (rc == RTEMS_SUCCESSFUL) {
   CID 1399752 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from rtems_semaphore_release(softc_ptr->disp_param.trns_sema_id) to rc here, but that stored value is overwritten before it can be used.
599        rc = rtems_semaphore_release(softc_ptr->disp_param.trns_sema_id);
600      }
#4345 3 years ago fixed network/libbsd Till Straumann Heinz Junkes <junkes@…> 2 years ago
Summary

Nexus Driver for Marvell mv643xx Ethernet Adapter (powerpc/beatnik BSP, MVME6100 board)

Description

This pull request implements a nexus driver (on top of the 5-freebsd-12 branch) for the Marvell 643xx ethernet adapter which is used on the MVME6100 board (powerpc/beatnik BSP).

Note that this driver builds on top of the low-level driver which is part of the beatnik BSP and requires a patch to the rtems bsp which was submitted in a related ticket.

#4346 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Require RTEMS_PRIORITY for MrsP semaphores

Description

The MrsP semaphores are a generalization the priority ceiling semaphores for SMP configurations. Priority ceiling semaphores are required to use the priority task wait queue discipline. Require this discipline also for MrsP semaphores.

#4355 3 years ago fixed test Ryan Long joel@… 3 years ago
Summary

Remove leon3 test configurations which assume sis is built into gdb from rtems-test

Description

When trying to run the tests with rtems-test on leon3, every test was invalid except for minimum. rtems-test is still using sis through gdb when it should be using the dedicated sis executable.

#4356 3 years ago fixed rtems Sebastian Huber Sebastian Huber 2 years ago
Summary

rtems_semaphore_set_priority() uses an invalid SMP lock

Description

If the priority of a locked priority ceiling mutex is set, the used SMP lock sequence is invalid.

#4358 3 years ago fixed admin Sebastian Huber Sebastian Huber 3 years ago
Summary

Priority discipline is broken for semaphores and message queues in SMP configurations

Description

The priority queues in clustered scheduling configurations use a per scheduler priority queue rotation to ensure FIFO fairness across schedulers. This mechanism is implemented in the thread queue surrender operation. Unfortunately some semaphore and message queue directives use wrongly the thread queue extract operation.

#4363 3 years ago wontfix tool/gdb Chris Johns Chris Johns 17 months ago
Summary

GDB does not build on Windows for MSYS2

Description

The details are in the GDB bug ...

https://sourceware.org/bugzilla/show_bug.cgi?id=27657

#4365 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

main_cp.c: Ignore return value from stat()

Description

CID 26051: Unchecked return value from library in main_cp().

257                        if (Rflag && (Lflag || Hflag))
   CID 26051 (#1 of 1): Unchecked return value from library (CHECKED_RETURN)34. check_return: Calling stat(*argv, &tmp_stat) without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
258                                stat(*argv, &tmp_stat);
#4368 3 years ago fixed tool Chris Johns Joel Sherrill 3 years ago
Summary

rtems--tools tool kit temp file constructor does nothing

Description

A change to add an overloaded constructor ...

https://git.rtems.org/rtems-tools/commit/?id=420d7a13672991a1480d06ac02190f2976b9253b

does not do anything. The body of the constructor is empty.

Thinking about this I think the change is not right because the code depends on libiberty make temp call to find the temp directory and that is designed to crate safe temp files.

I am now wondering how the code was tested? The files registered are not known to the clean up handler that runs on exit.

#4374 3 years ago fixed tool Alex White Alex White 3 years ago
Summary

Handle symbol sets in covoar

Description

The covoar tool should be changed to handle all symbol sets for a coverage run rather than being called by coverage.py for each symbol set.

Currently, coverage.py calls covoar once for each symbol set found in the symbol-sets.ini configuration file. This leads to a lot of redundancy. For each symbol set, covoar has to process the objdumps and the coverage information of all the executables even though they do not change.

Changing covoar to process all symbol sets and generate reports in one invocation will result in a large speedup.

This will also require a minor modification to coverage.py to generate the correct .ini file and only call covoar once.

#4375 3 years ago fixed fs Joel Sherrill 2 years ago
Summary

Add futimens() and utimensat()

Description

RTEMS currently only supports utimes() which is marked as Legacy in the POSIX standard. Support needs to be added for futimens() and utimensat() per the following specification:

https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html

utimes() only has second granularity on its times. The newer methods greatly improve on that even if many of the RTEMS file systems do not support nanosecond times on the file access, create, etc timestamps.

The following changes have been identified:

  • The utimes file handler entry will need to be replaced with a handler geared to the futimens() API.
  • File systems will have to be updated to account for the new handler.
  • Existing methods like utimes() will have to be adjusted to be implemented in terms of the futimens() style method.
  • File system test cases will have to be added to the fstests.
#4376 3 years ago fixed tool Alex White Ryan Long <ryan.long@…> 2 years ago
Summary

covoar/ReportsBase Coverage::GenerateReports?() uses raw pointer to std::list

Description

The Coverage::GenerateReports() function uses a variable of type std::list<ReportsBase *> to store the ReportsBase-derived classes used to generate the reports. The function should use an std::vector<std::unique_ptr<ReportsBase>> instead.

An std::vector is the preferred container type in this case because the constant-time insertion and removal properties of std::list are not needed. The smart pointer type std::unique_ptr<ReportsBase> is preferred over ReportsBase * because it eliminates the need for manual pointer deletion at the end of the function.

#4377 3 years ago fixed tool Alex White Alex White 3 years ago
Summary

covoar/Explanations Explanations::writeNotFound() NULL check of wrong variable

Description

The Explanations::writeNotFound() method contains two NULL checks for the fileName variable. The second check should be checking if notFoundFile is NULL because it relates to the error being reported in the true case.

It appears that this was a simple mistake that was never caught until now.

#4378 3 years ago fixed tool Alex White 3 years ago
Summary

covoar/symbol-sets add libuuid to symbol-sets.ini

Description

libuuid should be added to the list of symbol sets in the symbol-sets.ini configuration file.

#4380 3 years ago fixed doc Joel Sherrill Joel Sherrill 3 years ago
Summary

Update RTEMS POSIX Compliance Spreadsheet

Description

There have been additions to RTEMS and the tracking spreadsheet now includes FACE Technical Standard, Edition 3.1

#4382 3 years ago fixed doc Joel Sherrill Joel Sherrill 17 months ago
Summary

mingw - add flex to packages needed

Description

New install of msys2 and pacman instructions in manual missed flex.

#4383 3 years ago fixed tool Alex White Alex White 3 years ago
Summary

covoar keeps DWARF info in memory too long

Description

To get covoar working again, the ELF and DWARF info cleanup was moved from the ExecutableInfo constructor to the ExecutableInfo destructor. Without this change, covoar would report the locations of symbols as unknown:-1. This is because the DWARF info is used later in the ExecutableInfo::getSourceAndLine() method with a call to debug.get_source().

This caused a new issue: the ELF and DWARF info is now held in memory for the life of the program. This causes very high memory usage when running covoar, more than 10 GB for some BSPs.

A quick and dirty solution is to find what is being referenced in debug.get_source() and preserve it after debug.end() is called. It appears that refraining from calling cus.clear() in rld::dwarf::file::end() would be a good place to start. Additionally, the rld::dwarf::sources class will likely need to be changed to copy out the DWARF source file info.

#4384 3 years ago fixed tool Alex White Alex White 3 years ago
Summary

Add SMTP login to rtems-tools mailer

Description

The ability to provide a username and password to perform an SMTP login should be added so that rtems-test results can be mailed via an external SMTP server that requires authentication.

The following additional command line options should be enough to make it work: --smtp-port --smtp-user --smtp-password

The mail-related command line options should be filtered from the mailed logs so that credentials do not get leaked.

#4386 3 years ago fixed tool Alex White Alex White 3 years ago
Summary

covoar missing conditional branch instructions on ARM

Description

Two ARM instructions, cbz and cbnz, are not being treated as conditional branch instructions by covoar currently. They should be added to the list of conditional branch instructions in Target_arm.

#4387 3 years ago fixed tool Alex White Alex White 3 years ago
Summary

covoar marks taken/not taken incorrectly for AArch64

Description

The AArch64 annotated assembly produced by covoar reveals that branches that are never taken are marked "ALWAYS TAKEN" and branches that are always taken are marked "NEVER TAKEN".

It appears that this is caused by incorrect return values in TargetBase::qemuTakenBit() and TargetBase::qemuNotTakenBit(). These methods should be overridden in Target_aarch64 so that the return values are switched.

#4388 3 years ago fixed build Alex White Alex White 3 years ago
Summary

Copy improved mailer.py from rtems-tools

Description

The mailer.py script from rtems-tools has had various improvements made to it that have been left out of the mailer.py script in rtems-source-builder.

The mailer.py in rtems-source-builder should be made to mirror the mailer.py script in rtems-tools so that it incorporates the same improvements.

#4389 3 years ago fixed lib Sebastian Huber Sebastian Huber 3 years ago
Summary

Undefined behaviour if the area size calculation in calloc() and rtems_calloc() overflows

#4390 3 years ago fixed admin Sebastian Huber Sebastian Huber 3 years ago
Summary

Make zero size allocation result consistent across directives

Description

There is a special case in malloc() which results in a malloc( 0 ) == NULL invariant. This special case should move to rtems_heap_allocate_aligned_with_boundary() to have a consistent behaviour across the API level memory allocation directives.

#4391 3 years ago fixed posix Joel Sherrill Ryan Long <ryan.long@…> 3 years ago
Summary

SPARC GCC no longer needs sysconf(515) (_SC_STACK_PROT)

Description

In reviewing Ryan's rework of psx13, Gedare asked why there was a test for sysconf(515) conditionally compiled for SPARC. The answer was GCC needed it. But investigated showed that GCC has not had code to call this for over 20 years. It was removed per this commit.

commit ac4904440b4733f461bcd2c45915f502b0345f80
Author: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Date:   Mon Jan 24 00:47:38 2000 +0000

    sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Moved...
    
    * config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Moved...
    * config/sparc/sol2.h: ... here.
    
    From-SVN: r31578

This ticket is to remove the code from posix/src/sysconf.c and update psx13 accordingly.

#4392 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

rtems: Constify timer fire when directives

Description

The time of day pointer can be made constant in the timer fire when directives.

#4393 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

rtems: Change rtems_task_get_affinity() status

Description

In case the processor set is not large enough to contain the processor affinity set of the task return RTEMS_INVALID_SIZE instead of RTEMS_INVALID_NUMBER. This is more in line with other directives since the issue is related to the size of an object.

#4395 3 years ago fixed arch/arm Sebastian Huber Sebastian Huber 3 years ago
Summary

Workspace initialization is broken for arm/imx7 and arm/raspberrypi

Description

Cloned from #4394:


The ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX has a wrong value. The bug was introduced by the fix for #4185.

#4396 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

Add futimens() and utimensat()

Description

Implement the futimens and utimensat APIs

#4397 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

Make utime() use utimensat()

Description

Make utime use the utimensat API

#4398 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

Make utimes() use utimensat()

Description

Make utimes use the utimensat API

#4399 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

Add tests for futimens() and utimensat()

Description

Create tests to test the futimens() and utimensat() APIs

#4400 3 years ago fixed lib Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

Change filesystem utime_h to utimens_h to support nanosecond granularity

Description

Change utime_h to utimens_h for the new nanosecond granularity APIs

#4401 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

rtems: Change rtems_scheduler_get_processor_set() status

Description

In case the processor set is not large enough to contain the processor set of the scheduler return RTEMS_INVALID_SIZE instead of RTEMS_INVALID_NUMBER. This is more in line with other directives since the issue is related to the size of an object.

A similar change was done in #4393.

#4402 3 years ago fixed tool Alex White Alex White 3 years ago
Summary

rtemstoolkit/mailer.py option added twice

Description

In the add_arguments function, the intent is that the first two options are added to the arguments before the rest of them are iterated and added. The iteration of the remaining options, however, starts with the first option when it should start with the second.

Additionally, the order of keys in a dictionary cannot be relied on for all versions of Python we support. The dictionary should be changed to an OrderedDict to preserve key order to facilitate iteration.

#4403 3 years ago fixed rtems Frank Kuehndel Sebastian Huber 3 years ago
Summary

rtems_timer_fire_when() returns wrong status code when wall_time argument is NULL

Description

The RTEMS Classic API Guide (https://docs.rtems.org/branches/master/c-user/timer/directives.html#rtems-timer-fire-when) elaborates for rtems_timer_fire_when():

RTEMS_INVALID_ADDRESS

The wall_time parameter was NULL.

RTEMS_INVALID_CLOCK

The time of day was invalid.

Yet, calling rtems_timer_fire_when() with wall_time = NULL and all other parameters valid results in RTEMS_INVALID_CLOCK. Have a look into cpukit/rtems/src/timercreate.c function _Timer_Fire_when() to see the cause for this behavior.

I attach two patches:

  • sptimer_err01.patch -- extends an existing test to reproduce this issue
  • timercreate.patch -- fixes the issue

There are at least two ways to handle this bug and I do not want to decide which way to choose:

  1. Change the documentation
  2. Change the code

For the records:

RTEMS_VERSION    = 6.0.0
remote origin    = git://git.rtems.org/rtems.git
commit HEAD      = 2c5199bb049efe8e29cd12461dc57bd6e30388e8  (HEAD -> master, origin/master, origin/HEAD)
config.ini       =
    [arm/realview_pbx_a9_qemu]
    RTEMS_DEBUG = True
    RTEMS_NETWORKING = True
    RTEMS_POSIX_API = True
    RTEMS_SMP = True
    BUILD_TESTS = True
NEWLIB_VERSION   = 3.2.0
SOURCE_BUILDER   = Set Builder, 6 (5e449fb5c2cb)
GCC_VERSION      = arm-rtems6-gcc (GCC) 10.2.1 20210309 (RTEMS 6, RSB 5e449fb5c2cb6812a238f9f9764fd339cbbf05c2, Newlib d10d0d9)
BINUTILS_VERSION = GNU ld (GNU Binutils) 2.36.1.20210309
#4406 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

rtems: Constify rtems_task_wake_when()

Description

The time of day pointer can be made constant in this directive.

#4410 3 years ago fixed admin Sebastian Huber Sebastian Huber 3 years ago
Summary

rtems_task_start() does not check that the entry point is not equal to NULL (cloned)

Description

Cloned from #4409:


Bug was introduced by commit 33829ce155069462ba410d396da431386369ed08 related to #2555.

#4411 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

rtems_task_restart() should set the real priority to the initial priority

Description

The rtems_task_restart() directive should set the real priority to the initial priority. If another task is restarted this is only under certain conditions. The RTEMS 4.5.0 behaviour was to unconditionally set the real priority to the initial priority during a task restart.

#4412 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Unexpected rtems_task_restart() behaviour if called from within interrrupt context

Description

In rtems_task_restart() there is a check if the executing thread is restarted. However, in interrupt context, this simple check results in an internal error INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL if the executing thread is restarted. Check also if an ISR is in progress to make sure the thread restart works within interrupt context.

#4413 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Allow pthread_cancel() from within interrupt context

Description

The pthread_cancel() does not immediately delete resources if invoked for threads other than the executing thread. With minor changes it may be called also from within interrupt context.

#4414 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Return RTEMS_CALLED_FROM_ISR in rtems_task_delete()

Description

Calling rtems_task_delete() from within interrupt context has an unpredictable behaviour. It depends on which thread is interrupted. Return an error status instead.

#4415 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

ReportsBase?.cc: Division or modulo by float zero error spotted by Coverity

Description

CID 1503709: Division or modulo by float zero in WriteSummaryReport?().

485  percentage = (double) notExecuted;
   CID 1503709 (#1 of 1): Division or modulo by float zero (DIVIDE_BY_ZERO)7. divide_by_zero: In expression percentage /= (double)totalBytes, division by expression totalBytes which may be zero has undefined behavior.
486  percentage /= (double) totalBytes;
487  percentage *= 100.0;
#4416 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

rtems-exeinfo.cpp: Division or modulo by zero errors spotted by Coverity

Description

CID 1503008: Division or modulo by zero in output_inlined().

    CID 1503008 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)9. divide_by_zero: In expression funcs_inlined.size() * 100UL / total, division by expression total which may be zero has undefined behavior.
 801      std::cout << "inlined funcs   : " << funcs_inlined.size () << std::endl
 802                << "    total funcs : " << total << std::endl
 803                << " % inline funcs : " << (funcs_inlined.size () * 100) / total << '%'
 804                << std::endl

CID 1503015: Division or modulo by zero in output_inlined().

   CID 1503015 (#1-2 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)18. divide_by_zero: In expression inlined_size * 100UL / total_size, division by expression total_size which may be zero has undefined behavior.
 805                << "     total size : " << total_size << std::endl
 806                << "    inline size : " << inlined_size << std::endl
 807                << "  % inline size : " << (inlined_size * 100) / total_size << '%'
 808                << std::endl;
#4417 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

Explanations.cc: Resource leak error spotted by Coverity

Description

CID 1399608: Resource leak in load().

CID 1399608 (#1 of 1): Resource leak (RESOURCE_LEAK)9. leaked_storage: Variable explain going out of scope leaks the storage it points to.
#4418 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

GcovData?.cc: Resource leak error spotted by Coverity

Description

CID 1399610: Resource leak in readFrame().

250        newFunction = new GcovFunctionData;
   5. noescape: Resource newFunction is not freed or pointed-to in readFunctionFrame. [show details]
   6. Condition !this->readFunctionFrame(header, gcovFile, newFunction), taking true branch.
251        if ( !readFunctionFrame(header, gcovFile, newFunction) ){
252          fprintf( stderr, "Error while reading FUNCTION from gcov file...\n" );
   CID 1399610 (#1 of 1): Resource leak (RESOURCE_LEAK)7. leaked_storage: Variable newFunction going out of scope leaks the storage it points to.
253          return false;
254        }
#4419 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

TraceReaderLogQEMU.cc: Resource leak error spotted by Coverity

Description

CID 1399615: Resource leak in processFile().

113    //
114    //  Discard Header section
115    //
   6. noescape: Resource logFile is not freed or pointed-to in ReadUntilFound. [show details]
   7. Condition !ReadUntilFound(logFile, "----------------"), taking true branch.
116    if (! ReadUntilFound( logFile, QEMU_LOG_SECTION_END ) ) {
117      fprintf( stderr, "Unable to locate end of log file header\n" );
   CID 1399615 (#2 of 2): Resource leak (RESOURCE_LEAK)8. leaked_storage: Variable logFile going out of scope leaks the storage it points to.
118      return false;
#4420 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

TraceWriterQEMU.cc: Resource leak error spotted by Coverity

Description

CID 1399621: Resource leak in writeFile().

   5. noescape: Resource traceFile is not freed or pointed-to in fwrite.
116    status = ::fwrite( &header, sizeof(trace_header), 1, traceFile );
   6. Condition status != 1, taking true branch.
117    if (status != 1) {
118      std::cerr << "Unable to write header to " << file << std::endl;
   CID 1399621 (#1 of 1): Resource leak (RESOURCE_LEAK)7. leaked_storage: Variable traceFile going out of scope leaks the storage it points to.
119      return false;
#4421 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

DesiredSymbols?.cc: Resource leak error spotted by Coverity

Description

CID 1503018: Resource leak in load().

   13. alloc_fn: Storage is returned from allocation function operator new.
   14. noescape: Resource new Coverage::SymbolInformation is not freed or pointed-to in operator =. [show details]
   CID 1503018 (#2 of 2): Resource leak (RESOURCE_LEAK)15. leaked_storage: Failing to save or free storage allocated by new Coverage::SymbolInformation leaks it.
104          set[sym.name()] = *(new SymbolInformation);
#4422 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

ReportsBase?.cc: Resource leak error spotted by Coverity

Description

CID 1503711: Resource leak in WriteSummaryReport?().

548    fprintf(
549      report,
550      "Percentage branch paths covered  : %4.4g\n",
551      100.0 - percentageBranches
552    );
553  }
   CID 1503711 (#1 of 1): Resource leak (RESOURCE_LEAK)34. leaked_storage: Variable report going out of scope leaks the storage it points to.
554}
555
#4423 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

record-client.c: Unchecked return value error spotted by Coverity

Description

CID 1503011: Unchecked return value in resolve_hold_back().

191    for ( index = begin_index; index < per_cpu->item_index; ++index ) {
192      const rtems_record_item_64 *item;
193
194      item = &per_cpu->items[ index ];
   CID 1503011 (#1 of 1): Unchecked return value (CHECKED_RETURN)12. check_return: Calling visit without checking return value (as is done elsewhere 4 out of 5 times).
195      visit( ctx, item->event, item->data );
#4424 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

rtems-bin2c.c: Copy into fixed size buffer spotted by Coverity

Description

CID 1063892: Copy into fixed size buffer in process().

141  char *ifbasename;
142  ifbasename = basename(ifbasename_to_free);
143
   CID 1063892 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)13. fixed_size_dest: You might overrun the 1025-character fixed-size string buf by copying ifbasename without checking the length.
144  strcpy(buf, ifbasename);
#4425 3 years ago fixed tool Ryan Long 2 years ago
Summary

GcovFunctionData?.cc: Copy into fixed size buffer errors spotted by Coverity

Description

CID 1063892: Copy into fixed size buffer in addBlock().

   CID 1399613 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)1. fixed_size_dest: You might overrun the 256-character fixed-size string block.sourceFileName by copying sourceFileName without checking the length.
   2. parameter_as_source: Note: This defect has an elevated risk because the source argument is a parameter of the current function.
184    strcpy (block.sourceFileName, sourceFileName);

CID 1399616: Copy into fixed size buffer in setBlockFileName().

   CID 1399616 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)1. fixed_size_dest: You might overrun the 256-character fixed-size string block->sourceFileName by copying fileName without checking the length.
   2. parameter_as_source: Note: This defect has an elevated risk because the source argument is a parameter of the current function.
298    strcpy(block->sourceFileName, fileName);
#4426 3 years ago fixed posix Sebastian Huber Sebastian Huber 3 years ago
Summary

clock_nanosleep() may use wrong clock for relative times

Description

For relative times, the clock identifier is not used to select the clock and instead always the CLOCK_MONOTONIC is used. A side-effect is that sleep() and nanosleep() use the wrong clock (CLOCK_MONOTONIC instead of CLOCK_REALTIME).

#4427 3 years ago fixed tool Ryan Long 3 years ago
Summary

GcovData?.cc: Dereference after null check error spotted by Coverity

Description

CID 1399597: Dereference after null check in readGcnoFile().

 53    strcpy( gcnoFileName, fileName );
 54    strcpy( gcdaFileName, fileName );
 55    strcpy( textFileName, fileName );
 56    strcpy( cFileName, fileName );
 57    tempString = strstr( gcdaFileName,".gcno" );
 58    tempString2 = strstr( textFileName,".gcno" );
 59    tempString3 = strstr( cFileName,".gcno" );
 60
   2. Condition tempString == NULL, taking true branch.
   3. var_compare_op: Comparing tempString to null implies that tempString might be null.
   4. Condition tempString2 == NULL, taking false branch.
 61    if ( (tempString == NULL) && (tempString2 == NULL) ){
 62      fprintf(stderr, "ERROR: incorrect name of *.gcno file\n");
 63    }
 64    else
 65    {
   CID 1399597 (#1 of 1): Dereference after null check (FORWARD_NULL)5. var_deref_model: Passing null pointer tempString to strcpy, which dereferences it.
 66      strcpy( tempString, ".gcda");             // construct gcda file name
 67      strcpy( tempString2, ".txt");             // construct report file name
 68      strcpy( tempString3, ".c");               // construct source file name
 69    }
#4428 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

ReportsBase?.cc: Dereference after null check error spotted by Coverity

Description

CID 1503710: Dereference after null check in WriteAnnotatedReport?().

   12. var_compare_op: Comparing info.uncoveredRanges to null implies that info.uncoveredRanges might be null.
   13. Condition info.uncoveredBranches == NULL, taking false branch.
219    if ((info.uncoveredRanges == NULL) &&
220        (info.uncoveredBranches == NULL))
   5. Continuing loop.
   9. Continuing loop.
221      continue;
222
223    // If uncoveredRanges and uncoveredBranches are empty, then everything
224    // must have been covered for this symbol.  Just skip it.
   CID 1503710 (#1 of 1): Dereference after null check (FORWARD_NULL)14. var_deref_model: Passing null pointer info.uncoveredRanges->set to empty, which dereferences it. [show details]
225    if ((info.uncoveredRanges->set.empty()) &&
226        (info.uncoveredBranches->set.empty()))
227      continue;
#4430 3 years ago fixed tool Ryan Long 3 years ago
Summary

DesiredSymbols?.cc: Uninitialized pointer read error spotted by Coverity

Description

CID 1503005: Uninitialized pointer read in load().

111        if (sym.type() == sym.st_func) {
   20. alloc_fn: Calling operator new which returns uninitialized memory.
   CID 1503005 (#2 of 2): Uninitialized pointer read (UNINIT)21. uninit_use_in_call: Using uninitialized value (new Coverage::SymbolInformation).sourceFile when calling operator =. [show details]
112          set[sym.name()] = *(new SymbolInformation);
#4432 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

GcovFunctionData?.cc: Uninitialized pointer field error spotted by coverity

Description

CID 1399640: Uninitialized pointer field in GcovFunctionData?().

 20  GcovFunctionData::GcovFunctionData()
 21  {
 22    numberOfArcs = 0;
 23    numberOfBlocks = 0;
 24    coverageMap = NULL;
   2. uninit_member: Non-static class member id is not initialized in this constructor nor in any functions that it calls.
   4. uninit_member: Non-static class member checksum is not initialized in this constructor nor in any functions that it calls.
   6. uninit_member: Non-static class member firstLineNumber is not initialized in this constructor nor in any functions that it calls.
   CID 1399640 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)8. uninit_member: Non-static class member symbolInfo is not initialized in this constructor nor in any functions that it calls.
 25  }
#4433 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

DesiredSymbols?.h: Uninitialized pointer field error spotted by coverity

Description

CID 1399637: Uninitialized pointer field in SymbolInformation?().

176    SymbolInformation() :
177      baseAddress( 0 ),
178      uncoveredBranches( NULL ),
179      uncoveredRanges( NULL ),
180      unifiedCoverageMap( NULL )
181    {
   CID 1399637 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)2. uninit_member: Non-static class member sourceFile is not initialized in this constructor nor in any functions that it calls.
182    }
#4434 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

record-filter-zlib.cc: Uninitialized pointer field error spotted by Coverity

Description

CID 1503020: Uninitialized pointer field in ZlibFilter?().

36ZlibFilter::ZlibFilter() : buffer_(65536)
37{
  CID 1503013: Unchecked return value from library (CHECKED_RETURN) [select issue]
38  inflateInit(&stream_);
  2. uninit_member: Non-static class member stream_.next_in is not initialized in this constructor nor in any functions that it calls.
  4. uninit_member: Non-static class member stream_.avail_in is not initialized in this constructor nor in any functions that it calls.
  6. uninit_member: Non-static class member stream_.total_in is not initialized in this constructor nor in any functions that it calls.
  8. uninit_member: Non-static class member stream_.next_out is not initialized in this constructor nor in any functions that it calls.
  10. uninit_member: Non-static class member stream_.avail_out is not initialized in this constructor nor in any functions that it calls.
  12. uninit_member: Non-static class member stream_.total_out is not initialized in this constructor nor in any functions that it calls.
  14. uninit_member: Non-static class member stream_.msg is not initialized in this constructor nor in any functions that it calls.
  16. uninit_member: Non-static class member stream_.zalloc is not initialized in this constructor nor in any functions that it calls.
  18. uninit_member: Non-static class member stream_.zfree is not initialized in this constructor nor in any functions that it calls.
  20. uninit_member: Non-static class member stream_.opaque is not initialized in this constructor nor in any functions that it calls.
  22. uninit_member: Non-static class member stream_.data_type is not initialized in this constructor nor in any functions that it calls.
  24. uninit_member: Non-static class member stream_.adler is not initialized in this constructor nor in any functions that it calls.
  CID 1503020 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)26. uninit_member: Non-static class member stream_.reserved is not initialized in this constructor nor in any functions that it calls.
39}
#4435 3 years ago fixed score Sebastian Huber Sebastian Huber 3 years ago
Summary

Thread cancellation may produce ready threads with an active thread timer

Description

The _Thread_Cancel() (in contrast to _Thread_Restart() which uses a similar code block) may produce ready threads with an active timer in case the thread to cancel has its thread life protection enabled. The problem is this code block:

    Priority_Control priority;

    _Thread_Add_life_change_request( the_thread );

    if ( _Thread_Is_life_change_allowed( previous ) ) {
      _Thread_State_release( the_thread, &lock_context );

      _Thread_queue_Extract_with_proxy( the_thread );
      _Thread_Timer_remove( the_thread );
    } else {
      _Thread_Clear_state_locked( the_thread, STATES_SUSPENDED );
      _Thread_State_release( the_thread, &lock_context );
    }

    priority = _Thread_Get_priority( executing );
    _Thread_Raise_real_priority( the_thread, priority );
    _Thread_Remove_life_change_request( the_thread );

The life change request should only be added/removed if a life change is allowed (see _Thread_Restart()).

#4437 3 years ago fixed bsps Joel Sherrill 2 years ago
Summary

powerpc/shared/sbrk.c: Do not reference errno

Description

Using errno implicitly references the newlib reentrancy structure. Changing this eliminates one reason the reentrancy code may be pulled into minimum.exe.

#4438 3 years ago fixed bsps Joel Sherrill Joel Sherrill <joel@…> 3 years ago
Summary

powerpc/shared/irq/ppc-irq-legacy.c: Use rtems_malloc() not malloc()

Description

malloc() is required to set errno which implicitly references the newlib reentrancy structure. Changing this eliminates one reason the reentrancy code may be pulled into minimum.exe.

#4439 3 years ago fixed rtems Joel Sherrill Joel Sherrill <joel@…> 3 years ago
Summary

Open of /dev/console should only be in SysInit? List if Console Enabled

Description

The current code implicitly requires that the code to open /dev/console be included in the system initialization set anytime a dependency exists on the newlib reentrancy structure. This means that referencing errno pulls in at least open(), libio code, close(), atexit(), and unmount support.

This was shown to result in about 20K of text an 5K of data being included in powerpc/psim minimum.exe. A similar impact would happen on all BSPs.

#4442 3 years ago fixed lib Harrison Gerber Gedare Bloom 3 years ago
Summary

CID 1399721: Copy into fixed size buffer

Description

In pci_cfg_print_device: A source buffer of statically unknown size is copied into a fixed-size destination buffer (CWE-120)

#4444 3 years ago fixed rtems Harrison Gerber Gedare Bloom 3 years ago
Summary

CID 1399727: Copy into fixed size buffer

Description

In rtems_monitor_line_editor: A source buffer of statically unknown size is copied into a fixed-size destination buffer (CWE-120)

NOTE: Issue is more regarding source/dest overlapping with use of strcpy: needs change to use memory copy for overlapping source/dest

#4445 3 years ago fixed lib/debugger Harrison Gerber Gedare Bloom 3 years ago
Summary

CID 1468684: Uninitialized scalar variable

Description

In tcp_remote_connect: Use of an uninitialized variable (CWE-457)

#4448 3 years ago fixed tool Alex White Alex White 3 years ago
Summary

covoar reports uncovered ranges of size 1

Description

The uncovered range reports produced by covoar for the ARM architecture contain ranges of size 1. When clicked, they link to instructions that appears to be covered.

This should be fixed to remove these erroneous ranges.

#4451 3 years ago wontfix tool Ryan Long 3 years ago
Summary

DesiredSymbols?: Implement move assignment operator

Description

CID 1505133: Missing move assignment operator for SymbolInformation? class.

128   */
   CID 1505133 (#1 of 1): Missing move assignment operator (MISSING_MOVE_ASSIGNMENT)missing_move_assignment: Class Coverage::SymbolInformation may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
129  class SymbolInformation {
#4453 3 years ago fixed doc Joel Sherrill Joel Sherrill 17 months ago
Summary

Global vs Local Attribute Unclear for SMP/Distributed MP

Description

The description for global vs local attributes on objects do not make it clear whether they apply to SMP or distributed multiprocessing configuration. This applies to at least the rtems_task_create description but likely needs to be addressed in the description in every create with global/local and in the SMP section.

#4454 3 years ago duplicate bsps Jan Sommer 2 years ago
Summary

bsps/i386: TSC calibration inaccurate

Description

The current implementation of the TSC calibration during startup yields inaccurate results.

There are 2 issues:

1. Rounding error:

The calibrate_tsc function calibrates for 1s by waiting for rtems_clock_get_ticks_per_second() ticks via the PIT.

The PIT has a frequency of 1193182 Hz. For a rtems tick of 1ms this yields 1193. Waiting for 1s means then waiting for 1193000 PIT ticks (instead of the full 1193182). For a 1 GHz TSC clock this would yield already ~150 kHz less then the correct TSC frequency.

2. Waiting for the first loop at begin of timer period

for (i = rtems_clock_get_ticks_per_second() * pc386_isrs_per_tick;
     i != 0; --i ) {
  /* We know we've just completed a tick when timer goes from low to high */
  then_lsb = then_msb = 0xff;
  do {                            <== First loop does not start at begin of clock period 
    READ_8254(now_lsb, now_msb); 
    if ((then_msb < now_msb) ||
        ((then_msb == now_msb) && (then_lsb < now_lsb)))
      break;
    then_lsb = now_lsb;
    then_msb = now_msb;
  } while (1);
}

This can yield deviations of several MHz for the TSC frequency. For example, for a tested CPU with a TSC frequency of 19167.1 MHz yields a calibration result of 1912.3 MHz.

Proposed solution

  • Just wait 1193182 PIT ticks for 1 s instead of a number of rtems ticks
  • Use the raw timer value instead of waiting for clock ticks.
#4455 3 years ago fixed admin Jan Sommer Jan Sommer 3 years ago
Summary

bsps/i386: TSC calibration inaccurate

Description

The current implementation of the TSC calibration during startup yields inaccurate results.

There are 2 issues:

1. Rounding error:

The calibrate_tsc function calibrates for 1s by waiting for rtems_clock_get_ticks_per_second() ticks via the PIT.

The PIT has a frequency of 1193182 Hz. For a rtems tick of 1ms this yields 1193. Waiting for 1s means then waiting for 1193000 PIT ticks (instead of the full 1193182). For a 1 GHz TSC clock this would yield already ~150 kHz less then the correct TSC frequency.

2. Waiting for the first loop at begin of timer period

for (i = rtems_clock_get_ticks_per_second() * pc386_isrs_per_tick;
     i != 0; --i ) {
  /* We know we've just completed a tick when timer goes from low to high */
  then_lsb = then_msb = 0xff;
  do {                            <== First loop does not start at begin of clock period 
    READ_8254(now_lsb, now_msb); 
    if ((then_msb < now_msb) ||
        ((then_msb == now_msb) && (then_lsb < now_lsb)))
      break;
    then_lsb = now_lsb;
    then_msb = now_msb;
  } while (1);
}

This can yield deviations of several MHz for the TSC frequency. For example, for a tested CPU with a TSC frequency of 19167.1 MHz yields a calibration result of 1912.3 MHz.

Proposed solution

  • Just wait 1193182 PIT ticks for 1 s instead of a number of rtems ticks
  • Use the raw timer value instead of waiting for clock ticks.
#4458 3 years ago fixed arch/sparc Sebastian Huber Sebastian Huber 10 months ago
Summary

Simplify trap table initialization

Description

Currently, the trap table is statically initialized (see start.S). Unexpected traps end up in system error mode. Later during startup most traps are changed to jump to _ISR_Handler(). This is a side-effect of bsp_spurious_initialize(). The used functions for this dynamic initialization are a bit complex and need cache manager directives which involve all online processors. This should be simplified to cover only basic requirements.

  1. The _ISR_Vector_table should be initialized by _CPU_Initialize_vectors() to an new default handler _SPARC_ISR_handler_default() which just invokes _Terminate().
  1. The traps associated with external interrupts (0x11 up to including 0x1f) should be statically initialized in start.S to jump to _ISR_Handler().
  1. Standard synchronous exceptions such as
    • 0x01 instruction access exception
    • 0x02 illegal instruction
    • 0x03 privileged instruction
    • 0x04 fp disabled
    • 0x07 memory address not aligned
    • 0x08 fp exception
    • 0x09 data access exception
    • 0x0A tag overflow
    • 0x24 cp_disabled
    • 0x28 cp_exception

should also be statically initialize to jump to _ISR_Handler() to invoke the fatal error handler.

If software needs to change the default initialization, then it can use set_vector() or alternatives on demand.

#4460 3 years ago fixed admin Harrison Gerber Gedare Bloom 18 months ago
Summary

CID 1437647: Explicit null dereferenced

Description

A null pointer dereference will occur.

In rtems_fdt_unload: Dereference of an explicit null value (CWE-476)

#4461 3 years ago fixed arch/sparc Sebastian Huber Sebastian Huber 3 years ago
Summary

grlib: Register system console as "/dev/console"

Description

The driver manager console driver did not register the system console as "/dev/console" this resulted in some test failures (for example spconsole01.exe).

#4462 3 years ago fixed admin Harrison Gerber Gedare Bloom 18 months ago
Summary

CID 1437638: Logically dead code

Description

In rtems-fdt.c:

The indicated dead code may have performed some action; that action will never occur.

In rtems_fdt_init_index: Code can never be reached because of a logical contradiction (CWE-561)

159  entries = calloc(num_entries, sizeof(rtems_fdt_index_entry));
   	cond_notnull: Condition entries, taking true branch. Now the value of entries is not NULL.
160  if (!entries)
161  {
162    return -RTEMS_FDT_ERR_NO_MEMORY;
163  }
164
165  names = calloc(1, total_name_memory);
   	notnull: At condition entries, the value of entries cannot be NULL.
   	dead_error_condition: The condition !entries cannot be true.
166  if (!entries)
167  {
   	
CID 1437638 (#1 of 1): Logically dead code (DEADCODE)
dead_error_begin: Execution cannot reach this statement: free(entries);.
168    free(entries);
169    return -RTEMS_FDT_ERR_NO_MEMORY;
170  }
#4463 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

rtems_condition_variable_signal() is implemented as a broadcast

Description

rtems_condition_variable_signal() should use _Condition_Signal().

#4468 3 years ago fixed build Chris Johns Chris Johns <chrisj@…> 3 years ago
Summary

waf build system does not generate the same bspopts.h

Description

Building with autoconf and the command line of:

$ ../rtems.git/configure --target=powerpc-rtems6 --enable-rtemsbsp=mvme2307

gives:

$ grep BSP_CONSOLE_BAUD `find . -name bspopts.h`
#define BSP_CONSOLE_BAUD 9600

Building with waf and a config of ...

[DEFAULT]
BUILD_TESTS = True
RTEMS_POSIX_API = True

[powerpc/mvme2307]

gives:

$ grep BSP_CONSOLE_BAUD `find . -name bspopts.h`
#define BSP_CONSOLE_BAUD 115200

The default should be 9600 and the motorola_powerpc BSP is listed in the options under 9600. Something is broken in the waf BSP opts handling.

#4469 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

rtems-exeinfo.cpp: Not restoring ostream format errors spotted by Coverity

Description

CID 1503006: Not restoring ostream format in output_compilation_unit().

   185. format_changed: left changes the format state of std::cout for category adjustfield.
478            std::cout << "   | "
479                      << std::setw (source_max + 1) << std::left
480                      << rld::path::basename (s.source);

CID 1503007: Not restoring ostream format in output_tls().

   11. format_changed: right changes the format state of std::cout for category adjustfield.
   12. format_changed: hex changes the format state of std::cout for category basefield.
   13. format_changed: setfill changes the format state of std::cout for category fill.
   14. format_restored: dec changes the format state of std::cout for category basefield.
   15. format_restored: setfill changes the format state of std::cout for category fill.
704      std::cout << "    data size : " << tls_data_size->value () << std::endl
705                << "     bss size : " << tls_bss_size->value () << std::endl
706                << "    alignment : " << tls_alignment->value () << std::endl
707                << std::right << std::hex << std::setfill ('0')
708                << "    data addr : 0x" << std::setw (8) << tls_data_begin->value ()
709                << std::endl
710                << std::dec << std::setfill (' ')
711                << std::endl;
#4470 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

CoverageMapBase?.cc: Not restoring ostream format error spotted by Coverity

Description

CID 1503022: Not restoring ostream format in dump().

1. format_changed: hex changes the format state of out for category basefield.
   2. format_changed: setfill changes the format state of out for category fill.
 78    out << std::hex << std::setfill('0')
 79        << "Address range: low = " << std::setw(8) << lowAddress
 80        << " high = " << std::setw(8) << highAddress
 81        << std::endl;
#4471 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

ReportsHtml?.cc: Not restoring ostream format error spotted by Coverity

Description

CID 1505939: Not restoring ostream format in PutSymbolSummaryLine?().

   5. format_changed: fixed changes the format state of report for category floatfield.
   6. format_changed: setprecision changes the format state of report for category precision.
782        report << "<td class=\"covoar-td\" align=\"center\">"
783               << std::fixed << std::setprecision( 2 )
784               << ( symbolInfo.stats.uncoveredInstructions * 100.0 ) /
785                    symbolInfo.stats.sizeInInstructions
786               << "</td>" << std::endl;
#4472 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

ReportsText?.cc: Not restoring ostream format error spotted by Coverity

Description

CID 1505940: Not restoring ostream format in PutSymbolSummaryLine?().

   5. format_changed: fixed changes the format state of report for category floatfield.
   6. format_changed: setprecision changes the format state of report for category precision.
231    report << "============================================" << std::endl
232           << "Symbol                            : "
233           << symbolName << std::endl
234           << "Total Size in Bytes               : "
235           << symbolInfo.stats.sizeInBytes << std::endl
236           << "Total Size in Instructions        : "
237           << symbolInfo.stats.sizeInInstructions << std::endl
238           << "Total number Branches             : "
239           << symbolInfo.stats.branchesNotExecuted +
240              symbolInfo.stats.branchesExecuted
241           << std::endl
242           << "Total Always Taken                : "
243           << symbolInfo.stats.branchesAlwaysTaken << std::endl
244           << "Total Never Taken                 : "
245           << symbolInfo.stats.branchesNeverTaken << std::endl
246           << std::fixed << std::setprecision( 2 )
247           << "Percentage Uncovered Instructions : "
248           << uncoveredInstructions << std::endl
249           << "Percentage Uncovered Bytes        : "
250           << uncoveredBytes << std::endl;
#4473 3 years ago fixed tool Alex White Alex White 3 years ago
Summary

AddressToLineMapper?.h: Pointer to local outside scope error spotted by Coverity

Description

CID 1505281: Pointer to local outside scope

   SourceLine()
 28    : address(0),
   	
CID 1505281 (#1 of 1): Pointer to local outside scope (RETURN_LOCAL)
1. escape_local_addr: Returning, through this->path_, the address of stack variable <temporary>.
 29      path_("unknown"),
 30      line_num(-1),
 31      is_end_sequence(true)
 32    {
   	2. return: Returning here.
 33    }
#4475 3 years ago fixed network/libbsd Chris Johns Chris Johns 23 months ago
Summary

Add NFSv4 client support to libbsd

Description

Add NFSv4 client support to libbsd. The client support is part of kernel and provides support for a range of the NFS protocol version including version 4.

The task is made of the following:

  1. Update the locks and locking to support the lock manager. VFS requires this be supported
  2. Add support for the FreeBSD Virtual File System (VFS)
  3. Add the kernel RPC implementation
  4. Add NFS client support

VFS

VFS is built around the FB's file structure and file descriptor structure. These need to be supported. The file struct and file descriptor form the basis for all fd based interactions with the FB kernel code such as files, devices and sockets.

LibIO and FB fd

The FB fd and file support clashes with the existing libio implementations used for things like socket, kqueue and select. The work to port the VFS requires:

  1. socket, kqueue, select support FB fd support. This is closer to the kernel. No direct libio access
  2. Provide an interface to libio mapping the iop descriptors to FB descriptors.

This approach nests the FB file descriptors inside the libio support. This is not optimal in terms of some activities but the hot paths in the code should not see a significant change in performance. Some paths like open are not optimal because the RTEMS file system op handlers imply a specific implementation that does not match up well with the FB namei interface. The long term approach is to look at libio and the handlers and consider allowing closer integration of FB's fd support.

BIO and Paging

The bio layer is required for VFS. No paging support other than the calls needed to have VFS link are provided. No VM paging is need and none of that code need be ported.

System Calls

Collect all the syscall functionality exported to RTEMS into a single place. Currently the calls are spread around the code and this:

  1. Does not centralize the code
  2. Add a lot of code to FB being ported

Proc0

FreeBSD's initialization creates the initial process called proc0. Add support to create proc0 and let all thread' reference it. This allow the creds to be managed, kernel trace to work and it removes a number of changes that do not need to be made.

File Descripter Reuse

The libio functionality of cycling across the fd range rather than reusing lower fd numbers is not compatible with the select call. Not reusing fd numbers once closed until the range as been used provides some protection against bugs where a user does not cleanly handle the fd they own however this is not compatible with FB and makes supporting select harder.

The select interface should not be used on RTEMS and users should be encourages to use threads for concurrent IO or kqueue. The means select may exist for legacy code porting reasons however the cycling fd count reduces how well the code ported will actually work. For example port a piece of select code, open a socket and use, it may work. Then open and close a file 64 times then run the same code. It will fail.

FB fd's are reused.

RPC

The legacy NFSv2 client the the NFSv4 cannot be built at the same time.

The kernel RPC and the user land RPC cannot exist in the same build. I have not looked extensively into this but I was seeing clashes with headers for the same types but different contents. The legacy NFSv2 client uses the user land RPC code while the kernel NFSv4 uses the kernel's RPC.

Module support is already in libbsd to handle the separate building of each piece.

Security

NFSv4 provides a number of extra security features. The code will be ported is possible but little or no security tested is planned at this point in time.

Testing

The NFSv4 stack will be tested against Linux and FreeBSD servers.

#4482 3 years ago fixed doc Sebastian Huber Sebastian Huber 3 years ago
Summary

Document kernel character I/O support in Classic API Guide

Description

Directives like printk() are available for a long time. Document them in the Classic API Guide.

#4483 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

GcovData?.cc: Not restoring ostream format error spotted by Coverity

Description

CID 1506202: Not restoring ostream format

   3. format_changed: hex changes the format state of std::cerr for category basefield.
407      std::cerr << "File is not a valid *.gcno output (magic: 0x"
408                << std::hex << std::setw( 4 ) << preamble->magic
409                << ")" << std::endl;
   CID 1506202 (#1 of 1): Not restoring ostream format (STREAM_FORMAT_STATE)4. end_of_path: Changing format state of stream std::cerr for category basefield without later restoring it.
#4484 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

GcovFunctionData?.cc: Not restoring ostream format error spotted by Coverity

Description

CID 1506205: Not restoring ostream format

   1. format_changed: hex changes the format state of textFile for category basefield.
360    textFile << " > BLOCK " << std::setw( 3 ) << block->id
361             << " from " << block->sourceFileName << std::endl
362             << "    -counter: " << std::setw( 5 ) << block->counter << std::endl
363             << "    -flags: 0x" << std::hex << block->flags << std::endl
364             << "    -lines: ";
#4485 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

GcovData?.cc: Out-of-bounds acces errors spotted by Coverity

Description

CID 1506208: Out-of-bounds access

   CID 1506208 (#1 of 1): Out-of-bounds access (OVERRUN)2. overrun-buffer-arg: Overrunning struct type _ZN4Gcov13gcov_preambleE of 12 bytes by passing it to a function which accesses it at byte offset 47 using argument 48L.
132    gcdaFile.write( (char *) &preamble , 4 * sizeof( preamble ) );
133    if ( gcdaFile.fail() ) {
134      std::cerr << "Error while writing gcda preamble to a file "
135                << gcdaFileName << std::endl;
136    }

CID 1506209: Out-of-bounds access

   CID 1506209 (#1 of 1): Out-of-bounds access (OVERRUN)1. overrun-buffer-arg: Overrunning buffer pointed to by (char *)&preamble of 8 bytes by passing it to a function which accesses it at byte offset 47 using argument 48L.
400    gcovFile.read( (char *) &preamble, 4 * sizeof( gcov_preamble ) );
401    if ( gcovFile.gcount() != 4 * sizeof( gcov_preamble ) ) {
402      std::cerr << "Error while reading file preamble" << std::endl;
403      return -1;
404    }
#4486 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

TraceWriterQEMU.cc: String not null terminated issue spotted by Coverity

Description

CID 1506203: String not null terminated

   CID 1506203 (#1 of 1): String not null terminated (STRING_NULL)6. string_null: Passing unterminated string header.magic to operator <<, which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
124      std::cerr << "magic = " << header.magic << std::endl
125                << "version = " << header.version << std::endl
126                << "kind = " << header.kind << std::endl
127                << "sizeof_target_pc = " << header.sizeof_target_pc << std::endl
128                << "big_endian = " << header.big_endian << std::endl
129                << std::hex << std::setfill('0')
130                << "machine = " << std::setw(2) << header.machine[0]
131                << ':' << header.machine[1]
132                << std::dec << std::setfill(' ')
133                << std::endl;
#4487 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

GcovData?.cc: Uninitialized scalar field error spotted by Coverity

Description

CID 1506206: Uninitialized scalar field

 22  GcovData::GcovData( Coverage::DesiredSymbols& symbolsToAnalyze ):
 23    numberOfFunctions( 0 ),
 24    symbolsToAnalyze_m( symbolsToAnalyze )
 25  {
   2. uninit_member: Non-static class member gcnoPreamble.magic is not initialized in this constructor nor in any functions that it calls.
   4. uninit_member: Non-static class member gcnoPreamble.version is not initialized in this constructor nor in any functions that it calls.
   CID 1506206 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)6. uninit_member: Non-static class member gcnoPreamble.timestamp is not initialized in this constructor nor in any functions that it calls.
 26  }
#4488 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

TraceWriterQEMU.cc: Uninitialized scalar variable issue spotted by Coverity

Description

CID 1506204: Uninitialized scalar variable

115    header.machine[1] = 0; // XXX ??
   CID 1506204 (#1 of 1): Uninitialized scalar variable (UNINIT)4. uninit_use_in_call: Using uninitialized value header. Field header._pad is uninitialized when calling fwrite.
116    status = ::fwrite( &header, sizeof(trace_header), 1, traceFile );
#4489 3 years ago wontfix build Chris Johns 17 months ago
Summary

waf configure's --rtems-config and build create an error

Description

Waf allows distclean, configure, build and install on a single command line however adding --rtems-config to the configure stage generates this error:

The --rtems-config command line option is not allowed in the build command

This is error is incorrect.

#4490 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

rtems_partition_return_buffer() wrongly accepts buffers which are exactly at the buffer area end

Description

The range checking in rtems_partition_return_buffer() is wrong.

#4491 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

TraceWriterQEMU.cc: Buffer not null terminated issue spotted by Coverity

Description

CID 1506207: Buffer not null terminated

   CID 1506207 (#1 of 1): Buffer not null terminated (BUFFER_SIZE)3. buffer_size: Calling strncpy with a source string whose length (12 chars) is greater than or equal to the size argument (12) will fail to null-terminate header.magic.
109    strncpy( header.magic, QEMU_TRACE_MAGIC, sizeof(header.magic) );
#4492 3 years ago fixed tool Ryan Long 3 years ago
Summary

ObjdumpProcessor?.cc: Uninitialized pointer field

Description

CID 1506210: Uninitialized pointer field

125  ObjdumpProcessor::ObjdumpProcessor(
126    DesiredSymbols&     symbolsToAnalyze,
127    std::shared_ptr<Target::TargetBase>& targetInfo
128  ): symbolsToAnalyze_m( symbolsToAnalyze ),
129     targetInfo_m( targetInfo )
130  {
   CID 1506210 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)2. uninit_member: Non-static class member inputBuffer_m is not initialized in this constructor nor in any functions that it calls.
131  }
#4499 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

rtems-exeinfo.cpp: Uninitialized scalar field error spotted by Coverity

Description

CID 1471637: Uninitialized scalar field

211    section::section (const section& orig)
212      : sec (orig.sec),
213        data (orig.data)
214    {
   CID 1471637 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member byteorder is not initialized in this constructor nor in any functions that it calls.
215    }
#4500 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

rld-dwarf.cpp: Uninitialized scalar field

Description

CID 1503019: Uninitialized scalar field

677    function::function (file& debug, debug_info_entry& die)
678      : debug (debug),
679        machine_code_ (false),
680        external_ (false),
681        declaration_ (false),
682        inline_ (DW_INL_not_inlined),
683        entry_pc_ (0),
684        has_entry_pc_ (false),
685        pc_low_ (0),
686        pc_high_ (0),
687        ranges_ (debug),
688        call_line_ (0)
CID 1503019 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)14. uninit_member: Non-static class member prototyped_ is not initialized in this constructor nor in any functions that it calls.
#4501 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 2 years ago
Summary

TraceConverter?.cc: Uncaught exception issue spotted by Coverity

Description

CID 1471639: Uncaught exception

   CID 1471639 (#1-9 of 9): Uncaught exception (UNCAUGHT_EXCEPT)root_function: In function main(int, char **) an exception of type rld::error is thrown and never caught.
.
.
.
   fun_call_w_exception: Called function throws an exception of type rld::error. [show details]
144    executableInfo = new Coverage::ExecutableInfo(
145      executable,
146      "",
147      false,
148      symbolsToAnalyze
149    );
#4502 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

rld-rap.cpp: Uncaught exception issue spotted by Coverity

Description

CID 1471643: Uncaught exception

   CID 1471643 (#1 of 1): Uncaught exception (UNCAUGHT_EXCEPT)exn_spec_violation: An exception of type rld::error is thrown but the throw list noexcept doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
724    section_merge::~section_merge ()
725    {
726      if (rld::verbose () >= RLD_VERBOSE_FULL_DEBUG)
   fun_call_w_exception: Called function throws an exception of type rld::error. [show details]
727        std::cout << "rap:section-merge: " << sec.name
728                  << " size=" << sec.size ()
729                  << " offset=" << sec.offset
730                  << " " << obj.obj.name ().full ()  << std::endl;
731    }
#4506 3 years ago fixed posix Joel Sherrill Ryan Long <ryan.long@…> 3 years ago
Summary

posix_devctl() should return the errno directly not -1 and set errno

Description

The RTEMS implementation of posix_devctl() from POSIX 1003.26 does not return error codes as required by the standard.

"Upon successful completion, posix_devctl() shall return zero; otherwise an error number shall be returned to indicate the error. The value returned via the dev_info_ptr argument is driver dependent."

It should return the errno value and not -1 and set the errno variable. The current behavior is wrong but understandable because the implementation is a wrapper for close() and ioctl() which do set errno and return -1.

#4507 3 years ago wontfix fs Chris Johns Chris Johns 3 years ago
Summary

mount call retruns error number and it should return -1

Description

The mount call should return -1 for an any error with the errno set. Some paths in the mount do this and others so not.

The implementation needs to be changed to only return -1 when there is an error.

#4508 3 years ago fixed doc Frank Kuehndel Sebastian Huber 3 years ago
Summary

rtems_message_queue_receive(): flush() does not release waiting tasks

Description

The RTEMS Classic API Guide https://docs.rtems.org/branches/master/c-user/index.html in Message ManagerDirectives → section 14.4.8 rtems_message_queue_receive() says:

RTEMS_UNSATISFIED:

The queue was flushed while the calling task was waiting to receive a message.

Yet, when I tested it, this does not happen. A waiting task is not released from the message queue when calling rtems_message_queue_flush(). Moreover, I did not find any sign in the source code of rtems_message_queue_flush() which look liked it would dequeue waiting threads. (In contrast rtems_message_queue_delete() does!) Furthermore, there is no other hint in the documentation of either function that flush() would kick out waiting receivers.

I may misinterpret the documentation above or oversee something in the code. Yet, I believe the text I cited above is a mistake in the documentation and should simply be removed.

How to reproduce/How I tested:

# I created a message queue and a second task with a higher priority than the first one. # I made the second task wait on the message empty queue by calling rtems_message_queue_receive(). # Mean while the first task called rtems_message_queue_flush() on the empty queue. # Result: The second task does still wait on the queue after rtems_message_queue_flush() returned. It does not return with RTEMS_UNSATISFIED.

The debug output of my test looks like (the worker task is not released by rtems_message_queue_flush() but afterwards by a timeout of 3 ticks):

P:574:0:UI1/Valid/Valid/Valid/Flushed/Local/Fifo/Timeout/Empty/Nop:tc-message-re
ceive.c:1316
L:#### rtems_message_queue_construct() with
L:####   .maximum_pending_messages = 3
L:####   .maximum_message_size = 5
L:####   .storage_size = 72
L:####   .storage_free = 0
L:####   .attributes = 0 (LOCAL=0, FIFO=0, PRIORITY=4)
L:#### rtems_task_restart BEFORE
L:#### rtems_message_queue_receive(option_set=0, timeout_param=3 ) BEGIN
L:#### rtems_task_restart AFTER
L:#### rtems_message_queue_flush() BEFORE
L:#### rtems_message_queue_flush() AFTER
L:#### WaitForWorker wait ticks BEFORE
L:#### rtems_message_queue_receive() END status = 6 (0=RTEMS_SUCCESSFUL, 13=RTEMS_UNSATISFIED, 6=RTEMS_TIMEOUT )
L:#### WorkerTask send event
L:#### WaitForWorker wait ticks AFTER
F:586:0:UI1/Valid/Valid/Valid/Flushed/Local/Fifo/Timeout/Empty/Nop:tc-message-receive.c:1004:RTEMS_TIMEOUT == RTEMS_UNSATISFIED
F:587:0:UI1/Valid/Valid/Valid/Flushed/Local/Fifo/Timeout/Empty/Nop:tc-message-receive.c:1043:3 == 0
L:#### rtems_message_queue_delete()

For the records:

RTEMS_VERSION = 6.0.0 remote origin = git://git.rtems.org/sebh/rtems.git /* The HASH is also in git://git.rtems.org/rtems.git */ commit HEAD = bb77a82f619752ba147c317d982ac47f56f4afec config.ini =

[arm/realview_pbx_a9_qemu] RTEMS_DEBUG = True RTEMS_NETWORKING = True RTEMS_POSIX_API = True RTEMS_SMP = True BUILD_TESTS = True

NEWLIB_VERSION = 3.2.0 SOURCE_BUILDER = Set Builder, 6 (f12dee02d52d) GCC_VERSION = arm-rtems6-gcc (GCC) 10.3.1 20210409 (RTEMS 6, RSB c938bd7cbe16bd03d3b382f2d7cfee6a86aa9424, Newlib 0c0f3df) BINUTILS_VERSION = GNU ld (GNU Binutils) 2.36.1.20210409

#4509 3 years ago fixed score Sebastian Huber Sebastian Huber 3 years ago
Summary

Message queue priority dicipline is broken in SMP configurations

Description

The message queue handler uses the thread queue extract operation to dequeue a receiver thread. This is wrong in SMP configurations since the extract thread queue operation does not ensure FIFO fairness across schedulers. The thread queue surrender operation should be used instead.

#4511 3 years ago fixed rtems Sebastian Huber Sebastian Huber 3 years ago
Summary

Count of postponed jobs is not set to zero for a newly created rate-monotonic period object

Description

rtems_rate_monotonic_get_status() returns an arbitrary number for the count of postponed jobs if it is called for a newly created period object. The count of postponed jobs should be cleared to zero at object creation.

#4513 3 years ago fixed doc Sebastian Huber Sebastian Huber 3 years ago
Summary

Document parts of the Cache Manager in the Classic API Guide

Description

The Cache Manager directives are available via <rtems.h>. Document most of them in the Classic API Guide.

#4517 3 years ago wontfix tool Chris Johns 17 months ago
Summary

Build failures for MacOS

Description

This ticket is a collection of the following archs that fail to build:

  • bfin
  • lm32
  • mips
  • or1k
  • powerpc
  • v850

bfin

../../../sourceware-mirror-binutils-gdb-7ab567f/sim/bfin/dv-bfin_dma.c:124:35: error: implicitly declaring library function 'abs' with type 'int (int)' [-Werror,-Wimplicit-function-declaration]
  if (dma->ele_size != (unsigned) abs (dma->x_modify))

lm32

../../../sourceware-mirror-binutils-gdb-7ab567f/sim/lm32/dv-lm32cpu.c:151:8: error: implicit declaration of function 'lm32bf_h_csr_get' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  im = lm32bf_h_csr_get (cpu, LM32_CSR_IM);

mip

../../../sourceware-mirror-binutils-gdb-7ab567f/sim/mips/cp1.c:495:7: error: implicitly declaring library function 'abort' with type 'void (void) __attribute

or1k

../../../sourceware-mirror-binutils-gdb-7ab567f/sim/or1k/../common/cgen-trace.c:213:6: error: implicitly declaring library function 'abort' with type 'void (void) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
            abort ();

powerpc

semantics.c:42:7: error: implicit declaration of function 'tree_find_property' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  if (tree_find_property(root, "/options/mpc860c0"))

v850

../../../sourceware-mirror-binutils-gdb-7ab567f/sim/v850/simops.c:1651:6: error: implicit declaration of function 'free' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            free (path);
#4518 3 years ago fixed network/libbsd Chris Johns Chris Johns 3 years ago
Summary

RTEMS and LibBSD both provide competing pipe() interfaces

Description

RTEMS provides a pipe() call in cpukit/libfs/src/pipe/pipe.c and LibBSD also provides a call in rtemsbsd/rtems/rtems-bsd-syscall-api.c. We should not have competing interfaces.

The selection of the version you get depends on the link order and the linker version. The RTEMS 6 linker seems to have a different preference to RTEMS 5. Apart from this fragility LibBSD should not be providing this interface.

A LibBSD pipe() is problematic for a number of reasons and so I am going to remove the call from it.

If LibBSD support is needed it needs to be via a file system op handles like all other file system interfaces for descriptor based access. I will not be adding this support.

The removal of pipe() from LibBSD removes the kqueue support for pipes. See the test selectpollkqueue01. If this support is needed please contact the RTEMS developers.

#4519 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

record-main-lttng.cc: Out-of-bounds access

Description

CID 1503017: Out-of-bounds access in CopyThreadName?().

   1. Condition api_index < 3, taking false branch.
298  if (api_index < THREAD_API_COUNT) {
299    name = thread_names_[api_index][GetObjIndexOfID(item.data)];
300  } else {
   2. alias: Assigning: name = kEmptyThreadName. name now points to byte 0 of kEmptyThreadName (which consists of 3 bytes).
301    name = kEmptyThreadName;
302  }
303
   CID 1503017 (#1 of 1): Out-of-bounds access (OVERRUN)3. overrun-buffer-arg: Overrunning buffer pointed to by name of 3 bytes by passing it to a function which accesses it at byte offset 15 using argument 16UL.
304  std::memcpy(dst, name, THREAD_NAME_SIZE);
#4522 3 years ago fixed tool/newlib Sebastian Huber Sebastian Huber 3 years ago
Summary

Optimize red-black tree insert/extract

Description

Code coverage analysis of the red-black tree insert/extract operations defined in <sys/tree.h> showed that the macros contain dead code. To fix this simplify some expressions and add specialized rotations:

https://sourceware.org/pipermail/newlib/2021/018599.html

#4524 3 years ago fixed rtems Joel Sherrill Joel Sherrill <joel@…> 12 months ago
Summary

Re-add lost capability for custom stack allocator to allocate IDLE thread stacks

Description

The move to statically allocate the stacks for the IDLE threads resulted in the loss of the capability for a custom stack allocator to be able to allocate the idle threads' stacks. This occurred close to the 5 branching point and is addressed for the 5 branch by #4520. This ticket is for the master (6).

#4525 3 years ago fixed tool Ryan Long Ryan Long <ryan.long@…> 3 years ago
Summary

rtems-tld.cpp: Logically dead code error spotted by Coverity

Description

CID 1399595: Logically dead code in generate_traces().

1263            if (sig.has_ret () && !generator_.ret_trace.empty ())
1264            {
1265              if (ds_added)
1266                ds += " + ";
1267              else
1268                ds_added = true;
    const: At condition drs_added, the value of drs_added must be equal to 0.
    dead_error_condition: The condition drs_added cannot be true.
1269              if (drs_added)
    CID 1399595 (#1 of 1): Logically dead code (DEADCODE)dead_error_line: Execution cannot reach this statement: drs += " + ";.
1270                drs += " + ";
1271              else
1272                drs_added = true;
1273              ds += "sizeof(" + sig.ret + ')';
1274              drs += "sizeof(" + sig.ret + ')';
1275            }
#4527 3 years ago fixed rtems Sebastian Huber Sebastian Huber 2 years ago
Summary

Add new directives to get all time values provided by the timehands

Description

Add directives for all time values provided by the timehands to the Clock Manager.

#4528 3 years ago fixed rtems Frank Kuehndel Sebastian Huber 2 years ago
Summary

rate monotonic: reset of CPU usage time not always detected

Description

rtems_rate_monotonic_get_statistics() and rtems_rate_monotonic_get_status() must detect whether the used CPU time was resetted during a period (rtems_cpu_usage_reset()). This is achieved by storing the CPU usage time counter value when the period is started. To detect whether there was a reset, the CPU usage time value from the period start and the current value are compared. If the current value is lower than the one from the start there was a reset.

The bug is that when the current CPU usage time value is greater than the value at the start, a reset may still have occurred.

For example, when the period starts the used CPU time is at 1000 and 1000 is stored. Then the CPU time counter is resetted - so it is 0. Assume the period thread does some work and the CPU usage time is at 100 when rtems_rate_monotonic_get_status() is called. In this case the current code detects the reset and returns correctly RTEMS_NOT_DEFINED. Yet, when more CPU usage time passes without rtems_rate_monotonic_period() being called - lets say the used CPU time is at 1200 - and rtems_rate_monotonic_get_status() is called, the stored value (1000) is smaller than the current one (1200) so the reset is not detected.

This bug has been found with a test which manipulates the time directly. I doubt this bug is very relevant in practice. It requires that there are periods with long intervals and much CPU load and that either the system is shortly started or rtems_cpu_usage_reset() is used frequently.

The background:

The Classic API guide https://docs.rtems.org/branches/master/c-user/rate-monotonic/directives.html#rtems-rate-monotonic-get-status says for rtems_rate_monotonic_get_status():

RTEMS_NOT_DEFINED: There was no status available due to a reset of the processor time usage of the owner task of the period.

The directive rtems_cpu_usage_reset() sets the_thread->cpu_time_used 0 in line 43 of cpukit/libmisc/cpuuse/cpuusagereset.c.

The detection whether there was an reset or not is done in file cpukit/rtems/src/ratemonperiod.c line 56 in function _Rate_monotonic_Get_status():

  [...]
  /*
   *  Determine cpu usage since period initiated.
   */
  _Thread_Get_CPU_time_used( owning_thread, &used );

  /*
   *  The cpu usage info was reset while executing.  Can't
   *  determine a status.
   */
  if ( _Timestamp_Less_than( &used, &the_period->cpu_usage_period_initiated ) )
    return false;
  [...]

The directive rtems_rate_monotonic_get_statistics() is affected indirectly because collecting its data is skipped when there was a reset. cpukit/rtems/src/ratemonperiod.c line 149 in function _Rate_monotonic_Update_statistics() (which in turn calls the above code).

For the records:

RTEMS_VERSION    = 6.0.0
remote origin    = git://git.rtems.org/sebh/rtems.git
commit HEAD      = 1df2666ca1d73807a338e0d209ed1f42f67f00a9  (HEAD, origin/qual-43)
config.ini       =
    [arm/realview_pbx_a9_qemu]
    RTEMS_DEBUG = True
    RTEMS_NETWORKING = True
    RTEMS_POSIX_API = True
    RTEMS_SMP = True
    BUILD_SAMPLES = False
    BUILD_VALIDATIONTESTS = True
    BUILD_UNITTESTS = True
NEWLIB_VERSION   = 3.2.0
SOURCE_BUILDER   = Set Builder, 6 (f12dee02d52d)
GCC_VERSION      = arm-rtems6-gcc (GCC) 10.3.1 20210409 (RTEMS 6, RSB c938bd7cbe16bd03d3b382f2d7cfee6a86aa9424, Newlib 0c0f3df)
BINUTILS_VERSION = GNU ld (GNU Binutils) 2.36.1.20210409
#4531 3 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

Data corruption in SMP schedulers

Description

Certain operations involving sticky thread queues, thread to processor affinity changes, priority updates, or thread pinning lead to data corruption in SMP schedulers, in particular the default SMP scheduler (SMP EDF).

#4532 3 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

Priority inversion issues with MrsP locking protocol implementation

Description

While a thread is scheduled on a helping scheduler, while it does not own a MrsP semaphore, if it obtains a MrsP semaphore, then no scheduler node using an idle thread and the ceiling priority of the semaphore is unblocked for the home scheduler. This could lead to priority inversion issues and is not in line with the MrsP protocol.

#4533 2 years ago fixed lib/debugger Chris Johns Chris Johns 2 years ago
Summary

libdebugger should only build for archs with a backend

Description

Libdebugger has limited backend support however the generic parts are bring built for all architectures and libdebugger.a is being install however it will never link because of the missing backend support.

LibBSD has been fixed to correctly detect libdebugger.a and enable the test. This now fails to build.

#4534 2 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

SMP EDF scheduler violates priority group ordering

Description

The SMP EDF scheduler supports one-to-one and one-to-all thread to processor affinities. The one-to-one thread to processor affinity introduces a constraint on the ordering of threads. The implementation uses one ready queue for threads which have a one-to-all affinity and one for each one-to-one affinity group. To order threads across the ready queues, a generation number is used. However, the approach to update the generation number each time a thread is inserted into a ready queue is wrong. The generation number need to be updated only in the enqueue and enqueue scheduled operations where an insert priority is available. The scheduled chain needs to take the generation number into account.

An example scenario which shows the bug is this. Let T be a high priority task affine to processor X. Let A be a lower priority task affine to processor X. Let B be a lower priority task with no affinity to a particular processor which executes on processor Y. Let B be in the same priority group than A and after A. Let T set the affinity to all processors. Now A (higher priority relative to B) should execute on X and T (high priority) should execute on Y.

#4543 2 years ago worksforme arch/aarch64 mohamedosama94 2 years ago
Summary

cannot build multiprocessor application on eclipse

Description

Hi,

hope my mail finds you well, i have an issue as i am using rtems6 for zinq a53_lp64 i downloaded the source and installed the toolchain aarch64-rtems6 and i built the bsp successfully by using waf and i used the qemu to run the test samples exe files successfully , so i installed the eclipse and added rtems plugin to it and i built the sample rtems example successfully but when i try to build an application task has test_begin() or test_end() the make is uncomplete and error (.text.Init+0x50): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rtems_test_begin' always appear i tried open declaration and i found the reference prototype int rtems_test_begin(const char* name, const RTEMS_TEST_STATE state);

on test-info.h so eclipse refuse to build as cannot see the source code of the function and this also for rtems_test_end so what i have to do to make the eclipse build the rtems-application, kindly check the logs

/home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: o-optimize/init.o: in function `Init': /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:64: undefined reference to `rtems_test_begin' /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:64:(.text.Init+0x50): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rtems_test_begin' /home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:66: undefined reference to `locked_print_initialize' /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:66:(.text.Init+0x54): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `locked_print_initialize' /home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: o-optimize/init.o: in function `success': /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:31: undefined reference to `rtems_test_end' /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:31:(.text.Init+0x5c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rtems_test_end' /home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:32: undefined reference to `rtems_test_exit' /home/mohamed/eclipse-ground/rtems/rtems-appinit.c:32:(.text.Init+0x64): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rtems_test_exit' /home/mohamed/quick-starts/rtems/6/lib/gcc/aarch64-rtems6/10.3.1/../../../../aarch64-rtems6/bin/ld: o-optimize/init.o:(.rodata._User_extensions_Initial_extensions+0x80): undefined reference to `rtems_test_fatal_extension' collect2: error: ld returned 1 exit status

best regards, Mohamed

#4544 2 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

The last processor must not be removed if it is owned by a helping scheduler

Description

The following error condition is currently not checked by rtems_scheduler_remove_processor(): While an attempt is made to remove a processor from a scheduler, while the processor is the only processor owned by the scheduler, if a thread exists which uses the scheduler as a helping scheduler, then shall not be removed.

The reason is that ask for help requests and withdraw node requests are processed asynchronously in any order. An ask for help request carried out on a scheduler without a processor is undefined behaviour.

#4545 2 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

The SMP EDF scheduler can only support more restricted affinity sets of a thread

Description

The SMP EDF scheduler supports a one-to-one and one-to-all thread to processor affinity. Currently it accepts affinity sets which are a proper subset of the online processors containing at least two processors owned by the scheduler. In this case it sets a one-to-one thread to processor affinity. This leads to undefined behaviour if a processor is removed since the higher level check in rtems_scheduler_remove_processor() does not account for this implementation detail.

#4546 2 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

A thread restart does not update the priority of related threads

Description

Consider the following scenario. Let a high priority task H wait on a priority inheritance mutex M owned by a low priority task L. Restart task H. This should remove the priority inherited by H from L. This is currently not the case.

#4548 2 years ago fixed build Chris Johns Sebastian Huber <sebastian.huber@…> 2 years ago
Summary

Add RTEMS version option to waf configure

Description

We need a way to override the default release for testing. This is a developer option and is not for production. A waf option is considered the best way to manage this.

#4550 2 years ago duplicate tool Joel Sherrill Chris Johns 2 years ago
Summary

Add --rtems-version to rtems-test

Description

The rtems-test does not have a way to override the RTEMS version. This results in some tools defaulting to rtems6 when you want to test with the rtems7 version.

#4551 2 years ago fixed arch/sparc Sebastian Huber Sebastian Huber 2 years ago
Summary

Workaround for GRLIB-TN-0011 required for sparc/leon3 BSPs in SMP configuration

Description

The check script tn-0011.tcl reported the following affected code block in cpu_asm.S:

sparc-rtems6-objdump -d build/sparc/gr712rc/testsuites/validation/ts-validation-0.exe | tn-0011.tcl 
INFO:  Scanning utility for
INFO:    GRLIB-TN-0011 - LEON3/FT AHB Lock Release during Atomic Operation
INFO:  Script revision: 3 (20180412)
INFO:  
INFO:  Scanning objdump -d output on standard input...
0x400ad5f8 : seqa
INFO:  400ad5f8:        c2 7a 60 58     swap  [ %o1 + 0x58 ], %g1
INFO:  400ad5fc:        80 a0 60 00     cmp  %g1, 0
INFO:  400ad600:        12 80 00 14     bne  400ad650 <done_flushing+0x7c>
INFO:  
INFO:  Error locations found: 1
#4556 2 years ago fixed shell chenjin_zhong Chris Johns 16 months ago
Summary

rtems_shell_main_mmove problem

Description

Hi, I think mmove command in shell means that the memory can be overlapped when copy happens. but I find that when implementing this function, the memcpy is used in RTEMS4.13/RTEMS5.1.Should the memcpy be replaced with memmove ? The src code is listed as follows. static int rtems_shell_main_mmove(

int argc, char *argv[]

) {

unsigned long tmp; void *src; void *dst; size_t length;

if ( argc < 4 ) {

fprintf(stderr,"%s: too few arguments\n", argv[0]); return -1;

}

/*

  • Convert arguments into numbers */

if ( rtems_string_to_pointer(argv[1], &dst, NULL) ) {

printf( "Destination argument (%s) is not a number\n", argv[1] ); return -1;

}

if ( rtems_string_to_pointer(argv[2], &src, NULL) ) {

printf( "Source argument (%s) is not a number\n", argv[2] ); return -1;

}

if ( rtems_string_to_unsigned_long(argv[3], &tmp, NULL, 0) ) {

printf( "Length argument (%s) is not a number\n", argv[3] ); return -1;

} length = (size_t) tmp;

/*

  • Now copy the memory. */

memcpy(dst, src, length);

return 0;

}

#4557 2 years ago fixed shell chenjin_zhong Chris Johns 14 months ago
Summary

medit problem in RTEMS6 (was 4.11/5.1)

Description

Hi, I find when open medit editor in shell console, and then input CTRL+E/CTRL+X instructions in medit.the selected text cannot be cut. I review the code in main_medit file. First, when I input CTRL+E instruction, the function select_toggle is executed and selects the text. Second, when I input CTRL+X, the function cut_selection copies the selected text to clipboard. but after copy, the selected text is non-selected. Therefore, the erase_selection in cut_selection cannot take effect. the src code is listed as follows. I suggest that remove select_toggle in copy_selection function. and add after copy_selection. the code frament is marked in bold.

static void select_toggle(struct editor *ed) {

ed->selecting = ed->selecting ? 0 : 1; update_selection(ed, ed->selecting); adjust(ed);

}

static void cut_selection(struct editor *ed) {

copy_selection(ed); erase_selection(ed); select_toggle(ed);

}

static void copy_selection(struct editor *ed) {

int selstart, selend; if (!get_selection(ed, &selstart, &selend)) return; ed->env->clipsize = selend - selstart; ed->env->clipboard = (unsigned char *) realloc(ed->env->clipboard, ed->env->clipsize); if (!ed->env->clipboard) return; copy(ed, ed->env->clipboard, selstart, ed->env->clipsize); select_toggle(ed);

}

case ctrl('c'): copy_selection(ed); select_toggle; break;

#4560 2 years ago fixed tool/newlib Sebastian Huber Sebastian Huber 6 months ago
Summary

Use thread-local storage for Newlib reentrancy objects

Description

Problem

The state of the art architectures supported by RTEMS have all efficient support for thread-local storage (MIPS has issues with thread-local storage, however, is MIPS state of the art?).

Newlib currently uses a huge object of type struct _reent to store thread-specific data. This object is returned by __getreent(). It is related to the __DYNAMIC_REENT__ Newlib configuration option which is always defined for RTEMS.

The reentrancy structure contains errno and also the standard input, output, and error file streams. This means that if an application only uses errno it has a dependency on the file stream support event if it does not use it. This is an issue for lower end targets and the pre-qualification of RTEMS.

Solution

One approach to disentangle the dependencies introduced by struct _reent is to get rid of this structure and replace the individual members of the structure with thread-local objects. For example, instead of

struct _reent {
  int _errno;
  __FILE *_stdin;
  __FILE *_stdout;
  __FILE *_stderr;
};

use

_Thread_local int _errno;
_Thread_local __FILE *_stdin;
_Thread_local __FILE *_stdout;
_Thread_local __FILE *_stderr;

Newlib already has access macros for the struct _reent members, for example:

#define _REENT_SIGNGAM(ptr)     ((ptr)->_new._reent._gamma_signgam)
#define _REENT_RAND_NEXT(ptr)   ((ptr)->_new._reent._rand_next)
#define _REENT_RAND48_SEED(ptr) ((ptr)->_new._reent._r48._seed)
#define _REENT_RAND48_MULT(ptr) ((ptr)->_new._reent._r48._mult)
#define _REENT_RAND48_ADD(ptr)  ((ptr)->_new._reent._r48._add)

How-to Implement

The member access macros are incomplete. The first step is to use the Newlib configuration for RTEMS as is and rename all struct _reent members, for example add an TEMPORARY prefix to all member names, _errno to TEMPORARY_errno. Then add member access macros until Newlib builds again. Install this Newlib and check that RTEMS and libbsd compiles. Run the RTEMS and libbsd test suites to check for regressions.

In a second step to this for the _REENT_SMALL configuration of Newlib.

The third step is to add a new Newlib configuration option, for example _REENT_THREAD_LOCAL which turns the struct _reent members into thread-local objects with corresponding "member" access macros. Define _REENT to NULL.

Skills

C and assembly

Difficulty

This is a large (350-hour) project of hard difficulty.

#4566 2 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

Atomic store does not use the order parameter for C++

Description

This could result in invalid inline code for the SMP ticket locks if used from C++.

#4569 2 years ago fixed arch/aarch64 Sebastian Huber Joel Sherrill 2 years ago
Summary

aarch64 cache support does not provide rtems_cache_disable_data()

Description

The aarch64 cache support defines:

bsps/aarch64/shared/cache/cache.c:#define CPU_CACHE_SUPPORT_PROVIDES_DISABLE_DATA

However, it does not provide rtems_cache_disable_data().

#4572 2 years ago fixed doc Joel Sherrill Sebastian Huber 2 years ago
Summary

Improve Clarity for New Clock Manager Directives

Description

Looking through the Clock Manager at the new APIs, I noticed that there is nothing about what bintime and sbintime are in the "Time and Date Data Structures" section. Explaining what these time representations are is needed.

struct timeval and timespec are also not described in "Time and Data Data Structures" but this may be OK since they are from C and/or POSIX.

There is no discussion of what coarse is versus the non-coarse and what this means in practice.

There is no background on what the various clock sources are.

There may be other similar typos but rtems_clock_get_monotonic() describes its sole argument as being of the wrong type.

Without some background on the various time formats, sources, and terminology, the distinction between these APIs and their intended uses is impossible to figure out.

#4581 2 years ago fixed admin Kinsey Moore Kinsey Moore <kinsey.moore@…> 2 years ago
Summary

Add AArch64 to Tier 1 BSPs

Description

I finally got around to producing an emailed test run on the Avnet ZU3EG development board. The test results are available here

#4583 2 years ago fixed tool Joel Sherrill Joel Sherrill 2 years ago
Summary

rtems-bsp-builder: Do not vary on network

Description

With the network stack removed from the rtems.git repository, there is no need to build BSPs with and without networking. This should be removed. It should reduce the number of BSP build configurations in a run.

#4585 2 years ago fixed tool Joel Sherrill Joel Sherrill <joel@…> 2 years ago
Summary

Multiple Prototype Issues/Mismatches? in rtems-examples from trace linker

Description

This is some of the build failures in rtems-examples if the BSP has POSIX turned on:

/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc:  hello-test.c:185:199: error: expected declaration specifiers or '...' before 'Thread_CPU_budget_algorithm_callout'
/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc:   185 | bool __wrap__Thread_Initialize(Objects_Information* a1, Thread_Control* a2, const Scheduler_Control* a3, void* a4, size_t a5, bool a6, Priority_Control a7, bool a8, Thread_CPU_budget_algorithms a9, Thread_CPU_budget_algorithm_callout a10, uint32_t a11, Objects_Name a12)
/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc:       |                                                                                                                                                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: compiling wrapper: Compiler error

/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc:  hello-deep.c:1296:6: error: conflicting types for '_Thread_Start'
/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc:  1296 | bool _Thread_Start(Thread_Control* a1, const Thread_Entry_information* a2, ISR_lock_Context* a3);
/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc:       |      ^~~~~~~~~~~~~
/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc: In file included from  hello-deep.c:30:
/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc: /home/joel/rtems-class/bsp-install/aarch64-rtems6/xilinx_zynqmp_lp64_qemu/lib/include/rtems/score/threadimpl.h:279:16: note: previous declaration of '_Thread_Start' was here
/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc:   279 | Status_Control _Thread_Start(
/home/joel/rtems-class/tools/bin/aarch64-rtems6-gcc:       |                ^~~~~~~~~~~~~

error: compiling wrapper: Compiler error

#4588 2 years ago fixed admin Kinsey Moore Kinsey Moore <kinsey.moore@…> 2 years ago
Summary

RTEMS Stack Checker Report Bad Access When Not Enabled

Description

The RTEMS stack checker reporting function can be called without the stack checker infrastructure being enabled. This causes a bad access to 0x0 because the static interrupt stack checker data remains null instead of being initialized by rtems_stack_checker_begin_extension. The actual failure occurs in Stack_check_Find_high_water_mark while searching for U32_PATTERN.

This was found when the trailing D was left off of the CONFIGURE_STACK_CHECKER_ENABLED define in a test program.

#4607 2 years ago wontfix bsps ostyche 21 months ago
Summary

support for SATA(AHCI) drives

Description

Added support for SATA(AHCI) drives.The relevant file path is \cpukit\sata\ The files involved in the question were uploaded by git user ostyche who created a branch at 10:55 am on February 11, 2022

#4613 2 years ago fixed arch/sparc64 Gedare Bloom Gedare Bloom 15 months ago
Summary

Deprecate sparc64 port in rtems6 and remove in rtems7

Description

This port is no longer maintained. No one has been testing it and it does not appear to have any users.

Deprecate for RTEMS 6.x Remove in RTEMS 7.x

#4614 2 years ago fixed arch/sh Gedare Bloom Gedare Bloom 15 months ago
Summary

Deprecate sh port in rtems6 and remove in rtems7

Description

This port is no longer maintained. No one has been testing it and it does not appear to have any users.

Deprecate for RTEMS 6.x Remove in RTEMS 7.x

#4615 2 years ago fixed arch/v850 Gedare Bloom Gedare Bloom 15 months ago
Summary

Deprecate v850 port in rtems6 and remove in rtems7

Description

This port is no longer maintained. No one has been testing it and it does not appear to have any users.

Deprecate for RTEMS 6.x Remove in RTEMS 7.x

#4617 2 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

Potential non-monotonic CLOCK_MONOTONIC

Description

The RTEMS timecounter implementation could lead to a non-monotonic CLOCK_MONOTONIC if the clock interrupt is delayed for more than one second.

#4619 2 years ago worksforme bsps Ryan Long 17 months ago
Summary

riscv/rv32iac: minimum sample test fails to build

Description

This issue was found while investigating #4618. The specifics of the error are listed there.

#4627 2 years ago fixed score Sebastian Huber Sebastian Huber 2 years ago
Summary

Multitasking start is broken on SMP targets which do not restore the interrupt state during context switching

Description

The current SMP multitasking start assumed that the initial heir thread of a processor starts execution in _Thread_Handler() which sets the interrupt state explicitly by _ISR_Set_level(). Under certain timing conditions processors may perform an initial context switch to a thread which already executes its thread body. In this case, interrupts are disabled after the context switch on targets which do not save/restore the interrupt state during a context switch (for example arm and riscv).

#4629 2 years ago fixed shell Sebastian Huber Sebastian Huber 2 years ago
Summary

shell: Potential stack corruption in rtems_shell_init()

Description

The rtems_shell_init() passes the address of a stack variable (exit_code) to rtems_shell_run(). If wait == false, then the stack variable goes out of scope but may be accessed by the created shell thread.

#4631 2 years ago fixed tool/gdb Frank Kuehndel Chris Johns 2 years ago
Summary

RSB fails to build gdb with Python 3.10 (and newer)

Description

The rtems-source-builder fails to build the tools in a Fedora 35 container. I am building ARM for RTEMS 6 and get this error message:

config: tools/rtems-gdb-11.2.cfg
error: shell macro failed: /home/minna/src/rtems-source-builder/source-builder/sb/rtems-build-dep -c gcc  -l : 2: error: no library (-l) provided
Build Set: Time 0:00:33.396165

The same error appears for other architectures like AARCH64, POWERPC, RISCV on Fedora 35. The source for this error is in file source-builder/config/gdb-common-1.cfg in line 118:

   104	%ifnos darwin
   105	  %if %{host_ldflags} == %{nil}
   106	    %define gdb-host-libs %{nil}
   107	  %else
   108	    %define gdb-host-libs -L '%{host_ldflags}'
   109	  %endif
   110	  %if %{gdb-python-config} != %{nil}
   111	    %define gdb-python-lib-filter awk 'BEGIN{FS=" "}/python/{for(i=1;i<NF;++i)if(match($i,".*lpython.*")) print "lib"substr($i,3)"*";}'
   112	    %if %{gdb-python-ver-mm} < 3.8
   113	        %define gdb-python-config-lib-check-flags --ldflags
   114	    %else
   115	        %define gdb-python-config-lib-check-flags --ldflags --embed
   116	    %endif
   117	    %define gdb-python-config-libs %(%{gdb-python-config} %{gdb-python-config-lib-check-flags} | %{gdb-python-lib-filter})
   118	    %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -l %{gdb-python-config-libs})
   119	  %else
   120	    %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -l %{gdb-python-ver-lib})
   121	  %endif
   122	  %if %{gdb-python-lib-check} == not-found && !%{_rsb_getting_source}
   123	    %error "gdb: python: library file not found: %{gdb-python-ver-lib}, please install"
   124	  %endif
   125	%endif

Some values of involved variables:

gdb-python-ver-mm = 3.10
gdb-python-config = /usr/bin/python3-config
gdb-python-config-lib-check-flags = --ldflags
gdb-python-lib-filter = awk 'BEGIN{FS=" "}/python/{for(i=1;i<NF;++i)if(match($i,".*lpython.*")) print "lib"substr($i,3)"*";}'
gdb-python-config-libs = ''

The trouble is that gdb-python-config-libs is empty when line 118 gets called. It is empty because there is no python-library in the output of this call on Fedora 35:

$ /usr/bin/python3-config --ldflags
 -L/usr/lib64  -lcrypt -ldl  -lm -lm 

Just to compare, on OpenSUSE 15.3 the same call returns (note the -lpython3.6m ):

$ /usr/bin/python3-config --ldflags
 -L/usr/lib64 -lpython3.6m -lpthread -ldl  -lutil -lm  -Xlinker -export-dynamic

Commenting out line 118 makes the build go through smoothly but I would prefer a permanent fix.

  • Would be skipping line 118 when gdb-python-config-libs is empty be an appropriate solution?
  • Is the "real" error in line 112? (%if 3.10 < 3.8 evaluates unexpectedly to true)
  • Would the "error" in line 123 print out the correct library name?
  • Does the whole check make sense when python3-config is obviously installed (both the command and the library are "usually" in the same pythonX-devel package)?

Notes:

  • On Fedora 35 /usr/lib64/libpython3.10.so exists.
  • On Fedora 35 adding --embed provides the library:
$ /usr/bin/python3-config --ldflags --embed
 -L/usr/lib64 -lpython3.10 -lcrypt -ldl  -lm -lm

For the records:

Command:

../source-builder/sb-set-builder --rtems-version 6 --prefix /opt/rtems/6 --with_cxx --with_fortran --with_objc --jobs=12 --log ~/sb-set-builder.log 6/rtems-arm

RTEMS rtems-source-builder git: 6fe98f91d94bbf965bc0e78015585ff8823d17bd RTEMS: 6 Target architecture: ARM Host architecture: x86_64 Hoast Kernel: 5.3.18-150300.59.49-default OS: Fedora Linux 35 (Container Image) Container image base: docker.io/library/fedora:latest Python version in container: 3.10.2 Test date: 2022-03-18T11:02:10+01:00 rtems-source-builder/source-builder/sb-check log:

RTEMS Source Builder - Check, 6 (6fe98f91d94b modified)
warning: exe: absolute exe found in path: (__chown) /usr/sbin/chown
warning: exe: absolute exe found in path: (__install_info) /usr/bin/install-info
Environment is ok
#4632 2 years ago fixed lib Sebastian Huber Chris Johns 2 years ago
Summary

Error in rtems/thread.hpp with GCC 12

Description

There is a compile error with GCC 12:

In file included from /home/EB/sebastian_h/src/rtems/cpukit/librtemscxx/thread.cpp:35:
/home/EB/sebastian_h/src/rtems/cpukit/include/rtems/thread.hpp:449:14: error: redefinition of default argument for 'class<template-parameter-1-4>'
  449 |              class = thread::enable_if_attributes<A>>
      |              ^~~~~
/home/EB/sebastian_h/src/rtems/cpukit/include/rtems/thread.hpp:312:17: note: original definition appeared here
  312 |                 class = enable_if_attributes<A>>
      |                 ^~~~~
#4634 2 years ago fixed tool/rsb Ryan Long 15 months ago
Summary

Fix hash for glib-2.48

Description

The hash needs updated in order for glib to be built. This is currently preventing

#4635 2 years ago fixed fs/jffs2 Chris Johns Chris Johns <chrisj@…> 2 years ago
Summary

untar on JFFS slow down

Description

Using untar on JFFS is slower on rtems 6 compared to 4.11. The application writes files to the flash disk from an in memory tarfile and the difference is easy to see for 10M or so of files.

I reviewed the changes to JFFS in rtems 6 and they look OK so it is not a regression the libfs. I also timed the flash driver and it is the same on 6 as 4.11.

I noticed on 6 there is a lot more blocks being written at the flash driver level compared to 4.11. Looking at untar I see the block size written is 512 bytes and with compression this results in a lot of small blocks. Changing the untar block write size to 8K speeds returns the performance.

I am not sure why there are more blocks on 6. A guess is the compression is better, which is is nice. I will not look into this any more than changing untar to use 8K blocks.

#4639 2 years ago fixed fs Joel Sherrill Christian Mauderer 2 years ago
Summary

Error in imfs memfile when device is full

Description

Cloned from #4638:


The problem from #2353 still exists in 5 and 6:

Original description:


From the reporter (Круглов Сергей <skruglov@…>):

  • First bug I detect with attempt write file to full device (zero empty blocks).
  • And after I send too many files, disk overflow and system not responding (receive and write to disk have high priority). A test, and found block=0, after -- = too big value.
  • In imfs_memfile.c

function IMFS_memfile_extend block declared: unsigned int block, and after block— work incorrect (if block = 0). for ( ; block>=old_blocks ; block-- ) {

IMFS_memfile_remove_block( memfile, block );

} Must be declare int block;

#4641 2 years ago fixed arch/x86_64 Ryan Long Ryan Long <ryan.long@…> 2 years ago
Summary

x86_64 elf_machdep header file missing body

Description

The elf_machdep header file is missing the body under cpukit/score/cpu/x86_64/include/machine.

Joel found the code that needed to be put in at http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/amd64/include/elf_machdep.h.

#4644 2 years ago fixed score Matthew J Fletcher Sebastian Huber 2 years ago
Summary

wkspace "failed allocations" increase with heap protection enabled (cloned)

Description

Cloned from #4643:


Investigating the "Total number of failed allocations:" from the wkspace cmd i see that;

/* Statistics */ ++stats->failed_allocs;

Are incremented when _Heap_Allocate_aligned_with_boundary fails, however it seems this will routinely fail due to;

_Heap_Protection_free_all_delayed_blocks seemingly on purpose creating an impossibly large allocation.

uintptr_t large = 0

  • (uintptr_t) HEAP_BLOCK_HEADER_SIZE
  • (uintptr_t) HEAP_ALLOC_BONUS
  • (uintptr_t) 1;

void *p = _Heap_Allocate( heap, large );

This makes it difficult to place a breakpoint on failed_allocs to investigate true low memory situations with heap protection enabled.

#4646 2 years ago fixed tool/rsb Chris Johns Chris Johns 2 years ago
Summary

Control buildsets using the --with-* command line option

Description

The following thread has raise an important issue on how we can test newer versions of tools. This ticket is about providing a solution:

https://lists.rtems.org/pipermail/devel/2022-May/071458.html

The solution is allow users to specific a tool set on the command line for a build of tools. The standard option is --with-.*. For example a command line could be:

../source-builder/sb-set-builder \
    --prefix=/opt/rtems/6 \
    --log=arm.txt \
    --with-rtems-gcc=tools/rtems-gcc-head-newlib-head \
    6/rtems-arm

The buildset logic is to be changed to expand macros for buildset file names and to add a new buildset specific keyword %defineifnot. The tools default file becomes:

#
# Default tools configuration.
#
%include 6/rtems-base.bset

#
# Default RTEMS build. Override on the command line to the
# the RSB. For example to test the latest versino of gcc use:
#
#  --with-rtems-gcc=tools/rtems-gcc-head-newlib-head
#
%defineifnot with_rtems_dtc      devel/dtc-1.6.1-1
%defineifnot with_rtems_expat    devel/expat-2.4.8-1
%defineifnot with_rtems_gmp      devel/gmp-6.2.1
%defineifnot with_rtems_gdb      tools/rtems-gdb-11.2
%defineifnot with_rtems_binutils tools/rtems-binutils-2.38
%defineifnot with_rtems_gcc      tools/rtems-gcc-10-newlib-head
%defineifnot with_rtems_tools    tools/rtems-tools-6

#
# Build gdb first to raise the Python install error as early as
# possible.  GDB needs expat so it needs to be built before.
#
%{with_rtems_dtc}
%{with_rtems_expat}
%{with_rtems_gmp}
%{with_rtems_gdb}
%{with_rtems_binutils}
%{with_rtems_gcc}
%{with_rtems_tools}

This approach lets cron based CI flows configure a build with the latest gcc, binutils etc so they can always be tested as a workflow.

The new keyword lets a define in a nested buildset file override a command line value. That may be needed.

#4650 2 years ago fixed network/libbsd Sebastian Huber Sebastian Huber 2 years ago
Summary

tcpdump: Fix dumping to file and reading from file (cloned)

Description

Cloned from #4649:


When dumping to file, the file needs to be closed at program exit. When reading from file, we do not need the loop monitor. Do not use signals, since they are not cleaned up at program exit.

#4652 2 years ago fixed network/libbsd Sebastian Huber Sebastian Huber 23 months ago
Summary

if_atsam: Fix checksum offload, add multicast and VLAN support (cloned)

Description

Cloned from #4651:


The if_atsam network interface driver has several issues. Do not disable the FCS if the checksum offload is disabled. Make sure the interface capabilities are enabled. Add multicast and VLAN support. Use the interface transmit method instead of the interface start approach. Correct a potential receive starvation error. Fix the interface up/down.

#4654 2 years ago fixed network/libbsd Sebastian Huber Sebastian Huber 2 years ago
Summary

pfctl: Fix global state initialization (cloned)

Description

Cloned from #4653:


The last update introduced a static variable in get_query_socket() which was not initialized.

#4656 2 years ago fixed fs Sebastian Huber Sebastian Huber 2 years ago
Summary

sync() whould synchronize all file descriptors (cloned)

Description

Cloned from #4655:


According to POSIX

https://pubs.opengroup.org/onlinepubs/9699919799/functions/sync.html

we have

The sync() function shall cause all information in memory that updates file systems to be scheduled for writing out to all file systems.

Currently, the RTEMS sync() implementation synchronizes only the file descriptors associated with a FILE object. This should be changed to call fsync() and fdatasync() for all file descriptors.

#4658 2 years ago fixed arch/riscv Ryan Long 17 months ago
Summary

Fix build issue with riscv sample test

Description

When trying to build the minimum sample test for any RISC-V BSP, the following error occurs.

start.o: in function .L0:

/home/tester/rtems-cron-6/rtems/build/riscv/rv32i/../../../bsps/riscv/shared/start/start.S:84:(.bsp_start_text+0x2c): relocation truncated to fit: R_RISCV_GPREL_I against symbol 'bsp_section_bss_size' defined in *ABS* section in /home/tester/rtems-cron-6/rtems/build/riscv/rv32i/testsuites/samples/minimum.exe

collect2: error: ld returned 1 exit status
#4661 23 months ago fixed tool/gcc Chris Johns Chris Johns <chrisj@…> 21 months ago
Summary

GCC 12 generates wrong code

Description

Calling exit() in a C++ application results in std::terminate() being called.

The std::ios_base::Init::~Init() destructor flushes std::cout, std::cerr and std::clog. The flush of std::cerr results in terminate being called.

The ios_base class uses a sentry to check the state. The code in it's destructor is:

if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception())  

The std::cerr object has ios_base::unitbuf set so uncaught_exception() is called. This call gets the cxa globals:

__cxa_eh_globals *globals = __cxa_get_globals (); 

The __cxa_get_globals() checks if the ec_globals init object:

static __eh_globals_init init;

to see if it is still valid and the state is:

(gdb) p /x init
$2 = {
  _M_key = 0x13010001,
  _M_init = 0x1
}

However the static destructor has run and the POSIX key has been deleted. This results in std::terminate() being called.

The code for the destructor on ARM is:

006562e0 <__eh_globals_init::~__eh_globals_init()>:
  6562e0:       7903            ldrb    r3, [r0, #4]
  6562e2:       b510            push    {r4, lr}
  6562e4:       4604            mov     r4, r0
  6562e6:       b90b            cbnz    r3, 6562ec <__eh_globals_init::~__eh_globals_init()+0xc>
  6562e8:       4620            mov     r0, r4
  6562ea:       bd10            pop     {r4, pc}
  6562ec:       6800            ldr     r0, [r0, #0]
  6562ee:       f04d fe6b       bl      6a3fc8 <pthread_key_delete>
  6562f2:       4620            mov     r0, r4
  6562f4:       bd10            pop     {r4, pc}

and for aarch64 it is:

0000000010222c30 <__eh_globals_init::~__eh_globals_init()>:
    10222c30:   39401001        ldrb    w1, [x0, #4]
    10222c34:   35000041        cbnz    w1, 10222c3c <__eh_globals_init::~__eh_globals_init()+0xc>
    10222c38:   d65f03c0        ret
    10222c3c:   a9bf7bfd        stp     x29, x30, [sp, #-16]!
    10222c40:   910003fd        mov     x29, sp
  return pthread_key_delete (__key);
    10222c44:   b9400000        ldr     w0, [x0]
    10222c48:   94008806        bl      10244c60 <pthread_key_delete>
    10222c4c:   a8c17bfd        ldp     x29, x30, [sp], #16
    10222c50:   d65f03c0        ret

The _M_init boolean is not set to false.

#4662 23 months ago fixed tool/gcc Chris Johns 6 months ago
Summary

Fix GCC 12 warnings

Description

The move to GCC 12 has resulted in an increase in the number of warning. This ticket covers fixing these warning.

#4666 22 months ago fixed fs Sebastian Huber Sebastian Huber 3 months ago
Summary

TFTP: Implement block and window size options

Description

Support the following TFTP options:

  • RFC 2347 TFTP Option Extension
  • RFC 2348 TFTP Blocksize Option
  • RFC 7440 TFTP Windowsize Option
#4667 22 months ago fixed tool/newlib Alexandre Oliva Sebastian Huber 6 months ago
Summary

include/sys/_bitset.h defines struct bitset, pollutes namespace

Description

sys/_bitset.h gets indirectly (*) included by sys/types.h, and should thus define only names that C and C++ standards reserve for the implementation. However, the line:

BITSET_DEFINE(bitset, 1);

expands to a definition of struct bitset in the global namespace.

Some of GCC's libstdc++ tests were failing on aarch64-rtems6.0 because of the naming ambiguity that arises. https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596918.html

It would be best if user programs didn't have to resort to such trickery. In C++, it's not so hard; in C, it can be trickier.

I have not checked whether this struct bitset is actually used for any purpose on aarch64-rtems, or whether it's present on other ports. Maybe it could just be removed or renamed? Maybe upstream (FreeBSD?) would consider dropping it?

(*) sys/types.h includes sys/_pthreadtypes.h includes sys/cpuset.h includes sys/_cpuset.h includes sys/_bitset.h

#4668 22 months ago fixed tool/gcc Sebastian Huber Sebastian Huber 6 months ago
Summary

Use thread-local storage in libstdc++

Description

Fix the libstdc++ configuration so that TLS is used on targets with TLS support. Using TLS is more robust against shortages of system resources which lead to unexpected behaviour.

#4669 22 months ago fixed score Sebastian Huber Sebastian Huber 21 months ago
Summary

clock_nanosleep() uses the wrong clock to determine the start time point

Description

See gcc-patches mailing list:

On 22/06/2022 08:22, Sebastian Huber wrote:
> On 22/06/2022 08:01, Alexandre Oliva via Gcc-patches wrote:
>>
>> On rtems under qemu, the frequently-interrupted nanosleep ends up
>> sleeping shorter than expected, by a margin of less than 0,3%.
>>
>> I figured failing the library test over a system (emulator?) bug is
>> undesirable, so I put in some tolerance for the drift.
>>
>> Regstrapped on x86_64-linux-gnu, also tested with a cross to
>> aarch64-rtems6.  Ok to install?
>>
>> PS: I see nothing wrong with the implementation of clock_nanosleep (used
>> by nanosleep) on rtems6 that could cause it to wake up too early.  I
>> suspect some artifact of the emulation environment.
>>
>>
>> for  libstdc++-v3/ChangeLog
>>
>>     * testsuite/30_threads/this_thread/60421.cc: Tolerate a
>>     slightly early wakeup.
>> ---
>>   .../testsuite/30_threads/this_thread/60421.cc      |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc b/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc
>> index 12dbeba1cc492..f3a5af453c4ad 100644
>> --- a/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc
>> +++ b/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc
>> @@ -51,9 +51,10 @@ test02()
>>     std::thread t([&result, &sleeping] {
>>       auto start = std::chrono::system_clock::now();
>>       auto time = std::chrono::seconds(3);
>> +    auto tolerance = std::chrono::milliseconds(10);
>>       sleeping = true;
>>       std::this_thread::sleep_for(time);
>> -    result = std::chrono::system_clock::now() >= (start + time);
>> +    result = std::chrono::system_clock::now() + tolerance >= (start + time);
>>       sleeping = false;
>>     });
>>     while (!sleeping)
>
> This looks like a bug in RTEMS or the BSP for the test platform. I would first investigate this and then change the test which looks all right to me.

This is a problem in RTEMS. RTEMS uses the FreeBSD timecounters to maintain CLOCK_REALTIME and provides two methods to get the time in a coarse and fine resolution. The std::chrono::system_clock::now() uses the fine resolution (higher overhead). The clock_nanosleep() uses the coarse resolution which may give a time before now().
#4670 22 months ago fixed test Sebastian Huber Sebastian Huber 20 months ago
Summary

Add option to build RTEMS with coverage instrumentation

Description

Add build options to build RTEMS with coverage instrumentation. Dump the gcov information after each test.

#4672 22 months ago fixed score Sebastian Huber Sebastian Huber 6 months ago
Summary

Thread-local storage should be usable once an idle thread exists

Description

At some point during system initialization the idle threads are created. Afterwards the boot processor basically executes within the context of an idle thread with thread dispatching disabled. On some architectures, the thread-local storage state must be applied to processor registers. Add a new CPU port function to do this: _CPU_Use_thread_local_storage( Context_Control *executing ).

#4673 22 months ago fixed lib/dl Ryan Long Ryan Long <ryan.long@…> 21 months ago
Summary

Runtime loader exported symbols address size not consistent

Description

In rtl-sym.c, where the exported symbols table is read in rtems_rtl_symbol_global_add, the addresses are expected to be of size sizeof(unsigned long). This works fine for most architectures because most of them evaluate to 4. For Aarch64 however, this evaluates to 8.

#4677 22 months ago fixed score Adrian Varlan Sebastian Huber 6 months ago
Summary

incorrect handling of "inactive_per_block" from "Objects_Information" structure (cloned)

Description

Cloned from #4676:


The inactive_per_block for block 1 is not handled correctly. For the first object in the second block, the inactive_per_block value is not decremented. As a consequence, the block might be deleted when the second to last object from block 1 is deleted. This is only valid when the application is configured with "CONFIGURE_UNLIMITED_OBJECTS".

The reason is the following:

in function "_Objects_Activate_unlimited" from "objectimpl.h"


block = _Objects_Get_index( the_object->id ) - OBJECTS_INDEX_MINIMUM;

if ( block > objects_per_block ) {

block /= objects_per_block;

information->inactive_per_block[ block ]--; information->inactive--;

}


in a block with 8 objects per block, when creating the 9th object, _Objects_Get_index( the_object->id ) returns 9. Therefore, "block" will be 8 (9 - 1). The next "if" will not be taken (8 > 8 ? No) and the inactive_per_block will not be decremented to 7 and remains at 8. This means that block 1 is a candidate for "_Objects_Shrink_information" function although object id 9 is still valid.

Steps to reproduce: -assuming 8 objects per allocation block -using semaphores as objects

  1. create 17 "RTEMS_SIMPLE_BINARY_SEMAPHORE" semaphore objects id's 1 -> 17.
  2. delete semaphores 11, 12, 13, 14, 15, 16, 17 (order is important)
  3. lock semaphore 9
  4. delete semaphore 10 -> at this point, block 1 is freed although semaphore 9 is still active
  5. unlock semaphore 9 -> this can lead to errors. In my case due to the free the semaphore object was altered and changed from a "SEMAPHORE_VARIANT_SIMPLE_BINARY" to "SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY" resulting in a return value of "RTEMS_NOT_OWNER_OF_RESOURCE".

Simple fix: the condition for the "if" should be ">=" instead of ">".

#4678 21 months ago fixed score Sebastian Huber Sebastian Huber 6 months ago
Summary

System initialization time increased compared to RTEMS 4.11

Description

Since RTEMS 5, the objects based on Objects_Control are statically allocated in the .bss sections. The zero-initialization is unnecessary since each object is fully initialized after allocation by an object-specific initialization routine. The memory for objects is statically allocated or allocated from the workspace if the unlimited objects configuration option is used. Workspace memory is uninitialized by default. Optimize the static allocation to place the object controls, local tables, and thread queue heads into a .noinit section.

The longer system initialization time compared to RTEMS 4.11 may lead to hardware watchdog problems.

#4679 21 months ago fixed score Sebastian Huber Sebastian Huber 12 months ago
Summary

Use priority inheritance for thread join

Description

Threads may join the thread termination of another thread using the pthread_join() or rtems_task_delete() directives. Currently, the thread cancel operation uses a special case priority boosting mechanism:

static void _Thread_Raise_real_priority(
  Thread_Control   *the_thread,
  Priority_Control  priority
)
{
  Thread_queue_Context queue_context;

  _Thread_queue_Context_initialize( &queue_context );
  _Thread_queue_Context_clear_priority_updates( &queue_context );
  _Thread_Wait_acquire( the_thread, &queue_context );

  if ( priority < the_thread->Real_priority.priority ) {
    _Thread_Priority_change(
      the_thread,
      &the_thread->Real_priority,
      priority,
      PRIORITY_GROUP_LAST,
      &queue_context
    );
  }

  _Thread_Wait_release( the_thread, &queue_context );
  _Thread_Priority_update( &queue_context );
}

The problem is that this approach is not transitive, it does not account for priority adjustments of the calling task while waiting for the join, clustered scheduling is not supported, and deadlocks are not detected. All these problems are fixed by using a priority inheritance thread queue for the join operation.

#4680 21 months ago fixed posix Sebastian Huber Sebastian Huber 12 months ago
Summary

POSIX tasks cancelled through rtems_task_delete() should have an exit value of PTHREAD_CANCELED

Description

The rtems_task_delete() directive is basically just a combined pthread_cancel() and pthread_join(). In addition, it removes the PTHREAD_DETACHED state. The exit value returned by pthread_join() of threads cancelled by rtems_task_delete() should reflect this by getting a PTHREAD_CANCELED value and not NULL.

#4682 21 months ago fixed lib/dl Ryan Long Ryan Long <ryan.long@…> 21 months ago
Summary

Add AArch64 support to libdl

Description

Add AArch64 support to libdl using NetBSD code as necessary.

#4684 21 months ago fixed bsps Chris Johns Chris Johns 21 months ago
Summary

Support Versal DDRMC0 regions 0 and 1

Description

The Versal's DDRMC0 supports region 0 and 1. Region 0's base address defaults to 0x00000000000 and can be up to 2G in length. If the hardware has more than 2G of DDR memory it is placed in region 1 and it's default base address is 0x00800000000 placing it in the A64 address space.

Add support so the user defined memory length BSP_XILINX_VERSAL_RAM_LENGTH spans region 0 and 1.

Extend the heap with the region 1 memory.

#4686 21 months ago fixed lib/dl Ryan Long Ryan Long <ryan.long@…> 21 months ago
Summary

Refactor shared code in Arm and AArch64

Description

rtl-mdreloc-arm.c and rtl-mdreloc-aarch64.c share code. The shared code should be pulled out and included into each file.

#4689 21 months ago fixed arch/mips Joel Sherrill Joel Sherrill <joel@…> 18 months ago
Summary

mips/jmr3904 Massive Number of Test Failures

Description

jmr3904 last had a good test run in January 2022 (now July). Since then, there has not been one in which more than 1 test pass and I suspect that's because the one doesn't expect output.

https://lists.rtems.org/pipermail/build/2022-January/030809.html

This has been tracked down to a gdb simulator bug which has been reported as:

https://sourceware.org/bugzilla/show_bug.cgi?id=29439

Many details follow in the comments.

#4690 21 months ago fixed score Chris Johns Chris Johns <chrisj@…> 21 months ago
Summary

CLOCK_REALTIME thread queue not updated as part of clock_settime call

Description

Setting the CLOCK_REALTIME clock using clock_settime(CLOCK_REALTIME, , ) clock does not update thread relative period entries on the watchdog timer queue.

A system's stability is effected if a user calls clock_settime on the CLOCK_REALTIME clock. The watchdog's REALTIME clock queue is references against the realtime clock and movement of the time means

The effected parts are:

  1. User C code that calls nanosleep, usleep, sleep or clock_nanosleep(CLOCK_REALTIME, , ).
  2. User C++ code that uses std::this_thread::sleep_for() as GCC uses the nanosleep() call.
  3. LibBSD uses CLOCK_REALTIME.

The nanosleep call is explained in more detail in the clock_nanosleep rational. The nanosleep clock must be CLOCK_REALTIME. The clock_settime standard says:

Setting the value of the CLOCK_REALTIME clock via clock_settime() shall have no effect on threads that are blocked waiting for a relative time service based upon this clock, including the nanosleep() function; nor on the expiration of relative timers based upon this clock. Consequently, these time services shall expire when the requested relative interval elapses, independently of the new or old value of the clock.

#4691 21 months ago fixed posix Joel Sherrill Joel Sherrill 6 months ago
Summary

Add support for FACE Technical Standard Restriction on POSIX Absolute Timers

Description

Overview

Most of the time, the FACE Technical Standard (https://opengroup.org/face) defines a subset (e.g. profile) of a standard. It currently includes four profiles of the POSIX 1003.1-2008 standard with a few optional features like multiple processes and IPV6. However, in one case, it defines an error case for something POSIX defines as required behavior. This ticket is intended to track adding support for an application being able to configure whether it wants the POSIX behavior or that defined by the FACE Technical Standard.

FACE Technical Standard Requirements

POSIX allows for setting a timer on CLOCK_REALTIME[1] while the FACE Technical Standard defines this as an error. This behavior and deviation from POSIX has been in the FACE Technical Standard since the beginning and was present in Edition 1.0[2]. This is the language from Edition 1.0 of the FACE Technical Standard which was written in the tone of a white paper rather than as a set of requirements:

3.9.4 Time Management

Partial support for the POSIX CLOCK_REALTIME, which permits a calendar-based clock time to be set that becomes available to all partitions. Due to safety and security-related considerations in the POSIX definitions of this clock’s behavior, the configuration data will specify which partitions (preferably one partition) have permissions to set (using the clock_settime API) this clock. All partitions may have access to read this clock, but an error will be returned for any partition that attempts to set an alarm based on this clock that is based on absolute time (setting of an alarm based on a relative time is supported). Partitions authorized to set the calendar time will also be authorized to set the time zone value that is visible to all other partitions.

Subsequent editions of the FACE Technical Standard have fine-tuned the language and made requirements clearer with simpler direct "shall" statements.

Also, although the term OSS UoC was defined in Edition 1.0, the requirements now use this acronym for Operating System Segment Unit of Conformance to refer to the operating system and foundational services. Other types of segments are defined for applications, communications, and device management. In Edition 3.1[3], the language has the same intent as Edition 1.0 but the requirements are stated in a more direct and clearer manner.

4.1.1.3 OSS POSIX Clock Requirements

An OSS UoC provides support for POSIX clocks.

  1. An OSS UoC shall support the POSIX Monotonic Clock option (CLOCK_MONOTONIC), including setting absolute and relative timers on this clock.
  2. An OSS UoC shall support clock read-access based POSIX CLOCK_REALTIME clock (calendar-based clock time).
  3. An OSS UoC shall support setting a relative timer-based POSIX CLOCK_REALTIME clock (calendar-based clock time).
  4. An OSS UoC shall support clock time write access for POSIX CLOCK_REALTIME clock value under the constraint that configuration data specifies the partition is authorized to set the clock time (using the clock_settime() API).

Note: The time value set by one partition becomes visible to all other partitions. The timezone value set by one POSIX process using the tzset() or setenv() APIs is local to that POSIX process.

  1. An OSS UoC shall return an error when a software component attempts to set an absolute timer on the POSIX CLOCK_REALTIME clock.

Note: The behavior is necessary (e.g., to prevent backwards and forwards shifts in sequential timers) due to the setting of POSIX_CLOCK_REALTIME clock impacting all partitions.

The use of the word "partition" is intentional because the FACE Technical Standard includes ARINC 653 and POSIX standards. ARINC 653 defines a time and space partitioned real-time environment. POSIX or ARINC 653 applications can be hosted in a partition. In three of the four profiles, ARINC 653 is required while in the fourth it is optional. RTEMS can be hosted in an ARINC 653 partition using a paravirtualized configuration with a BSP that adapts it to the environment.

The requirement being addressed by this ticket is (5) since RTEMS currently meets the other requirements. (5) contradicts the POSIX standard and modifying RTEMS to not support absolute POSIX timers is not an acceptable option.

Proposed Solution

The proposed solution is to add a confdefs.h configure option that enables this behavior when the OSS UoC (e.g. operating system) must provide FACE conformant behavior. When not defined, the POSIX behavior will be in effect.

This will require additions to the confdefs.h family of headers, adding a test, and updating documentation.

References

[1] POSIX timer_create - https://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_create.html

[2] FACE Technical Standard, Edition 1.0. January 2012. https://publications.opengroup.org/c122.

[3] FACE Technical Standard, Edition 3.1. July 2020. https://publications.opengroup.org/c207.

#4693 21 months ago fixed arch/aarch64 Chris Johns Chris Johns 20 months ago
Summary

Remove ILP32 aarch64/xilinx_versal_* BSPs

Description

The BSPs:

  1. aarch64/xilinx_versal_ilp32_qemu
  2. aarch64/xilinx_versal_ilp32_vck190

support ILP32 addressing and the Versal has default memory regions above the 4G address boundary. There is value in supporting ILP32 if there is not practical use for it.

If a use case is identified they can be added back.

#4694 21 months ago invalid test Lucian-Raul Silistru joel@… 21 months ago
Summary

sptests/sp37 fails to compile if RTEMS_SMP is not defined

Description

Issue seems to be caused by lines 191-193 and 207 in testsuites/sptests/sp37/init.c

  • name is undefined
  • _ISR_lock_Initialize is "(void)name"

In file included from ../../../../../../RTEMS/cpukit/include/rtems/rtems/intr.h:70,

from ../../../../../../RTEMS/cpukit/include/rtems.h:69, from ../../../../../../RTEMS/bsps/include/bsp/default-initial-extension.h:40, from ../../../../../../RTEMS/bsps/myriad2/ma2x8x/include/bsp.h:27, from ../../../../../../RTEMS/testsuites/support/include/tmacros.h:41, from ../../../../../../RTEMS/testsuites/sptests/sp37/system.h:35, from ../../../../../../RTEMS/testsuites/sptests/sp37/init.c:41:

../../../../../../RTEMS/testsuites/sptests/sp37/init.c: In function 'test_isr_locks': ../../../../../../RTEMS/testsuites/sptests/sp37/init.c:207:42: error: 'name' undeclared (first use in this function)

207 | _ISR_lock_Initialize( &container.lock, name );

| ~

../../../../../../RTEMS/cpukit/include/rtems/score/isrlock.h:202:12: note: in definition of macro '_ISR_lock_Initialize'

202 | (void) _name

|

../../../../../../RTEMS/testsuites/sptests/sp37/init.c:207:42: note: each undeclared identifier is reported only once for each function it appears in

207 | _ISR_lock_Initialize( &container.lock, name );

| ~

../../../../../../RTEMS/cpukit/include/rtems/score/isrlock.h:202:12: note: in definition of macro '_ISR_lock_Initialize'

202 | (void) _name

|

#4697 21 months ago invalid network/libbsd Joel Sherrill 17 months ago
Summary

Documentation for libbsd Configure options

Description

libbsd appears to have some options to configure it similar to confdefs.h. We need user facing documentation on those options.

#4700 21 months ago fixed tool Ryan Long Ryan Long <ryan.long@…> 21 months ago
Summary

Fix instances of "is" operator used with literals

Description

Python 3.8 introduced new warnings when using the "is" operator when comparing literals.

#4701 21 months ago fixed bsps Sebastian Huber Sebastian Huber 21 months ago
Summary

Relocatable write data is placed in read-only region on some BSPs

Description

The .data.rel.ro* linker input section pattern accidentally matches with writeable data those symbol name starts with "ro".

#4703 20 months ago fixed lib Chris Johns Chris Johns 20 months ago
Summary

NetSNMP 5.7.2.1 Patch

Description

This ticket is a place holder for the NetSNMP patch moving it out of the rtems-tools repo.

#4705 20 months ago fixed build Chris Johns Chris Johns 17 months ago
Summary

Installed header clean up

Description

A number of headers are installed when they should not or are not installed.

#4706 20 months ago fixed rtems Chris Johns Chris Johns 6 months ago
Summary

Installed header break C++

Description

Some headers generate C++ errors and so cannot be included.

#4710 20 months ago fixed tool/rsb Chris Johns Chris Johns 20 months ago
Summary

RSB does not expand dir type macros correctly

Description

The expansion of the dir type macros is not done correctly. Macro replacement only appends the file part to the last element of a path list. For example:

  %{mydir}/abc.cfg

with a path of:

  %define mydir x:y:z

results in:

  x:y:z/abc.cfg

The config load code handles this but it is wrong. The expansion of dir type macro variables should handle path separators (:) so you get:

 x/abc.cfg:y/abc.cfg:z.abc.cfg

This has not been a problem in the RSB because the _configdir has only had two elements and the last one only ever had subdirectories.

#4712 20 months ago fixed arch/powerpc Sebastian Huber Sebastian Huber 20 months ago
Summary

powerpc: Add AltiVec? VRSAVE support

Description

The VRSAVE feature of the Altivec unit can be used to reduce the amount of Altivec registers which need to be saved/restored during interrupt processing and context switches.

#4713 20 months ago fixed posix Joel Sherrill Joel Sherrill 20 months ago
Summary

Make pthread_atfork follow FACE Technical Standard Behavior for Single Process Environments

Description

The POSIX specification for pthread_atfork() does not address the behavior when in a single process environment. The RTEMS implementation was an arbitrary decision on our part with no basis from the wider POSIX community. The FACE Technical Standard includes profiles without multiple process support and has defined the behavior for this method as follows:

When multiple POSIX processes are supported, pthread_atfork(), the functionality is per the POSIX standard. When multiple POSIX processes are not supported, pthread_atfork() should return 0. The provision to support only a single process is not addressed in the POSIX standard.

The RTEMS implementation currently returns ENOSYS instead of 0.

This ticket is to track the change to RTEMS and the documentation.

#4714 20 months ago fixed network/lwip Chris Johns 17 months ago
Summary

Use waf for LwIP walk sources

Description

The lwip.py support has a call to walk the source tree for source files. Waf supports glob'ing of sources so why not use that?

This ticket is to remove the walk.

#4718 19 months ago fixed fs Frank Kuehndel Sebastian Huber 17 months ago
Summary

Coverity issues in cpukit/libfs/src/ftpfs/tftpDriver.c

Description

Coverity indicates the following issues in cpukit/libfs/src/ftpfs/tftpDriver.c:

CID 1506523 (#1 of 1):

Unchecked return value from library (CHECKED_RETURN)

  1. check_return: Calling sendto(tp->socket, send_buf, plen, 0, (struct sockaddr *)&tp->farAddress, 16U) without checking return value. This library function may fail and return an error code.
727        sendto (
728            tp->socket,
729            send_buf,
730            plen,
731            0,
732            (struct sockaddr *) &tp->farAddress,
733            sizeof (tp->farAddress)
734        );

CID 1506522 (#1 of 1):

Unchecked return value from library (CHECKED_RETURN)

  1. check_return: Calling sendto(tp->socket, (char *)&msg, len, 0, (struct sockaddr *)to, 16U) without checking return value. This library function may fail and return an error code.
529    sendto (tp->socket, (char *)&msg, len, 0, (struct sockaddr *)to, sizeof *to);

CID 1437618 (#1 of 3):

Unchecked return value from library (CHECKED_RETURN)

  1. check_return: Calling setsockopt(tp->socket, 65535, 4102, &tv, 16U) without checking return value. This library function may fail and return an error code.
594        setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);

CID 1437618 (#2 of 3):

Unchecked return value from library (CHECKED_RETURN)

  1. check_return: Calling setsockopt(tp->socket, 65535, 4102, &tv, 16U) without checking return value. This library function may fail and return an error code.
555        setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);

CID 1437618 (#3 of 3):

Unchecked return value from library (CHECKED_RETURN)

  1. check_return: Calling setsockopt(tp->socket, 65535, 4102, &tv, 16U) without checking return value. This library function may fail and return an error code.
559        setsockopt (tp->socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv);
#4724 19 months ago fixed doc Chris Johns Joel Sherrill 16 months ago
Summary

Git commit message format instructions

Description

The Eng docs Creating A Patch references the Wiki. The content should be in the manual.

Note lots of git related bits are in the Eng manual and still on the Wiki so which is correct?

#4726 19 months ago fixed admin Chris Johns Chris Johns 19 months ago
Summary

RSB decode exception stops build

Description

Building in a Rocky VM on FB 12 with 5 I got:

Traceback (most recent call last):
  File "/usr/lib64/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/work/chris/rtems/rsb/rtems-source-builder.git/source-builder/sb/execute.py", line 204, in _readthread
    data = data.decode(sys.stdout.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 4095: unexpected end of data

If the data is corrupted or broken things stop. Fix to attempt to keep going.

This issue also effect rtems-tools.

#4729 19 months ago fixed lib Chris Johns Chris Johns 17 months ago
Summary

Add 64bit address support to RTEMS FDT

Description

RTEMS's FDT wrapper does not handle the reg property correctly. Update to handle 64bit register addresses.

#4730 19 months ago fixed tool/rsb Christian Mauderer Chris Johns 19 months ago
Summary

rtems-source-builder doesn't generate tar archives for all packages any more

Description

Like discussed in the following mailing list thread, the rtems-source-builder doesn't generate tar archives for all packages anymore:

https://lists.rtems.org/pipermail/devel/2022-September/073369.html

All RTEMS tools build sets 6/rtems-* work fine except for 6/rtems-microblaze. devel/qemu and devel/dtc do not generate a tar archive. If the patch

https://git.rtems.org/rtems-source-builder/commit/?id=6205068c5a429e9ee1b471f4c8a3a119bb6757b2

is reverted, the tar files are generated just like before.

#4732 19 months ago fixed tool/rsb Chris Johns Chris Johns 19 months ago
Summary

Set top in RSB version.py

Description

Setting the top lets the code be used in deployment to get the version of the RSB being used. An RSB version lets a user track the exact tools being built and version numbers reported by the tools can match the packaged build, eg an rpm name and version info.

#4741 18 months ago fixed arch/sparc Sebastian Huber Sebastian Huber 18 months ago
Summary

Fix GCC PR 107248

Description

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107248

#4744 18 months ago fixed lib/debugger Chris Johns Chris Johns 18 months ago
Summary

libdebugger arm backend does not single step

Description

Single stepping with the ARM backend does not cleanly step instructions.

#4746 18 months ago fixed arch/arm Sebastian Huber Sebastian Huber 18 months ago
Summary

Armv7-M SysTick? clock driver uses off by one reload value

#4750 18 months ago invalid rtems dsa93 18 months ago
Summary

Linker discards RTEMS_SYSINIT_ITEM object

Description

Hi

I am developing device driver in custom BSP in RTEMS. I applied my BSP on top of master branch.

My driver code looks like this:

/* driver logic in "static" functions (omitted) */

void custom_driver_init(void);

RTEMS_SYSINIT_ITEM(
  custom_driver_init,
  RTEMS_SYSINIT_DEVICE_DRIVERS,
  RTEMS_SYSINIT_ORDER_SEVENTH
);

It is discarded by linker. custom_driver_init is never called. I discovered hack how to make linker not discard this: if I put at least one extern linkage function and call it in other file then linker dont discard "custom_driver_init"

/* driver logic in "static" functions (omitted) */

/* Call this function for example from main function */
int workaraound(void) {
    return 5;
}

void custom_driver_init(void);

RTEMS_SYSINIT_ITEM(
  custom_driver_init,
  RTEMS_SYSINIT_DEVICE_DRIVERS,
  RTEMS_SYSINIT_ORDER_SEVENTH
);

Driver file compilation arguments:

 -MMD,
 -Wall,
 -Wmissing-prototypes,
 -Wimplicit-function-declaration,
 -Wstrict-prototypes,
 -Wnested-externs,
 -O2,
 -g,
 -fdata-sections,
 -ffunction-sections,
 -mthumb,
 -mcpu=cortex-m7,
 -mfpu=fpv5-d16,
 -mfloat-abi=hard,
 -save-temps,
 -Icpukit/include,
 -I../../../cpukit/include,
 -Icpukit/score/cpu/arm/include,
 -I../../../cpukit/score/cpu/arm/include,
 -Ibsps/include,
 -I../../../bsps/include,
 -Ibsps/arm/include,
 -I../../../bsps/arm/include,
 ../../../bsps/arm/someplatform/console/console.c,
 -c,
 -DHAVE_CONFIG_H=1,
 -DBOARD_MAINCK_FREQ_HZ=10000000

Application linkage files

/home/dsa/rtems/rsb-6/bin/arm-rtems6-gcc
 -g
 -mthumb
 -mcpu=cortex-m7
 -mfpu=fpv5-d16
 -mfloat-abi=hard
 -DBOARD_MAINCK_FREQ_HZ=10000000
 -I/home/dsa/arm-rtems6/someplatform/lib/include
 -B/home/dsa/arm-rtems6/someplatform/lib
 -qrtems
 -Wl,--gc-sections
 -Wl,-Map=ecu-app.map,--print-memory-usage,--cref
 CMakeFiles/ecu-app.dir/src/main.c.obj
 -o ecu-app.elf
 -lrtemsbsp
 -lrtemscpu

I tried to research this topic and I am not sure if there is a way to prevent this optimisation, so I decided to post it here. I can provide you some more details or perform some tests

#4751 18 months ago fixed shell chenjin_zhong Chris Johns 16 months ago
Summary

chmod problem in shell of RTEMS 6

Description

Cloned from #4558:


Hi, I find one problem in rtems_shell_main_chmod function. the usage of this instruction is descripted as "chmod 0777 n1 n2... #change filemode", .the src code is listed as follows. the bold part should be replaced with chmod(argv[n], mode)?

static int rtems_shell_main_chmod(
  int argc,
  char *argv[]
)
{
  int           n;
  mode_t        mode;
  unsigned long tmp;

  if (argc < 2) {
    fprintf(stderr,"%s: too few arguments\n", argv[0]);
    return -1;
  }

  /*
   *  Convert arguments into numbers
   */
  if ( rtems_string_to_unsigned_long(argv[1], &tmp, NULL, 0) ) {
    printf( "Mode argument (%s) is not a number\n", argv[1] );
    return -1;
  }
  mode = (mode_t) (tmp & 0777);

  /*
   *  Now change the files modes
   */
  for (n=2 ; n < argc ; n++)
    chmod(argv[n++], mode); /* <<<< here */

  return 0;
}
#4756 18 months ago fixed doc Chris Johns Chris Johns <chrisj@…> 17 months ago
Summary

Docs build system does not build singlehtml (cloned)

Description

Cloned from #4755:


The configure logic does not handle the inliner detection correctly.

#4759 17 months ago fixed arch/arm jkillelea Sebastian Huber <sebastian.huber@…> 16 months ago
Summary

TLS support is broken for ARMv6

Description

I have found two possible memory exceptions under rtems_shell_init when running on the raspberry pi 1 BSP.

First, a possible null pointer dereference from getpwuid_r(0, &pwd, NULL, 0, &pwd_res); in rtems_shell_init_once. The NULL pointer is never checked before it is used as a backing buffer for pwd.

Second, usage of stdin, stdout, and stderr cause memory exceptions in rtems_shell_run when used, for example shell_env->parent_stdin = stdin;.

#4762 17 months ago fixed network/libbsd Aaron N Chris Johns 17 months ago
Summary

Add Versal SDHCI Arasan driver to libbsd

Description

Added support for SD card slots in libbsd for the Versal. Tested on VCK190.

#4763 17 months ago fixed shell Chris Johns Chris Johns 17 months ago
Summary

Detect terminal size

Description

Add support to set the rows and columns in the shell. RTEMS does not have a full tty system and does not carry terminfo so implement a shell based approach to let some commands manage the terminal size.

Update the edit command to support the terminal size.

Fix the help lines.

#4766 17 months ago fixed doc Joel Sherrill Joel Sherrill 17 months ago
Summary

Classic API User Guide Index has Functions without Parentheses

Description

Some index entries in the Classic API Users Guide has some method names without parentheses like rtems_clock_get instead of rtems_clock_get() which is used most of the time. Fix to improve consistency.

#4769 17 months ago fixed config Sebastian Huber Sebastian Huber 16 months ago
Summary

config: Add CONFIGURE_RECORD_INTERRUPTS_ENABLED

Description
/**
 * @brief This configuration option is a boolean feature define.
 *
 * In case
 *
 * * this configuration option is defined
 *
 * * and #CONFIGURE_RECORD_PER_PROCESSOR_ITEMS is properly defined,
 *
 * then the interrupt event recording is enabled.
 *
 * @par Default Configuration
 * If this configuration option is undefined, then the described feature is not
 * enabled.
 *
 * @par Notes
 * The interrupt event recording generates interrupt entry and exit events when
 * interrupt entries are dispatched.
 */
#define CONFIGURE_RECORD_INTERRUPTS_ENABLED
#4771 17 months ago fixed arch/aarch64 Chris Johns Chris Johns 11 months ago
Summary

Versal UART issues

Description

The Versal polled mode it broken when building. The disable all interrupt call is not built in polled mode.

The UART interrupt mode behaves differently with a small stand alone app than a full app with libbsd. A full application with libbsd seems to behave while the small app exhibit the "not tx interrupt on FIFO load" issue.

#4772 17 months ago fixed doc Chris Johns Kinsey Moore 9 months ago
Summary

Remove use of interval from rtems_task_wake_after() documentation

Description

The Classic API documentation for rtems_task_wake_after() refers to an interval while the call accepts ticks. The exact interval is not known because the period of time to next tick is not known when the call is made.

  1. Clarify the wording
  1. Recommend new applications use the POSIX based calls nanosleep() and clock_nanosleep() for applications that have intervals in a time base rather than system ticks.

The Gemini, Verify the fidelity of RTEMS System Tick issue provides some back ground to this change.

#4775 16 months ago fixed arch/riscv Hesham Almatary Hesham Almatary <hesham.almatary@…> 14 months ago
Summary

RISC-V: Default RV64 BSPs to medany

Description

Currently generic RISC-V BSPs (riscv/riscv) that start with rv64 and not rv64_medany will start at 0x70000000. This adds high maintenance overhead and deviates from almost all other RISC-V-based OSes and baremetal program that start at 0x80000000. Further, testing now has to account for an extra parameter (medany or not) that doubles the number of BSPs need to be tested.

It would be ideal to reduce maintenance efforts by defaulting all RV64 BSPs to medany and make them start at 0x80000000 to run on both QEMU and Spike. Those that need other cmodels or start addresses could be customised (e.g., rv64imac would default to medany but rv64imac_medlow won't).

#4778 16 months ago fixed tool/rsb Chris Johns 10 months ago
Summary

Deployed RSB does not find release version config

Description

Cloned from #4777:


The RSB does not find the VERSION file when released.

#4782 16 months ago fixed doc Joel Sherrill 15 months ago
Summary

Correct Issues in Rate Monotonic Manager Background Section

Description

Fix these issues:

  • 11.2.5.1 last bullet is inverted logically. Non-periodic tasks must NOT displace periodic ones and should run in background at a logically lower priority.
  • 11.2.5.4 - emphasis box needed on the second paragraph (after lead-in that ends with a colon)
#4803 15 months ago fixed dev Gedare Bloom Gedare Bloom 9 months ago
Summary

Revert or Mark CAN API as experimental

Description

The CAN API done in GSoC 2022 is not stable. There are some key deficiencies that need to be fixed, and they may cause the API to change. The API needs to be marked as experimental or reverted before it appears in a release.

#4818 15 months ago fixed score Daniel Páscoa Sebastian Huber <sebastian.huber@…> 15 months ago
Summary

Incomplete Statement in “cpu->heir”

Description

Description: The assignment statement "cpu->heir = " is incomplete and missing a value and semicolon at the end. It is recommended to revise this statement to ensure the code is not broken by the missing semicolon.

The attached excel lists in a systematic way the sources where this issue applies.

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-058.

File list (please check the attached excel for more information): cpukit\score\src\threadcreateidle.c

#4820 15 months ago fixed test Daniel Páscoa Sebastian Huber <sebastian.huber@…> 15 months ago
Summary

Hazardous cast

Description

Description: Converting a function pointer to a different type of pointer can lead to unpredictable and undefined behavior. It is important to note that attempting to convert a pointer to a function to a pointer of a different type of function is particularly dangerous and should be avoided.

The attached excel lists in a systematic way the sources where this issue applies.

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-079.

File list (please check the attached excel for more information): bsps\shared\irq\irq-handler-iterate.c bsps\sparc\leon3\include\tm27.h

#4821 15 months ago fixed doc Joel Sherrill Joel Sherrill <joel@…> 15 months ago
Summary

Ubuntu Host Instructions Wrong

Description

The current instructions were reported to be as being broken in email. Filing a ticket to track.

So here is the quick start command line which is missing the work ‘install’ and some of the packages listed don’t exist: https://docs.rtems.org/branches/master/user/hosts/posix.html#xubuntu

Here is the correct command line:

$ sudo apt install build-essential g++ gdb unzip pax bison flex texinfo python3-dev python-is-python3 libpython2-dev libncurses5-dev zlib1g-dev ninja-build pkg-config

#4822 15 months ago fixed score Daniel Páscoa Sebastian Huber 15 months ago
Summary

Function returning unchanged function input

Description

Description: These functions appear to be returning their input without making any changes. To improve their functionality, it is recommended to re-write them to return void.

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-057.

File: cpukit\score\src\smp.c Function: _SMP_Process_message Line: 284

#4828 15 months ago fixed bsps Daniel Páscoa Sebastian Huber 9 months ago
Summary

Macro defined but magic number used instead

Description

Description: Each register has a dedicated SHIFT macro, however, it is not utilized in subsequent macro definitions where the shift operation is performed. To improve consistency and maintainability, consider incorporating the defined shift macro in the subsequent macro definitions instead of using hardcoded shift values.

Additional Notes: These findings are related to the fact that a bunch of macros like AHBSTAT_AHBS_HMASTER_SHIFT are defined and then are not used right in the next few lines.

#define AHBSTAT_AHBS_HMASTER_SHIFT 3 #define AHBSTAT_AHBS_HMASTER_MASK 0x78U #define AHBSTAT_AHBS_HMASTER_GET( _reg ) \

( ( ( _reg ) >> 3 ) & 0xfU )

#define AHBSTAT_AHBS_HMASTER( _val ) ( ( _val ) << 3 )

As stated, in every one of these files, “This file is part of the RTEMS quality process and was automatically generated". There are YAML files where these registers are defined and the Waf build system generates the header files automatically with the current configuration.

This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-013.

File list: bsps\include\grlib\ahbstat-regs.h bsps\include\grlib\ahbtrace-regs.h bsps\include\grlib\apbuart-regs.h bsps\include\grlib\dsu4-regs.h bsps\include\grlib\ftmctrl-regs.h bsps\include\grlib\gptimer-regs.h bsps\include\grlib\gr1553b-regs.h bsps\include\grlib\gr740thsens-regs.h bsps\include\grlib\grcan-regs.h bsps\include\grlib\grclkgate-regs.h bsps\include\grlib\grethgbit-regs.h bsps\include\grlib\grgpio-regs.h bsps\include\grlib\grgprbank-regs.h bsps\include\grlib\grgpreg-regs.h bsps\include\grlib\griommu-regs.h bsps\include\grlib\grpci2-regs.h bsps\include\grlib\grspw2-regs.h bsps\include\grlib\grspwrouter-regs.h bsps\include\grlib\irqamp-regs.h bsps\include\grlib\l4stat-regs.h bsps\include\grlib\memscrub-regs.h bsps\include\grlib\l2cache-regs.h bsps\include\grlib\mmctrl-regs.h bsps\include\grlib\spictrl-regs.h bsps\include\grlib\spwpnp-regs.h bsps\include\grlib\spwrmap-regs.h

#4832 15 months ago wontfix score Daniel Páscoa 15 months ago
Summary

CLANG flagged error

Description

Description: SPAMR/CLANG point out to a possible deference to a null pointer. However, this issue has already been checked by the RTEMS team and flagged as false positive (see rtems-6-sparc-gr740-smp-3/doc/paf/spamr/spamr.pdf page 29). Yet, the justification sentence ends with "Why CLANG complains about a possible null pointer at this place in code and not everywhere or nowhere remains a mystery" which sounds awkward and lead us to think that a complete analysis as not been done on the error.

Looking at it now, "_Chain_Initialize_one" is declared as static inline in a .h. That makes it public and so not all calls are controlled. Within the function, there is already an assert operation for one of the inputs. Now, one needs to add it also to the other one. Note that this assert is only active when compiler options RTEMS_DEBUG or RTEMS_STATIC_ANALYSIS are used which shall remove the CLANG error and not influence the flight executable.

(Missions might do an early compilation with RTEMS_DEGUG to spot any problem on this).

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-062.

File list: cpukit\include\rtems\score\chainimpl.h (line 525)

#4834 15 months ago fixed shell chenjin_zhong Chris Johns 15 months ago
Summary

close_editor problem of RTEMS4.13/5.1 (cloned)

Description

Cloned from #4564:


Hi, I find when close editor in shell console.some errors will occur. I check and analyse the source code of medit.c. the code fragment is listed as follows.

#if defined(rtems)

case ctrl('w'): ed = ed->env->current; close_editor(ed); break;

#else

case ctrl('w'): close_editor(ed); ed = ed->env->current; break;

#endif

static void close_editor(struct editor *ed) {

struct env *env = ed->env; if (ed->dirty) {

display_message(ed, "Close %s without saving changes (y/n)? ", ed->filename); if (!ask()) {

ed->refresh = 1; return;

}

}

delete_editor(ed);

ed = env->current; if (!ed) {

ed = create_editor(env); new_file(ed, "");

} ed->refresh = 1;

}

static void delete_editor(struct editor *ed) {

if (ed->next == ed) {

ed->env->current = NULL;

} else {

ed->env->current = ed->prev;

} ed->next->prev = ed->prev; ed->prev->next = ed->next; if (ed->start) free(ed->start);

clear_undo(ed);

free(ed);

}

as seen above, if the macro rtems is defined. the delete_editor function will free ed pointer. Therefore, after the next loop, the ed is an invalid pointer.I have checked the code of https://github.com/ringgaard/sanos/blob/master/src/utils/edit/edit.c. the code is as follows.

case ctrl('w'): close_editor(ed); ed = ed->env->current; break;

#4835 15 months ago fixed shell chenjin_zhong Chris Johns 15 months ago
Summary

medit malloc problem of RTEMS (cloned)

Description

Cloned from #4565:


I find malloc function is called by move_gap function in medit.c. The returned value does not check. At least 32KB of memory is allocated at each time, maybe more than. The returned value "start" should be check to avoid malloc failure. The move_gap function should return immediatelty when malloc failure. the code frament is listed as follows.

static void move_gap(struct editor *ed, int pos, int minsize) {

int gapsize = ed->rest - ed->gap; unsigned char *p = text_ptr(ed, pos); if (minsize < 0) minsize = 0; if (minsize <= gapsize) {

if (p != ed->rest) {

if (p < ed->gap) {

memmove(p + gapsize, p, ed->gap - p);

} else {

memmove(ed->gap, ed->rest, p - ed->rest);

} ed->gap = ed->start + pos; ed->rest = ed->gap + gapsize;

}

} else {

int newsize; unsigned char *start; unsigned char *gap; unsigned char *rest; unsigned char *end;

if (gapsize + MINEXTEND > minsize) minsize = gapsize + MINEXTEND; newsize = (ed->end - ed->start) - gapsize + minsize; start = (unsigned char *) malloc(newsize); TODO check for out of memory gap = start + pos; rest = gap + minsize; end = start + newsize;

if (p < ed->gap) {

memcpy(start, ed->start, pos); memcpy(rest, p, ed->gap - p); memcpy(end - (ed->end - ed->rest), ed->rest, ed->end - ed->rest);

} else {

memcpy(start, ed->start, ed->gap - ed->start); memcpy(start + (ed->gap - ed->start), ed->rest, p - ed->rest); memcpy(rest, p, ed->end - p);

}

free(ed->start); ed->start = start; ed->gap = gap; ed->rest = rest; ed->end = end;

}

#ifdef DEBUG

memset(ed->gap, 0, ed->rest - ed->gap);

#endif

}

#4838 15 months ago duplicate arch/aarch64 Aaron N Chris Johns 15 months ago
Summary

Fix for UART interrupt on aarch64 Versal

Description

Fixed UART interrupts for Versal. Tested on VCK190.

#4842 15 months ago fixed arch/sparc Daniel Páscoa Sebastian Huber 9 months ago
Summary

SPARC/grlib - Registers definitions wrongly defined when there are reserved bits

Description

With respect to RTEMS 6 (ESA-promoted RTEMS SMP Qualification Data Pack release 3), the following issues are observed:

FileLinesDiscrepancy
bsps\include\grlib\ftmctrl-regs.h84; 86; 88; 91; 96;98; 101; 106; 109; 115; 120; 123According to table 365 of page 294 of the GR740 User Manual (v.2.50), the register addresses are incorrectly defined.
bsps\include\grlib\grgpio-regs.h225According to table 406 of page 319 of the GR740 User Manual (v.2,50), the register address is incorrect;
bsps\include\grlib\dsu4-regs.h435According to table 538 of page 403 of the GR740 User Manual (v.2.5), the register address is incorrect according to the table but it is correct according to the table description.
bsps\include\grlib\gr1553b-regs.h609According to table 327 of page 259 of the GR740 User Manual (v.2.50), the register address is incorrect according to the table but it is correct according to the table description.
bsps\include\grlib\spwpnp-regs.h151According to table 213 of page 200 of the GR740 User Manual (v.2.5), the register address is incorrect according to the table but it is correct according to the table description.
bsps\include\grlib\spwrmap-regs.h575; 591; 715; 787; 809According to tables 191, 192, 199, 201, 202, respectively (to each identified line) starting on page 192 of the GR740 User Manual (v.2.5), the register addresses are incorrect according to the table but are correct according to the table description.

It seems that the generation of these registers definitions leads to incorrect bit definitions whenever there are reserved bits specified in the Gaisler User Manual. Can you please double-check these cases?

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). The original ISVV reference for this issue is RTEMS-SMP-CODE-VER-014.

#4843 15 months ago fixed bsps Daniel Páscoa Sebastian Huber <sebastian.huber@…> 14 months ago
Summary

Output value not assigned

Description

The Software Document Design (starting on page 181) specifies that there should be two outputs, but the RTEMS_UNSATISFIED is not returned by the function. The only failure detected may be due to the assert function, but the rtems_status_code isn't the returned value. Ensure all output values specified in the SDD are returned.

Additional Notes: From code analysis and from objdumping the librtemsbsp.a library it can be observed that the asserts() currently do nothing: they are translated to #define _Assert( _e ) ( ( void ) 0 ) unless RTEMS_DEBUG or RTEMS_STATIC_ANALYSIS are defined, which in a release environment target are not defined. Since in the documentation it says that it can return RTEMS_UNSATISFIED or RTEMS_SUCCESSFUL either the documentation is wrong, or the code is not correctly implemented.

This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). The original ISVV reference for this issue is RTEMS-SMP-CODE-VER-032.

File list: bsps\sparc\leon3\start\eirq.c

bsp_interrupt_is_pending (line 106) bsp_interrupt_raise (line 127) bsp_interrupt_clear (line 185) bsp_interrupt_vector_enable (line 270) bsp_interrupt_vector_disable (line 299)

#4845 15 months ago fixed arch/sparc Daniel Páscoa Sebastian Huber <sebastian.huber@…> 14 months ago
Summary

Global variable declared/defined in the wrong file

Description

This source file contains both declaration and definition of the variable. It is recommended to declare global variables in a header file and define them in separate source files. Please consider this best practice and move the declarations to a header file and corresponding definitions to respective source files.

Additional Notes: LEON3_Boot_Cpu is a global variable and only used by start.S file. And as such cannot be declared as static. Because is used in an assembly file there was no need to declare it as external. But the global variable is in fact declared and defined in same file.

This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-043.

File list: bsps\sparc\leon3\start\bspstart.c (line 54)

#4847 15 months ago fixed score Daniel Páscoa Sebastian Huber <sebastian.huber@…> 14 months ago
Summary

Goto statements

Description

The use of “goto” statements is strongly discouraged as it results in convoluted program logic, making it challenging to analyse and verify program correctness, particularly in loops. Instead, the “break” and “continue” statements provide alternatives to “goto” and should be utilized to simplify the code.

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-074.

File list: cpukit/score/src/threaddispatch.c (line 290)

#4850 14 months ago fixed arch/sparc Daniel Páscoa Sebastian Huber 9 months ago
Summary

LEON3 - Variable not initialized in any file / missing #ifdefs

Description

Within bsps\sparc\leon3\include\bsp\leon3.h (lines 207, 309)

The *LEON3_IrqCtrl_Adev and *LEON3_Timer_Adev are declared but not initialized in any file of the QDP.:

Please consider having these declared within the “else” blocks of the “#if defined(LEON3_IRQAMP_BASE)” where *LEON3_IrqCtrl_Regs and *LEON3_Timer_Regs are declared.

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-041.

#4855 14 months ago wontfix unspecified Daniel Páscoa 13 months ago
Summary

Input validity unchecked

Description

In a generic way, function inputs shall be checked for validity before being used.

When successive calls are done to different functions, one might argue that inputs are to be checked only once and then considered valid in other calls. Yet this has some pitfalls like:

  • function inputs are not checked in a consistent way throughout all functions:
    • Each one has to constantly double-check in comments and/or callers if inputs are instead checked elsewhere in the call tree.
    • Even if for the moment no call tree leads to invalid input issues, future maintenance operations may add new calls without validity checks.

One can assume some exceptions can occur (e.g., when there is a considerable performance impact), but as long such cases are justified within the function’s comments one can easily sort out those exceptions.

Bellow, there is a list of cases where input validity could be added:

  • bsps\include\bsp\irq-generic.h: bsp_interrupt_entry_load_first function is called by bsp_interrupt_handler_dispatch_unchecked where the argument was already checked.
  • bsps\include\bsp\irq-generic.h: bsp_interrupt_handler_index function is called by bsp_interrupt_entry_load_first, bsp_interrupt_entry_remove, bsp_interrupt_spurious, bsp_interrupt_entry_find, bsp_interrupt_entry_install, rtems_interrupt_handler_iterate functions. It was possible to trace in all of them a validation of the argument used in bsp_interrupt_handler_index before being called.
  • bsps\shared\irq\irq-default-handler.c: bsp_interrupt_handler_default is only called by bsp_interrupt_spurious and bsp_interrupt_handler_dispatch_unchecked functions and It was possible to trace in all ot them a validation of the argument used in bsp_interrupt_handler_index before being called.
  • bsps\shared\irq\irq-entry-remove.c: the *entry argument of bsp_interrupt_entry_do_remove is actually tested and validated inside of that function. That function is also the only place where bsp_interrupt_entry_remove is called. The arguments vector, *entry and previous_next are all validated by a call to the bsp_interrupt_entry_find and subsequent code that is run prior to call bsp_interrupt_entry_remove function.
  • bsps\shared\irq\irq-generic.c: the bsp_interrupt_spurious function argument vector is tested before being called in bsp_interrupt_handler_dispatch_unchecked function.
  • bsps\shared\irq\irq-generic.c: bsp_interrupt_entry_install_first function is called once by bsp_interrupt_entry_install function. The validation of the argument vector can be traceback to rtems_interrupt_entry_install function. The argument *entry is also passed by bsp_interrupt_entry_install function and explained in the previous paragraph.
  • bsps\shared\dev\clock\clockimpl.h: in both functions (void Clock_isr and rtems_isr Clock_isr) declaration/definition (they are the same function, just declared differently depending of #if def's), both arguments are not used. Due to the evaluation of the internal #if, this functions are reduced to Clock_driver_ticks += 1; _Timecounter_Tick();
  • bsps\sparc\leon3\start\bspsmp.c: the bsp_start_on_secondary_processor function calls _SMP_Start_multitasking_on_secondary_processor with the same argument as it was called. This argument in that sub-function is used to get a value cpu_index_self, which itself is validated and checked if it is a proper value or not. Indirect validation.
  • bsps\sparc\leon3\start\bspsmp.c: the _CPU_SMP_Send_interrupt function is called in 3 different places: in one place (_SMP_Request_shutdown function in smp.c file) it is inside a for loop that is limited by _SMP_Processor_configured_maximum. This is OK. For the other 2 places ( from _SMP_Send_message function in smp.c file and _Thread_Dispatch_request function in threaddispatch.h file it is not clear that the argument of _CPU_SMP_Send_interrupt cannot be limited (when it should be limited at least to _SMP_Processor_configured_maximum).
  • bsps\sparc\leon3\start\eirq.c: bsp_interrupt_get_attributes function actually tests vector argument. But also there is only one call to this function which is from rtems_interrupt_get_attributes function in irq-enable-disable.c file where both arguments are tested prior call to bsp_interrupt_get_attributes function.
  • bsps\sparc\shared\start\bspgetworkarea.c: _SPARC_Memory_initialize function receives its *end_of_usable_ram argument from the main function in start.S file. No validation is performed there. The argument is used to initialize a struct, which later on may be used for dynamically allocated memory. The referred pointer argument is never dereferenced, it is used as the end limit of the allocated memory position. It may make sense to test in this initialisation function if it is value is above &_Memory_Areas[ 0 ].
  • cpukit\libc\string\memset.c: memset function is part of space qualification profile context, and the void *<[dst]> pointer is not tested against NULL.
  • cpukit\libc\string\memcpy.c: memcpy function is part of space qualification profile context, and the void *dst and void *src pointers is not tested against NULL.
  • cpukit\posix\src\clocknanosleep.c: in function clock_nanosleep the *rmtp argument can be NULL if the user does not want to get the remain time, so there is no need to validated it. For the *rqtp (request) argument this should be validated if different than NULL and the tv_nsec field must be validated if between 0 and 999999999.
  • cpukit\rtems\src\clocktodtoseconds.c: the _TOD_To_seconds function is called by _Timer_Fire_when function from timercreate.c file, by rtems_task_wake_when function from taskwakewhen.c file and by rtems_clock_set function from clockset.c file. In all three cases the argument with which the _TOD_To_seconds function is called is validated with a call to _TOD_Validate function prior to the call.
  • cpukit\rtems\src\eventsend.c: the _Event_Seize function is called by two similar functions the rtems_event_receive from eventreceive.c file and rtems_event_system_receive from systemeventreceive.c file. The *event_out argument is validated prior the call; all other arguments are declared and defined in the caller functions prior to call the Event_Seize function.

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). The original ISVV reference for this issue is RTEMS-SMP-VAL-029.

#4857 14 months ago duplicate tool/rsb Joel Sherrill Chris Johns 10 months ago
Summary

RSB Recipe Missing %hash Does Not Fail

Description

If a recipe is missing a %hash command, it is reported as a warning. It would be preferable to have an error.

warning: gdb-readline8.2.patch: no hash found

From #4760 and copied as part of merging these tickets:

The time has come to raise a fatal error if a hash is missing rather than a warning. This will stop missing checksums being present when releasing. It also makes it simpler to test releases for no missing checksums.

#4858 14 months ago fixed tool/gdb Joel Sherrill Joel Sherrill 14 months ago
Summary

GDB fails to build on any host with readline 8.2 or newer

Description

This showed up with gdb 11.2 building on Cygwin. The fix is already in the gdb git repository on the master but not gdb 12.x. This ticket tracks adding that to the RSB.

#4859 14 months ago fixed tool/gdb Joel Sherrill Joel Sherrill <joel@…> 14 months ago
Summary

Update gdb to 12.1

Description

While investigating the build issue tracked as #4858, I tried bumping the gdb to 12.1 hoping it included the fix. But it did not. This bumps the default gdb to 12.1 with the same patch.

#4860 14 months ago fixed tool Joel Sherrill 14 months ago
Summary

Waf Failure on CentOS 8 Stream

Description

Jeff Mayes reported (https://lists.rtems.org/pipermail/devel/2023-February/074424.html) that builds on the CentOS 8 Stream test host are failing with this:

Using rtems for RTEMS source
Testing: sparc erc32-sis
BSP to Build: erc32
Traceback (most recent call last):
  File "./waf", line 167, in <module>
    from waflib import Scripting
  File "/home/tester/rtems-cron-6/rtems/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Scripting.py", line 7, in <module>
    from waflib import Utils,Configure,Logs,Options,ConfigSet,Context,Errors,Build,Node
  File "/home/tester/rtems-cron-6/rtems/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Configure.py", line 6, in <module>
    from waflib import ConfigSet,Utils,Options,Logs,Context,Build,Errors
  File "/home/tester/rtems-cron-6/rtems/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Options.py", line 6, in <module>
    from waflib import Logs,Utils,Context,Errors
  File "/home/tester/rtems-cron-6/rtems/.waf-2.0.20-36f5354d605298f6a89c09e0c7ef6c1d/waflib/Context.py", line 183
    raise Errors.WafError('Execution failure: %s'%str(e),ex=e),None,sys.exc_info()[2],None,sys.exc_info()[2]
                                                                                     ^
SyntaxError: invalid syntax
FAILED:  Unable to waf distclean rtems

In follow up emails, Chris Johns suggested updating waf which Jeff reported fixed the issue.

The action for this ticket is to update waf in the following repositories:

  • rtems
  • rtems-examples
  • rtems-docs
  • rtems-libbsd
  • rtems-lwip
  • rtems-net-legacy (OK -- already on latest waf)
  • rtems-tools
#4862 14 months ago fixed unspecified Daniel Páscoa Sebastian Huber 4 weeks ago
Summary

score/ & bsps/: Unused input parameters

Description

The following functions list input parameters on their signature that seem not to be used:

File Function Line Resolution
bsps\shared\cache\cacheimpl.hsmp_cache_inst_inv_all 293Unused due to API constraints
bsps\shared\dev\clock\clockimpl.hvoid Clock_isr130Fixed: parameter can be used
bsps\shared\dev\clock\clockimpl.hrtems_isr Clock_isr134Fixed: parameter can be used
bsps\shared\irq\irq-generic.cbsp_interrupt_allocate_handler_index62Fixed: parameter removed
bsps\sparc\leon3\start\bspclean.cbsp_fatal_extension70API backward compatibility
cpukit\score\src\threadchangepriority.cstatic void _Thread_Priority_action_change( ); 92Unused due to API constraints
cpukit\score\src\threadq.c_Thread_queue_MP_callout_do_nothing157Unused due to API constraints
cpukit\score\src\threadqenqueue.c_Thread_queue_Deadlock_fatal382Unused due to API constraints
cpukit\score\src\threadqops.c_Thread_queue_FIFO_do_initialize137Unused due to API constraints
cpukit\score\src\threadqtimeout.c_Thread_queue_Add_timeout_ticks28Unused due to API constraints
cpukit\score\src\threadrestart.c_Thread_Join_flush_filter84Unused due to API constraints
cpukit\score\src\userextiterate.c_User_extensions_Thread_begin_visitor102Unused due to API constraints

Could one please double-check if in each case the unused parameters can be safely removed from the function’s signature? PS: The first functions are also implemented within .h files and perhaps could be moved to .c files.

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). The original ISVV reference for this issue is RTEMS-SMP-CODE-VER-028.

#4863 14 months ago fixed score Daniel Páscoa Sebastian Huber <sebastian.huber@…> 12 months ago
Summary

Operations evaluation order.

Description

Within cpukit\include\rtems\score\objectimpl.h line 545 one has:

if ( !the_api
the_api > OBJECTS_APIS_LAST )
This shall be equivalent to “if ( (!the_api)
(the_api > OBJECTS_APIS_LAST ))”, but at first glance, this is not always obvious to everyone and one might need to read further documentation to be fully sure of it.

We would suggest the parenthesis be added so that the code logic is straightforward. In this case, one would not call it an ‘excess’ as stated within the RTEMS SW Eng. Manual (“Avoid excess parentheses. Learn the operator precedence. rules.”).

Additional Notes: This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). The original ISVV reference for this issue is RTEMS-SMP-CODE-VER-076.

#4867 14 months ago fixed network/lwip Kinsey Moore Kinsey Moore 10 months ago
Summary

Clean up rtems-lwip uLan directory

Description

The uLan directory in rtems-lwip was originally sourced from another project as documented in its ORIGIN.uLan file. This directory contains both some BSP-specific drivers as well as some of the core RTEMS/lwIP integration code in the form of sys_arch.c/h.

Permission has been given by the authors of this upstream repository to relicense the code under the terms of the rtemslwip directory so as to remove references to "uLan" since this term is relatively unrelated to either project and just so happened to be the location of the source. https://lists.rtems.org/pipermail/devel/2023-March/074525.html

Core integration components should be rehomed under rtemslwip/common and BSP-specific code should be rehomed under rtemslwip in a BSP-specific directory or in a new root directory with appropriate LICENSE and ORIGIN files depending on its provenance.

#4869 14 months ago fixed dev/spi Aaron N chrisj@… 10 months ago
Summary

Add QSPI Flash Device API

Description

Add an API for qspi flash to create device node.

#4872 14 months ago fixed tool/gdb Chris Johns Chris Johns 14 months ago
Summary

GDB 13.1 does not build on FreeBSD 13.1

Description

If the binutils package is installed GDB does not build.

See https://sourceware.org/bugzilla/show_bug.cgi?id=30214

#4874 14 months ago wontfix rtems Daniel Páscoa 14 months ago
Summary

Undefined behaviour

Description

If one searches within SRSs or ICDs for 'undefined behaviour' one will find specifications/functions on which descriptions mention conditions that will lead to 'undefined behaviour', e.g.:

...

spec:/rtems/clock/if/get-boot-time

...

boot_time is the pointer to a struct timespec object. The time elapsed since the Unix epoch at some time point during system initialization call will be stored in this object. Calling the directive with a pointer equal to NULL is undefined behaviour.".

One created specific tests to further access the eventual impacts, for instance in the clock-related functions below:

spec:/rtems/clock/if/get-boot-time

spec:/rtems/clock/if/get-boot-time-bintime

spec:/rtems/clock/if/get-boot-time-timeval

spec:/rtems/clock/if/get-monotonic

spec:/rtems/clock/if/get-monotonic-bintime

spec:/rtems/clock/if/get-monotonic-coarse

spec:/rtems/clock/if/get-monotonic-coarse-bintime

spec:/rtems/clock/if/get-monotonic-coarse-timeval

spec:/rtems/clock/if/get-monotonic-timeval

spec:/rtems/clock/if/get-realtime

spec:/rtems/clock/if/get-realtime-bintime

spec:/rtems/clock/if/get-realtime-coarse

spec:/rtems/clock/if/get-realtime-coarse-bintime

spec:/rtems/clock/if/get-realtime-coarse-timeval

spec:/rtems/clock/if/get-realtime-timeval

The outcome was:

There is no internal check for a NULL pointer in these functions, so when called with a null pointer argument there is unwanted behaviour for both the GR712rc and GR740; an attempt to access memory location 0.

For the GR712rc board this memory position is not mapped and causes a trap to be raised (this trap handler leads to unpredictable results, the workflow of the program is not recoverable). For the GR740 board the actual memory position is either read or written (the previous value being overridden with unpredictable results).

So, even if somehow this shall also be a user responsibility, shouldn’t one adopt a safe approach to this and add input checking for these functions?

Additional Notes:

This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). The original ISVV reference for this issue is RTEMS-SMP-REQ-VER-008 and RTEMS-SMP-VAL-005.

#4878 13 months ago fixed test Lucian-Raul Silistru Sebastian Huber 13 months ago
Summary

sptests/spsysinit01 sem_open call only has 3 parameters with O_CREAT flag (cloned)

Description

Cloned from #4877:


When calling sem_open with the O_CREAT flag the sem_open function requires 4 parameters. It will: value = va_arg(args, unsigned int); so the "value" argument will be randomly chosen.

sem_open can fail if the random value is not a valid semaphore value, failing the test.

#4881 13 months ago fixed tool/binutils Chris Johns Chris Johns 13 months ago
Summary

powerpc gas and ld warnings

Description

The upgraded binutils generates new warnings when linking executables:

/opt/work/6/lib/gcc/powerpc-rtems6/12.2.1/../../../../powerpc-rtems6/bin/ld: warning: /opt/work/rtems/6-bsp/powerpc-rtems6/mvme2307/lib/vectors_entry.o: missing .note.GNU-stack section implies executable stack
/opt/work/6/lib/gcc/powerpc-rtems6/12.2.1/../../../../powerpc-rtems6/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/opt/work/6/lib/gcc/powerpc-rtems6/12.2.1/../../../../powerpc-rtems6/bin/ld: warning: /opt/work/chris/rtems/libbsd/rtems-libbsd.git/build/powerpc-rtems6-mvme2307-default/termios05.exe has a LOAD segment with RWX permissions
/opt/work/6/lib/gcc/powerpc-rtems6/12.2.1/../../../../powerpc-rtems6/bin/ld: warning: /opt/work/chris/rtems/libbsd/rtems-libbsd.git/build/powerpc-rtems6-mvme2307-default/termios05.exe has a LOAD segment with RWX permissions
#4882 13 months ago fixed network/legacy Chris Johns 10 months ago
Summary

mvme2703 legacy network build failure

Description

Building powerpc/mvme2703 BSP with the legacy networking fails with:

../../netinet/in.c: In function 'in_canforward':
../../netinet/in.c:117:13: warning: implicit declaration of function 'IN_CLASSA'; did you mean 'IN_BADCLASS'? [-Wimplicit-function-declaration]
  117 |         if (IN_CLASSA(i)) {
      |             ^~~~~~~~~
      |             IN_BADCLASS
../../netinet/in.c:118:27: error: 'IN_CLASSA_NET' undeclared (first use in this function)
  118 |                 net = i & IN_CLASSA_NET;
      |                           ^~~~~~~~~~~~~
../../netinet/in.c:118:27: note: each undeclared identifier is reported only once for each function it appears in
../../netinet/in.c:119:41: error: 'IN_LOOPBACKNET' undeclared (first use in this function); did you mean 'IN_LOOPBACK'?
  119 |                 if (net == 0 || net == (IN_LOOPBACKNET << IN_CLASSA_NSHIFT))
      |                                         ^~~~~~~~~~~~~~
      |                                         IN_LOOPBACK
../../netinet/in.c:119:59: error: 'IN_CLASSA_NSHIFT' undeclared (first use in this function)
  119 |                 if (net == 0 || net == (IN_LOOPBACKNET << IN_CLASSA_NSHIFT))
      |                                                           ^~~~~~~~~~~~~~~~
../../netinet/in.c: In function 'in_ifinit':
../../netinet/in.c:495:34: error: 'IN_CLASSA_NET' undeclared (first use in this function)
  495 |                 ia->ia_netmask = IN_CLASSA_NET;
      |                                  ^~~~~~~~~~~~~
../../netinet/in.c:496:18: warning: implicit declaration of function 'IN_CLASSB'; did you mean 'IN_BADCLASS'? [-Wimplicit-function-declaration]
  496 |         else if (IN_CLASSB(i))
      |                  ^~~~~~~~~
      |                  IN_BADCLASS
../../netinet/in.c:497:34: error: 'IN_CLASSB_NET' undeclared (first use in this function)
  497 |                 ia->ia_netmask = IN_CLASSB_NET;
      |                                  ^~~~~~~~~~~~~
../../netinet/in.c:499:34: error: 'IN_CLASSC_NET' undeclared (first use in this function)
  499 |                 ia->ia_netmask = IN_CLASSC_NET;
      |                                  ^~~~~~~~~~~~~
#4884 13 months ago invalid dev/i2c Chris Johns Chris Johns 13 months ago
Summary

I2C default ioctl handler does not handle set clock

Description

The base struct for an I2C driver can set set_clock handler so a user can change the I2C clock speed. The default ioctl handler does not check for the I2C_BUS_SET_CLOCK command and if the set_clock handler is set calling it.

#4887 13 months ago fixed network/legacy Chris Johns Chris Johns 10 months ago
Summary

RTEMS Net Legacy does not build as a package in the RSB

Description

The waf support does not handle staged builds or the options --rtems-tools and --rtems at the same time. The build fails when reading the rtemsbsp static library because it will not be in the PREFIX.

Also the build script scans for .c and .h files. This is fragile. If someone copies in a C file for some reason it is picked up. The sources and headers need to be explicit in build script.

#4889 13 months ago fixed network/lwip Kinsey Moore Kinsey Moore <kinsey.moore@…> 13 months ago
Summary

Remove file scanning from rtems-lwip

Description

rtems-lwip currently scans a subset of directories for files. Since it already supports includes in its definition format, it should instead explicitly list all files to be compiled and support for directory scanning should be removed.

#4892 13 months ago fixed tool/rsb Chris Johns Chris Johns 12 months ago
Summary

MacOS tools build failures on Ventura and M series processors

Description

Building the tools with a recent MacOS such as Ventura failed because Apple has removed support for embedded python in programs. This means GDB does not build. The solution is to teach the RSB GDB support to use a build of Python from https://www.python.org/.

The RSB failed to build gcc on the M series processors on Ventura using Xcode 14.2. The build gcc crosscompiler (xgcc) crashes with sig faults. GCC does not bootstrap on ARM systems:

*** Configuration aarch64-apple-darwin22.3.0 not supported

Look at supporting Homebrew built gcc.

#4896 12 months ago fixed build Chris Johns Chris Johns 12 months ago
Summary

Makefile.inc exported BSP include path not a system include path

Description

The BSP include path exported in the Makefile.inc set of files uses -I and that is not a system include. The RTEMS 5 and earlier autoconf build system provided a spec file using the -B option and that either added a system path or the spec file included a system path. Either way the BSP include path was added as a system include path and so the compiler placed it at the end of the include list.

The CPU_DEFINES macro is part of CPPFLAGS exported by Makefile.inc and we cannot control how applications uses that variable so we need to make sure the BSP include path is exported as a system include path.

The issue was found with EPICS. EPICS installs a header file called link.h under its include path. RTEMS now provides a header file called link.h. The CPPFLAGS are before the EPICS include path so our link.h was seen before the EPICS one and that broken the build.

#4899 12 months ago fixed bsps Chris Johns 10 months ago
Summary

BSP powerpc/qoriq_e6500_64 and powerpc/qoriq_e6500_32 fail to build

Description
[  87/1471] Compiling bsps/powerpc/shared/vme/vmeTsi148.c 
/tmp//cccfu9l8.s: Assembler messages:                      
/tmp//cccfu9l8.s:353: Error: unrecognized opcode: `eieio'  
/tmp//cccfu9l8.s:386: Error: unrecognized opcode: `eieio'  
/tmp//cccfu9l8.s:419: Error: unrecognized opcode: `eieio'  
/tmp//cccfu9l8.s:444: Error: unrecognized opcode: `eieio'  
/tmp//cccfu9l8.s:477: Error: unrecognized opcode: `eieio'  
/tmp//cccfu9l8.s:503: Error: unrecognized opcode: `eieio'  
  ...
#4900 12 months ago fixed score Chris Johns Sebastian Huber <sebastian.huber@…> 6 months ago
Summary

PowerPC score warnings in score headers

Description

Building a few of the PowerPC BSPs with RTEMS_DEBUG = True generates these warnings:

[ 319/1483] Compiling cpukit/score/cpu/powerpc/cpu.c
In file included from ../../../cpukit/score/cpu/powerpc/include/rtems/score/cpu.h:59,
                 from ../../../cpukit/score/cpu/powerpc/include/rtems/score/cpuimpl.h:42,
                 from ../../../cpukit/score/cpu/powerpc/cpu.c:43:
../../../cpukit/score/cpu/powerpc/cpu.c: In function '_CPU_Fatal_halt':
../../../cpukit/include/rtems/score/basedefs.h:436:33: warning: implicit declaration of function '_Assert' [-Wimplicit-function-declaration]
  436 |   #define _Assert_Unreachable() _Assert( 0 )
      |                                 ^~~~~~~
../../../cpukit/include/rtems/score/basedefs.h:865:7: note: in expansion of macro '_Assert_Unreachable'
  865 |       _Assert_Unreachable(); \
      |       ^~~~~~~~~~~~~~~~~~~
../../../cpukit/score/cpu/powerpc/cpu.c:361:3: note: in expansion of macro 'RTEMS_UNREACHABLE'
  361 |   RTEMS_UNREACHABLE();
      |   ^~~~~~~~~~~~~~~~~
../../../cpukit/include/rtems/score/basedefs.h:436:33: warning: nested extern declaration of '_Assert' [-Wnested-externs]
  436 |   #define _Assert_Unreachable() _Assert( 0 )
      |                                 ^~~~~~~
../../../cpukit/include/rtems/score/basedefs.h:865:7: note: in expansion of macro '_Assert_Unreachable'
  865 |       _Assert_Unreachable(); \
      |       ^~~~~~~~~~~~~~~~~~~
../../../cpukit/score/cpu/powerpc/cpu.c:361:3: note: in expansion of macro 'RTEMS_UNREACHABLE'
  361 |   RTEMS_UNREACHABLE();
      |   ^~~~~~~~~~~~~~~~~

The score headers basedefs.h header depends on assert.h and assert.h includes basedefs.h at it's top.

I think this ticket should be set to blocker for the 6.1 release. We should resolve this and the warnings before we make a release.

#4901 12 months ago fixed doc Joel Sherrill Sebastian Huber 11 months ago
Summary

rtems_task_construct Documentation Missing Some Details

Description

The rtems_task_construct directive description has a couple of deficiencies:

  • does not mention or link to RTEMS_TASK_STORAGE_SIZE
  • does not provide rtems_task_config and discuss the fields

It would be nice to discuss how each of the parameters to rtems_task_create is set/computed when using rtems_task_config.

I did not look but rtems_message_queue_construct may have similar issues.

#4902 12 months ago fixed lib Sebastian Huber Sebastian Huber 12 months ago
Summary

Update zlib to version 1.2.13

Description

The last zlib update was more than ten years ago. Update it to the latest version. This includes security fixes.

#4905 11 months ago fixed score Joel Sherrill Joel Sherrill 11 months ago
Summary

SuperCore? _TOD_Adjust No Longer Referenced and Should be Removed

Description

Apparently with the rework of time handling, this method has become unused and should be removed.

#4906 11 months ago invalid network/libbsd Ning Yang 10 months ago
Summary

libbsd not working on nucleo-h743ZI

Description

libbsd not working on nucleo-h743ZI.

I run the libbsd testsuit selectpollkqueue01,get a fatal.

The same fatal happened in my project.

* FATAL * fatal source: 0 (INTERNAL_ERROR_CORE) fatal code: 2 (INTERNAL_ERROR_TOO_LITTLE_WORKSPACE) RTEMS version: 6.0.0.020163e5b7bb0b4363b57f37729b99becae9c629 RTEMS tools: 12.2.1 20230224 (RTEMS 6, RSB f0e34eab8bf33b833a7d9d0b2bddd3b89f6d83cb, Newlib 17ac400) executing

i used a sh to build libbsd

cd /home/yangn0/devel/rtems-arm/rtems-libbsd
./waf distclean
./waf configure --prefix=$HOME/devel/rtems-arm/tools/rtems/6 \
      --rtems-bsps=arm/nucleo-h743zi \
      --buildset=buildset/default.ini
./waf
./waf install
#4909 11 months ago fixed score Joel Sherrill Joel Sherrill 6 months ago
Summary

Multiple Protected Heap Functions are Ununused

Description

The following functions are unused and should be removed:

  • _Protected_heap_Get_block_size
  • _Protected_heap_Iterate
  • _Protected_heap_Resize_block
#4912 11 months ago fixed lib Joel Sherrill Joel Sherrill 11 months ago
Summary

Collect Compression Library Source in Single Place

Description

Currently zlib is in cpukit/ while xz is in cpukit/libmisc. The purpose of this ticket is to create cpukit/compression and move both to it.

This ticket does not add, remove, or upgrade the existing source. It is intended to just document improving the organization.

#4913 11 months ago fixed network/libbsd Christian Mauderer Christian Mauderer 11 months ago
Summary

libbsd/ipsec-tools: Problems with more than 64 open files

Description

IPSec with racoon doesn't work if there are more than 64 open file descriptors in the system.

#4915 11 months ago wontfix tool Andrew Butterfield Utkarsh Verma <utkarsh@…> 5 months ago
Summary

Building sphinx 7.0.1 fails

Description

I am trying to install sphinx on an Apple Silicon OSX machine. I've already done this successfully in the past on a similar machine.

This time, after following steps in the rtems-docs README.txt, I do ./waf , it does some stuff and then:

[ 7/10] Compiling common/_static/favicon.ico
[ 8/10] Compiling common/_static/my-styles.css
[ 9/10] Compiling common/_static/logo.png
[10/10] Compiling common/_static/style.css

Theme error:
An error happened in rendering the page bld/index.
Reason: UndefinedError("'style' is undefined")

I'm using pip 22.2.1, Python 3.10.6 and pip3 installs sphinx 7.0.1

(sphinx) ab-rtems-docs% pip3 install sphinx
Requirement already satisfied: sphinx in ./sphinx/lib/python3.10/site-packages (7.0.1)
#4924 10 months ago fixed lib Joel Sherrill Joel Sherrill 8 months ago
Summary

Add Regulator Helper to RTEMS

Description

This is to add the Regulator Helper. This will include the regulator itself, a test with full coverage, an example for rtems-examples, and a chapter in the Classic API Guide.

The regulator is designed to sit logically between two entities -- a source and a destination, where it limits the traffic sent to the destination to prevent it from being flooded with messages from the source. This can be used to accommodate bursty input from a source and meter it out to a destination.

#4934 9 months ago fixed arch/arm kgardas kgardas 9 months ago
Summary

Update STM32 H7 HAL/LL drivers code

Description

Hello,

patch series for updating STM32 H7 HAL/LL drivers code is ready for review already here: https://github.com/karelfv/rtems/tree/stm32h7-hal-update-2023-07.

The code was tested on both M7 and M4 cores on stm32h747i-disco board and shows that update does not cause any new failures/regressions.

The patch series was already submitted for review on devel@ here: https://lists.rtems.org/pipermail/devel/2023-July/075880.html

#4935 9 months ago fixed tool/rsb Chris Johns joel 5 months ago
Summary

7/rtems-mips get source fails

Description

Getting sources for 7/rtems-mips fails with:

error: 7/rtems-mips.bset:6: cannot find file: tools/rtems-mipstx39-gdb-head

Release candidates for 6 get the 7 sources because the 6-rc? are made from master.

#4940 8 months ago fixed arch/arm Sebastian Huber Sebastian Huber 8 months ago
Summary

Fix cache support for ARM926EJ-S processor

Description

Fix the CP15 cache support so that it works on ARMv5T processors such as the ARM926EJ-S. This processor has different cache maintenance operations compared to ARMv6 processors such as the ARM1176JZF-S. The current support leads to undefined instruction exceptions.

#4942 8 months ago fixed lib Chris Johns Joel Sherrill 8 months ago
Summary

Regulator warnings

Description

The recently added regulator has warnings on aarch64/xilinx_zynqmp_lp64_qemu:

../../../cpukit/libmisc/regulator/regulator.c: In function 'rtems_regulator_get_statistics':
../../../cpukit/libmisc/regulator/regulator.c:656:3: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
  656 |   memset(statistics, 0, sizeof(rtems_regulator_statistics));
      |   ^~~~~~                                                                                                                                 
../../../cpukit/libmisc/regulator/regulator.c:40:1: note: include '<string.h>' or provide a declaration of 'memset'
   39 | #include <rtems/regulatorimpl.h>                      
  +++ |+#include <string.h>                                      
   40 |                                                 
../../../cpukit/libmisc/regulator/regulator.c:656:3: warning: incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch]
  656 |   memset(statistics, 0, sizeof(rtems_regulator_statistics));
      |   ^~~~~~                                               
../../../cpukit/libmisc/regulator/regulator.c:656:3: note: include '<string.h>' or provide a declaration of 'memset'
                                                                        
#4943 8 months ago fixed lib/dl Chris Johns Chris Johns 8 months ago
Summary

ARM unwind register is not being hooked

Description

The ARM unwind support is not working and dl05 is failing on aarch64.

The support uses __gnu_Unwind_Find_exidx and it is not being called.

I have not tested arm but the support is shared between arm and aarch64.

#4944 8 months ago fixed lib/dl Chris Johns Chris Johns <chrisj@…> 8 months ago
Summary

libdl test dl09 fails on arm and aarch64

Description

The test crashes on arm and fails on aarch64 with:

--------------------------------------------------
 Run: 3
Test source (link in strstr): testsuites/libtests/dl09/dl-load.c
Allocation size: 33554432
load: /dl09-o1.o
handel: 0x4811d650: unresolved externals
handle: 0x4811d650 loaded
space alloc: /dl09-o1.o: 33554432: 0x40118940
load: /dl09-o2.o
handel: 0x421191f0: unresolved externals
handle: 0x421191f0 loaded
space alloc: /dl09-o2.o: 33554432: 0x4c1225b0
load: /dl09-o3.o
kobj_reloc: Relocation 0x40045820 too far from 0x4e122f48 (base+0x18) for 26bit word
dlopen failed: (null)
/opt/work/chris/rtems/kernel/rtems.git/testsuites/libtests/dl09/dl-load.c: 168 o->handle != NULL

[ RTEMS shutdown ]
RTEMS version: 6.0.0.10da3025186cadf2d78e34cf81cce02121069d44
RTEMS tools: 12.3.1 20230626 (RTEMS 6, RSB 8e568b2ca3489d6bfa48e1d29618ea9b48a5b408, Newlib 4c7d0df)
executing thread ID: 0x0a010001
executing thread name: UI1 
#4945 8 months ago fixed test Chris Johns Chris Johns 8 months ago
Summary

rtems-test SIS support is broken

Description

The sis BSP is using gdb and I am not sure gdb supports the SIS simulator any more?

And sis-run is broken with the stand alone sis tool we now use. The -a option is not supported.

#4947 8 months ago fixed build Chris Johns Sebastian Huber <sebastian.huber@…> 7 months ago
Summary

Testsuite libtest tests not built with optimise or debug flags

Description

The tests are being built with the optimsize or debug options for:

  • aarch64/xilinx_zynqmp_lp64_qemu
  • arm/xilinx_zynq_a9_qemu

The build is:

09:44:14 runner ' /opt/work/rtems/6/bin/arm-rtems6-gcc 
 -MMD -Wall -Wmissing-prototypes -Wimplicit-function-declaration
 -Wstrict-prototypes -Wnested-externs -march=armv7-a -mthumb
 -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9 -DHAVE_CONFIG_H=1
 -Icpukit/include -I../../../cpukit/include -Icpukit/score/cpu/arm/include
 -I../../../cpukit/score/cpu/arm/include -Ibsps/include
 -I../../../bsps/include -Ibsps/arm/include -I../../../bsps/arm/include 
 -Ibsps/arm/xilinx-zynq/include -I../../../bsps/arm/xilinx-zynq/include 
 -Itestsuites/support/include -I../../../testsuites/support/include 
 -Itestsuites/libtests/dl09 -I../../../testsuites/libtests/dl09 
 -c /opt/work/chris/rtems/kernel/rtems.git/testsuites/libtests/dl09/dl-load.c 
 -o testsuites/libtests/dl09/dl-load.o '                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

while a cpukit file is:

09:45:00 runner ['/opt/work/rtems/6/bin/arm-rtems6-gcc', 
 '-MMD', '-Wall', '-Wmissing-prototypes', '-Wimplicit-function-declaration',
 '-Wstrict-prototypes', '-Wnested-externs', '-march=armv7-a',
 '-mthumb', '-mfpu=neon', '-mfloat-abi=hard', '-mtune=cortex-a9',
 '-O2', '-g', '-fdata-sections', '-ffunction-sections',
 '-Icpukit/include', '-I../../../cpukit/include',
 '-Icpukit/score/cpu/arm/include',
 '-I../../../cpukit/score/cpu/arm/include',
 '../../../cpukit/libdl/rtl-elf.c',
 '-c', '-o/opt/work/chris/rtems/kernel/rtems.git/build/arm/xilinx_zynq_a9_qemu/cpukit/libdl/rtl-elf.c.59.o',
 '-DHAVE_CONFIG_H=1']
#4950 8 months ago fixed lib/dl Chris Johns Chris Johns 8 months ago
Summary

libdl test dl07 fails on PowerPC

Description

The libdl test dl07 fails on PowerPC (psim) with:

rtl: alloc: del: READ_WRITE addr=0x91ca8
*** FATAL ***
fatal source: 13 (RTEMS_FATAL_SOURCE_HEAP)
heap error: heap=0x7e6d0 block=0x91cdc reason=HEAP_ERROR_BROKEN_PROTECTOR(0)=[0x91ce0,0,0,0]
RTEMS version: 6.0.0.b9f11607b1731bc5f2391653cd8f4ebe48ba278e
RTEMS tools: 12.3.1 20230626 (RTEMS 6, RSB 8e568b2ca3489d6bfa48e1d29618ea9b48a5b408, Newlib 4c7d0df)
executing thread ID: 0x0a010001
executing thread name: UI1 

The issue is the .bss section size is too small for the sections present. The bug has been triggered by the separate section support now being used in the testsuite.

#4951 8 months ago fixed tool Chris Johns Chris Johns <chrisj@…> 8 months ago
Summary

rtems-tools fail on FreeBSD to get number of cores

Description
$ ./waf test
Waf: Entering directory `/opt/work/chris/rtems/tools/rtems-tools.git/build'
Test python rtemstoolkit.check           : fail 
Test python3 rtemstoolkit.check          : fail 
Test python rtemstoolkit.config          : fail 
Test python3 rtemstoolkit.config         : fail 
Test python rtemstoolkit.configuration   : pass 
Test python3 rtemstoolkit.configuration  : pass 
Test python rtemstoolkit.error           : pass 
Test python3 rtemstoolkit.error          : pass 
Test python rtemstoolkit.execute         : fail 
Test python3 rtemstoolkit.execute        : fail 
Test python rtemstoolkit.git             : fail 
Test python3 rtemstoolkit.git            : fail 
Test python rtemstoolkit.host            : fail 
Test python3 rtemstoolkit.host           : fail 
Test python rtemstoolkit.log             : pass 
Test python3 rtemstoolkit.log            : pass 
Test python rtemstoolkit.macros          : pass 
Test python3 rtemstoolkit.macros         : pass 
Test python rtemstoolkit.mailer          : fail 
Test python3 rtemstoolkit.mailer         : fail 
Test python rtemstoolkit.options         : fail 
Test python3 rtemstoolkit.options        : fail 
Test python rtemstoolkit.path            : pass 
Test python3 rtemstoolkit.path           : pass 
Test python rtemstoolkit.reraise         : pass 
Test python3 rtemstoolkit.reraise        : pass 
Test python rtemstoolkit.rtems           : pass 
Test python3 rtemstoolkit.rtems          : pass 
Test python rtemstoolkit.stacktraces     : pass 
Test python3 rtemstoolkit.stacktraces    : pass 
Test python rtemstoolkit.textbox         : pass 
Test python3 rtemstoolkit.textbox        : pass 
Test python rtemstoolkit.version         : fail 
Test python3 rtemstoolkit.version        : fail 
Test failures
#4953 7 months ago fixed score Sebastian Huber Sebastian Huber 5 months ago
Summary

Use of symbol addresses for arbitrary values may not work for some code models

Description

The _ISR_Stack_size is defined by the application configuration like this:

/**
 * @ingroup RTEMSAPIBaseDefs
 *
 * @brief Defines a global symbol with the name and value.
 *
 * @param _name is the user defined name of the symbol.  The name shall be a
 *   valid designator.  On the name a macro expansion is performed and
 *   afterwards it is stringified.
 *
 * @param _value is the value of the symbol.  On the value a macro expansion is
 *   performed and afterwards it is stringified.  It shall expand to an integer
 *   expression understood by the assembler.
 *
 * This macro shall be placed at file scope.
 */
#if defined(__USER_LABEL_PREFIX__)
  #define RTEMS_DEFINE_GLOBAL_SYMBOL( _name, _value ) \
    __asm__( \
      "\t.globl " RTEMS_XSTRING( RTEMS_SYMBOL_NAME( _name ) ) \
      "\n\t.set " RTEMS_XSTRING( RTEMS_SYMBOL_NAME( _name ) ) \
      ", " RTEMS_STRING( _value ) "\n" \
    )
#else
  #define RTEMS_DEFINE_GLOBAL_SYMBOL( _name, _value )
#endif

RTEMS_DEFINE_GLOBAL_SYMBOL(
  _ISR_Stack_size,
  CONFIGURE_INTERRUPT_STACK_SIZE
);

Firstly, the RTEMS_DEFINE_GLOBAL_SYMBOL() is broken. It should depend on GNUC and not USER_LABEL_PREFIX.

Secondly, setting a symbol to an arbitrary absolute address may not work with all code models, see:

https://sourceware.org/pipermail/binutils/2023-September/129448.html

The _ISR_Stack_size should be changed to point to the end of the ISR stack of processor 0:

RTEMS_DEFINE_GLOBAL_SYMBOL(
  _ISR_Stack_0_end,
  RTEMS_SYMBOL_NAME( _ISR_Stack_area_begin )
    + CONFIGURE_INTERRUPT_STACK_SIZE
);

The tests for RTEMS_DEFINE_GLOBAL_SYMBOL() should be changed to use values relative to another symbol.

#4954 7 months ago fixed arch/sparc Sebastian Huber Sebastian Huber 6 months ago
Summary

sparc: Simplify the clock driver and CPU counter support

Description

Unfortunately, most SPARC SoCs? supported by RTEMS lack a proper free-running counter. The only exception are the GR712RC and the GR740. For the pre-qualified GR712RC BSP, the current implementation is too complicated. Make the fall back to a free-running GPTIMER mandatory for the leon3 BSP family to simplify things. For the GR712RC use the DSU time tag counter.

#4955 7 months ago fixed arch/sparc Sebastian Huber Sebastian Huber 11 days ago
Summary

sparc: Potential stack corruption in uniprocessor configurations during start multitasking

Description

The system initialization uses the interrupt stack. A first level interrupt shall never interrupt a context which uses the interrupt stack. Such a use would lead to stack corruption and undefined system behaviour. Unfortunately, in uniprocessor configurations this is the case right now. Multiprocessing is started using _CPU_Context_restore(). The caller of this function (_Thread_Start_multitasking()) uses the interrupt stack. Later we have in cpukit/score/cpu/sparc/cpu_asm.S:

        mov     %g1, %psr                     ! restore status register and
                                              ! **** ENABLE TRAPS ****

        ld      [%o1 + G5_OFFSET], %g5        ! restore the global registers
        ld      [%o1 + G7_OFFSET], %g7

        ! Load thread specific ISR dispatch prevention flag
        ld      [%o1 + ISR_DISPATCH_DISABLE_STACK_OFFSET], %o2
        ! Store it to memory later to use the cycles

        ldd     [%o1 + L0_OFFSET], %l0        ! restore the local registers
        ldd     [%o1 + L2_OFFSET], %l2
        ldd     [%o1 + L4_OFFSET], %l4
        ldd     [%o1 + L6_OFFSET], %l6

        ! Now restore thread specific ISR dispatch prevention flag
        st      %o2, [%g6 + PER_CPU_ISR_DISPATCH_DISABLE]

        ldd     [%o1 + I0_OFFSET], %i0        ! restore the input registers
        ldd     [%o1 + I2_OFFSET], %i2
        ldd     [%o1 + I4_OFFSET], %i4
        ldd     [%o1 + I6_FP_OFFSET], %i6

        ldd     [%o1 + O6_SP_OFFSET], %o6     ! restore the output registers

Between the ENABLE TRAPS and the restore of the output registers, we still use the stack of the caller and interrupts may be enabled. If an interrupt happens in this code block, the interrupt stack is concurrently used which may lead to a crash.

#4959 7 months ago fixed test Chris Johns Chris Johns 4 months ago
Summary

rtems-test tftp does not a session timeout

Description

The TFTP server has a timeout for session that are running however there is no timeout on the listen state. A target could fail to create a session. Add a session timeout.

#4967 5 months ago fixed tool/newlib Chris Johns 2 months ago
Summary

strtof leaks memory

Description

The libc call strtof leaks memory when a thread exits if strtof has been made within the context of the thread. The code uses Balloc and Bfree to obtain pieces of memory it uses. The memory is recycled using newlib reent TLS variables. The _reclaim_reent() does not clean up _REENT_MP_P5S.

#4969 5 months ago fixed tool Chris Johns Chris Johns 7 weeks ago
Summary

Update libibery sources in rtems-tools

Description

MacOS is removing vfork. Update to gcc latest sources and use POSIX spawn support.

Update all files.

#4970 5 months ago fixed tool Chris Johns Chris Johns 5 months ago
Summary

Fix C++ 17 deprecated functionality in rtems-tools

Description

The C++ code uses functionality depreciated in c++17. Update and resolve.

#4971 5 months ago fixed test Sebastian Huber Sebastian Huber 5 months ago
Summary

Report that nested validation test cases did run

Description

Some validation test cases use parameterized nested test cases. For example, the rtems_semaphore_obtain() test uses a parameterized test case to seize a mutex. The nested mutex seize test case uses a parameterized thread queue enqueue test case. Currently, there is no indication that these nested test cases did actually run. Some of these nested test cases run in a tight loop, so printing a hint on every run could lead to a massive amount of test output.

Add test case remarks to the RTEMS Test Framework which may be used to give such an indication.

#4973 5 months ago fixed tool/rsb Chris Johns Chris Johns 5 months ago
Summary

Add RSB options to control a specific python

Description

Older hosts can have varying installations of pythons. Provide a means to set a version found in your path with:

  1. --with-python2
  1. --with-python3
  1. --with-python-version
#4974 5 months ago fixed tool zhengxiaojun zhengxiaojun <jameszxj@…> 7 weeks ago
Summary

rtems-tools buid failed with '--host=x86_64-w64-mingw32'

Description

rtems-tools build failed with "--host=x86_64-w64-mingw32" after the commit https://git.rtems.org/rtems-tools/commit/?id=a4b312ee4f3d8c93ab0d45d568879069e7ac7d7a 'writeargv' is undefined. add libierty/argv.c will solve this problem.

#4975 5 months ago fixed lib Chris Johns Chris Johns 4 months ago
Summary

Terminal row/col probe timeout too fast

Description

The timeout is too fast if the terminal and the target hardware are on different continents.

#4977 4 months ago fixed lib Chris Johns Chris Johns 4 months ago
Summary

tmux bug swaps lines and columns

Description

A tmux bug which is fixed but not released swaps the columns and rows fields:

https://github.com/tmux/tmux/issues/3457

Given it will be a while before this enters downstream packages provide a work around.

also improve response time to the query. At the moment a 50 msec delay is imposed and it does not have to be there.

#4980 4 months ago fixed doc Chris Johns Chris Johns 4 months ago
Summary

Build documentation using sphinx 7.2

Description
  • Set no max version
  • Fix the layout to support versions later than 5.9

I have no idea when the breakage happened and if other versions are effected.

#4986 3 months ago fixed config Sebastian Huber Sebastian Huber 3 days ago
Summary

Improve CONFIGURE_TICKS_PER_TIMESLICE configuration and documentation

Description

The documentation allows a value of zero for CONFIGURE_TICKS_PER_TIMESLICE. This should be changed to make zero an invalid value and it should be rejected by an #error configuration error.

#4994 2 months ago fixed doc Chris Johns Chris Johns 2 months ago
Summary

Documentation Sphinx theme broken for HTML

Description

The theme in rtems-docs.git breaks with newer versions of sphinx-build.

#4995 8 weeks ago fixed lib/dl Joel Sherrill Sebastian Huber 7 weeks ago
Summary

powerpc/qoriq_e6500_64 rtems-syms unknown machine type (cloned)

Description

Cloned from #3627:


rtems-syms does not know 64-bit powerpc.

gmake[5]: Entering directory `/data/home/joel/rtems-work/rtems-testing/rtems/build-powerpc-qoriq_e6500_64-rtems/powerpc-rtems5/c/qoriq_e6500_64/testsuites/libtests'
rtems-syms -e -c "-mcpu=e6500 -m64 -fno-common -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs" -o dl07-sym.o dl07.pre
error: machine-type: unknown machine type: 21

#4999 5 weeks ago fixed arch/powerpc Heinz Junkes 5 weeks ago
Summary

missing bsp's in rtems 6.1 rc2

Description

Only a few bsps are available as configurations (bsets). Not all that are listed in the documentation. E.g. 'beatnik' is missing.

this is the output of ../source-builder/sb-set-builder --list-bsets ...

bsps/atsamv.bset bsps/beagleboneblack.bset bsps/erc32.bset bsps/gr712rc.bset bsps/gr740.bset bsps/imx7.bset bsps/pc.bset bsps/qoriq_e500.bset bsps/qoriq_e6500_32.bset bsps/qoriq_e6500_64.bset bsps/raspberrypi2.bset bsps/xilinx_zynq_zc702.bset bsps/xilinx_zynq_zc706.bset bsps/xilinx_zynq_zedboard.bset

...