This revises the post-IRQ interruption control logic so that to balance
the disable/enable operations for both chardev and socketcan cases.
Checked with chardev/socketcan on qemu-intel64.
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
- Add ELE command to initialize the ELE RNG context.
- Add ELE command to poll the readiness of the RNG
- Add ELE command to obtain random numbers.
- Replace AHAB_ prefixes with ELE_
- Cleanup header includes
- Added some explanatory comments on .../hardware/imx9_ele.h
Signed-off-by: Theodore Karatapanis <tkaratapanis@census-labs.com>
Even when enabled, the PCNT counter doesn't accumulate into the 32-bit value.
Instead, a value in range [PCNT_LOW_LIMIT, PCNT_HIGH_LIMIT] is always returned.
This is due to interrupt events associated with limit overflows are disabled on the periphery,
therefore the ISR responsible for the accumulation never gets called.
Fixed by enabling the associated interrupt events.
Signed-off-by: michal matias <mich4l.matias@gmail.com>
When we use fcntl for dup, an fd is directly passed. If we have opened FDCHECK. we need to restore this file descriptor.
open FDCHECK and test this:
`
int main(int ac, char **av)
{
int fd1= open("./1.txt", O_WRONLY | O_CREAT, 0666);
if (fd1 < 0)
{
printf("open err\n");
return fd1;
}
int fd2= open("./2.txt", O_WRONLY | O_CREAT, 0666);
if (fd2 < 0)
{
printf("open err\n");
close(fd1);
return fd2;
}
//close(fd2);
int fd3 = fcntl(fd1, F_DUPFD, fd2);
printf("fd3 = %d\n", fd3);
close(fd1);
close(fd3);
return 0;
}
`
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
nxsig_timeout calls nxsched_add_readytorun and up_switch_context, so
must be in critical section.
nxsig_timeout is used as wdentry in nxsig_clockwait
See wd_expiration CALL_FUNC is not in critical section.
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
fix an unaligned pointer error for arm32 build:
ctucanfd_pci.c:1361:7: warning: converting a packed 'struct ctucanfd_frame_s'
pointer (alignment 1) to a 'uint32_t' {aka 'long unsigned int'} pointer (alignment 4)
may result in an unaligned pointer value [-Waddress-of-packed-member]
1361 | ptr = (FAR uint32_t *)&rxframe;
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Move can_bytes2dlc() and can_dlc2bytes() to a common CAN file
that can be shared between socketCAN implementation and CAN
character driver.
This is the first step to simplifying the logic repeated in
many CAN drivers.
Signed-off-by: raiden00pl <raiden00@railab.me>
Add ability to use arv8m systick lowerhalf driver
Fix wrong macro for systick current register in initialize
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
In case the wdog has already completed when calling cancel, the cancel is
supposed to just return OK.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
The watchdog auto-monitor sets up during the register phase,
so we should be prepared before calling register.
Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
There are many close calls in application without checking return value,
and wrong code causes the same fd to be closed multi times, we should detect
this situation and avoud effecting the fd in other threads.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Remove dependency on CONFIG_NET_CAN for socketCAN definitions.
Definitions from this file are also used by arch/sim CAN
implementation, which is based on a host socketCAN interface.
With this change CONFIG_NET and CONFIG_NET_CAN don't need to
be enabled to support CAN character driver on sim.
Signed-off-by: raiden00pl <raiden00@railab.me>
The fast path can be used also for counting semaphores when the priority
inheritance is disabled.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
Installation instructions, license exceptions and supported features
of the RP2040 common among all boards have been moved exclusively to the
rp2040/index.rst file. Board documentation links back to the primary
source for installation instructions.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Add a kernel build with OP-TEE/SMC driver enabled to
i.MX93 EVK (target imx93-evk:koptee). Since this is
derived from the 'knsh' target, it is also preconfigured
for use with AHAB boot (see
https://spsdk.readthedocs.io/en/latest/examples/ahab/imx93/imx93_ahab_uboot.html).
Signed-off-by: George Poulios <gpoulios@census-labs.com>
Whitelist all symbols starting with "TEEC_" and a few
entire struct field names from tee_client_api.h.
Signed-off-by: George Poulios <gpoulios@census-labs.com>
So far the NuttX implementation of OP-TEE has been using
registered memory references to pass non-registered memory
to OP-TEE OS, passing the physical address of the memory
in what is normally used as a 'cookie'. This was compatible
with the Openvela framework, but no other OP-TEE OS.
Fix this by passing temporary memory instead with the standard
non-contiguous (OPTEE_MSG_ATTR_NONCONTIG) flag.
Signed-off-by: George Poulios <gpoulios@census-labs.com>