Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Last active February 21, 2025 14:38
Show Gist options
  • Save lupyuen/901365650d8f908a7caa431de4e84ff6 to your computer and use it in GitHub Desktop.
Save lupyuen/901365650d8f908a7caa431de4e84ff6 to your computer and use it in GitHub Desktop.
Apache #NuttX RTOS boots OK on #StarPro64 @ThePine64! πŸŽ‰ (#RISCV #ESWIN EIC7700X) ... But OSTest fails 😬 https://youtu.be/70DQ4YlQMMw
PHY1 training process:100%
DDR type:LPDDR5;Size:32GB,Data Rate:6400MT/s
DDR self test OK
m
OpenSBI v1.5
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : ESWIN EIC7700 EVB
Platform Features : medeleg
Platform HART Count : 4
Platform IPI Device : aclint-mswi
Platform Timer Device : aclint-mtimer @ 1000000Hz
Platform Console Device : uart8250
Platform HSM Device : ---
Platform PMU Device : ---
Platform Reboot Device : eswin_eic770x_reset
Platform Shutdown Device : eswin_eic770x_reset
Platform Suspend Device : ---
Platform CPPC Device : ---
Firmware Base : 0x80000000
Firmware Size : 357 KB
Firmware RW Offset : 0x40000
Firmware RW Size : 101 KB
Firmware Heap Offset : 0x4f000
Firmware Heap Size : 41 KB (total), 2 KB (reserved), 11 KB (used), 27 KB (free)
Firmware Scratch Size : 4096 B (total), 416 B (used), 3680 B (free)
Runtime SBI Version : 2.0
Domain0 Name : root
Domain0 Boot HART : 2
Domain0 HARTs : 0*,1*,2*,3*
Domain0 Region00 : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region01 : 0x0000000080000000-0x000000008007ffff M: (R,W) S/U: ()
Domain0 Region02 : 0x000000c000000000-0x000000d000000000 M: () S/U: (R,W)
Domain0 Region03 : 0x0000001000000000-0x0000008000000000 M: () S/U: ()
Domain0 Region04 : 0x0000000000000000-0xffffffffffffffff M: () S/U: (R,W,X)
Domain0 Next Address : 0x0000000080200000
Domain0 Next Arg1 : 0x00000000f8000000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Domain0 SysSuspend : yes
Boot HART ID : 2
Boot HART Domain : root
Boot HART Priv Version : v1.11
Boot HART Base ISA : rv64imafdchx
Boot HART ISA Extensions : sscofpmf,zihpm,sdtrig
Boot HART PMP Count : 8
Boot HART PMP Granularity : 12 bits
Boot HART PMP Address Bits: 39
Boot HART MHPM Info : 4 (0x00000078)
Boot HART Debug Triggers : 4 triggers
Boot HART MIDELEG : 0x0000000000002666
Boot HART MEDELEG : 0x0000000000f0b509
Hardware Feature[7C1]: 0x4000
Hardware Feature[7C2]: 0x80
Hardware Feature[7C3]: 0x104095c1be241
Hardware Feature[7C4]: 0x1d3ff
ll
U-Boot 2024.01-gaa36f0b4 (Jan 23 2025 - 02:49:59 +0000)
CPU: rv64imafdc_zba_zbb
Model: ESWIN EIC7700 EVB
DRAM: 32 GiB (effective 16 GiB)
llCore: 143 devices, 31 uclasses, devicetree: separate
Warning: Device tree includes old 'u-boot,dm-' tags: please fix by 2023.07!
MMC: sdhci@50450000: 0, sd@50460000: 1
Loading Environment from SPIFlash... SF: Detected w25q128fw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
[display_init]Eswin UBOOT DRM driver version: v1.0.1
In: serial,usbkbd
Out: vidconsole,serial
Err: vidconsole,serial
Success to initialize SPI flash at spi@51800000
Bootspi flash write protection enabled
Get board info from flash
ERROR: There is no valid hardware board information!!!
Cpu volatge need boost above 1.6 Ghz!
sdhci_transfer_data: Transfer data timeout
Low power features will not be supported!
Net: eth0: ethernet@50400000
Working FDT set to ed4ecb90
starting USB...
Bus usb1@50490000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb1@50490000 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
No SATA device found!
Autoboot in 5 seconds
ethernet@50400000 Waiting for PHY auto negotiation to complete..... done
BOOTP broadcast 1
BOOTP broadcast 2
*** Unhandled DHCP Option in OFFER/ACK: 43
*** Unhandled DHCP Option in OFFER/ACK: 43
DHCP client bound to address 192.168.31.194 (729 ms)
Using ethernet@50400000 device
TFTP from server 192.168.31.10; our IP address is 192.168.31.194
Filename 'Image-starpro64'.
Load address: 0x84000000
Loading: #################################################################
#################################################################
#################################################################
############################################################
1.2 MiB/s
done
Bytes transferred = 3741265 (391651 hex)
Using ethernet@50400000 device
TFTP from server 192.168.31.10; our IP address is 192.168.31.194
Filename 'jh7110-star64-pine64.dtb'.
Load address: 0x88000000
Loading: ####
1.2 MiB/s
done
Bytes transferred = 50235 (c43b hex)
Working FDT set to 88000000
Moving Image from 0x84000000 to 0x80200000, end=84200000
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
Using Device Tree in place at 0000000088000000, end 000000008800f43a
Working FDT set to 88000000
Starting kernel ...
123Hello NuttX!
2ABC[CPU0] nx_start: Entry
[CPU0] uart_register: Registering /dev/console
[CPU0] uart_register: Registering /dev/ttyS0
[CPU0] up_cpu_start: CPU=1
[CPU0] up_cpu_start: CPU=2
[CPU0] up_cpu_start: CPU=3
[CPU0] work_start_lowpri: Starting low-priority kernel worker thread(s)
[CPU0] nxtask_activate: lpwork pid=4,TCB=0x8040eb50
[CPU0] nxtask_activate: AppBringUp pid=5,TCB=0x8040ece8
[CPU0] nx_start_application: Starting init task: /system/bin/init
[CPU0] nxtask_activate: /system/bin/init pid=6,TCB=0x8040f538
[CPU0] nxtask_exit: AppBringUp pid=5,TCB=0x8040ece8
[CPU0] nx_start: CPU0: Beginning Idle Loop
NuttShell (NSH) NuttX-12.4.0
nsh> uname -a
[CPU0] nxposix_spawn_exec: ERROR: exec failed: 2
NuttX 12.4.0 bee5f77e03 Feb 21 2025 19:24:32 risc-v milkv_duos
nsh> ls -l /dev
[CPU0] nxposix_spawn_exec: ERROR: exec failed: 2
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
[CPU0] nxposix_spawn_exec: ERROR: exec failed: 2
PID GROUP CPU PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 0 FIFO Kthread - Assigned 0000000000000000 0003056 0000000 0.0% CPU0 IDLE
1 0 1 0 FIFO Kthread - Running 0000000000000000 0003056 0000528 17.2% CPU1 IDLE
2 0 2 0 FIFO Kthread - Running 0000000000000000 0003056 0001952 63.8% CPU2 IDLE
3 0 3 0 FIFO Kthread - Running 0000000000000000 0003056 0003056 100.0%! CPU3 IDLE
4 0 1 100 RR Kthread - Assigned 0000000000000000 0001968 0000528 26.8% lpwork 0x80400100 0x80400150
6 6 0 100 RR Task - Running 0000000000000000 0003008 0001888 62.7% /system/bin/init
nsh> free
[CPU0] nxposix_spawn_exec: ERROR: exec failed: 2
total used free maxused maxfree nused nfree name
2039808 11680 2028128 33440 2026416 38 6 Kmem
20971520 720896 20250624 20250624 Page
nsh> hello
[CPU0] nxtask_activate: hello pid=7,TCB=0x8040f8a8
[CPU0] nxsig_tcbdispatch: TCB=0x8040f8a8 pid=7 signo=0 code=0 value=0 masked=NO
[CPU0] nxsig_tcbdispatch: TCB=0x8040f538 pid=6 signo=17 code=5 value=0 masked=NO
[CPU0] nxtask_exit: hello pid=7,TCB=0x8040f8a8
[CPU0] nxsig_tcbdispatch: TCB=0x8040f538 pid=6 signo=17 code=5 value=0 masked=NO
Hello, World!!
nsh> getprime
[CPU0] nxtask_activate: getprime pid=8,TCB=0x8040f8a8
[CPU0] nxsig_tcbdispatch: TCB=0x8040f8a8 pid=8 signo=0 code=0 value=0 masked=NO
S[CPU0] nxtask_activate: getprime pid=9,TCB=0x8040fd40
et thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
th[CPU0] nx_pthread_exit: exit_value=0
[CPU0] pthread_completejoin: pid=9 exit_value=0
[CPU0] nxtask_exit: getprime pid=9,TCB=0x8040fd40
[CPU0] pthread_join: Returning 0, exit_value 0
[CPU0] nxsig_tcbdispatch: TCB=0x8040f538 pid=6 signo=17 code=5 value=0 masked=NO
[CPU0] nxtask_exit: getprime pid=8,TCB=0x8040f8a8
[CPU0] nxsig_tcbdispatch: TCB=0x8040f538 pid=6 signo=17 code=5 value=0 masked=NO
read #0 finished, found 1230 primes, last one was 9973
Done
getprime took 155 msec
nsh> ostest
[CPU0] nxtask_activate: ostest pid=10,TCB=0x8040f8a8
[CPU0] nxsig_tcbdispatch: TCB=0x8040f8a8 pid=10 signo=0 code=0 value=0 masked=NO
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodVal[CPU0] nxtask_activate: ostest pid=11,TCB=0x80412088
u[CPU0] nxsig_tcbdispatch: TCB=0x80412088 pid=11 signo=0 code=0 value=0 masked=NO
e2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2678 2678
fordblks 7e988 7e988
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2678 2678
fordblks 7e988 7e988
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2678 2678
fordblks 7e988 7e988
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2678 2658
fordblks 7e988 7e9a8
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2658 2580
fordblks 7e9a8 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2580 2580
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test[CPU0] pthread_mutex_init: mutex=0xc01015b8 attr=0
memory usage:
VAR[CPU0] nxtask_activate: ostest pid=12,TCB=0x804130d0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] nx_pthread_exit: exit_value=0
[CPU0] pthread_completejoin: pid=12 exit_value=0
[CPU0] nxtask_exit: ostest pid=12,TCB=0x804130d0
IABLE BEFORE AFT[CPU0] nxtask_activate: ostest pid=13,TCB=0x804130d0
[CPU0] pthread_destroyjoin: pjoin=0x80413278
[CPU0] pthread_join: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc01015b8
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc01015b8
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] nx_pthread_exit: exit_value=0
[CPU0] pthread_completejoin: pid=13 exit_value=0
[CPU0] nxtask_exit: ostest pid=13,TCB=0x804130d0
[CPU0] pthread_join: Returning 0
[CPU0] pthread_mutex_destroy: mutex=0xc01015b8
[CPU0] pthread_mutex_destroy: Returning 0
ER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2580 2580
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 32 32
Errors 0 0
End of test memory usage:
VA[CPU0] pthread_mutex_init: mutex=0xc0101720 attr=0
[CPU0] pthread_mutex_timedlock: mutex=0xc0101720
[CPU0] pthread_mutex_timedlock: Returning 0
RIABLE BEFORE AFTER
=====[CPU0] nxtask_activate: ostest pid=14,TCB=0x804130d0
=== ======== ========
arena 81000 81000
ordblks[CPU0] pthread_mutex_timedlock: mutex=0xc0101720
2 3
mxordblk 7cff8 7a7f8
uordblks 2580 2d88
fordblks 7ea80 7e278
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mu[CPU0] pthread_mutex_unlock: mutex=0xc0101720
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc0101720
[CPU0] pthread_mutex_unlock: Returning 0
tex_test: Unlocking
pthread: Got the lock
[CPU0] pthread_mutex_timedlock: mutex=0xc0101720
[CPU0] pthread_mutex_timedlock: Returning 0
pt[CPU0] pthread_mutex_timedlock: mutex=0xc0101720
hread: Waiting for lock or timeout
[CPU0] pthread_mutex_timedlock: Returning 110
[CPU0] nx_pthread_exit: exit_value=0
[CPU0] pthread_completejoin: pid=14 exit_value=0
[CPU0] nxtask_exit: ostest pid=14,TCB=0x804130d0
pthread: Got the timeout. Terminating
mu[CPU0] pthread_destroyjoin: pjoin=0x80413278
[CPU0] pthread_join: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc0101720
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_destroy: mutex=0xc0101720
[CPU0] pthread_mutex_destroy: Returning 0
tex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 [CPU0] pthread_mutex_init: mutex=0xc0101110 attr=0
81000
ordblks 3 [CPU0] pthread_cond_init: cond=0xc01010f0 attr=0
[CPU0] pthread_cond_init: Returning 0
3
mxordblk 7a7f8 7a7f8[CPU0] nxtask_activate: ostest pid=15,TCB=0x804130d0
uordblks 2d88 2d88
fordblks 7e278 [CPU0] pthread_mutex_timedlock: mutex=0xc0101110
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc0101110
7e278
user_main: cancel test
cancel_[CPU0] pthread_cond_wait: cond=0xc01010f0 mutex=0xc0101110
[CPU0] pthread_cond_wait: Give up mutex / take cond
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc0101110
[CPU0] pthread_mutex_unlock: Returning 0
test: Test 1a: Normal Cancellat[CPU0] pthread_completejoin: pid=15 exit_value=0xffffffffffffffff
ion
cancel_test: Star[CPU0] pthread_destroyjoin: pjoin=0x80413278
[CPU0] pthread_join: Returning 0, exit_value 0xffffffffffffffff
ting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xfff[CPU0] pthread_cond_destroy: cond=0xc01010f0
[CPU0] pthread_cond_destroy: Returning 0
fffffffffffff
cancel_test: PASS t[CPU0] pthread_mutex_destroy: mutex=0xc0101110
[CPU0] pthread_mutex_destroy: Returning 0
hread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchron[CPU0] pthread_mutex_init: mutex=0xc0101110 attr=0
ous Cancellation
... Skipped
ca[CPU0] pthread_cond_init: cond=0xc01010f0 attr=0
[CPU0] pthread_cond_init: Returning 0
ncel_test: Test 3: Cancellation[CPU0] nxtask_activate: ostest pid=21,TCB=0x804130d0
of detached thread
can[CPU0] pthread_detach: Returning 0
cel_test: Re-starting thre[CPU0] pthread_mutex_timedlock: mutex=0xc0101110
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc0101110
ad
restart_thread: Destroying cond
rest[CPU0] pthread_cond_wait: cond=0xc01010f0 mutex=0xc0101110
[CPU0] pthread_cond_wait: Give up mutex / take cond
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc0101110
[CPU0] pthread_mutex_unlock: Returning 0
art_thread: Destroying mutex
r[CPU0] pthread_completejoin: pid=21 exit_value=0xffffffffffffffff
estart_thread: Re-star[CPU0] pthread_join: Returning 3, exit_value 0xffffffffffffffff
ting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wai[CPU0] pthread_cond_destroy: cond=0xc01010f0
[CPU0] pthread_cond_destroy: Returning 0
t for condition
cancel_test: Canc[CPU0] pthread_mutex_destroy: mutex=0xc0101110
[CPU0] pthread_mutex_destroy: Returning 0
eling thread
cancel_test: Joining
cancel_test: PASS pthread_join fai[CPU0] pthread_mutex_init: mutex=0xc0101110 attr=0
led with status=ESRCH
cancel_tes[CPU0] pthread_cond_init: cond=0xc01010f0 attr=0
[CPU0] pthread_cond_init: Returning 0
t: Test 5: Non-cancelable threa[CPU0] nxtask_activate: ostest pid=23,TCB=0x804130d0
ds
cancel_test: Re-starting thread (non-cancelabl[CPU0] pthread_mutex_timedlock: mutex=0xc0101110
[CPU0] pthread_mutex_timedlock: Returning 0
e)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restar[CPU0] pthread_cond_wait: cond=0xc01010f0 mutex=0xc0101110
[CPU0] pthread_cond_wait: Give up mutex / take cond
t_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
[CPU0] pthread_mutex_timedlock: mutex=0xc0101110
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc0101110
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc0101110
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_cond_signal: cond=0xc01010f0
[CPU0] pthread_cond_signal: Signalling...
[CPU0] pthread_cond_signal: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc0101110
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_cond_wait: Reacquire mutex...
[CPU0] pthread_cond_wait: Returning 0
[CPU0] pthread_mutex_unlock: mutex=0xc0101110
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] nx_pthread_exit: exit_value=0xffffffffffffffff
[CPU0] pthread_completejoin: pid=23 exit_value=0xffffffffffffffff
[CPU0] nxtask_exit: ostest pid=23,TCB=0x804130d0
[CPU0] pthread_join: Returning 0, exit_value 0xffffffffffffffff
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:[CPU0] pthread_mutex_init: mutex=0xc0101618 attr=0xc0203ee8
VARIABLE BEFORE AFTER
==[CPU0] nxtask_activate: ostest pid=24,TCB=0x804130d0
====== ======== ========
are[CPU0] pthread_mutex_timedlock: mutex=0xc0101618
[CPU0] pthread_mutex_timedlock: Returning 0
na 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d88 4588
fordblks 7e278 7ca78
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
[CPU0] pthread_mutex_timedlock: mutex=0xc0101618
[CPU0] nx_pthread_exit: exit_value=0
[CPU0] pthread_completejoin: pid=24 exit_value=0
[CPU0] nxtask_exit: ostest pid=24,TCB=0x804130d0
[CPU0] pthread_mutex_timedlock: Returning 130
[CPU0] pthread_mutex_timedlock: mutex=0xc0101618
[CPU0] pthread_mutex_timedlock: Returning 130
robust_test: Take the lock again
ro[CPU0] pthread_mutex_consistent: mutex=0xc0101618
[CPU0] pthread_mutex_consistent: Returning 0
[CPU0] pthread_mutex_timedlock: mutex=0xc0101618
[CPU0] pthread_mutex_timedlock: Returning 0
[CPU0] pthread_destroyjoin: pjoin=0x80413278
[CPU0] pthread_join: Returning 0, exit_value 0
[CPU0] pthread_mutex_unlock: mutex=0xc0101618
[CPU0] pthread_mutex_unlock: Returning 0
[CPU0] pthread_mutex_destroy: mutex=0xc0101618
[CPU0] pthread_mutex_destroy: Returning 0
bust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
o[CPU0] nxtask_activate: ostest pid=25,TCB=0x804130d0
rdblks 3 3
mxordblk 78ff8 78ff8
uordblks 4588 [CPU0] nxtask_activate: ostest pid=28,TCB=0x80413ea8
4588
fordblks 7ca78 7ca78
user_main: semaphore test
sem_test: Initializing semaphore to 0
sem_test: Starting waiter thread 1
sem_test: Set thread 1 priority to 191
sem_test: Starting waiter thread 2
sem_test: Set thread 2 priority to 128
waiter_func: Thread 2 Started
waiter_func: Thread 2 initial semaphore value = 0
waiter_func: Thread 2 waiting on semaphore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment