During the boot phase, when we transition from tee smp to ap smp, we can use a busy waitflag to wait for the completion of the initialization of ap's core0
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
Signed-off-by: hujun5 <hujun5@xiaomi.com>
because 'g_cpu_nestcount[me] > 0' will never happen, in this place
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Only in the non-critical region, nuttx can the respond to the irq and not hold the lock
When returning from the irq, there is no need to check whether the lock needs to be restored
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
Signed-off-by: hujun5 <hujun5@xiaomi.com>
When the PSRAM is enabled, we should not allocate the TX/RX
buffers there, so we use kmm_calloc here, to make it into IRAM,
so the ethernet controller can read bytes from it.
Add support for XSAVE/XRSTOR to handle x86_64 procesor extended states.
Support for these instructions is required to support AVX instruction set
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Use 32bit operations for id field in intel64_cpu_s which is int type.
This fixes an error that appears when enabling some debug options:
`Error: operand size mismatch for `movq'``
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Add a common method to format backtrace to buffer, so it can be used by both mm, fs and other possoble modules.
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
This revises ld-nuttsbi.script for easier use. It also adjusts
canmv230/nsbi to fit both k230d and k230 devices.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
Intel64 can now boot application cores which is needed for SMP
IMPORTANT: CONFIG_BOARD_LOOPSPERMSEC must be properly configured,
otherwise AP boot sequence can fail due too short delays during the AP startup
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Add support for inter-processor signaling in x86_64 based on up_trigger_irq() interface.
Preparations for SMP.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
reduce the time consumed by function call
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Use GS base regsiter to store reference to CPU private data.
Then we can easily refer to private CPU data using the GS segment.
Required for SMP support.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Allow CPU_XXX macros to be used without CONFIG_SMP=y
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
Co-authored-by: Bowen Wang <wangbowen6@xiaomi.com>
It turns out that the D0 core of the BL808 has an IRQ that represents all interrupt sources for the M0 core. This change uses this IRQ to access these sources, eliminating the need for IPC between M0 and D0.
fix missing reference to comm_region->tsc_khz and
fix 'defined but not used' warnings in arch/x86_64/intel64_rtc.c
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Hide --whole-archive behind Kconfig option for x86.
This option is not needed and breaks ELF modules build.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>