URL
https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk
Subversion Repositories riscv_vhdl
[/] [riscv_vhdl/] [trunk/] [examples/] [zephyr/] [gcc711/] [zephyr.lst] - Rev 5
Compare with Previous | Blame | View Log
zephyr.elf: file format elf64-littleriscv
Disassembly of section text:
0000000010000000 <__start>:
*/
.section ".text"
.globl __start
__start:
jal _Cstart;
10000000: 556030ef jal ra,10003556 <_Cstart>
0000000010000004 <_Swap>:
.section ".text"
.globl _Swap
_Swap:
_save_context(tp)
10000004: 00123023 sd ra,0(tp) # 0 <__memory_pool_quad_block_size-0x10>
10000008: 00823423 sd s0,8(tp) # 8 <__memory_pool_quad_block_size-0x8>
1000000c: 00923823 sd s1,16(tp) # 10 <__memory_pool_quad_block_size>
10000010: 01223c23 sd s2,24(tp) # 18 <__memory_pool_quad_block_size+0x8>
10000014: 03323023 sd s3,32(tp) # 20 <__memory_pool_quad_block_size+0x10>
10000018: 03423423 sd s4,40(tp) # 28 <__memory_pool_quad_block_size+0x18>
1000001c: 03523823 sd s5,48(tp) # 30 <__memory_pool_quad_block_size+0x20>
10000020: 03623c23 sd s6,56(tp) # 38 <__memory_pool_quad_block_size+0x28>
10000024: 05723023 sd s7,64(tp) # 40 <__memory_pool_quad_block_size+0x30>
10000028: 05823423 sd s8,72(tp) # 48 <__memory_pool_quad_block_size+0x38>
1000002c: 05923823 sd s9,80(tp) # 50 <__memory_pool_quad_block_size+0x40>
10000030: 05a23c23 sd s10,88(tp) # 58 <__memory_pool_quad_block_size+0x48>
10000034: 07b23023 sd s11,96(tp) # 60 <__memory_pool_quad_block_size+0x50>
10000038: 06223423 sd sp,104(tp) # 68 <__memory_pool_quad_block_size+0x58>
1000003c: 07023c23 sd a6,120(tp) # 78 <__memory_pool_quad_block_size+0x68>
10000040: 09123023 sd a7,128(tp) # 80 <__memory_pool_quad_block_size+0x70>
10000044: 08a23423 sd a0,136(tp) # 88 <__memory_pool_quad_block_size+0x78>
10000048: 08b23823 sd a1,144(tp) # 90 <__memory_pool_quad_block_size+0x80>
1000004c: 08c23c23 sd a2,152(tp) # 98 <__memory_pool_quad_block_size+0x88>
10000050: 0ad23023 sd a3,160(tp) # a0 <__memory_pool_quad_block_size+0x90>
10000054: 0ae23423 sd a4,168(tp) # a8 <__memory_pool_quad_block_size+0x98>
10000058: 0af23823 sd a5,176(tp) # b0 <__memory_pool_quad_block_size+0xa0>
1000005c: 0b023c23 sd a6,184(tp) # b8 <__memory_pool_quad_block_size+0xa8>
10000060: 0d123023 sd a7,192(tp) # c0 <__memory_pool_quad_block_size+0xb0>
10000064: 0c523423 sd t0,200(tp) # c8 <__memory_pool_quad_block_size+0xb8>
10000068: 0c623823 sd t1,208(tp) # d0 <__memory_pool_quad_block_size+0xc0>
1000006c: 0c723c23 sd t2,216(tp) # d8 <__memory_pool_quad_block_size+0xc8>
10000070: 0fc23023 sd t3,224(tp) # e0 <__memory_pool_quad_block_size+0xd0>
10000074: 0fd23423 sd t4,232(tp) # e8 <__memory_pool_quad_block_size+0xd8>
10000078: 0e323823 sd gp,240(tp) # f0 <__memory_pool_quad_block_size+0xe0>
la s0, _kernel
1000007c: 00006417 auipc s0,0x6
10000080: d4440413 addi s0,s0,-700 # 10005dc0 <_kernel>
ld s1,_kernel_offset_to_current(s0) # s1 = _kernel.current
10000084: 6804 ld s1,16(s0)
addi s2,s1,_thread_offset_to_callee_saved # s2 = &next_thread->callee_saved
10000086: 06048913 addi s2,s1,96
sd a0,_callee_saved_offset_to_key(s2) # _kernel.current->callee_saved.key = fl
1000008a: 10a93023 sd a0,256(s2)
## Populate default return value
lw a1,_k_neg_eagain
1000008e: 00005597 auipc a1,0x5
10000092: f825a583 lw a1,-126(a1) # 10005010 <__data_rom_start>
sd a1, _callee_saved_offset_to_retval(s2)
10000096: 10b93423 sd a1,264(s2)
## This thread was switched preemptively
li a1,0
1000009a: 4581 li a1,0
sd a1,_callee_saved_offset_to_preemptive(s2)
1000009c: 10b93823 sd a1,272(s2)
jal _get_next_ready_thread
100000a0: 033030ef jal ra,100038d2 <_get_next_ready_thread>
mv s1,a0
100000a4: 84aa mv s1,a0
sd s1,_kernel_offset_to_current(s0) # _kernel.current = _get_next_ready_thread()
100000a6: e804 sd s1,16(s0)
addi tp,s1,_thread_offset_to_callee_saved # tp = &next_thread->callee_saved
100000a8: 06048213 addi tp,s1,96
ld a0,_callee_saved_offset_to_key(tp) # a0 = callee_saved.key
100000ac: 10023503 ld a0,256(tp) # 100 <__memory_pool_quad_block_size+0xf0>
jal _arch_irq_unlock # _arch_irq_unlock(callee_saved.key)
100000b0: 77f020ef jal ra,1000302e <_arch_irq_unlock>
_restore_context(tp)
100000b4: 00023083 ld ra,0(tp) # 0 <__memory_pool_quad_block_size-0x10>
100000b8: 00823403 ld s0,8(tp) # 8 <__memory_pool_quad_block_size-0x8>
100000bc: 01023483 ld s1,16(tp) # 10 <__memory_pool_quad_block_size>
100000c0: 01823903 ld s2,24(tp) # 18 <__memory_pool_quad_block_size+0x8>
100000c4: 02023983 ld s3,32(tp) # 20 <__memory_pool_quad_block_size+0x10>
100000c8: 02823a03 ld s4,40(tp) # 28 <__memory_pool_quad_block_size+0x18>
100000cc: 03023a83 ld s5,48(tp) # 30 <__memory_pool_quad_block_size+0x20>
100000d0: 03823b03 ld s6,56(tp) # 38 <__memory_pool_quad_block_size+0x28>
100000d4: 04023b83 ld s7,64(tp) # 40 <__memory_pool_quad_block_size+0x30>
100000d8: 04823c03 ld s8,72(tp) # 48 <__memory_pool_quad_block_size+0x38>
100000dc: 05023c83 ld s9,80(tp) # 50 <__memory_pool_quad_block_size+0x40>
100000e0: 05823d03 ld s10,88(tp) # 58 <__memory_pool_quad_block_size+0x48>
100000e4: 06023d83 ld s11,96(tp) # 60 <__memory_pool_quad_block_size+0x50>
100000e8: 06823103 ld sp,104(tp) # 68 <__memory_pool_quad_block_size+0x58>
100000ec: 07823803 ld a6,120(tp) # 78 <__memory_pool_quad_block_size+0x68>
100000f0: 08023883 ld a7,128(tp) # 80 <__memory_pool_quad_block_size+0x70>
100000f4: 08823503 ld a0,136(tp) # 88 <__memory_pool_quad_block_size+0x78>
100000f8: 09023583 ld a1,144(tp) # 90 <__memory_pool_quad_block_size+0x80>
100000fc: 09823603 ld a2,152(tp) # 98 <__memory_pool_quad_block_size+0x88>
10000100: 0a023683 ld a3,160(tp) # a0 <__memory_pool_quad_block_size+0x90>
10000104: 0a823703 ld a4,168(tp) # a8 <__memory_pool_quad_block_size+0x98>
10000108: 0b023783 ld a5,176(tp) # b0 <__memory_pool_quad_block_size+0xa0>
1000010c: 0b823803 ld a6,184(tp) # b8 <__memory_pool_quad_block_size+0xa8>
10000110: 0c023883 ld a7,192(tp) # c0 <__memory_pool_quad_block_size+0xb0>
10000114: 0c823283 ld t0,200(tp) # c8 <__memory_pool_quad_block_size+0xb8>
10000118: 0d023303 ld t1,208(tp) # d0 <__memory_pool_quad_block_size+0xc0>
1000011c: 0d823383 ld t2,216(tp) # d8 <__memory_pool_quad_block_size+0xc8>
10000120: 0e023e03 ld t3,224(tp) # e0 <__memory_pool_quad_block_size+0xd0>
10000124: 0e823e83 ld t4,232(tp) # e8 <__memory_pool_quad_block_size+0xd8>
10000128: 0f023183 ld gp,240(tp) # f0 <__memory_pool_quad_block_size+0xe0>
ld t4,_callee_saved_offset_to_preemptive(tp)
1000012c: 11023e83 ld t4,272(tp) # 110 <__memory_pool_quad_block_size+0x100>
bnez t4,__swap_preemptive
10000130: 000e9363 bnez t4,10000136 <__swap_preemptive>
0000000010000134 <__swap_cooperative>:
__swap_cooperative:
ret
10000134: 8082 ret
0000000010000136 <__swap_preemptive>:
__swap_preemptive:
ld t4,COOP_REG_MEPC(tp)
10000136: 07023e83 ld t4,112(tp) # 70 <__memory_pool_quad_block_size+0x60>
jalr t4
1000013a: 9e82 jalr t4
000000001000013c <_IsrWrapper>:
# a0 store IRQ index,
# a1 equals NULL
#
.globl _IsrWrapper
_IsrWrapper:
addi sp,sp,-32
1000013c: 1101 addi sp,sp,-32
sd ra,0(sp)
1000013e: e006 sd ra,0(sp)
sd s0,8(sp)
10000140: e422 sd s0,8(sp)
sd s1,16(sp)
10000142: e826 sd s1,16(sp)
sd s2,24(sp)
10000144: ec4a sd s2,24(sp)
# Grab a reference to _kernel in r10 so we can determine the
# current irq stack pointer
#
la a1,_kernel
10000146: 00006597 auipc a1,0x6
1000014a: c7a58593 addi a1,a1,-902 # 10005dc0 <_kernel>
# Stash a copy of thread's sp in r12 so that we can put it on the IRQ
# stack
#
mv a2,sp
1000014e: 860a mv a2,sp
# Switch to interrupt stack
ld sp,_kernel_offset_to_irq_stack(a1)
10000150: 0085b103 ld sp,8(a1)
# Store thread stack pointer onto IRQ stack
addi sp,sp,-8
10000154: 1161 addi sp,sp,-8
sd a2,0(sp)
10000156: e032 sd a2,0(sp)
call run_isr_handler
10000158: 65f020ef jal ra,10002fb6 <run_isr_handler>
ld sp,0(sp)
1000015c: 6102 ld sp,0(sp)
# Check reschedule condition
jal _get_next_ready_thread
1000015e: 774030ef jal ra,100038d2 <_get_next_ready_thread>
beqz a0,_IsrExit_ending # _get_next_ready_thread() == 0 goto ending
10000162: c921 beqz a0,100001b2 <_IsrExit_ending>
## Do not reschedule coop threads (threads that have negative prio)
lw s1, _thread_offset_to_prio(a0)
10000164: 4944 lw s1,20(a0)
blt s1,zero,_IsrExit_ending
10000166: 0404c663 bltz s1,100001b2 <_IsrExit_ending>
## Do not reschedule if scheduler is locked
lw s1, _thread_offset_to_sched_locked(a0)
1000016a: 4d04 lw s1,24(a0)
bne s1,zero,_IsrExit_ending
1000016c: 04049363 bnez s1,100001b2 <_IsrExit_ending>
## Call into the kernel to see if a scheduling decision is necessary
mv s1,a0 # s1 = next_thread
10000170: 84aa mv s1,a0
jal _is_next_thread_current
10000172: 027030ef jal ra,10003998 <_is_next_thread_current>
bne a0,zero,_IsrExit_ending
10000176: 02051e63 bnez a0,100001b2 <_IsrExit_ending>
## Flag current thread that it was switched preemptively
la s0, _kernel
1000017a: 00006417 auipc s0,0x6
1000017e: c4640413 addi s0,s0,-954 # 10005dc0 <_kernel>
ld s0,_kernel_offset_to_current(s0) # s0 = _kernel.current
10000182: 6800 ld s0,16(s0)
addi s2,s0,_thread_offset_to_callee_saved # s2 = &next_thread->callee_saved
10000184: 06040913 addi s2,s0,96
li a0,1
10000188: 4505 li a0,1
sd a0,_callee_saved_offset_to_preemptive(s2)
1000018a: 10a93823 sd a0,272(s2)
# Store IRQ key
jal _arch_irq_lock_state # a0 = _arch_irq_lock_state()
1000018e: 6bb020ef jal ra,10003048 <_arch_irq_lock_state>
sd a0,_callee_saved_offset_to_key(s2)
10000192: 10a93023 sd a0,256(s2)
##
# Switch to the new thread.
#
addi tp,s1,_thread_offset_to_callee_saved # tp = &next_thread->callee_saved
10000196: 06048213 addi tp,s1,96
ld a0,_callee_saved_offset_to_key(tp) # a0 = callee_saved.key
1000019a: 10023503 ld a0,256(tp) # 100 <__memory_pool_quad_block_size+0xf0>
jal _arch_irq_unlock # _arch_irq_unlock(callee_saved.key)
1000019e: 691020ef jal ra,1000302e <_arch_irq_unlock>
ld t4,_callee_saved_offset_to_preemptive(tp)
100001a2: 11023e83 ld t4,272(tp) # 110 <__memory_pool_quad_block_size+0x100>
bnez t4,_IsrExit_ending
100001a6: 000e9663 bnez t4,100001b2 <_IsrExit_ending>
## Next thread was switched cooperative so,set MEPC to ra
ld a0,COOP_REG_RA(tp)
100001aa: 00023503 ld a0,0(tp) # 0 <__memory_pool_quad_block_size-0x10>
sd a0,COOP_REG_MEPC(tp)
100001ae: 06a23823 sd a0,112(tp) # 70 <__memory_pool_quad_block_size+0x60>
00000000100001b2 <_IsrExit_ending>:
_IsrExit_ending:
ld s2,24(sp)
100001b2: 6962 ld s2,24(sp)
ld s1,16(sp)
100001b4: 64c2 ld s1,16(sp)
ld s0,8(sp)
100001b6: 6422 ld s0,8(sp)
ld ra,0(sp)
100001b8: 6082 ld ra,0(sp)
addi sp,sp,32
100001ba: 6105 addi sp,sp,32
ret
100001bc: 8082 ret
00000000100001be <shell_cmd_params>:
#else
"__memory_pool_quad_block_size = %c0\n\t"
#endif
:
: "n"(sizeof(struct k_mem_pool_quad_block)));
}
100001be: 1141 addi sp,sp,-16
100001c0: e022 sd s0,0(sp)
100001c2: e406 sd ra,8(sp)
100001c4: 0800 addi s0,sp,16
100001c6: 6190 ld a2,0(a1)
100001c8: 85aa mv a1,a0
100001ca: 10004537 lui a0,0x10004
100001ce: 06850513 addi a0,a0,104 # 10004068 <__devconfig_end>
100001d2: 064020ef jal ra,10002236 <printk>
100001d6: 60a2 ld ra,8(sp)
100001d8: 6402 ld s0,0(sp)
100001da: 4501 li a0,0
100001dc: 0141 addi sp,sp,16
100001de: 8082 ret
00000000100001e0 <shell_cmd_ping>:
100001e0: 1141 addi sp,sp,-16
100001e2: e022 sd s0,0(sp)
100001e4: e406 sd ra,8(sp)
100001e6: 0800 addi s0,sp,16
100001e8: 10004537 lui a0,0x10004
100001ec: 08850513 addi a0,a0,136 # 10004088 <__devconfig_end+0x20>
100001f0: 046020ef jal ra,10002236 <printk>
100001f4: 60a2 ld ra,8(sp)
100001f6: 6402 ld s0,0(sp)
100001f8: 4501 li a0,0
100001fa: 0141 addi sp,sp,16
100001fc: 8082 ret
00000000100001fe <main>:
{ NULL, NULL }
};
void main(void)
{
100001fe: 1141 addi sp,sp,-16
10000200: e422 sd s0,8(sp)
10000202: 0800 addi s0,sp,16
SHELL_REGISTER(MY_SHELL_MODULE, commands);
}
10000204: 6422 ld s0,8(sp)
10000206: 0141 addi sp,sp,16
10000208: 8082 ret
000000001000020a <shell_run>:
#include <init.h>
#define SHELL_PROMPT "shell> "
int shell_run(struct device *dev)
{
1000020a: 1141 addi sp,sp,-16
1000020c: e022 sd s0,0(sp)
1000020e: e406 sd ra,8(sp)
10000210: 0800 addi s0,sp,16
ARG_UNUSED(dev);
shell_init(SHELL_PROMPT);
10000212: 10004537 lui a0,0x10004
10000216: 0c050513 addi a0,a0,192 # 100040c0 <__devconfig_end+0x58>
1000021a: 013000ef jal ra,10000a2c <shell_init>
return 0;
}
1000021e: 60a2 ld ra,8(sp)
10000220: 6402 ld s0,0(sp)
10000222: 4501 li a0,0
10000224: 0141 addi sp,sp,16
10000226: 8082 ret
0000000010000228 <shell_cmd_cycles>:
return 0;
}
static int shell_cmd_cycles(int argc, char *argv[])
{
10000228: 1141 addi sp,sp,-16
1000022a: e406 sd ra,8(sp)
1000022c: e022 sd s0,0(sp)
1000022e: 0800 addi s0,sp,16
printk("cycles: %u hw cycles\n", k_cycle_get_32());
10000230: 1e0010ef jal ra,10001410 <k_cycle_get_32>
10000234: 0005059b sext.w a1,a0
10000238: 10004537 lui a0,0x10004
1000023c: 16050513 addi a0,a0,352 # 10004160 <__devconfig_end+0xf8>
10000240: 7f7010ef jal ra,10002236 <printk>
return 0;
}
10000244: 60a2 ld ra,8(sp)
10000246: 6402 ld s0,0(sp)
10000248: 4501 li a0,0
1000024a: 0141 addi sp,sp,16
1000024c: 8082 ret
000000001000024e <shell_cmd_uptime>:
{
1000024e: 1141 addi sp,sp,-16
10000250: e406 sd ra,8(sp)
10000252: e022 sd s0,0(sp)
10000254: 0800 addi s0,sp,16
printk("uptime: %u ms\n", k_uptime_get_32());
10000256: 001030ef jal ra,10003a56 <k_uptime_get_32>
1000025a: 0005059b sext.w a1,a0
1000025e: 10004537 lui a0,0x10004
10000262: 17850513 addi a0,a0,376 # 10004178 <__devconfig_end+0x110>
10000266: 7d1010ef jal ra,10002236 <printk>
}
1000026a: 60a2 ld ra,8(sp)
1000026c: 6402 ld s0,0(sp)
1000026e: 4501 li a0,0
10000270: 0141 addi sp,sp,16
10000272: 8082 ret
0000000010000274 <shell_cmd_version>:
{
10000274: 1141 addi sp,sp,-16
10000276: e406 sd ra,8(sp)
10000278: e022 sd s0,0(sp)
1000027a: 0800 addi s0,sp,16
uint32_t version = sys_kernel_version_get();
1000027c: 254010ef jal ra,100014d0 <sys_kernel_version_get>
10000280: 2501 sext.w a0,a0
SYS_KERNEL_VER_PATCHLEVEL(version));
10000282: 0085569b srliw a3,a0,0x8
SYS_KERNEL_VER_MINOR(version),
10000286: 0105561b srliw a2,a0,0x10
printk("Zephyr version %d.%d.%d\n",
1000028a: 0185559b srliw a1,a0,0x18
1000028e: 10004537 lui a0,0x10004
10000292: 18850513 addi a0,a0,392 # 10004188 <__devconfig_end+0x120>
10000296: 0ff6f693 andi a3,a3,255
1000029a: 0ff67613 andi a2,a2,255
1000029e: 2581 sext.w a1,a1
100002a0: 797010ef jal ra,10002236 <printk>
}
100002a4: 60a2 ld ra,8(sp)
100002a6: 6402 ld s0,0(sp)
100002a8: 4501 li a0,0
100002aa: 0141 addi sp,sp,16
100002ac: 8082 ret
00000000100002ae <get_destination_module>:
100002ae: 7179 addi sp,sp,-48
100002b0: ec26 sd s1,24(sp)
100002b2: 100057b7 lui a5,0x10005
100002b6: 100054b7 lui s1,0x10005
100002ba: 23078713 addi a4,a5,560 # 10005230 <__device_MICROKERNEL_start>
100002be: 26048493 addi s1,s1,608 # 10005260 <__shell_cmd_end>
100002c2: f022 sd s0,32(sp)
100002c4: e84a sd s2,16(sp)
100002c6: e44e sd s3,8(sp)
100002c8: e052 sd s4,0(sp)
100002ca: f406 sd ra,40(sp)
100002cc: 1800 addi s0,sp,48
100002ce: 8c99 sub s1,s1,a4
100002d0: 8a2a mv s4,a0
100002d2: 8491 srai s1,s1,0x4
100002d4: 4901 li s2,0
100002d6: 23078993 addi s3,a5,560
100002da: 00994c63 blt s2,s1,100002f2 <get_destination_module+0x44>
100002de: 597d li s2,-1
100002e0: 70a2 ld ra,40(sp)
100002e2: 7402 ld s0,32(sp)
100002e4: 854a mv a0,s2
100002e6: 64e2 ld s1,24(sp)
100002e8: 6942 ld s2,16(sp)
100002ea: 69a2 ld s3,8(sp)
100002ec: 6a02 ld s4,0(sp)
100002ee: 6145 addi sp,sp,48
100002f0: 8082 ret
100002f2: 00491793 slli a5,s2,0x4
100002f6: 97ce add a5,a5,s3
100002f8: 638c ld a1,0(a5)
100002fa: 4651 li a2,20
100002fc: 8552 mv a0,s4
100002fe: 52b010ef jal ra,10002028 <strncmp>
10000302: dd79 beqz a0,100002e0 <get_destination_module+0x32>
10000304: 2905 addiw s2,s2,1
10000306: bfd1 j 100002da <get_destination_module+0x2c>
0000000010000308 <set_default_module>:
10000308: 7179 addi sp,sp,-48
1000030a: f022 sd s0,32(sp)
1000030c: f406 sd ra,40(sp)
1000030e: 1800 addi s0,sp,48
10000310: ec26 sd s1,24(sp)
10000312: fca43c23 sd a0,-40(s0)
10000316: 4cf010ef jal ra,10001fe4 <strlen>
1000031a: 47d1 li a5,20
1000031c: fd843583 ld a1,-40(s0)
10000320: 00a7ff63 bleu a0,a5,1000033e <set_default_module+0x36>
10000324: 10004537 lui a0,0x10004
10000328: 22050513 addi a0,a0,544 # 10004220 <__devconfig_end+0x1b8>
1000032c: 70b010ef jal ra,10002236 <printk>
10000330: 54fd li s1,-1
10000332: 70a2 ld ra,40(sp)
10000334: 7402 ld s0,32(sp)
10000336: 8526 mv a0,s1
10000338: 64e2 ld s1,24(sp)
1000033a: 6145 addi sp,sp,48
1000033c: 8082 ret
1000033e: 852e mv a0,a1
10000340: fcb43c23 sd a1,-40(s0)
10000344: f6bff0ef jal ra,100002ae <get_destination_module>
10000348: 57fd li a5,-1
1000034a: 84aa mv s1,a0
1000034c: fd843583 ld a1,-40(s0)
10000350: 00f51963 bne a0,a5,10000362 <set_default_module+0x5a>
10000354: 10004537 lui a0,0x10004
10000358: 25850513 addi a0,a0,600 # 10004258 <__devconfig_end+0x1f0>
1000035c: 6db010ef jal ra,10002236 <printk>
10000360: bfc9 j 10000332 <set_default_module+0x2a>
10000362: 100057b7 lui a5,0x10005
10000366: 100054b7 lui s1,0x10005
1000036a: 26a7a023 sw a0,608(a5) # 10005260 <__shell_cmd_end>
1000036e: 4651 li a2,20
10000370: 5d848513 addi a0,s1,1496 # 100055d8 <default_module_prompt>
10000374: 419010ef jal ra,10001f8c <strncpy>
10000378: 100045b7 lui a1,0x10004
1000037c: 5d848513 addi a0,s1,1496
10000380: 28858593 addi a1,a1,648 # 10004288 <__devconfig_end+0x220>
10000384: 4d3010ef jal ra,10002056 <strcat>
10000388: 4481 li s1,0
1000038a: b765 j 10000332 <set_default_module+0x2a>
000000001000038c <set_module>:
1000038c: 4785 li a5,1
1000038e: 00f51963 bne a0,a5,100003a0 <set_module+0x14>
10000392: 100057b7 lui a5,0x10005
10000396: 577d li a4,-1
10000398: 26e7a023 sw a4,608(a5) # 10005260 <__shell_cmd_end>
1000039c: 4501 li a0,0
1000039e: 8082 ret
100003a0: 1141 addi sp,sp,-16
100003a2: e022 sd s0,0(sp)
100003a4: e406 sd ra,8(sp)
100003a6: 0800 addi s0,sp,16
100003a8: 6588 ld a0,8(a1)
100003aa: f5fff0ef jal ra,10000308 <set_default_module>
100003ae: 60a2 ld ra,8(sp)
100003b0: 6402 ld s0,0(sp)
100003b2: 4501 li a0,0
100003b4: 0141 addi sp,sp,16
100003b6: 8082 ret
00000000100003b8 <get_prompt>:
100003b8: 1000a7b7 lui a5,0x1000a
100003bc: d107b783 ld a5,-752(a5) # 10009d10 <app_prompt_handler>
100003c0: ef89 bnez a5,100003da <get_prompt+0x22>
100003c2: 100057b7 lui a5,0x10005
100003c6: 2607a703 lw a4,608(a5) # 10005260 <__shell_cmd_end>
100003ca: 57fd li a5,-1
100003cc: 04f71163 bne a4,a5,1000040e <get_prompt+0x56>
100003d0: 1000a7b7 lui a5,0x1000a
100003d4: d187b503 ld a0,-744(a5) # 10009d18 <prompt>
100003d8: 8082 ret
100003da: 1141 addi sp,sp,-16
100003dc: e022 sd s0,0(sp)
100003de: e406 sd ra,8(sp)
100003e0: 0800 addi s0,sp,16
100003e2: 9782 jalr a5
100003e4: ed01 bnez a0,100003fc <get_prompt+0x44>
100003e6: 100057b7 lui a5,0x10005
100003ea: 2607a703 lw a4,608(a5) # 10005260 <__shell_cmd_end>
100003ee: 57fd li a5,-1
100003f0: 00f71a63 bne a4,a5,10000404 <get_prompt+0x4c>
100003f4: 1000a7b7 lui a5,0x1000a
100003f8: d187b503 ld a0,-744(a5) # 10009d18 <prompt>
100003fc: 60a2 ld ra,8(sp)
100003fe: 6402 ld s0,0(sp)
10000400: 0141 addi sp,sp,16
10000402: 8082 ret
10000404: 10005537 lui a0,0x10005
10000408: 5d850513 addi a0,a0,1496 # 100055d8 <default_module_prompt>
1000040c: bfc5 j 100003fc <get_prompt+0x44>
1000040e: 10005537 lui a0,0x10005
10000412: 5d850513 addi a0,a0,1496 # 100055d8 <default_module_prompt>
10000416: 8082 ret
0000000010000418 <get_command_and_module>:
10000418: 7139 addi sp,sp,-64
1000041a: f822 sd s0,48(sp)
1000041c: f426 sd s1,40(sp)
1000041e: fc06 sd ra,56(sp)
10000420: f04a sd s2,32(sp)
10000422: ec4e sd s3,24(sp)
10000424: 0080 addi s0,sp,64
10000426: 6104 ld s1,0(a0)
10000428: 57fd li a5,-1
1000042a: c19c sw a5,0(a1)
1000042c: ec99 bnez s1,1000044a <get_command_and_module+0x32>
1000042e: 10004537 lui a0,0x10004
10000432: 1d050513 addi a0,a0,464 # 100041d0 <__devconfig_end+0x168>
10000436: 601010ef jal ra,10002236 <printk>
1000043a: 70e2 ld ra,56(sp)
1000043c: 7442 ld s0,48(sp)
1000043e: 8526 mv a0,s1
10000440: 7902 ld s2,32(sp)
10000442: 74a2 ld s1,40(sp)
10000444: 69e2 ld s3,24(sp)
10000446: 6121 addi sp,sp,64
10000448: 8082 ret
1000044a: 100057b7 lui a5,0x10005
1000044e: 2607a983 lw s3,608(a5) # 10005260 <__shell_cmd_end>
10000452: 57fd li a5,-1
10000454: 04f99563 bne s3,a5,1000049e <get_command_and_module+0x86>
10000458: 651c ld a5,8(a0)
1000045a: 892a mv s2,a0
1000045c: c781 beqz a5,10000464 <get_command_and_module+0x4c>
1000045e: 0007c783 lbu a5,0(a5)
10000462: eb91 bnez a5,10000476 <get_command_and_module+0x5e>
10000464: 10004537 lui a0,0x10004
10000468: 85a6 mv a1,s1
1000046a: 1e850513 addi a0,a0,488 # 100041e8 <__devconfig_end+0x180>
1000046e: 5c9010ef jal ra,10002236 <printk>
10000472: 4481 li s1,0
10000474: b7d9 j 1000043a <get_command_and_module+0x22>
10000476: 8526 mv a0,s1
10000478: fcb43423 sd a1,-56(s0)
1000047c: e33ff0ef jal ra,100002ae <get_destination_module>
10000480: fc843583 ld a1,-56(s0)
10000484: c188 sw a0,0(a1)
10000486: 01351963 bne a0,s3,10000498 <get_command_and_module+0x80>
1000048a: 10004537 lui a0,0x10004
1000048e: 00093583 ld a1,0(s2)
10000492: 20850513 addi a0,a0,520 # 10004208 <__devconfig_end+0x1a0>
10000496: bfe1 j 1000046e <get_command_and_module+0x56>
10000498: 00893483 ld s1,8(s2)
1000049c: bf79 j 1000043a <get_command_and_module+0x22>
1000049e: 0135a023 sw s3,0(a1)
100004a2: bf61 j 1000043a <get_command_and_module+0x22>
00000000100004a4 <completion>:
100004a4: 04400793 li a5,68
100004a8: 00b7f463 bleu a1,a5,100004b0 <completion+0xc>
100004ac: 4501 li a0,0
100004ae: 8082 ret
100004b0: 7175 addi sp,sp,-144
100004b2: e122 sd s0,128(sp)
100004b4: fca6 sd s1,120(sp)
100004b6: f8ca sd s2,112(sp)
100004b8: f4ce sd s3,104(sp)
100004ba: e506 sd ra,136(sp)
100004bc: f0d2 sd s4,96(sp)
100004be: ecd6 sd s5,88(sp)
100004c0: e8da sd s6,80(sp)
100004c2: e4de sd s7,72(sp)
100004c4: e0e2 sd s8,64(sp)
100004c6: fc66 sd s9,56(sp)
100004c8: f86a sd s10,48(sp)
100004ca: f46e sd s11,40(sp)
100004cc: 0900 addi s0,sp,144
100004ce: 00b507b3 add a5,a0,a1
100004d2: 89aa mv s3,a0
100004d4: 892e mv s2,a1
100004d6: 00078023 sb zero,0(a5)
100004da: 84aa mv s1,a0
100004dc: 02000713 li a4,32
100004e0: 0004c783 lbu a5,0(s1)
100004e4: 02e78363 beq a5,a4,1000050a <completion+0x66>
100004e8: e39d bnez a5,1000050e <completion+0x6a>
100004ea: 4501 li a0,0
100004ec: 60aa ld ra,136(sp)
100004ee: 640a ld s0,128(sp)
100004f0: 74e6 ld s1,120(sp)
100004f2: 7946 ld s2,112(sp)
100004f4: 79a6 ld s3,104(sp)
100004f6: 7a06 ld s4,96(sp)
100004f8: 6ae6 ld s5,88(sp)
100004fa: 6b46 ld s6,80(sp)
100004fc: 6ba6 ld s7,72(sp)
100004fe: 6c06 ld s8,64(sp)
10000500: 7ce2 ld s9,56(sp)
10000502: 7d42 ld s10,48(sp)
10000504: 7da2 ld s11,40(sp)
10000506: 6149 addi sp,sp,144
10000508: 8082 ret
1000050a: 0485 addi s1,s1,1
1000050c: bfd1 j 100004e0 <completion+0x3c>
1000050e: 100057b7 lui a5,0x10005
10000512: 2607ac83 lw s9,608(a5) # 10005260 <__shell_cmd_end>
10000516: 577d li a4,-1
10000518: 26078b13 addi s6,a5,608
1000051c: 00ec8363 beq s9,a4,10000522 <completion+0x7e>
10000520: 8aa6 mv s5,s1
10000522: 02000593 li a1,32
10000526: 8526 mv a0,s1
10000528: 29b010ef jal ra,10001fc2 <strchr>
1000052c: 000b2b03 lw s6,0(s6)
10000530: 57fd li a5,-1
10000532: 8a2a mv s4,a0
10000534: 00fb0663 beq s6,a5,10000540 <completion+0x9c>
10000538: f94d bnez a0,100004ea <completion+0x46>
1000053a: fafc88e3 beq s9,a5,100004ea <completion+0x46>
1000053e: a091 j 10000582 <completion+0xde>
10000540: d54d beqz a0,100004ea <completion+0x46>
10000542: 40950ab3 sub s5,a0,s1
10000546: 001a8613 addi a2,s5,1
1000054a: 47cd li a5,19
1000054c: f8c7cfe3 blt a5,a2,100004ea <completion+0x46>
10000550: 85a6 mv a1,s1
10000552: f7840513 addi a0,s0,-136
10000556: 237010ef jal ra,10001f8c <strncpy>
1000055a: f9040793 addi a5,s0,-112
1000055e: 9abe add s5,s5,a5
10000560: f7840513 addi a0,s0,-136
10000564: fe0a8423 sb zero,-24(s5)
10000568: d47ff0ef jal ra,100002ae <get_destination_module>
1000056c: 8caa mv s9,a0
1000056e: f7650ee3 beq a0,s6,100004ea <completion+0x46>
10000572: 001a0a93 addi s5,s4,1
10000576: 02000593 li a1,32
1000057a: 8556 mv a0,s5
1000057c: 247010ef jal ra,10001fc2 <strchr>
10000580: f52d bnez a0,100004ea <completion+0x46>
10000582: 8556 mv a0,s5
10000584: 261010ef jal ra,10001fe4 <strlen>
10000588: 10005737 lui a4,0x10005
1000058c: 0c92 slli s9,s9,0x4
1000058e: 23070713 addi a4,a4,560 # 10005230 <__device_MICROKERNEL_start>
10000592: 01970db3 add s11,a4,s9
10000596: 8baa mv s7,a0
10000598: 00050a1b sext.w s4,a0
1000059c: 4b01 li s6,0
1000059e: 5c7d li s8,-1
100005a0: 4481 li s1,0
100005a2: 8cee mv s9,s11
100005a4: 47e1 li a5,24
100005a6: 02fb0d33 mul s10,s6,a5
100005aa: 008db683 ld a3,8(s11)
100005ae: 96ea add a3,a3,s10
100005b0: 628c ld a1,0(a3)
100005b2: eda1 bnez a1,1000060a <completion+0x166>
100005b4: d89d beqz s1,100004ea <completion+0x46>
100005b6: 0c0c4463 bltz s8,1000067e <completion+0x1da>
100005ba: dffff0ef jal ra,100003b8 <get_prompt>
100005be: 10004ab7 lui s5,0x10004
100005c2: 85aa mv a1,a0
100005c4: 1b8a8513 addi a0,s5,440 # 100041b8 <__devconfig_end+0x150>
100005c8: 46f010ef jal ra,10002236 <printk>
100005cc: 1b8a8513 addi a0,s5,440
100005d0: 85ce mv a1,s3
100005d2: 465010ef jal ra,10002236 <printk>
100005d6: 4a81 li s5,0
100005d8: 94d2 add s1,s1,s4
100005da: 10004b37 lui s6,0x10004
100005de: 0b8a4763 blt s4,s8,1000068c <completion+0x1e8>
100005e2: 000a8d63 beqz s5,100005fc <completion+0x158>
100005e6: 10004537 lui a0,0x10004
100005ea: 1c850513 addi a0,a0,456 # 100041c8 <__devconfig_end+0x160>
100005ee: 449010ef jal ra,10002236 <printk>
100005f2: 994e add s2,s2,s3
100005f4: 02000713 li a4,32
100005f8: 00e90023 sb a4,0(s2)
100005fc: 015c053b addw a0,s8,s5
10000600: 4175053b subw a0,a0,s7
10000604: 0ff57513 andi a0,a0,255
10000608: b5d5 j 100004ec <completion+0x48>
1000060a: 8652 mv a2,s4
1000060c: 8556 mv a0,s5
1000060e: 21b010ef jal ra,10002028 <strncmp>
10000612: e901 bnez a0,10000622 <completion+0x17e>
10000614: e889 bnez s1,10000626 <completion+0x182>
10000616: 008db683 ld a3,8(s11)
1000061a: 01a68833 add a6,a3,s10
1000061e: 00083483 ld s1,0(a6)
10000622: 2b05 addiw s6,s6,1
10000624: b741 j 100005a4 <completion+0x100>
10000626: 000c5e63 bgez s8,10000642 <completion+0x19e>
1000062a: 100047b7 lui a5,0x10004
1000062e: 1a878513 addi a0,a5,424 # 100041a8 <__devconfig_end+0x140>
10000632: 85a6 mv a1,s1
10000634: 403010ef jal ra,10002236 <printk>
10000638: 8526 mv a0,s1
1000063a: 1ab010ef jal ra,10001fe4 <strlen>
1000063e: 00050c1b sext.w s8,a0
10000642: 008cb683 ld a3,8(s9)
10000646: 01a68833 add a6,a3,s10
1000064a: 00083583 ld a1,0(a6)
1000064e: 4681 li a3,0
10000650: 00068d1b sext.w s10,a3
10000654: 018d5d63 ble s8,s10,1000066e <completion+0x1ca>
10000658: 00d48533 add a0,s1,a3
1000065c: 00054803 lbu a6,0(a0)
10000660: 00d58533 add a0,a1,a3
10000664: 00054503 lbu a0,0(a0)
10000668: 0685 addi a3,a3,1
1000066a: fea803e3 beq a6,a0,10000650 <completion+0x1ac>
1000066e: 100047b7 lui a5,0x10004
10000672: 1b078513 addi a0,a5,432 # 100041b0 <__devconfig_end+0x148>
10000676: 3c1010ef jal ra,10002236 <printk>
1000067a: 8c6a mv s8,s10
1000067c: b75d j 10000622 <completion+0x17e>
1000067e: 8526 mv a0,s1
10000680: 165010ef jal ra,10001fe4 <strlen>
10000684: 00050c1b sext.w s8,a0
10000688: 4a85 li s5,1
1000068a: b7b9 j 100005d8 <completion+0x134>
1000068c: 0004c583 lbu a1,0(s1)
10000690: 1c0b0513 addi a0,s6,448 # 100041c0 <__devconfig_end+0x158>
10000694: 2a05 addiw s4,s4,1
10000696: 3a1010ef jal ra,10002236 <printk>
1000069a: 0004c683 lbu a3,0(s1)
1000069e: 0019071b addiw a4,s2,1
100006a2: 994e add s2,s2,s3
100006a4: 00d90023 sb a3,0(s2)
100006a8: 0485 addi s1,s1,1
100006aa: 0ff77913 andi s2,a4,255
100006ae: bf05 j 100005de <completion+0x13a>
00000000100006b0 <show_cmd_help>:
100006b0: 715d addi sp,sp,-80
100006b2: e0a2 sd s0,64(sp)
100006b4: f052 sd s4,32(sp)
100006b6: 0880 addi s0,sp,80
100006b8: e486 sd ra,72(sp)
100006ba: fc26 sd s1,56(sp)
100006bc: f84a sd s2,48(sp)
100006be: f44e sd s3,40(sp)
100006c0: ec56 sd s5,24(sp)
100006c2: e85a sd s6,16(sp)
100006c4: 57fd li a5,-1
100006c6: fbc40593 addi a1,s0,-68
100006ca: faf42e23 sw a5,-68(s0)
100006ce: 8a2a mv s4,a0
100006d0: d49ff0ef jal ra,10000418 <get_command_and_module>
100006d4: fbc42783 lw a5,-68(s0)
100006d8: 577d li a4,-1
100006da: 04e78e63 beq a5,a4,10000736 <show_cmd_help+0x86>
100006de: 8aaa mv s5,a0
100006e0: c939 beqz a0,10000736 <show_cmd_help+0x86>
100006e2: 100054b7 lui s1,0x10005
100006e6: 0792 slli a5,a5,0x4
100006e8: 23048493 addi s1,s1,560 # 10005230 <__device_MICROKERNEL_start>
100006ec: 4901 li s2,0
100006ee: 4b61 li s6,24
100006f0: 94be add s1,s1,a5
100006f2: 036909b3 mul s3,s2,s6
100006f6: 6498 ld a4,8(s1)
100006f8: 974e add a4,a4,s3
100006fa: 630c ld a1,0(a4)
100006fc: e991 bnez a1,10000710 <show_cmd_help+0x60>
100006fe: 000a3583 ld a1,0(s4)
10000702: 10004537 lui a0,0x10004
10000706: 1e850513 addi a0,a0,488 # 100041e8 <__devconfig_end+0x180>
1000070a: 32d010ef jal ra,10002236 <printk>
1000070e: a025 j 10000736 <show_cmd_help+0x86>
10000710: 8556 mv a0,s5
10000712: 0f1010ef jal ra,10002002 <strcmp>
10000716: e91d bnez a0,1000074c <show_cmd_help+0x9c>
10000718: 649c ld a5,8(s1)
1000071a: 97ce add a5,a5,s3
1000071c: 6b90 ld a2,16(a5)
1000071e: 638c ld a1,0(a5)
10000720: e609 bnez a2,1000072a <show_cmd_help+0x7a>
10000722: 10005637 lui a2,0x10005
10000726: c3860613 addi a2,a2,-968 # 10004c38 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x850>
1000072a: 10004537 lui a0,0x10004
1000072e: 32850513 addi a0,a0,808 # 10004328 <__devconfig_end+0x2c0>
10000732: 305010ef jal ra,10002236 <printk>
10000736: 60a6 ld ra,72(sp)
10000738: 6406 ld s0,64(sp)
1000073a: 74e2 ld s1,56(sp)
1000073c: 7942 ld s2,48(sp)
1000073e: 79a2 ld s3,40(sp)
10000740: 7a02 ld s4,32(sp)
10000742: 6ae2 ld s5,24(sp)
10000744: 6b42 ld s6,16(sp)
10000746: 4501 li a0,0
10000748: 6161 addi sp,sp,80
1000074a: 8082 ret
1000074c: 2905 addiw s2,s2,1
1000074e: b755 j 100006f2 <show_cmd_help+0x42>
0000000010000750 <show_help>:
10000750: 4789 li a5,2
10000752: 10a7c163 blt a5,a0,10000854 <show_help+0x104>
10000756: 7179 addi sp,sp,-48
10000758: f022 sd s0,32(sp)
1000075a: ec26 sd s1,24(sp)
1000075c: e84a sd s2,16(sp)
1000075e: e44e sd s3,8(sp)
10000760: f406 sd ra,40(sp)
10000762: e052 sd s4,0(sp)
10000764: 1800 addi s0,sp,48
10000766: 10005737 lui a4,0x10005
1000076a: 26072483 lw s1,608(a4) # 10005260 <__shell_cmd_end>
1000076e: 577d li a4,-1
10000770: 892e mv s2,a1
10000772: 89a6 mv s3,s1
10000774: 0ae48663 beq s1,a4,10000820 <show_help+0xd0>
10000778: 00f51d63 bne a0,a5,10000792 <show_help+0x42>
1000077c: 7402 ld s0,32(sp)
1000077e: 70a2 ld ra,40(sp)
10000780: 64e2 ld s1,24(sp)
10000782: 6942 ld s2,16(sp)
10000784: 69a2 ld s3,8(sp)
10000786: 6a02 ld s4,0(sp)
10000788: 00858513 addi a0,a1,8
1000078c: 6145 addi sp,sp,48
1000078e: f23ff06f j 100006b0 <show_cmd_help>
10000792: 4785 li a5,1
10000794: 02f51e63 bne a0,a5,100007d0 <show_help+0x80>
10000798: 10004537 lui a0,0x10004
1000079c: 33050513 addi a0,a0,816 # 10004330 <__devconfig_end+0x2c8>
100007a0: 297010ef jal ra,10002236 <printk>
100007a4: 100057b7 lui a5,0x10005
100007a8: 0492 slli s1,s1,0x4
100007aa: 23078793 addi a5,a5,560 # 10005230 <__device_MICROKERNEL_start>
100007ae: 4901 li s2,0
100007b0: 94be add s1,s1,a5
100007b2: 49e1 li s3,24
100007b4: 10004a37 lui s4,0x10004
100007b8: 03390733 mul a4,s2,s3
100007bc: 649c ld a5,8(s1)
100007be: 97ba add a5,a5,a4
100007c0: 638c ld a1,0(a5)
100007c2: c1c1 beqz a1,10000842 <show_help+0xf2>
100007c4: 1b0a0513 addi a0,s4,432 # 100041b0 <__devconfig_end+0x148>
100007c8: 26f010ef jal ra,10002236 <printk>
100007cc: 2905 addiw s2,s2,1
100007ce: b7ed j 100007b8 <show_help+0x68>
100007d0: 10004537 lui a0,0x10004
100007d4: 33850513 addi a0,a0,824 # 10004338 <__devconfig_end+0x2d0>
100007d8: 25f010ef jal ra,10002236 <printk>
100007dc: 100057b7 lui a5,0x10005
100007e0: 100054b7 lui s1,0x10005
100007e4: 23078713 addi a4,a5,560 # 10005230 <__device_MICROKERNEL_start>
100007e8: 26048493 addi s1,s1,608 # 10005260 <__shell_cmd_end>
100007ec: 8c99 sub s1,s1,a4
100007ee: 8491 srai s1,s1,0x4
100007f0: 4901 li s2,0
100007f2: 23078993 addi s3,a5,560
100007f6: 10004a37 lui s4,0x10004
100007fa: 00994963 blt s2,s1,1000080c <show_help+0xbc>
100007fe: 10004537 lui a0,0x10004
10000802: 35050513 addi a0,a0,848 # 10004350 <__devconfig_end+0x2e8>
10000806: 231010ef jal ra,10002236 <printk>
1000080a: a825 j 10000842 <show_help+0xf2>
1000080c: 00491793 slli a5,s2,0x4
10000810: 97ce add a5,a5,s3
10000812: 638c ld a1,0(a5)
10000814: 1b0a0513 addi a0,s4,432 # 100041b0 <__devconfig_end+0x148>
10000818: 2905 addiw s2,s2,1
1000081a: 21d010ef jal ra,10002236 <printk>
1000081e: bff1 j 100007fa <show_help+0xaa>
10000820: faf518e3 bne a0,a5,100007d0 <show_help+0x80>
10000824: 00893503 ld a0,8(s2)
10000828: a87ff0ef jal ra,100002ae <get_destination_module>
1000082c: 84aa mv s1,a0
1000082e: f73515e3 bne a0,s3,10000798 <show_help+0x48>
10000832: 00893583 ld a1,8(s2)
10000836: 10004537 lui a0,0x10004
1000083a: 20850513 addi a0,a0,520 # 10004208 <__devconfig_end+0x1a0>
1000083e: 1f9010ef jal ra,10002236 <printk>
10000842: 70a2 ld ra,40(sp)
10000844: 7402 ld s0,32(sp)
10000846: 64e2 ld s1,24(sp)
10000848: 6942 ld s2,16(sp)
1000084a: 69a2 ld s3,8(sp)
1000084c: 6a02 ld s4,0(sp)
1000084e: 4501 li a0,0
10000850: 6145 addi sp,sp,48
10000852: 8082 ret
10000854: 00858513 addi a0,a1,8
10000858: bf1d j 1000078e <show_help+0x3e>
000000001000085a <shell>:
1000085a: 7115 addi sp,sp,-224
1000085c: e9a2 sd s0,208(sp)
1000085e: fd4e sd s3,184(sp)
10000860: f556 sd s5,168(sp)
10000862: f15a sd s6,160(sp)
10000864: ed5e sd s7,152(sp)
10000866: e962 sd s8,144(sp)
10000868: ed86 sd ra,216(sp)
1000086a: e5a6 sd s1,200(sp)
1000086c: e1ca sd s2,192(sp)
1000086e: f952 sd s4,176(sp)
10000870: e566 sd s9,136(sp)
10000872: e16a sd s10,128(sp)
10000874: fcee sd s11,120(sp)
10000876: 1180 addi s0,sp,224
10000878: 10000ab7 lui s5,0x10000
1000087c: 100009b7 lui s3,0x10000
10000880: 10005b37 lui s6,0x10005
10000884: 10004bb7 lui s7,0x10004
10000888: 10005c37 lui s8,0x10005
1000088c: 750a8a93 addi s5,s5,1872 # 10000750 <show_help>
10000890: 38c98993 addi s3,s3,908 # 1000038c <set_module>
10000894: 230b0b13 addi s6,s6,560 # 10005230 <__device_MICROKERNEL_start>
10000898: b21ff0ef jal ra,100003b8 <get_prompt>
1000089c: 85aa mv a1,a0
1000089e: 1b8b8513 addi a0,s7,440 # 100041b8 <__devconfig_end+0x150>
100008a2: 195010ef jal ra,10002236 <printk>
100008a6: 55fd li a1,-1
100008a8: 5b8c0513 addi a0,s8,1464 # 100055b8 <cmds_queue>
100008ac: 3f9020ef jal ra,100034a4 <k_fifo_get>
100008b0: 00850493 addi s1,a0,8
100008b4: 892a mv s2,a0
100008b6: 8526 mv a0,s1
100008b8: 72c010ef jal ra,10001fe4 <strlen>
100008bc: 02000713 li a4,32
100008c0: e911 bnez a0,100008d4 <shell+0x7a>
100008c2: 10005537 lui a0,0x10005
100008c6: 85ca mv a1,s2
100008c8: 28050513 addi a0,a0,640 # 10005280 <__data_ram_end>
100008cc: 337020ef jal ra,10003402 <k_fifo_put>
100008d0: b7e1 j 10000898 <shell+0x3e>
100008d2: 0485 addi s1,s1,1
100008d4: 0004c783 lbu a5,0(s1)
100008d8: fee78de3 beq a5,a4,100008d2 <shell+0x78>
100008dc: d3fd beqz a5,100008c2 <shell+0x68>
100008de: f3840c93 addi s9,s0,-200
100008e2: f2943c23 sd s1,-200(s0)
100008e6: 4d05 li s10,1
100008e8: 8a66 mv s4,s9
100008ea: 4dad li s11,11
100008ec: 02000593 li a1,32
100008f0: 8526 mv a0,s1
100008f2: 6d0010ef jal ra,10001fc2 <strchr>
100008f6: cd01 beqz a0,1000090e <shell+0xb4>
100008f8: 00150493 addi s1,a0,1
100008fc: 00050023 sb zero,0(a0)
10000900: 02000713 li a4,32
10000904: 0004c783 lbu a5,0(s1)
10000908: 04e78c63 beq a5,a4,10000960 <shell+0x106>
1000090c: efa1 bnez a5,10000964 <shell+0x10a>
1000090e: 003d1793 slli a5,s10,0x3
10000912: f9040713 addi a4,s0,-112
10000916: 97ba add a5,a5,a4
10000918: fa07b423 sd zero,-88(a5)
1000091c: f3843483 ld s1,-200(s0)
10000920: 57fd li a5,-1
10000922: f2f42a23 sw a5,-204(s0)
10000926: 000d0c9b sext.w s9,s10
1000092a: e8b9 bnez s1,10000980 <shell+0x126>
1000092c: 10004537 lui a0,0x10004
10000930: 2b050513 addi a0,a0,688 # 100042b0 <__devconfig_end+0x248>
10000934: 103010ef jal ra,10002236 <printk>
10000938: 1000a7b7 lui a5,0x1000a
1000093c: d087b783 ld a5,-760(a5) # 10009d08 <_end>
10000940: ebe9 bnez a5,10000a12 <shell+0x1b8>
10000942: f3843583 ld a1,-200(s0)
10000946: 10004537 lui a0,0x10004
1000094a: 1e850513 addi a0,a0,488 # 100041e8 <__devconfig_end+0x180>
1000094e: 0e9010ef jal ra,10002236 <printk>
10000952: 10004537 lui a0,0x10004
10000956: 2f850513 addi a0,a0,760 # 100042f8 <__devconfig_end+0x290>
1000095a: 0dd010ef jal ra,10002236 <printk>
1000095e: b795 j 100008c2 <shell+0x68>
10000960: 0485 addi s1,s1,1
10000962: b74d j 10000904 <shell+0xaa>
10000964: 009cb423 sd s1,8(s9)
10000968: 0d05 addi s10,s10,1
1000096a: 0ca1 addi s9,s9,8
1000096c: f9bd10e3 bne s10,s11,100008ec <shell+0x92>
10000970: 10004537 lui a0,0x10004
10000974: 45a9 li a1,10
10000976: 29050513 addi a0,a0,656 # 10004290 <__devconfig_end+0x228>
1000097a: 0bd010ef jal ra,10002236 <printk>
1000097e: b791 j 100008c2 <shell+0x68>
10000980: 0004c783 lbu a5,0(s1)
10000984: d7c5 beqz a5,1000092c <shell+0xd2>
10000986: 100045b7 lui a1,0x10004
1000098a: 2c858593 addi a1,a1,712 # 100042c8 <__devconfig_end+0x260>
1000098e: 8526 mv a0,s1
10000990: 672010ef jal ra,10002002 <strcmp>
10000994: 87d6 mv a5,s5
10000996: cd35 beqz a0,10000a12 <shell+0x1b8>
10000998: 100045b7 lui a1,0x10004
1000099c: 2d058593 addi a1,a1,720 # 100042d0 <__devconfig_end+0x268>
100009a0: 8526 mv a0,s1
100009a2: 660010ef jal ra,10002002 <strcmp>
100009a6: c149 beqz a0,10000a28 <shell+0x1ce>
100009a8: 4785 li a5,1
100009aa: 00fd1e63 bne s10,a5,100009c6 <shell+0x16c>
100009ae: 100057b7 lui a5,0x10005
100009b2: 2607a703 lw a4,608(a5) # 10005260 <__shell_cmd_end>
100009b6: 57fd li a5,-1
100009b8: 00f71763 bne a4,a5,100009c6 <shell+0x16c>
100009bc: 10004537 lui a0,0x10004
100009c0: 2e050513 addi a0,a0,736 # 100042e0 <__devconfig_end+0x278>
100009c4: bf85 j 10000934 <shell+0xda>
100009c6: f3440593 addi a1,s0,-204
100009ca: 8552 mv a0,s4
100009cc: a4dff0ef jal ra,10000418 <get_command_and_module>
100009d0: f3442483 lw s1,-204(s0)
100009d4: 57fd li a5,-1
100009d6: 872a mv a4,a0
100009d8: f6f480e3 beq s1,a5,10000938 <shell+0xde>
100009dc: dd31 beqz a0,10000938 <shell+0xde>
100009de: 0492 slli s1,s1,0x4
100009e0: 4d01 li s10,0
100009e2: 46e1 li a3,24
100009e4: 94da add s1,s1,s6
100009e6: 02dd0db3 mul s11,s10,a3
100009ea: 649c ld a5,8(s1)
100009ec: 97ee add a5,a5,s11
100009ee: 638c ld a1,0(a5)
100009f0: d5a1 beqz a1,10000938 <shell+0xde>
100009f2: 853a mv a0,a4
100009f4: f2d43023 sd a3,-224(s0)
100009f8: f2e43423 sd a4,-216(s0)
100009fc: 606010ef jal ra,10002002 <strcmp>
10000a00: f2843703 ld a4,-216(s0)
10000a04: f2043683 ld a3,-224(s0)
10000a08: ed11 bnez a0,10000a24 <shell+0x1ca>
10000a0a: 649c ld a5,8(s1)
10000a0c: 97ee add a5,a5,s11
10000a0e: 679c ld a5,8(a5)
10000a10: d785 beqz a5,10000938 <shell+0xde>
10000a12: 85d2 mv a1,s4
10000a14: 8566 mv a0,s9
10000a16: 9782 jalr a5
10000a18: ea0555e3 bgez a0,100008c2 <shell+0x68>
10000a1c: 8552 mv a0,s4
10000a1e: c93ff0ef jal ra,100006b0 <show_cmd_help>
10000a22: b545 j 100008c2 <shell+0x68>
10000a24: 2d05 addiw s10,s10,1
10000a26: b7c1 j 100009e6 <shell+0x18c>
10000a28: 87ce mv a5,s3
10000a2a: b7e5 j 10000a12 <shell+0x1b8>
0000000010000a2c <shell_init>:
return common_chars - command_len + space;
}
void shell_init(const char *str)
{
10000a2c: 7139 addi sp,sp,-64
10000a2e: fc06 sd ra,56(sp)
10000a30: f822 sd s0,48(sp)
10000a32: f426 sd s1,40(sp)
10000a34: 0080 addi s0,sp,64
10000a36: f04a sd s2,32(sp)
10000a38: ec4e sd s3,24(sp)
10000a3a: e852 sd s4,16(sp)
k_fifo_init(&cmds_queue);
10000a3c: 100059b7 lui s3,0x10005
{
10000a40: 892a mv s2,a0
k_fifo_init(&cmds_queue);
10000a42: 5b898513 addi a0,s3,1464 # 100055b8 <cmds_queue>
k_fifo_init(&avail_queue);
10000a46: 100054b7 lui s1,0x10005
k_fifo_init(&cmds_queue);
10000a4a: 1a1020ef jal ra,100033ea <k_fifo_init>
k_fifo_init(&avail_queue);
10000a4e: 28048513 addi a0,s1,640 # 10005280 <__data_ram_end>
10000a52: 199020ef jal ra,100033ea <k_fifo_init>
k_fifo_put(&avail_queue, &buf[i]);
10000a56: 100055b7 lui a1,0x10005
10000a5a: 2a058a13 addi s4,a1,672 # 100052a0 <buf>
10000a5e: 28048513 addi a0,s1,640
10000a62: 2a058593 addi a1,a1,672
10000a66: 19d020ef jal ra,10003402 <k_fifo_put>
10000a6a: 108a0593 addi a1,s4,264
10000a6e: 28048513 addi a0,s1,640
10000a72: 191020ef jal ra,10003402 <k_fifo_put>
10000a76: 210a0593 addi a1,s4,528
10000a7a: 28048513 addi a0,s1,640
10000a7e: 185020ef jal ra,10003402 <k_fifo_put>
line_queue_init();
prompt = str ? str : "";
10000a82: 00091663 bnez s2,10000a8e <shell_init+0x62>
10000a86: 10005937 lui s2,0x10005
10000a8a: c3890913 addi s2,s2,-968 # 10004c38 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x850>
10000a8e: 1000a7b7 lui a5,0x1000a
k_thread_spawn(stack, STACKSIZE, shell, NULL, NULL, NULL,
10000a92: 10001637 lui a2,0x10001
10000a96: 10005537 lui a0,0x10005
prompt = str ? str : "";
10000a9a: d127bc23 sd s2,-744(a5) # 10009d18 <prompt>
k_thread_spawn(stack, STACKSIZE, shell, NULL, NULL, NULL,
10000a9e: e002 sd zero,0(sp)
10000aa0: 85a60613 addi a2,a2,-1958 # 1000085a <shell>
10000aa4: 7d000593 li a1,2000
10000aa8: 4881 li a7,0
10000aaa: 585d li a6,-9
10000aac: 4781 li a5,0
10000aae: 4701 li a4,0
10000ab0: 4681 li a3,0
10000ab2: 5f050513 addi a0,a0,1520 # 100055f0 <stack>
10000ab6: 2d0030ef jal ra,10003d86 <k_thread_spawn>
K_PRIO_COOP(7), 0, K_NO_WAIT);
/* Register serial console handler */
uart_register_input(&avail_queue, &cmds_queue, completion);
}
10000aba: 7442 ld s0,48(sp)
10000abc: 70e2 ld ra,56(sp)
10000abe: 7902 ld s2,32(sp)
10000ac0: 6a42 ld s4,16(sp)
uart_register_input(&avail_queue, &cmds_queue, completion);
10000ac2: 5b898593 addi a1,s3,1464
10000ac6: 28048513 addi a0,s1,640
}
10000aca: 69e2 ld s3,24(sp)
10000acc: 74a2 ld s1,40(sp)
uart_register_input(&avail_queue, &cmds_queue, completion);
10000ace: 10000637 lui a2,0x10000
10000ad2: 4a460613 addi a2,a2,1188 # 100004a4 <completion>
}
10000ad6: 6121 addi sp,sp,64
uart_register_input(&avail_queue, &cmds_queue, completion);
10000ad8: 5740006f j 1000104c <uart_register_input>
0000000010000adc <uart_poll_out>:
10000adc: 1141 addi sp,sp,-16
10000ade: e422 sd s0,8(sp)
10000ae0: 0800 addi s0,sp,16
10000ae2: 651c ld a5,8(a0)
10000ae4: 6422 ld s0,8(sp)
10000ae6: 0087b303 ld t1,8(a5)
10000aea: 0141 addi sp,sp,16
10000aec: 8302 jr t1
0000000010000aee <uart_irq_rx_disable>:
10000aee: 1141 addi sp,sp,-16
10000af0: e422 sd s0,8(sp)
10000af2: 0800 addi s0,sp,16
10000af4: 651c ld a5,8(a0)
10000af6: 0487b303 ld t1,72(a5)
10000afa: 00030563 beqz t1,10000b04 <uart_irq_rx_disable+0x16>
10000afe: 6422 ld s0,8(sp)
10000b00: 0141 addi sp,sp,16
10000b02: 8302 jr t1
10000b04: 6422 ld s0,8(sp)
10000b06: 0141 addi sp,sp,16
10000b08: 8082 ret
0000000010000b0a <console_out>:
10000b0a: 1101 addi sp,sp,-32
10000b0c: e822 sd s0,16(sp)
10000b0e: e426 sd s1,8(sp)
10000b10: e04a sd s2,0(sp)
10000b12: ec06 sd ra,24(sp)
10000b14: 1000 addi s0,sp,32
10000b16: 1000a4b7 lui s1,0x1000a
10000b1a: 47a9 li a5,10
10000b1c: 892a mv s2,a0
10000b1e: d5048493 addi s1,s1,-688 # 10009d50 <uart_console_dev>
10000b22: 00f51663 bne a0,a5,10000b2e <console_out+0x24>
10000b26: 6088 ld a0,0(s1)
10000b28: 45b5 li a1,13
10000b2a: fb3ff0ef jal ra,10000adc <uart_poll_out>
10000b2e: 6088 ld a0,0(s1)
10000b30: 0ff97593 andi a1,s2,255
10000b34: fa9ff0ef jal ra,10000adc <uart_poll_out>
10000b38: 60e2 ld ra,24(sp)
10000b3a: 6442 ld s0,16(sp)
10000b3c: 854a mv a0,s2
10000b3e: 64a2 ld s1,8(sp)
10000b40: 6902 ld s2,0(sp)
10000b42: 6105 addi sp,sp,32
10000b44: 8082 ret
0000000010000b46 <del_char>:
10000b46: 7179 addi sp,sp,-48
10000b48: f022 sd s0,32(sp)
10000b4a: ec26 sd s1,24(sp)
10000b4c: e84a sd s2,16(sp)
10000b4e: e44e sd s3,8(sp)
10000b50: e052 sd s4,0(sp)
10000b52: f406 sd ra,40(sp)
10000b54: 1800 addi s0,sp,48
10000b56: 1000a937 lui s2,0x1000a
10000b5a: d5090a13 addi s4,s2,-688 # 10009d50 <uart_console_dev>
10000b5e: 89aa mv s3,a0
10000b60: 000a3503 ld a0,0(s4)
10000b64: 84ae mv s1,a1
10000b66: 45a1 li a1,8
10000b68: f75ff0ef jal ra,10000adc <uart_poll_out>
10000b6c: e09d bnez s1,10000b92 <del_char+0x4c>
10000b6e: 000a3503 ld a0,0(s4)
10000b72: 02000593 li a1,32
10000b76: f67ff0ef jal ra,10000adc <uart_poll_out>
10000b7a: 7402 ld s0,32(sp)
10000b7c: 000a3503 ld a0,0(s4)
10000b80: 70a2 ld ra,40(sp)
10000b82: 64e2 ld s1,24(sp)
10000b84: 6942 ld s2,16(sp)
10000b86: 69a2 ld s3,8(sp)
10000b88: 6a02 ld s4,0(sp)
10000b8a: 45a1 li a1,8
10000b8c: 6145 addi sp,sp,48
10000b8e: f4fff06f j 10000adc <uart_poll_out>
10000b92: 10004537 lui a0,0x10004
10000b96: 38850513 addi a0,a0,904 # 10004388 <__devconfig_end+0x320>
10000b9a: d5090913 addi s2,s2,-688
10000b9e: 698010ef jal ra,10002236 <printk>
10000ba2: 0ff00a13 li s4,255
10000ba6: 34fd addiw s1,s1,-1
10000ba8: 0ff4f493 andi s1,s1,255
10000bac: 00093503 ld a0,0(s2)
10000bb0: 03449363 bne s1,s4,10000bd6 <del_char+0x90>
10000bb4: 02000593 li a1,32
10000bb8: f25ff0ef jal ra,10000adc <uart_poll_out>
10000bbc: 7402 ld s0,32(sp)
10000bbe: 70a2 ld ra,40(sp)
10000bc0: 64e2 ld s1,24(sp)
10000bc2: 6942 ld s2,16(sp)
10000bc4: 69a2 ld s3,8(sp)
10000bc6: 6a02 ld s4,0(sp)
10000bc8: 10004537 lui a0,0x10004
10000bcc: 39050513 addi a0,a0,912 # 10004390 <__devconfig_end+0x328>
10000bd0: 6145 addi sp,sp,48
10000bd2: 6640106f j 10002236 <printk>
10000bd6: 0019c583 lbu a1,1(s3)
10000bda: 0985 addi s3,s3,1
10000bdc: feb98fa3 sb a1,-1(s3)
10000be0: efdff0ef jal ra,10000adc <uart_poll_out>
10000be4: b7c9 j 10000ba6 <del_char+0x60>
0000000010000be6 <uart_console_isr>:
10000be6: 7175 addi sp,sp,-144
10000be8: e122 sd s0,128(sp)
10000bea: fca6 sd s1,120(sp)
10000bec: f8ca sd s2,112(sp)
10000bee: f4ce sd s3,104(sp)
10000bf0: e8da sd s6,80(sp)
10000bf2: e4de sd s7,72(sp)
10000bf4: fc66 sd s9,56(sp)
10000bf6: e506 sd ra,136(sp)
10000bf8: f0d2 sd s4,96(sp)
10000bfa: ecd6 sd s5,88(sp)
10000bfc: e0e2 sd s8,64(sp)
10000bfe: f86a sd s10,48(sp)
10000c00: f46e sd s11,40(sp)
10000c02: 0900 addi s0,sp,144
10000c04: 1000ab37 lui s6,0x1000a
10000c08: 1000abb7 lui s7,0x1000a
10000c0c: 1000a4b7 lui s1,0x1000a
10000c10: 1000a937 lui s2,0x1000a
10000c14: 1000a9b7 lui s3,0x1000a
10000c18: 10004cb7 lui s9,0x10004
10000c1c: d50b0a13 addi s4,s6,-688 # 10009d50 <uart_console_dev>
10000c20: 000a3503 ld a0,0(s4)
10000c24: d50b0a93 addi s5,s6,-688
10000c28: 651c ld a5,8(a0)
10000c2a: 7fbc ld a5,120(a5)
10000c2c: c3b1 beqz a5,10000c70 <uart_console_isr+0x8a>
10000c2e: 9782 jalr a5
10000c30: c121 beqz a0,10000c70 <uart_console_isr+0x8a>
10000c32: 000a3503 ld a0,0(s4)
10000c36: 651c ld a5,8(a0)
10000c38: 7bbc ld a5,112(a5)
10000c3a: cb9d beqz a5,10000c70 <uart_console_isr+0x8a>
10000c3c: 9782 jalr a5
10000c3e: c90d beqz a0,10000c70 <uart_console_isr+0x8a>
10000c40: 000a3503 ld a0,0(s4)
10000c44: 651c ld a5,8(a0)
10000c46: 6fbc ld a5,88(a5)
10000c48: dbf1 beqz a5,10000c1c <uart_console_isr+0x36>
10000c4a: 9782 jalr a5
10000c4c: d961 beqz a0,10000c1c <uart_console_isr+0x36>
10000c4e: 000a3a03 ld s4,0(s4)
10000c52: 008a3783 ld a5,8(s4)
10000c56: 739c ld a5,32(a5)
10000c58: 36078763 beqz a5,10000fc6 <uart_console_isr+0x3e0>
10000c5c: 4605 li a2,1
10000c5e: f8f40593 addi a1,s0,-113
10000c62: 8552 mv a0,s4
10000c64: 9782 jalr a5
10000c66: 36055063 bgez a0,10000fc6 <uart_console_isr+0x3e0>
10000c6a: 8552 mv a0,s4
10000c6c: e83ff0ef jal ra,10000aee <uart_irq_rx_disable>
10000c70: 60aa ld ra,136(sp)
10000c72: 640a ld s0,128(sp)
10000c74: 74e6 ld s1,120(sp)
10000c76: 7946 ld s2,112(sp)
10000c78: 79a6 ld s3,104(sp)
10000c7a: 7a06 ld s4,96(sp)
10000c7c: 6ae6 ld s5,88(sp)
10000c7e: 6b46 ld s6,80(sp)
10000c80: 6ba6 ld s7,72(sp)
10000c82: 6c06 ld s8,64(sp)
10000c84: 7ce2 ld s9,56(sp)
10000c86: 7d42 ld s10,48(sp)
10000c88: 7da2 ld s11,40(sp)
10000c8a: 6149 addi sp,sp,144
10000c8c: 8082 ret
10000c8e: 45a1 li a1,8
10000c90: d4448513 addi a0,s1,-700 # 10009d44 <esc_state>
10000c94: 5ba020ef jal ra,1000324e <atomic_or>
10000c98: 1000a7b7 lui a5,0x1000a
10000c9c: 01baa023 sw s11,0(s5)
10000ca0: d207a223 sw zero,-732(a5) # 10009d24 <ansi_val_2>
10000ca4: bfa5 j 10000c1c <uart_console_isr+0x36>
10000ca6: d4448513 addi a0,s1,-700
10000caa: 596020ef jal ra,10003240 <atomic_get>
10000cae: 8921 andi a0,a0,8
10000cb0: 36050a63 beqz a0,10001024 <uart_console_isr+0x43e>
10000cb4: 000a0a9b sext.w s5,s4
10000cb8: fd0a871b addiw a4,s5,-48
10000cbc: 47a5 li a5,9
10000cbe: 02e7eb63 bltu a5,a4,10000cf4 <uart_console_isr+0x10e>
10000cc2: d4448513 addi a0,s1,-700
10000cc6: 57a020ef jal ra,10003240 <atomic_get>
10000cca: 8941 andi a0,a0,16
10000ccc: cd19 beqz a0,10000cea <uart_console_isr+0x104>
10000cce: 1000a737 lui a4,0x1000a
10000cd2: d2470713 addi a4,a4,-732 # 10009d24 <ansi_val_2>
10000cd6: 4314 lw a3,0(a4)
10000cd8: 47a9 li a5,10
10000cda: 02d787bb mulw a5,a5,a3
10000cde: 015787bb addw a5,a5,s5
10000ce2: fd07879b addiw a5,a5,-48
10000ce6: c31c sw a5,0(a4)
10000ce8: bf15 j 10000c1c <uart_console_isr+0x36>
10000cea: 1000a737 lui a4,0x1000a
10000cee: d2070713 addi a4,a4,-736 # 10009d20 <ansi_val>
10000cf2: b7d5 j 10000cd6 <uart_console_isr+0xf0>
10000cf4: 03b00793 li a5,59
10000cf8: 00fa0d63 beq s4,a5,10000d12 <uart_console_isr+0x12c>
10000cfc: 55dd li a1,-9
10000cfe: d4448513 addi a0,s1,-700
10000d02: 584020ef jal ra,10003286 <atomic_and>
10000d06: 55bd li a1,-17
10000d08: d4448513 addi a0,s1,-700
10000d0c: 57a020ef jal ra,10003286 <atomic_and>
10000d10: ae11 j 10001024 <uart_console_isr+0x43e>
10000d12: 45c1 li a1,16
10000d14: d4448513 addi a0,s1,-700
10000d18: 536020ef jal ra,1000324e <atomic_or>
10000d1c: 8941 andi a0,a0,16
10000d1e: fd79 bnez a0,10000cfc <uart_console_isr+0x116>
10000d20: bdf5 j 10000c1c <uart_console_isr+0x36>
10000d22: 04800793 li a5,72
10000d26: 0afa0963 beq s4,a5,10000dd8 <uart_console_isr+0x1f2>
10000d2a: 07e00793 li a5,126
10000d2e: 30fa1963 bne s4,a5,10001040 <uart_console_isr+0x45a>
10000d32: d4198a13 addi s4,s3,-703 # 10009d41 <end>
10000d36: 000a4783 lbu a5,0(s4)
10000d3a: 30078363 beqz a5,10001040 <uart_console_isr+0x45a>
10000d3e: 10004537 lui a0,0x10004
10000d42: 4585 li a1,1
10000d44: 3a050513 addi a0,a0,928 # 100043a0 <__devconfig_end+0x338>
10000d48: 4ee010ef jal ra,10002236 <printk>
10000d4c: 000a4583 lbu a1,0(s4)
10000d50: d4094503 lbu a0,-704(s2) # 10009d40 <cur>
10000d54: 0d21 addi s10,s10,8
10000d56: 35fd addiw a1,a1,-1
10000d58: 0ff5f593 andi a1,a1,255
10000d5c: 956a add a0,a0,s10
10000d5e: 00ba0023 sb a1,0(s4)
10000d62: de5ff0ef jal ra,10000b46 <del_char>
10000d66: ace9 j 10001040 <uart_console_isr+0x45a>
10000d68: d4090693 addi a3,s2,-704
10000d6c: 1000a737 lui a4,0x1000a
10000d70: 0006c783 lbu a5,0(a3)
10000d74: d2072583 lw a1,-736(a4) # 10009d20 <ansi_val>
10000d78: 2cb7e463 bltu a5,a1,10001040 <uart_console_isr+0x45a>
10000d7c: d4198513 addi a0,s3,-703
10000d80: 00054703 lbu a4,0(a0)
10000d84: 0ff5f613 andi a2,a1,255
10000d88: 9f91 subw a5,a5,a2
10000d8a: 9f31 addw a4,a4,a2
10000d8c: 00e50023 sb a4,0(a0)
10000d90: 10004537 lui a0,0x10004
10000d94: 00f68023 sb a5,0(a3)
10000d98: 39850513 addi a0,a0,920 # 10004398 <__devconfig_end+0x330>
10000d9c: 49a010ef jal ra,10002236 <printk>
10000da0: a445 j 10001040 <uart_console_isr+0x45a>
10000da2: d4198713 addi a4,s3,-703
10000da6: 1000a6b7 lui a3,0x1000a
10000daa: 00074783 lbu a5,0(a4)
10000dae: d206a583 lw a1,-736(a3) # 10009d20 <ansi_val>
10000db2: 28b7e763 bltu a5,a1,10001040 <uart_console_isr+0x45a>
10000db6: 0ff5f693 andi a3,a1,255
10000dba: 9f95 subw a5,a5,a3
10000dbc: 00f70023 sb a5,0(a4)
10000dc0: d4090713 addi a4,s2,-704
10000dc4: 00074783 lbu a5,0(a4)
10000dc8: 10004537 lui a0,0x10004
10000dcc: 3a050513 addi a0,a0,928 # 100043a0 <__devconfig_end+0x338>
10000dd0: 9fb5 addw a5,a5,a3
10000dd2: 00f70023 sb a5,0(a4)
10000dd6: b7d9 j 10000d9c <uart_console_isr+0x1b6>
10000dd8: d4090a13 addi s4,s2,-704
10000ddc: 000a4583 lbu a1,0(s4)
10000de0: 26058063 beqz a1,10001040 <uart_console_isr+0x45a>
10000de4: 10004537 lui a0,0x10004
10000de8: 39850513 addi a0,a0,920 # 10004398 <__devconfig_end+0x330>
10000dec: 44a010ef jal ra,10002236 <printk>
10000df0: d4198713 addi a4,s3,-703
10000df4: 00074783 lbu a5,0(a4)
10000df8: 000a4683 lbu a3,0(s4)
10000dfc: 9fb5 addw a5,a5,a3
10000dfe: 00f70023 sb a5,0(a4)
10000e02: 000a0023 sb zero,0(s4)
10000e06: ac2d j 10001040 <uart_console_isr+0x45a>
10000e08: d4198a13 addi s4,s3,-703
10000e0c: 000a4583 lbu a1,0(s4)
10000e10: 22058863 beqz a1,10001040 <uart_console_isr+0x45a>
10000e14: 10004537 lui a0,0x10004
10000e18: 3a050513 addi a0,a0,928 # 100043a0 <__devconfig_end+0x338>
10000e1c: 41a010ef jal ra,10002236 <printk>
10000e20: d4090713 addi a4,s2,-704
10000e24: bfc1 j 10000df4 <uart_console_isr+0x20e>
10000e26: 55f9 li a1,-2
10000e28: d4448513 addi a0,s1,-700
10000e2c: 45a020ef jal ra,10003286 <atomic_and>
10000e30: 8905 andi a0,a0,1
10000e32: c115 beqz a0,10000e56 <uart_console_isr+0x270>
10000e34: f8f44703 lbu a4,-113(s0)
10000e38: 05b00793 li a5,91
10000e3c: def710e3 bne a4,a5,10000c1c <uart_console_isr+0x36>
10000e40: 4589 li a1,2
10000e42: d4448513 addi a0,s1,-700
10000e46: 408020ef jal ra,1000324e <atomic_or>
10000e4a: 4591 li a1,4
10000e4c: d4448513 addi a0,s1,-700
10000e50: 3fe020ef jal ra,1000324e <atomic_or>
10000e54: b3e1 j 10000c1c <uart_console_isr+0x36>
10000e56: f8f44d03 lbu s10,-113(s0)
10000e5a: 05e00793 li a5,94
10000e5e: fe0d071b addiw a4,s10,-32
10000e62: 0ce7f663 bleu a4,a5,10000f2e <uart_console_isr+0x348>
10000e66: 47b5 li a5,13
10000e68: 06fd0c63 beq s10,a5,10000ee0 <uart_console_isr+0x2fa>
10000e6c: 03a7ed63 bltu a5,s10,10000ea6 <uart_console_isr+0x2c0>
10000e70: 47a5 li a5,9
10000e72: dafd15e3 bne s10,a5,10000c1c <uart_console_isr+0x36>
10000e76: 1000a7b7 lui a5,0x1000a
10000e7a: d387b783 ld a5,-712(a5) # 10009d38 <completion_cb>
10000e7e: d8078fe3 beqz a5,10000c1c <uart_console_isr+0x36>
10000e82: d419c703 lbu a4,-703(s3)
10000e86: d8071be3 bnez a4,10000c1c <uart_console_isr+0x36>
10000e8a: d4090a13 addi s4,s2,-704
10000e8e: 000db503 ld a0,0(s11)
10000e92: 000a4583 lbu a1,0(s4)
10000e96: 0521 addi a0,a0,8
10000e98: 9782 jalr a5
10000e9a: 000a4783 lbu a5,0(s4)
10000e9e: 9d3d addw a0,a0,a5
10000ea0: 00aa0023 sb a0,0(s4)
10000ea4: bba5 j 10000c1c <uart_console_isr+0x36>
10000ea6: 47ed li a5,27
10000ea8: 02fd0a63 beq s10,a5,10000edc <uart_console_isr+0x2f6>
10000eac: 07f00793 li a5,127
10000eb0: d6fd16e3 bne s10,a5,10000c1c <uart_console_isr+0x36>
10000eb4: d4090713 addi a4,s2,-704
10000eb8: 00074783 lbu a5,0(a4)
10000ebc: d60780e3 beqz a5,10000c1c <uart_console_isr+0x36>
10000ec0: 000db503 ld a0,0(s11)
10000ec4: 37fd addiw a5,a5,-1
10000ec6: 0ff7f793 andi a5,a5,255
10000eca: d419c583 lbu a1,-703(s3)
10000ece: 00f70023 sb a5,0(a4)
10000ed2: 07a1 addi a5,a5,8
10000ed4: 953e add a0,a0,a5
10000ed6: c71ff0ef jal ra,10000b46 <del_char>
10000eda: b389 j 10000c1c <uart_console_isr+0x36>
10000edc: 4585 li a1,1
10000ede: b7bd j 10000e4c <uart_console_isr+0x266>
10000ee0: d4090d13 addi s10,s2,-704
10000ee4: d4198a13 addi s4,s3,-703
10000ee8: 000a4683 lbu a3,0(s4)
10000eec: 000d4703 lbu a4,0(s10)
10000ef0: 000db783 ld a5,0(s11)
10000ef4: 000ab503 ld a0,0(s5)
10000ef8: 9736 add a4,a4,a3
10000efa: 97ba add a5,a5,a4
10000efc: 00078423 sb zero,8(a5)
10000f00: 45b5 li a1,13
10000f02: bdbff0ef jal ra,10000adc <uart_poll_out>
10000f06: 000ab503 ld a0,0(s5)
10000f0a: 45a9 li a1,10
10000f0c: bd1ff0ef jal ra,10000adc <uart_poll_out>
10000f10: 1000a7b7 lui a5,0x1000a
10000f14: 000db583 ld a1,0(s11)
10000f18: d487b503 ld a0,-696(a5) # 10009d48 <lines_queue>
10000f1c: 000d0023 sb zero,0(s10)
10000f20: 000a0023 sb zero,0(s4)
10000f24: 4de020ef jal ra,10003402 <k_fifo_put>
10000f28: 000db023 sd zero,0(s11)
10000f2c: b9c5 j 10000c1c <uart_console_isr+0x36>
10000f2e: d4090613 addi a2,s2,-704
10000f32: 00064683 lbu a3,0(a2)
10000f36: d419cc03 lbu s8,-703(s3)
10000f3a: 0fe00593 li a1,254
10000f3e: 0006871b sext.w a4,a3
10000f42: 00ec0533 add a0,s8,a4
10000f46: cca5cbe3 blt a1,a0,10000c1c <uart_console_isr+0x36>
10000f4a: 000ab503 ld a0,0(s5)
10000f4e: 0016859b addiw a1,a3,1
10000f52: 00b60023 sb a1,0(a2)
10000f56: 85ea mv a1,s10
10000f58: f6e43823 sd a4,-144(s0)
10000f5c: 000dba03 ld s4,0(s11)
10000f60: f6d43c23 sd a3,-136(s0)
10000f64: b79ff0ef jal ra,10000adc <uart_poll_out>
10000f68: f7043703 ld a4,-144(s0)
10000f6c: f7843683 ld a3,-136(s0)
10000f70: 9752 add a4,a4,s4
10000f72: 000c1563 bnez s8,10000f7c <uart_console_isr+0x396>
10000f76: 01a70423 sb s10,8(a4)
10000f7a: b14d j 10000c1c <uart_console_isr+0x36>
10000f7c: 100047b7 lui a5,0x10004
10000f80: 00874d83 lbu s11,8(a4)
10000f84: 06a5 addi a3,a3,9
10000f86: 01a70423 sb s10,8(a4)
10000f8a: 38878513 addi a0,a5,904 # 10004388 <__devconfig_end+0x320>
10000f8e: 9a36 add s4,s4,a3
10000f90: 0ff00d13 li s10,255
10000f94: 2a2010ef jal ra,10002236 <printk>
10000f98: fffc079b addiw a5,s8,-1
10000f9c: 0ff7fc13 andi s8,a5,255
10000fa0: 01ac1763 bne s8,s10,10000fae <uart_console_isr+0x3c8>
10000fa4: 390c8513 addi a0,s9,912 # 10004390 <__devconfig_end+0x328>
10000fa8: 28e010ef jal ra,10002236 <printk>
10000fac: b985 j 10000c1c <uart_console_isr+0x36>
10000fae: 000ab503 ld a0,0(s5)
10000fb2: 85ee mv a1,s11
10000fb4: 0a05 addi s4,s4,1
10000fb6: b27ff0ef jal ra,10000adc <uart_poll_out>
10000fba: fffa4703 lbu a4,-1(s4)
10000fbe: ffba0fa3 sb s11,-1(s4)
10000fc2: 8dba mv s11,a4
10000fc4: bfd1 j 10000f98 <uart_console_isr+0x3b2>
10000fc6: d30bb783 ld a5,-720(s7) # 10009d30 <cmd.2484>
10000fca: d30b8d93 addi s11,s7,-720
10000fce: ef81 bnez a5,10000fe6 <uart_console_isr+0x400>
10000fd0: 1000a7b7 lui a5,0x1000a
10000fd4: d287b503 ld a0,-728(a5) # 10009d28 <avail_queue>
10000fd8: 4581 li a1,0
10000fda: 4ca020ef jal ra,100034a4 <k_fifo_get>
10000fde: 00adb023 sd a0,0(s11)
10000fe2: c80507e3 beqz a0,10000c70 <uart_console_isr+0x8a>
10000fe6: d4448513 addi a0,s1,-700
10000fea: 256020ef jal ra,10003240 <atomic_get>
10000fee: 8909 andi a0,a0,2
10000ff0: e2050be3 beqz a0,10000e26 <uart_console_isr+0x240>
10000ff4: 55ed li a1,-5
10000ff6: d4448513 addi a0,s1,-700
10000ffa: f8f44a03 lbu s4,-113(s0)
10000ffe: 000dbd03 ld s10,0(s11)
10001002: 284020ef jal ra,10003286 <atomic_and>
10001006: 8911 andi a0,a0,4
10001008: c8050fe3 beqz a0,10000ca6 <uart_console_isr+0xc0>
1000100c: 1000aab7 lui s5,0x1000a
10001010: fd0a0d9b addiw s11,s4,-48
10001014: 47a5 li a5,9
10001016: d20a8a93 addi s5,s5,-736 # 10009d20 <ansi_val>
1000101a: c7b7fae3 bleu s11,a5,10000c8e <uart_console_isr+0xa8>
1000101e: 4785 li a5,1
10001020: 00faa023 sw a5,0(s5)
10001024: 04600793 li a5,70
10001028: defa00e3 beq s4,a5,10000e08 <uart_console_isr+0x222>
1000102c: cf47ebe3 bltu a5,s4,10000d22 <uart_console_isr+0x13c>
10001030: 04300793 li a5,67
10001034: d6fa07e3 beq s4,a5,10000da2 <uart_console_isr+0x1bc>
10001038: 04400793 li a5,68
1000103c: d2fa06e3 beq s4,a5,10000d68 <uart_console_isr+0x182>
10001040: 55f5 li a1,-3
10001042: d4448513 addi a0,s1,-700
10001046: 240020ef jal ra,10003286 <atomic_and>
1000104a: bec9 j 10000c1c <uart_console_isr+0x36>
000000001000104c <uart_register_input>:
uart_irq_rx_enable(uart_console_dev);
}
void uart_register_input(struct k_fifo *avail, struct k_fifo *lines,
uint8_t (*completion)(char *str, uint8_t len))
{
1000104c: 7179 addi sp,sp,-48
1000104e: f022 sd s0,32(sp)
10001050: ec26 sd s1,24(sp)
10001052: e84a sd s2,16(sp)
10001054: f406 sd ra,40(sp)
10001056: 1800 addi s0,sp,48
uart_irq_rx_disable(uart_console_dev);
10001058: 1000a4b7 lui s1,0x1000a
1000105c: d5048913 addi s2,s1,-688 # 10009d50 <uart_console_dev>
avail_queue = avail;
10001060: 1000a7b7 lui a5,0x1000a
10001064: d2a7b423 sd a0,-728(a5) # 10009d28 <avail_queue>
uart_irq_rx_disable(uart_console_dev);
10001068: 00093503 ld a0,0(s2)
lines_queue = lines;
1000106c: 1000a7b7 lui a5,0x1000a
10001070: d4b7b423 sd a1,-696(a5) # 10009d48 <lines_queue>
completion_cb = completion;
10001074: 1000a7b7 lui a5,0x1000a
10001078: d2c7bc23 sd a2,-712(a5) # 10009d38 <completion_cb>
uart_irq_rx_disable(uart_console_dev);
1000107c: a73ff0ef jal ra,10000aee <uart_irq_rx_disable>
uart_irq_tx_disable(uart_console_dev);
10001080: 00093503 ld a0,0(s2)
10001084: d5048493 addi s1,s1,-688
*/
static inline void uart_irq_tx_disable(struct device *dev)
{
const struct uart_driver_api *api = dev->driver_api;
if (api->irq_tx_disable) {
10001088: 651c ld a5,8(a0)
1000108a: 7b9c ld a5,48(a5)
1000108c: c391 beqz a5,10001090 <uart_register_input+0x44>
api->irq_tx_disable(dev);
1000108e: 9782 jalr a5
uart_irq_callback_set(uart_console_dev, uart_console_isr);
10001090: 6088 ld a0,0(s1)
* @return N/A
*/
static inline void uart_irq_callback_set(struct device *dev,
uart_irq_callback_t cb)
{
const struct uart_driver_api *api = dev->driver_api;
10001092: 651c ld a5,8(a0)
if ((api != NULL) && (api->irq_callback_set != NULL)) {
10001094: cb81 beqz a5,100010a4 <uart_register_input+0x58>
10001096: 63dc ld a5,128(a5)
10001098: c791 beqz a5,100010a4 <uart_register_input+0x58>
api->irq_callback_set(dev, cb);
1000109a: 100015b7 lui a1,0x10001
1000109e: be658593 addi a1,a1,-1050 # 10000be6 <uart_console_isr>
100010a2: 9782 jalr a5
while (uart_irq_rx_ready(uart_console_dev)) {
100010a4: 6088 ld a0,0(s1)
if (api->irq_rx_ready) {
100010a6: 651c ld a5,8(a0)
100010a8: 6fbc ld a5,88(a5)
100010aa: eb99 bnez a5,100010c0 <uart_register_input+0x74>
uart_irq_rx_enable(uart_console_dev);
100010ac: 6088 ld a0,0(s1)
if (api->irq_rx_enable) {
100010ae: 651c ld a5,8(a0)
100010b0: 63bc ld a5,64(a5)
100010b2: e395 bnez a5,100010d6 <uart_register_input+0x8a>
console_input_init();
}
100010b4: 70a2 ld ra,40(sp)
100010b6: 7402 ld s0,32(sp)
100010b8: 64e2 ld s1,24(sp)
100010ba: 6942 ld s2,16(sp)
100010bc: 6145 addi sp,sp,48
100010be: 8082 ret
return api->irq_rx_ready(dev);
100010c0: 9782 jalr a5
while (uart_irq_rx_ready(uart_console_dev)) {
100010c2: d56d beqz a0,100010ac <uart_register_input+0x60>
uart_fifo_read(uart_console_dev, &c, 1);
100010c4: 6088 ld a0,0(s1)
if (api->fifo_read) {
100010c6: 651c ld a5,8(a0)
100010c8: 739c ld a5,32(a5)
100010ca: dfe9 beqz a5,100010a4 <uart_register_input+0x58>
return api->fifo_read(dev, rx_data, size);
100010cc: 4605 li a2,1
100010ce: fdf40593 addi a1,s0,-33
100010d2: 9782 jalr a5
100010d4: bfc1 j 100010a4 <uart_register_input+0x58>
api->irq_rx_enable(dev);
100010d6: 9782 jalr a5
}
100010d8: bff1 j 100010b4 <uart_register_input+0x68>
00000000100010da <uart_console_hook_install>:
*
* @return N/A
*/
void uart_console_hook_install(void)
{
100010da: 1101 addi sp,sp,-32
100010dc: e822 sd s0,16(sp)
100010de: e426 sd s1,8(sp)
100010e0: ec06 sd ra,24(sp)
100010e2: 1000 addi s0,sp,32
__stdout_hook_install(console_out);
100010e4: 100014b7 lui s1,0x10001
100010e8: b0a48513 addi a0,s1,-1270 # 10000b0a <console_out>
100010ec: 649000ef jal ra,10001f34 <__stdout_hook_install>
__printk_hook_install(console_out);
}
100010f0: 6442 ld s0,16(sp)
100010f2: 60e2 ld ra,24(sp)
__printk_hook_install(console_out);
100010f4: b0a48513 addi a0,s1,-1270
}
100010f8: 64a2 ld s1,8(sp)
100010fa: 6105 addi sp,sp,32
__printk_hook_install(console_out);
100010fc: 1260106f j 10002222 <__printk_hook_install>
0000000010001100 <uart_console_init>:
* @brief Initialize one UART as the console/debug port
*
* @return 0 if successful, otherwise failed.
*/
static int uart_console_init(struct device *arg)
{
10001100: 1141 addi sp,sp,-16
10001102: e406 sd ra,8(sp)
10001104: e022 sd s0,0(sp)
ARG_UNUSED(arg);
uart_console_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);
10001106: 10004537 lui a0,0x10004
{
1000110a: 0800 addi s0,sp,16
uart_console_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);
1000110c: 14850513 addi a0,a0,328 # 10004148 <__devconfig_end+0xe0>
10001110: 1f0020ef jal ra,10003300 <device_get_binding>
10001114: 1000a7b7 lui a5,0x1000a
10001118: d4a7b823 sd a0,-688(a5) # 10009d50 <uart_console_dev>
}
}
sys_thread_busy_wait(1000000);
#endif
uart_console_hook_install();
1000111c: fbfff0ef jal ra,100010da <uart_console_hook_install>
return 0;
}
10001120: 60a2 ld ra,8(sp)
10001122: 6402 ld s0,0(sp)
10001124: 4501 li a0,0
10001126: 0141 addi sp,sp,16
10001128: 8082 ret
000000001000112a <uart_gnss_isr>:
*
* @param arg Argument to ISR.
*
* @return N/A
*/
void uart_gnss_isr(void *arg) {
1000112a: 1141 addi sp,sp,-16
1000112c: e422 sd s0,8(sp)
1000112e: 0800 addi s0,sp,16
struct device *dev = (struct device *)arg;
struct uart_gnss_dev_data_t *data =
(struct uart_gnss_dev_data_t *)dev->driver_data;
if (data->cb) {
10001130: 691c ld a5,16(a0)
10001132: 0087b303 ld t1,8(a5)
10001136: 00030563 beqz t1,10001140 <uart_gnss_isr+0x16>
data->cb(dev);
}
}
1000113a: 6422 ld s0,8(sp)
1000113c: 0141 addi sp,sp,16
data->cb(dev);
1000113e: 8302 jr t1
}
10001140: 6422 ld s0,8(sp)
10001142: 0141 addi sp,sp,16
10001144: 8082 ret
0000000010001146 <uart_gnss_poll_in>:
WRITE32(&__UART1->data, c);
return c;
}
static int uart_gnss_poll_in(struct device *dev, unsigned char *c)
{
10001146: 1141 addi sp,sp,-16
10001148: e422 sd s0,8(sp)
1000114a: 0800 addi s0,sp,16
return -ENOTSUP;
}
1000114c: 6422 ld s0,8(sp)
1000114e: fdd00513 li a0,-35
10001152: 0141 addi sp,sp,16
10001154: 8082 ret
0000000010001156 <uart_gnss_irq_update>:
* @param dev UART device struct
*
* @return Always 1
*/
static int uart_gnss_irq_update(struct device *dev)
{
10001156: 1141 addi sp,sp,-16
10001158: e422 sd s0,8(sp)
1000115a: 0800 addi s0,sp,16
return 1;
}
1000115c: 6422 ld s0,8(sp)
1000115e: 4505 li a0,1
10001160: 0141 addi sp,sp,16
10001162: 8082 ret
0000000010001164 <uart_gnss_irq_callback_set>:
*
* @return N/A
*/
static void uart_gnss_irq_callback_set(struct device *dev,
uart_irq_callback_t cb)
{
10001164: 1141 addi sp,sp,-16
10001166: e422 sd s0,8(sp)
10001168: 0800 addi s0,sp,16
struct uart_gnss_dev_data_t * const dev_data = dev->driver_data;
dev_data->cb = cb;
1000116a: 691c ld a5,16(a0)
}
1000116c: 6422 ld s0,8(sp)
dev_data->cb = cb;
1000116e: e78c sd a1,8(a5)
}
10001170: 0141 addi sp,sp,16
10001172: 8082 ret
0000000010001174 <uart_gnss_irq_tx_empty>:
int uart_gnss_irq_tx_empty(struct device *dev) {
10001174: 1141 addi sp,sp,-16
uint32_t status = READ32(&__UART1->status);
10001176: 00080537 lui a0,0x80
int uart_gnss_irq_tx_empty(struct device *dev) {
1000117a: e022 sd s0,0(sp)
1000117c: e406 sd ra,8(sp)
1000117e: 0800 addi s0,sp,16
uint32_t status = READ32(&__UART1->status);
10001180: 0505 addi a0,a0,1
10001182: 0532 slli a0,a0,0xc
10001184: 020020ef jal ra,100031a4 <READ32>
}
10001188: 60a2 ld ra,8(sp)
1000118a: 6402 ld s0,0(sp)
return ((status & UART_STATUS_TX_EMPTY) ? 1: 0);
1000118c: 0015551b srliw a0,a0,0x1
}
10001190: 8905 andi a0,a0,1
10001192: 0141 addi sp,sp,16
10001194: 8082 ret
0000000010001196 <uart_gnss_irq_rx_ready>:
{
10001196: 1141 addi sp,sp,-16
uint32_t status = READ32(&__UART1->status);
10001198: 00080537 lui a0,0x80
{
1000119c: e022 sd s0,0(sp)
1000119e: e406 sd ra,8(sp)
100011a0: 0800 addi s0,sp,16
uint32_t status = READ32(&__UART1->status);
100011a2: 0505 addi a0,a0,1
100011a4: 0532 slli a0,a0,0xc
100011a6: 7ff010ef jal ra,100031a4 <READ32>
}
100011aa: 60a2 ld ra,8(sp)
100011ac: 6402 ld s0,0(sp)
return ((status & UART_STATUS_RX_EMPTY) ? 0: 1);
100011ae: 02057513 andi a0,a0,32
}
100011b2: 00153513 seqz a0,a0
100011b6: 0141 addi sp,sp,16
100011b8: 8082 ret
00000000100011ba <uart_gnss_irq_is_pending>:
{
100011ba: 1141 addi sp,sp,-16
100011bc: e422 sd s0,8(sp)
100011be: 0800 addi s0,sp,16
}
100011c0: 6422 ld s0,8(sp)
100011c2: 0141 addi sp,sp,16
return uart_gnss_irq_rx_ready(dev);
100011c4: fd3ff06f j 10001196 <uart_gnss_irq_rx_ready>
00000000100011c8 <uart_gnss_fifo_read>:
{
100011c8: 7139 addi sp,sp,-64
100011ca: ec4e sd s3,24(sp)
uint32_t status = READ32(&__UART1->status);
100011cc: 000809b7 lui s3,0x80
{
100011d0: f822 sd s0,48(sp)
100011d2: f426 sd s1,40(sp)
100011d4: f04a sd s2,32(sp)
100011d6: e852 sd s4,16(sp)
100011d8: e456 sd s5,8(sp)
100011da: fc06 sd ra,56(sp)
100011dc: e05a sd s6,0(sp)
100011de: 0080 addi s0,sp,64
uint32_t status = READ32(&__UART1->status);
100011e0: 0985 addi s3,s3,1
100011e2: 00c99513 slli a0,s3,0xc
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
100011e6: 08000937 lui s2,0x8000
{
100011ea: 8a2e mv s4,a1
100011ec: 8ab2 mv s5,a2
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
100011ee: 10190913 addi s2,s2,257 # 8000101 <__bss_num_words+0x7fff361>
uint32_t status = READ32(&__UART1->status);
100011f2: 7b3010ef jal ra,100031a4 <READ32>
100011f6: 0005079b sext.w a5,a0
uint8_t num_rx = 0;
100011fa: 4481 li s1,0
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
100011fc: 0912 slli s2,s2,0x4
status = READ32(&__UART1->status);
100011fe: 09b2 slli s3,s3,0xc
while ((size - num_rx > 0) && ((status & UART_STATUS_RX_EMPTY) == 0)) {
10001200: 0004851b sext.w a0,s1
10001204: 40aa873b subw a4,s5,a0
10001208: 00e05563 blez a4,10001212 <uart_gnss_fifo_read+0x4a>
1000120c: 0207f793 andi a5,a5,32
10001210: cb99 beqz a5,10001226 <uart_gnss_fifo_read+0x5e>
}
10001212: 70e2 ld ra,56(sp)
10001214: 7442 ld s0,48(sp)
10001216: 74a2 ld s1,40(sp)
10001218: 7902 ld s2,32(sp)
1000121a: 69e2 ld s3,24(sp)
1000121c: 6a42 ld s4,16(sp)
1000121e: 6aa2 ld s5,8(sp)
10001220: 6b02 ld s6,0(sp)
10001222: 6121 addi sp,sp,64
10001224: 8082 ret
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
10001226: 854a mv a0,s2
10001228: 77d010ef jal ra,100031a4 <READ32>
1000122c: 00148b1b addiw s6,s1,1
10001230: 94d2 add s1,s1,s4
10001232: 00a48023 sb a0,0(s1)
status = READ32(&__UART1->status);
10001236: 854e mv a0,s3
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
10001238: 0ffb7b13 andi s6,s6,255
status = READ32(&__UART1->status);
1000123c: 769010ef jal ra,100031a4 <READ32>
10001240: 0005079b sext.w a5,a0
rx_data[num_rx++] = (uint8_t)READ32(&__UART1->data);
10001244: 84da mv s1,s6
10001246: bf6d j 10001200 <uart_gnss_fifo_read+0x38>
0000000010001248 <uart_gnss_poll_out>:
{
10001248: 1101 addi sp,sp,-32
1000124a: e426 sd s1,8(sp)
uint32_t status = READ32(&__UART1->status);
1000124c: 000804b7 lui s1,0x80
{
10001250: e822 sd s0,16(sp)
10001252: e04a sd s2,0(sp)
10001254: ec06 sd ra,24(sp)
10001256: 1000 addi s0,sp,32
uint32_t status = READ32(&__UART1->status);
10001258: 0485 addi s1,s1,1
1000125a: 00c49513 slli a0,s1,0xc
{
1000125e: 892e mv s2,a1
uint32_t status = READ32(&__UART1->status);
10001260: 745010ef jal ra,100031a4 <READ32>
10001264: 2501 sext.w a0,a0
status = READ32(&__UART1->status);
10001266: 04b2 slli s1,s1,0xc
while (status & UART_STATUS_TX_FULL) {
10001268: 8905 andi a0,a0,1
1000126a: e105 bnez a0,1000128a <uart_gnss_poll_out+0x42>
WRITE32(&__UART1->data, c);
1000126c: 08000537 lui a0,0x8000
10001270: 10150513 addi a0,a0,257 # 8000101 <__bss_num_words+0x7fff361>
10001274: 85ca mv a1,s2
10001276: 0512 slli a0,a0,0x4
10001278: 749010ef jal ra,100031c0 <WRITE32>
}
1000127c: 60e2 ld ra,24(sp)
1000127e: 6442 ld s0,16(sp)
10001280: 854a mv a0,s2
10001282: 64a2 ld s1,8(sp)
10001284: 6902 ld s2,0(sp)
10001286: 6105 addi sp,sp,32
10001288: 8082 ret
status = READ32(&__UART1->status);
1000128a: 8526 mv a0,s1
1000128c: 719010ef jal ra,100031a4 <READ32>
10001290: 2501 sext.w a0,a0
10001292: bfd9 j 10001268 <uart_gnss_poll_out+0x20>
0000000010001294 <uart_gnss_irq_tx_enable>:
void uart_gnss_irq_tx_enable(struct device *dev) {
10001294: 1101 addi sp,sp,-32
10001296: e426 sd s1,8(sp)
uint32_t status = READ32(&__UART1->status);
10001298: 000804b7 lui s1,0x80
void uart_gnss_irq_tx_enable(struct device *dev) {
1000129c: e822 sd s0,16(sp)
1000129e: ec06 sd ra,24(sp)
100012a0: 1000 addi s0,sp,32
uint32_t status = READ32(&__UART1->status);
100012a2: 0485 addi s1,s1,1
100012a4: 00c49513 slli a0,s1,0xc
100012a8: 6fd010ef jal ra,100031a4 <READ32>
}
100012ac: 6442 ld s0,16(sp)
uint32_t status = READ32(&__UART1->status);
100012ae: 0005059b sext.w a1,a0
}
100012b2: 60e2 ld ra,24(sp)
WRITE32(&__UART1->status, status);
100012b4: 00c49513 slli a0,s1,0xc
}
100012b8: 64a2 ld s1,8(sp)
WRITE32(&__UART1->status, status);
100012ba: 6791 lui a5,0x4
100012bc: 8ddd or a1,a1,a5
}
100012be: 6105 addi sp,sp,32
WRITE32(&__UART1->status, status);
100012c0: 7010106f j 100031c0 <WRITE32>
00000000100012c4 <uart_gnss_irq_tx_disable>:
void uart_gnss_irq_tx_disable(struct device *dev) {
100012c4: 1101 addi sp,sp,-32
100012c6: e426 sd s1,8(sp)
uint32_t status = READ32(&__UART1->status);
100012c8: 000804b7 lui s1,0x80
void uart_gnss_irq_tx_disable(struct device *dev) {
100012cc: e822 sd s0,16(sp)
100012ce: ec06 sd ra,24(sp)
100012d0: 1000 addi s0,sp,32
uint32_t status = READ32(&__UART1->status);
100012d2: 0485 addi s1,s1,1
100012d4: 00c49513 slli a0,s1,0xc
100012d8: 6cd010ef jal ra,100031a4 <READ32>
}
100012dc: 6442 ld s0,16(sp)
uint32_t status = READ32(&__UART1->status);
100012de: 0005059b sext.w a1,a0
}
100012e2: 60e2 ld ra,24(sp)
WRITE32(&__UART1->status, status);
100012e4: 77f1 lui a5,0xffffc
100012e6: 00c49513 slli a0,s1,0xc
}
100012ea: 64a2 ld s1,8(sp)
WRITE32(&__UART1->status, status);
100012ec: 17fd addi a5,a5,-1
100012ee: 8dfd and a1,a1,a5
}
100012f0: 6105 addi sp,sp,32
WRITE32(&__UART1->status, status);
100012f2: 6cf0106f j 100031c0 <WRITE32>
00000000100012f6 <uart_gnss_irq_rx_enable>:
void uart_gnss_irq_rx_enable(struct device *dev) {
100012f6: 1101 addi sp,sp,-32
100012f8: e426 sd s1,8(sp)
uint32_t status = READ32(&__UART1->status);
100012fa: 000804b7 lui s1,0x80
void uart_gnss_irq_rx_enable(struct device *dev) {
100012fe: e822 sd s0,16(sp)
10001300: ec06 sd ra,24(sp)
10001302: 1000 addi s0,sp,32
uint32_t status = READ32(&__UART1->status);
10001304: 0485 addi s1,s1,1
10001306: 00c49513 slli a0,s1,0xc
1000130a: 69b010ef jal ra,100031a4 <READ32>
}
1000130e: 6442 ld s0,16(sp)
uint32_t status = READ32(&__UART1->status);
10001310: 0005059b sext.w a1,a0
}
10001314: 60e2 ld ra,24(sp)
WRITE32(&__UART1->status, status);
10001316: 00c49513 slli a0,s1,0xc
}
1000131a: 64a2 ld s1,8(sp)
WRITE32(&__UART1->status, status);
1000131c: 6789 lui a5,0x2
1000131e: 8ddd or a1,a1,a5
}
10001320: 6105 addi sp,sp,32
WRITE32(&__UART1->status, status);
10001322: 69f0106f j 100031c0 <WRITE32>
0000000010001326 <uart_gnss_irq_rx_disable>:
void uart_gnss_irq_rx_disable(struct device *dev) {
10001326: 1101 addi sp,sp,-32
10001328: e426 sd s1,8(sp)
uint32_t status = READ32(&__UART1->status);
1000132a: 000804b7 lui s1,0x80
void uart_gnss_irq_rx_disable(struct device *dev) {
1000132e: e822 sd s0,16(sp)
10001330: ec06 sd ra,24(sp)
10001332: 1000 addi s0,sp,32
uint32_t status = READ32(&__UART1->status);
10001334: 0485 addi s1,s1,1
10001336: 00c49513 slli a0,s1,0xc
1000133a: 66b010ef jal ra,100031a4 <READ32>
}
1000133e: 6442 ld s0,16(sp)
uint32_t status = READ32(&__UART1->status);
10001340: 0005059b sext.w a1,a0
}
10001344: 60e2 ld ra,24(sp)
WRITE32(&__UART1->status, status);
10001346: 77f9 lui a5,0xffffe
10001348: 00c49513 slli a0,s1,0xc
}
1000134c: 64a2 ld s1,8(sp)
WRITE32(&__UART1->status, status);
1000134e: 17fd addi a5,a5,-1
10001350: 8dfd and a1,a1,a5
}
10001352: 6105 addi sp,sp,32
WRITE32(&__UART1->status, status);
10001354: 66d0106f j 100031c0 <WRITE32>
0000000010001358 <uart_gnss_init>:
* @param dev UART device struct
*
* @return DEV_OK
*/
static int uart_gnss_init(struct device *dev)
{
10001358: 1101 addi sp,sp,-32
1000135a: e822 sd s0,16(sp)
1000135c: e426 sd s1,8(sp)
1000135e: ec06 sd ra,24(sp)
10001360: 1000 addi s0,sp,32
dev->driver_api = &uart_gnss_driver_api;
10001362: 100057b7 lui a5,0x10005
10001366: 0d078793 addi a5,a5,208 # 100050d0 <uart_gnss_driver_api>
1000136a: e51c sd a5,8(a0)
dev->driver_data = &uart_gnss_dev_data_0;
1000136c: 100057b7 lui a5,0x10005
10001370: 0c078793 addi a5,a5,192 # 100050c0 <uart_gnss_dev_data_0>
10001374: e91c sd a5,16(a0)
{
10001376: 84aa mv s1,a0
// Speed-up RTL simulation avoidig long polling of the status register.
if (soc_is_rtl_simulation() != 0) {
10001378: 3ac010ef jal ra,10002724 <soc_is_rtl_simulation>
1000137c: 0005079b sext.w a5,a0
10001380: 20000537 lui a0,0x20000
10001384: 40150513 addi a0,a0,1025 # 20000401 <_time_slice_prio_ceiling+0xfff669d>
WRITE32(&__UART1->scaler, 20);
10001388: 45d1 li a1,20
if (soc_is_rtl_simulation() != 0) {
1000138a: e399 bnez a5,10001390 <uart_gnss_init+0x38>
} else {
WRITE32(&__UART1->scaler, CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC/115200/2);
1000138c: 0ad00593 li a1,173
10001390: 050a slli a0,a0,0x2
10001392: 62f010ef jal ra,100031c0 <WRITE32>
}
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
uart_gnss_irq_rx_enable(dev);
10001396: 8526 mv a0,s1
10001398: f5fff0ef jal ra,100012f6 <uart_gnss_irq_rx_enable>
IRQ_CONNECT(CFG_IRQ_UART1, CFG_IRQ_UART1, uart_gnss_isr, dev, UART_IRQ_FLAGS);
1000139c: 10001637 lui a2,0x10001
100013a0: 86a6 mv a3,s1
100013a2: 4701 li a4,0
100013a4: 12a60613 addi a2,a2,298 # 1000112a <uart_gnss_isr>
100013a8: 4585 li a1,1
100013aa: 4505 li a0,1
100013ac: 53d010ef jal ra,100030e8 <_arch_irq_connect_dynamic>
irq_enable(CFG_IRQ_UART1);
100013b0: 4505 li a0,1
100013b2: 4af010ef jal ra,10003060 <_arch_irq_enable>
#endif
return 0;
}
100013b6: 60e2 ld ra,24(sp)
100013b8: 6442 ld s0,16(sp)
100013ba: 64a2 ld s1,8(sp)
100013bc: 4501 li a0,0
100013be: 6105 addi sp,sp,32
100013c0: 8082 ret
00000000100013c2 <_timer_int_handler>:
100013c2: 1141 addi sp,sp,-16
100013c4: 40001537 lui a0,0x40001
100013c8: e406 sd ra,8(sp)
100013ca: e022 sd s0,0(sp)
100013cc: 0506 slli a0,a0,0x1
100013ce: 0800 addi s0,sp,16
100013d0: 45a1 li a1,8
100013d2: 0521 addi a0,a0,8
100013d4: 5ed010ef jal ra,100031c0 <WRITE32>
100013d8: 10001537 lui a0,0x10001
100013dc: a0150513 addi a0,a0,-1535 # 10000a01 <shell+0x1a7>
100013e0: 050e slli a0,a0,0x3
100013e2: 4581 li a1,0
100013e4: 5dd010ef jal ra,100031c0 <WRITE32>
100013e8: 1000a7b7 lui a5,0x1000a
100013ec: d5878793 addi a5,a5,-680 # 10009d58 <accumulated_cycle_count>
100013f0: 100096b7 lui a3,0x10009
100013f4: 4398 lw a4,0(a5)
100013f6: 9006a683 lw a3,-1792(a3) # 10008900 <__bss_end>
100013fa: 6402 ld s0,0(sp)
100013fc: 60a2 ld ra,8(sp)
100013fe: 9f35 addw a4,a4,a3
10001400: c398 sw a4,0(a5)
10001402: 100057b7 lui a5,0x10005
10001406: 2787a503 lw a0,632(a5) # 10005278 <_sys_idle_elapsed_ticks>
1000140a: 0141 addi sp,sp,16
1000140c: 6700206f j 10003a7c <_nano_sys_clock_tick_announce>
0000000010001410 <k_cycle_get_32>:
* If this routine is ever enhanced to return all 64 bits of the counter
* it will need to call _hpetMainCounterAtomic().
*/
uint32_t k_cycle_get_32(void)
{
10001410: 1141 addi sp,sp,-16
//return (uint32_t)READ64(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].cur_value);
return (uint32_t)READ64(&__TIMERS->highcnt);
10001412: 00080537 lui a0,0x80
{
10001416: e022 sd s0,0(sp)
10001418: e406 sd ra,8(sp)
1000141a: 0800 addi s0,sp,16
return (uint32_t)READ64(&__TIMERS->highcnt);
1000141c: 0515 addi a0,a0,5
1000141e: 0532 slli a0,a0,0xc
10001420: 593010ef jal ra,100031b2 <READ64>
}
10001424: 60a2 ld ra,8(sp)
10001426: 6402 ld s0,0(sp)
10001428: 2501 sext.w a0,a0
1000142a: 0141 addi sp,sp,16
1000142c: 8082 ret
000000001000142e <k_cycle_get_64>:
uint64_t k_cycle_get_64(void)
{
1000142e: 1141 addi sp,sp,-16
10001430: e422 sd s0,8(sp)
10001432: 0800 addi s0,sp,16
return READ64(&__TIMERS->highcnt);
}
10001434: 6422 ld s0,8(sp)
return READ64(&__TIMERS->highcnt);
10001436: 00080537 lui a0,0x80
1000143a: 0515 addi a0,a0,5
1000143c: 0532 slli a0,a0,0xc
}
1000143e: 0141 addi sp,sp,16
return READ64(&__TIMERS->highcnt);
10001440: 5730106f j 100031b2 <READ64>
0000000010001444 <_sys_clock_driver_init>:
*
* @return N/A
*/
static void tickless_idle_init(void) {}
int _sys_clock_driver_init(struct device *device) {
10001444: 1101 addi sp,sp,-32
10001446: e426 sd s1,8(sp)
ARG_UNUSED(device);
/* ensure that the timer will not generate interrupts */
WRITE32(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].control, 0);
10001448: 020004b7 lui s1,0x2000
int _sys_clock_driver_init(struct device *device) {
1000144c: ec06 sd ra,24(sp)
1000144e: e822 sd s0,16(sp)
10001450: e04a sd s2,0(sp)
10001452: 1000 addi s0,sp,32
WRITE32(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].control, 0);
10001454: 14148493 addi s1,s1,321 # 2000141 <__bss_num_words+0x1fff3a1>
10001458: 00649513 slli a0,s1,0x6
1000145c: 4581 li a1,0
1000145e: 563010ef jal ra,100031c0 <WRITE32>
sys_clock_hw_cycles_per_tick = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC /
10001462: 000317b7 lui a5,0x31
sys_clock_ticks_per_sec;
cycles_per_tick = sys_clock_hw_cycles_per_tick;
10001466: 10009937 lui s2,0x10009
sys_clock_hw_cycles_per_tick = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC /
1000146a: d407879b addiw a5,a5,-704
cycles_per_tick = sys_clock_hw_cycles_per_tick;
1000146e: 90090913 addi s2,s2,-1792 # 10008900 <__bss_end>
sys_clock_hw_cycles_per_tick = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC /
10001472: 10005737 lui a4,0x10005
accumulated_cycle_count = 0;
IRQ_CONNECT(CFG_IRQ_SYS_TIMER, 0, _timer_int_handler, 0, 0);
10001476: 10001637 lui a2,0x10001
1000147a: 4681 li a3,0
1000147c: 3c260613 addi a2,a2,962 # 100013c2 <_timer_int_handler>
sys_clock_hw_cycles_per_tick = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC /
10001480: 26f72e23 sw a5,636(a4) # 1000527c <sys_clock_hw_cycles_per_tick>
cycles_per_tick = sys_clock_hw_cycles_per_tick;
10001484: 00f92023 sw a5,0(s2)
IRQ_CONNECT(CFG_IRQ_SYS_TIMER, 0, _timer_int_handler, 0, 0);
10001488: 4701 li a4,0
accumulated_cycle_count = 0;
1000148a: 1000a7b7 lui a5,0x1000a
IRQ_CONNECT(CFG_IRQ_SYS_TIMER, 0, _timer_int_handler, 0, 0);
1000148e: 4581 li a1,0
10001490: 450d li a0,3
accumulated_cycle_count = 0;
10001492: d407ac23 sw zero,-680(a5) # 10009d58 <accumulated_cycle_count>
IRQ_CONNECT(CFG_IRQ_SYS_TIMER, 0, _timer_int_handler, 0, 0);
10001496: 453010ef jal ra,100030e8 <_arch_irq_connect_dynamic>
* counter and interrupt generation.
*/
tickless_idle_init();
WRITE64(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].init_value, cycles_per_tick - 1);
1000149a: 00092583 lw a1,0(s2)
1000149e: 08000537 lui a0,0x8000
100014a2: 50550513 addi a0,a0,1285 # 8000505 <__bss_num_words+0x7fff765>
100014a6: 35fd addiw a1,a1,-1
100014a8: 1582 slli a1,a1,0x20
100014aa: 9181 srli a1,a1,0x20
100014ac: 0512 slli a0,a0,0x4
100014ae: 521010ef jal ra,100031ce <WRITE64>
WRITE32(&__TIMERS->tmr[CFG_SYS_TIMER_IDX].control,
100014b2: 00649513 slli a0,s1,0x6
100014b6: 458d li a1,3
100014b8: 509010ef jal ra,100031c0 <WRITE32>
GPTIMER_CONTROL_COUNT_ENA | GPTIMER_CONTROL_IRQ_ENA);
/* everything has been configured: safe to enable the interrupt */
irq_enable(CFG_IRQ_SYS_TIMER);
100014bc: 450d li a0,3
100014be: 3a3010ef jal ra,10003060 <_arch_irq_enable>
return 0;
}
100014c2: 60e2 ld ra,24(sp)
100014c4: 6442 ld s0,16(sp)
100014c6: 64a2 ld s1,8(sp)
100014c8: 6902 ld s2,0(sp)
100014ca: 4501 li a0,0
100014cc: 6105 addi sp,sp,32
100014ce: 8082 ret
00000000100014d0 <sys_kernel_version_get>:
* file "kernel_version.h".
*
* @return kernel version
*/
uint32_t sys_kernel_version_get(void)
{
100014d0: 1141 addi sp,sp,-16
100014d2: e422 sd s0,8(sp)
100014d4: 0800 addi s0,sp,16
return kernel_version;
}
100014d6: 6422 ld s0,8(sp)
100014d8: 01060537 lui a0,0x1060
100014dc: 0141 addi sp,sp,16
100014de: 8082 ret
00000000100014e0 <printf>:
return r;
}
int printf(const char *_Restrict format, ...)
{
100014e0: 711d addi sp,sp,-96
100014e2: e822 sd s0,16(sp)
100014e4: ec06 sd ra,24(sp)
100014e6: 1000 addi s0,sp,32
100014e8: e810 sd a2,16(s0)
va_list vargs;
int r;
va_start(vargs, format);
r = _prf(fputc, DESC(stdout), format, vargs);
100014ea: 862a mv a2,a0
100014ec: 10002537 lui a0,0x10002
{
100014f0: e40c sd a1,8(s0)
100014f2: ec14 sd a3,24(s0)
r = _prf(fputc, DESC(stdout), format, vargs);
100014f4: 4589 li a1,2
va_start(vargs, format);
100014f6: 00840693 addi a3,s0,8
r = _prf(fputc, DESC(stdout), format, vargs);
100014fa: f4850513 addi a0,a0,-184 # 10001f48 <fputc>
{
100014fe: f018 sd a4,32(s0)
10001500: f41c sd a5,40(s0)
10001502: 03043823 sd a6,48(s0)
10001506: 03143c23 sd a7,56(s0)
va_start(vargs, format);
1000150a: fed43423 sd a3,-24(s0)
r = _prf(fputc, DESC(stdout), format, vargs);
1000150e: 0f2000ef jal ra,10001600 <_prf>
va_end(vargs);
return r;
}
10001512: 60e2 ld ra,24(sp)
10001514: 6442 ld s0,16(sp)
10001516: 6125 addi sp,sp,96
10001518: 8082 ret
000000001000151a <_to_x>:
/* Writes the specified number into the buffer in the given base,
* using the digit characters 0-9a-z (i.e. base>36 will start writing
* odd bytes), padding with leading zeros up to the minimum length.
*/
static int _to_x(char *buf, uint32_t n, int base, int minlen)
{
1000151a: 1141 addi sp,sp,-16
1000151c: e422 sd s0,8(sp)
1000151e: 0800 addi s0,sp,16
10001520: 872a mv a4,a0
10001522: 87aa mv a5,a0
do {
int d = n % base;
n /= base;
*buf++ = '0' + d + (d > 9 ? ('a' - '0' - 10) : 0);
10001524: 4325 li t1,9
int d = n % base;
10001526: 02c5f8bb remuw a7,a1,a2
*buf++ = '0' + d + (d > 9 ? ('a' - '0' - 10) : 0);
1000152a: 02700813 li a6,39
n /= base;
1000152e: 02c5d5bb divuw a1,a1,a2
*buf++ = '0' + d + (d > 9 ? ('a' - '0' - 10) : 0);
10001532: 0ff8f513 andi a0,a7,255
10001536: 01136363 bltu t1,a7,1000153c <_to_x+0x22>
1000153a: 4801 li a6,0
1000153c: 0305051b addiw a0,a0,48
10001540: 0785 addi a5,a5,1
10001542: 0105053b addw a0,a0,a6
10001546: fea78fa3 sb a0,-1(a5)
} while (n);
1000154a: fdf1 bnez a1,10001526 <_to_x+0xc>
*end++ = '0';
1000154c: 03000613 li a2,48
10001550: 40e78533 sub a0,a5,a4
while (end - start < minlen) {
10001554: 00d54b63 blt a0,a3,1000156a <_to_x+0x50>
*end = 0;
10001558: 00078023 sb zero,0(a5)
len = end - start;
1000155c: 2501 sext.w a0,a0
for (end--; end > start; end--, start++) {
1000155e: 17fd addi a5,a5,-1
10001560: 00f76963 bltu a4,a5,10001572 <_to_x+0x58>
return _reverse_and_pad(buf0, buf, minlen);
}
10001564: 6422 ld s0,8(sp)
10001566: 0141 addi sp,sp,16
10001568: 8082 ret
*end++ = '0';
1000156a: 0785 addi a5,a5,1
1000156c: fec78fa3 sb a2,-1(a5)
10001570: b7c5 j 10001550 <_to_x+0x36>
*end = *start;
10001572: 00074603 lbu a2,0(a4)
char tmp = *end;
10001576: 0007c683 lbu a3,0(a5)
for (end--; end > start; end--, start++) {
1000157a: 0705 addi a4,a4,1
*end = *start;
1000157c: 00c78023 sb a2,0(a5)
*start = tmp;
10001580: fed70fa3 sb a3,-1(a4)
for (end--; end > start; end--, start++) {
10001584: 17fd addi a5,a5,-1
10001586: bfe9 j 10001560 <_to_x+0x46>
0000000010001588 <_ldiv5>:
* six. This was tested exhaustively through the first ~10B values in
* the input space, and for ~2e12 (4 hours runtime) random inputs
* taken from the full 64 bit space.
*/
static void _ldiv5(uint64_t *v)
{
10001588: 1141 addi sp,sp,-16
1000158a: e422 sd s0,8(sp)
1000158c: 0800 addi s0,sp,16
uint32_t i, hi;
uint64_t rem = *v, quot = 0, q;
1000158e: 611c ld a5,0(a0)
*/
rem += 2;
for (i = 0; i < 3; i++) {
hi = rem >> shifts[i];
q = (uint64_t)(hi / 5) << shifts[i];
10001590: 4615 li a2,5
rem -= q * 5;
10001592: 4595 li a1,5
rem += 2;
10001594: 0789 addi a5,a5,2
hi = rem >> shifts[i];
10001596: 0207d693 srli a3,a5,0x20
q = (uint64_t)(hi / 5) << shifts[i];
1000159a: 02c6d6bb divuw a3,a3,a2
quot += q;
}
*v = quot;
}
1000159e: 6422 ld s0,8(sp)
q = (uint64_t)(hi / 5) << shifts[i];
100015a0: 1682 slli a3,a3,0x20
rem -= q * 5;
100015a2: 02b68733 mul a4,a3,a1
100015a6: 8f99 sub a5,a5,a4
hi = rem >> shifts[i];
100015a8: 0037d713 srli a4,a5,0x3
q = (uint64_t)(hi / 5) << shifts[i];
100015ac: 02c7573b divuw a4,a4,a2
100015b0: 1702 slli a4,a4,0x20
100015b2: 8375 srli a4,a4,0x1d
quot += q;
100015b4: 96ba add a3,a3,a4
rem -= q * 5;
100015b6: 02b70733 mul a4,a4,a1
100015ba: 8f99 sub a5,a5,a4
q = (uint64_t)(hi / 5) << shifts[i];
100015bc: 02c7d7bb divuw a5,a5,a2
100015c0: 1782 slli a5,a5,0x20
100015c2: 9381 srli a5,a5,0x20
quot += q;
100015c4: 97b6 add a5,a5,a3
*v = quot;
100015c6: e11c sd a5,0(a0)
}
100015c8: 0141 addi sp,sp,16
100015ca: 8082 ret
00000000100015cc <_get_digit>:
static char _get_digit(uint64_t *fr, int *digit_count)
{
100015cc: 1141 addi sp,sp,-16
100015ce: e422 sd s0,8(sp)
100015d0: 0800 addi s0,sp,16
int rval;
if (*digit_count > 0) {
100015d2: 419c lw a5,0(a1)
*digit_count -= 1;
*fr = *fr * 10;
rval = ((*fr >> 60) & 0xF) + '0';
*fr &= 0x0FFFFFFFFFFFFFFFull;
} else
rval = '0';
100015d4: 03000713 li a4,48
if (*digit_count > 0) {
100015d8: 02f05063 blez a5,100015f8 <_get_digit+0x2c>
*fr = *fr * 10;
100015dc: 6118 ld a4,0(a0)
*digit_count -= 1;
100015de: 37fd addiw a5,a5,-1
100015e0: c19c sw a5,0(a1)
*fr = *fr * 10;
100015e2: 47a9 li a5,10
100015e4: 02e787b3 mul a5,a5,a4
*fr &= 0x0FFFFFFFFFFFFFFFull;
100015e8: 56fd li a3,-1
100015ea: 8291 srli a3,a3,0x4
rval = ((*fr >> 60) & 0xF) + '0';
100015ec: 03c7d713 srli a4,a5,0x3c
*fr &= 0x0FFFFFFFFFFFFFFFull;
100015f0: 8ff5 and a5,a5,a3
rval = ((*fr >> 60) & 0xF) + '0';
100015f2: 03070713 addi a4,a4,48
*fr &= 0x0FFFFFFFFFFFFFFFull;
100015f6: e11c sd a5,0(a0)
return (char) (rval);
}
100015f8: 6422 ld s0,8(sp)
100015fa: 853a mv a0,a4
100015fc: 0141 addi sp,sp,16
100015fe: 8082 ret
0000000010001600 <_prf>:
*sptr = p;
return i;
}
int _prf(int (*func)(), void *dest, char *format, va_list vargs)
{
10001600: 7161 addi sp,sp,-432
10001602: f322 sd s0,416(sp)
10001604: ef26 sd s1,408(sp)
10001606: 1b00 addi s0,sp,432
10001608: e352 sd s4,384(sp)
1000160a: f2e2 sd s8,352(sp)
1000160c: f706 sd ra,424(sp)
1000160e: eb4a sd s2,400(sp)
10001610: e74e sd s3,392(sp)
10001612: fed6 sd s5,376(sp)
10001614: fada sd s6,368(sp)
10001616: f6de sd s7,360(sp)
10001618: eee6 sd s9,344(sp)
1000161a: eaea sd s10,336(sp)
1000161c: e6ee sd s11,328(sp)
while ((fract >> 32) >= (MAXFP1 / 5)) {
1000161e: 333337b7 lui a5,0x33333
10001622: 33278793 addi a5,a5,818 # 33333332 <_time_slice_prio_ceiling+0x233295ce>
{
10001626: e8a43423 sd a0,-376(s0)
1000162a: e8b43023 sd a1,-384(s0)
1000162e: 84b2 mv s1,a2
10001630: 8c36 mv s8,a3
int32_t *int32ptr_temp;
int32_t int32_temp;
uint32_t uint32_temp;
uint64_t double_temp;
count = 0;
10001632: 4a01 li s4,0
while ((fract >> 32) >= (MAXFP1 / 5)) {
10001634: e6f43c23 sd a5,-392(s0)
while ((c = *format++)) {
10001638: 0004c503 lbu a0,0(s1)
1000163c: 00148b93 addi s7,s1,1
10001640: cd11 beqz a0,1000165c <_prf+0x5c>
if (c != '%') {
10001642: 02500793 li a5,37
10001646: 16f50363 beq a0,a5,100017ac <_prf+0x1ac>
if ((*func) (c, dest) == EOF) {
1000164a: e8843783 ld a5,-376(s0)
1000164e: e8043583 ld a1,-384(s0)
10001652: 9782 jalr a5
10001654: 57fd li a5,-1
10001656: 02f51363 bne a0,a5,1000167c <_prf+0x7c>
return EOF;
1000165a: 5a7d li s4,-1
}
}
}
}
return count;
}
1000165c: 70ba ld ra,424(sp)
1000165e: 741a ld s0,416(sp)
10001660: 8552 mv a0,s4
10001662: 64fa ld s1,408(sp)
10001664: 695a ld s2,400(sp)
10001666: 69ba ld s3,392(sp)
10001668: 6a1a ld s4,384(sp)
1000166a: 7af6 ld s5,376(sp)
1000166c: 7b56 ld s6,368(sp)
1000166e: 7bb6 ld s7,360(sp)
10001670: 7c16 ld s8,352(sp)
10001672: 6cf6 ld s9,344(sp)
10001674: 6d56 ld s10,336(sp)
10001676: 6db6 ld s11,328(sp)
10001678: 615d addi sp,sp,432
1000167a: 8082 ret
count++;
1000167c: 2a05 addiw s4,s4,1
1000167e: 89e2 mv s3,s8
while ((c = *format++)) {
10001680: 84de mv s1,s7
if (c >= MAXFLD + 1)
10001682: 8c4e mv s8,s3
10001684: bf55 j 10001638 <_prf+0x38>
switch (c) {
10001686: 11390a63 beq s2,s3,1000179a <_prf+0x19a>
1000168a: 0f29ec63 bltu s3,s2,10001782 <_prf+0x182>
1000168e: fc0907e3 beqz s2,1000165c <_prf+0x5c>
10001692: 11c90263 beq s2,t3,10001796 <_prf+0x196>
fplus = true;
10001696: 8ba6 mv s7,s1
while (strchr("-+ #0", (c = *format++)) != NULL) {
10001698: 001b8493 addi s1,s7,1
1000169c: fff4c903 lbu s2,-1(s1)
100016a0: 100047b7 lui a5,0x10004
100016a4: 3a878513 addi a0,a5,936 # 100043a8 <__devconfig_end+0x340>
100016a8: 00090a9b sext.w s5,s2
100016ac: 85d6 mv a1,s5
100016ae: e7c43023 sd t3,-416(s0)
100016b2: e6643423 sd t1,-408(s0)
100016b6: e6c43823 sd a2,-400(s0)
100016ba: 109000ef jal ra,10001fc2 <strchr>
100016be: e7043603 ld a2,-400(s0)
100016c2: e6843303 ld t1,-408(s0)
100016c6: e6043e03 ld t3,-416(s0)
100016ca: fd55 bnez a0,10001686 <_prf+0x86>
if (c == '*') {
100016cc: 02a00713 li a4,42
100016d0: 10ea9163 bne s5,a4,100017d2 <_prf+0x1d2>
width = (int32_t) va_arg(vargs, int32_t);
100016d4: 000c2903 lw s2,0(s8)
100016d8: 008c0713 addi a4,s8,8
if (width < 0) {
100016dc: 00095763 bgez s2,100016ea <_prf+0xea>
fminus = true;
100016e0: 4785 li a5,1
width = -width;
100016e2: 4120093b negw s2,s2
fminus = true;
100016e6: e8f43823 sd a5,-368(s0)
c = *format++;
100016ea: 0004ca83 lbu s5,0(s1)
width = (int32_t) va_arg(vargs, int32_t);
100016ee: 8c3a mv s8,a4
c = *format++;
100016f0: 002b8493 addi s1,s7,2
if ((unsigned) width > MAXFLD) {
100016f4: 0009071b sext.w a4,s2
100016f8: 0c800693 li a3,200
100016fc: 00e6f463 bleu a4,a3,10001704 <_prf+0x104>
width = MAXFLD;
10001700: 0c800913 li s2,200
if (c == '.') {
10001704: 02e00693 li a3,46
precision = -1; /* No precision specified */
10001708: 5cfd li s9,-1
if (c == '.') {
1000170a: 02da9463 bne s5,a3,10001732 <_prf+0x132>
if (c == '*') {
1000170e: 0004c703 lbu a4,0(s1)
10001712: 02a00793 li a5,42
10001716: 10f71863 bne a4,a5,10001826 <_prf+0x226>
precision = (int32_t)
1000171a: 000c2c83 lw s9,0(s8)
c = *format++;
1000171e: 0485 addi s1,s1,1
precision = (int32_t)
10001720: 0c21 addi s8,s8,8
if (precision > MAXFLD)
10001722: 0c800793 li a5,200
10001726: 0197d363 ble s9,a5,1000172c <_prf+0x12c>
precision = -1;
1000172a: 5cfd li s9,-1
c = *format++;
1000172c: 0004ca83 lbu s5,0(s1)
10001730: 0485 addi s1,s1,1
if (strchr("hlLz", c) != NULL) {
10001732: 100047b7 lui a5,0x10004
10001736: 85d6 mv a1,s5
10001738: 3b078513 addi a0,a5,944 # 100043b0 <__devconfig_end+0x348>
1000173c: 087000ef jal ra,10001fc2 <strchr>
10001740: c501 beqz a0,10001748 <_prf+0x148>
c = *format++;
10001742: 0004ca83 lbu s5,0(s1)
10001746: 0485 addi s1,s1,1
switch (c) {
10001748: 06700693 li a3,103
1000174c: 1356cc63 blt a3,s5,10001884 <_prf+0x284>
10001750: 06500693 li a3,101
10001754: 20dade63 ble a3,s5,10001970 <_prf+0x370>
10001758: 04700693 li a3,71
1000175c: 20da8a63 beq s5,a3,10001970 <_prf+0x370>
10001760: 0d56c763 blt a3,s5,1000182e <_prf+0x22e>
10001764: 02500693 li a3,37
10001768: 72da8763 beq s5,a3,10001e96 <_prf+0x896>
1000176c: 04500693 li a3,69
10001770: 20da8063 beq s5,a3,10001970 <_prf+0x370>
10001774: ee0a84e3 beqz s5,1000165c <_prf+0x5c>
if (c >= MAXFLD + 1)
10001778: 0c800713 li a4,200
1000177c: 73575863 ble s5,a4,10001eac <_prf+0x8ac>
10001780: bde9 j 1000165a <_prf+0x5a>
switch (c) {
10001782: 03990163 beq s2,s9,100017a4 <_prf+0x1a4>
10001786: 00c90c63 beq s2,a2,1000179e <_prf+0x19e>
1000178a: f06916e3 bne s2,t1,10001696 <_prf+0x96>
fplus = true;
1000178e: 4785 li a5,1
10001790: e8f43c23 sd a5,-360(s0)
break;
10001794: b709 j 10001696 <_prf+0x96>
fspace = true;
10001796: 4d05 li s10,1
break;
10001798: bdfd j 10001696 <_prf+0x96>
falt = true;
1000179a: 4d85 li s11,1
break;
1000179c: bded j 10001696 <_prf+0x96>
pad = '0';
1000179e: 03000b13 li s6,48
break;
100017a2: bdd5 j 10001696 <_prf+0x96>
fminus = true;
100017a4: 4785 li a5,1
100017a6: e8f43823 sd a5,-368(s0)
100017aa: b5f5 j 10001696 <_prf+0x96>
pad = ' '; /* Default pad character */
100017ac: 02000b13 li s6,32
fminus = fplus = fspace = falt = false;
100017b0: 4d01 li s10,0
100017b2: e8043c23 sd zero,-360(s0)
100017b6: e8043823 sd zero,-368(s0)
100017ba: 4d81 li s11,0
switch (c) {
100017bc: 02300993 li s3,35
100017c0: 02d00c93 li s9,45
100017c4: 03000613 li a2,48
100017c8: 02b00313 li t1,43
100017cc: 02000e13 li t3,32
100017d0: b5e1 j 10001698 <_prf+0x98>
} else if (!isdigit(c))
100017d2: fd09071b addiw a4,s2,-48
100017d6: 4625 li a2,9
width = 0;
100017d8: 4901 li s2,0
i = 10 * i + *p++ - '0';
100017da: 45a9 li a1,10
} else if (!isdigit(c))
100017dc: f0e66ce3 bltu a2,a4,100016f4 <_prf+0xf4>
while (isdigit(((int) *p)))
100017e0: 000bc703 lbu a4,0(s7)
100017e4: 001b8493 addi s1,s7,1
100017e8: 00070a9b sext.w s5,a4
100017ec: fd07071b addiw a4,a4,-48
100017f0: f0e662e3 bltu a2,a4,100016f4 <_prf+0xf4>
i = 10 * i + *p++ - '0';
100017f4: 0325893b mulw s2,a1,s2
100017f8: 8ba6 mv s7,s1
100017fa: 0159093b addw s2,s2,s5
100017fe: fd09091b addiw s2,s2,-48
10001802: bff9 j 100017e0 <_prf+0x1e0>
10001804: 0395073b mulw a4,a0,s9
10001808: 84b2 mv s1,a2
1000180a: 9f2d addw a4,a4,a1
1000180c: fd070c9b addiw s9,a4,-48
while (isdigit(((int) *p)))
10001810: 0004c783 lbu a5,0(s1)
10001814: 00148613 addi a2,s1,1
10001818: 0007859b sext.w a1,a5
1000181c: fd07879b addiw a5,a5,-48
10001820: fef6f2e3 bleu a5,a3,10001804 <_prf+0x204>
10001824: bdfd j 10001722 <_prf+0x122>
i = 0;
10001826: 4c81 li s9,0
while (isdigit(((int) *p)))
10001828: 46a5 li a3,9
i = 10 * i + *p++ - '0';
1000182a: 4529 li a0,10
1000182c: b7d5 j 10001810 <_prf+0x210>
switch (c) {
1000182e: 06300693 li a3,99
10001832: 10da8163 beq s5,a3,10001934 <_prf+0x334>
10001836: 0756c763 blt a3,s5,100018a4 <_prf+0x2a4>
1000183a: 05800693 li a3,88
1000183e: f2da9de3 bne s5,a3,10001778 <_prf+0x178>
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
10001842: 008c0993 addi s3,s8,8
10001846: 000c2583 lw a1,0(s8)
1000184a: ec040c13 addi s8,s0,-320
if (alt_form) {
1000184e: 8be2 mv s7,s8
10001850: 000d8963 beqz s11,10001862 <_prf+0x262>
*buf++ = '0';
10001854: 76e1 lui a3,0xffff8
10001856: 8306c693 xori a3,a3,-2000
1000185a: ecd41023 sh a3,-320(s0)
*buf++ = 'x';
1000185e: ec240b93 addi s7,s0,-318
len = _to_x(buf, value, 16, precision);
10001862: 86e6 mv a3,s9
10001864: 4641 li a2,16
10001866: 855e mv a0,s7
10001868: cb3ff0ef jal ra,1000151a <_to_x>
if (prefix == 'X') {
1000186c: 05800693 li a3,88
10001870: 62da8063 beq s5,a3,10001e90 <_prf+0x890>
return len + (buf - buf0);
10001874: 418b8bb3 sub s7,s7,s8
prefix = 0;
10001878: 01b03d33 snez s10,s11
return len + (buf - buf0);
1000187c: 00ab853b addw a0,s7,a0
prefix = 0;
10001880: 0d06 slli s10,s10,0x1
10001882: a885 j 100018f2 <_prf+0x2f2>
switch (c) {
10001884: 07000693 li a3,112
10001888: 58da8a63 beq s5,a3,10001e1c <_prf+0x81c>
1000188c: 0756c563 blt a3,s5,100018f6 <_prf+0x2f6>
10001890: 06e00693 li a3,110
10001894: 50da8163 beq s5,a3,10001d96 <_prf+0x796>
10001898: 5156c663 blt a3,s5,10001da4 <_prf+0x7a4>
1000189c: 06900693 li a3,105
100018a0: ecda9ce3 bne s5,a3,10001778 <_prf+0x178>
int32_temp = (int32_t) va_arg(vargs, int32_t);
100018a4: 000c2a83 lw s5,0(s8)
100018a8: 008c0993 addi s3,s8,8
100018ac: ec040b93 addi s7,s0,-320
if (value < 0) {
100018b0: 080add63 bgez s5,1000194a <_prf+0x34a>
*buf++ = '-';
100018b4: 02d00693 li a3,45
100018b8: ecd40023 sb a3,-320(s0)
if (value != 0x80000000)
100018bc: 800007b7 lui a5,0x80000
100018c0: 800005b7 lui a1,0x80000
100018c4: 00fa8463 beq s5,a5,100018cc <_prf+0x2cc>
value = -value;
100018c8: 415005bb negw a1,s5
*buf++ = ' ';
100018cc: ec140c13 addi s8,s0,-319
return _to_x(buf, value, 10, precision);
100018d0: 86e6 mv a3,s9
100018d2: 4629 li a2,10
100018d4: 8562 mv a0,s8
100018d6: c45ff0ef jal ra,1000151a <_to_x>
if (fplus || fspace || (int32_temp < 0))
100018da: e9843783 ld a5,-360(s0)
return (buf + _to_udec(buf, (uint32_t) value, precision)) - start;
100018de: 9562 add a0,a0,s8
100018e0: 4175053b subw a0,a0,s7
if (fplus || fspace || (int32_temp < 0))
100018e4: e3d9 bnez a5,1000196a <_prf+0x36a>
100018e6: 000d1663 bnez s10,100018f2 <_prf+0x2f2>
100018ea: 01fad81b srliw a6,s5,0x1f
prefix = 0;
100018ee: 00080d1b sext.w s10,a6
if (precision != -1)
100018f2: 57fd li a5,-1
100018f4: ab39 j 10001e12 <_prf+0x812>
switch (c) {
100018f6: 07500693 li a3,117
100018fa: 56da8263 beq s5,a3,10001e5e <_prf+0x85e>
100018fe: 07800693 li a3,120
10001902: f4da80e3 beq s5,a3,10001842 <_prf+0x242>
10001906: 07300693 li a3,115
1000190a: e6da97e3 bne s5,a3,10001778 <_prf+0x178>
cptr_temp = (char *) va_arg(vargs, char *);
1000190e: 000c3583 ld a1,0(s8)
10001912: 008c0993 addi s3,s8,8
for (c = 0; c < MAXFLD; c++) {
10001916: 4d81 li s11,0
10001918: 87ae mv a5,a1
1000191a: 0c800693 li a3,200
if (cptr_temp[c] == '\0') {
1000191e: 0007c603 lbu a2,0(a5) # ffffffff80000000 <_time_slice_prio_ceiling+0xffffffff6fff629c>
10001922: 50060e63 beqz a2,10001e3e <_prf+0x83e>
for (c = 0; c < MAXFLD; c++) {
10001926: 2d85 addiw s11,s11,1
10001928: 0785 addi a5,a5,1
1000192a: fedd9ae3 bne s11,a3,1000191e <_prf+0x31e>
if ((precision >= 0) && (precision < c))
1000192e: 500cda63 bgez s9,10001e42 <_prf+0x842>
10001932: a305 j 10001e52 <_prf+0x852>
buf[0] = (char) ((int32_t) va_arg(vargs, int32_t));
10001934: 000c2783 lw a5,0(s8)
10001938: 008c0993 addi s3,s8,8
buf[1] = '\0';
1000193c: ec0400a3 sb zero,-319(s0)
buf[0] = (char) ((int32_t) va_arg(vargs, int32_t));
10001940: ecf40023 sb a5,-320(s0)
c = 1;
10001944: 4d85 li s11,1
prefix = 2;
10001946: 4d01 li s10,0
10001948: a159 j 10001dce <_prf+0x7ce>
} else if (fplus)
1000194a: e9843783 ld a5,-360(s0)
*buf++ = '+';
1000194e: 02b00693 li a3,43
} else if (fplus)
10001952: e789 bnez a5,1000195c <_prf+0x35c>
else if (fspace)
10001954: 000d0863 beqz s10,10001964 <_prf+0x364>
*buf++ = ' ';
10001958: 02000693 li a3,32
1000195c: ecd40023 sb a3,-320(s0)
10001960: 85d6 mv a1,s5
10001962: b7ad j 100018cc <_prf+0x2cc>
else if (fspace)
10001964: 85d6 mv a1,s5
10001966: 8c5e mv s8,s7
10001968: b7a5 j 100018d0 <_prf+0x2d0>
prefix = 1;
1000196a: e9843d03 ld s10,-360(s0)
1000196e: b751 j 100018f2 <_prf+0x2f2>
double_temp = u.i;
10001970: 000c3603 ld a2,0(s8)
fract = (double_temp << 11) & ~HIGHBIT64;
10001974: 55fd li a1,-1
10001976: 0015d513 srli a0,a1,0x1
1000197a: 00b61693 slli a3,a2,0xb
1000197e: 8ee9 and a3,a3,a0
u.d = (double) va_arg(vargs, double);
10001980: 008c0993 addi s3,s8,8
exp = double_temp >> 52 & 0x7ff;
10001984: 03465c13 srli s8,a2,0x34
10001988: 7ffc7c13 andi s8,s8,2047
fract = (double_temp << 11) & ~HIGHBIT64;
1000198c: ead43823 sd a3,-336(s0)
if (exp == 0x7ff) {
10001990: 7ff00513 li a0,2047
10001994: 06ac1c63 bne s8,a0,10001a0c <_prf+0x40c>
if (!fract) {
10001998: eeb1 bnez a3,100019f4 <_prf+0x3f4>
*buf++ = sign ? '-' : '+';
1000199a: 02b00793 li a5,43
1000199e: 00065463 bgez a2,100019a6 <_prf+0x3a6>
100019a2: 02d00793 li a5,45
100019a6: ecf40023 sb a5,-320(s0)
*buf++ = 'I';
100019aa: 04900793 li a5,73
100019ae: ecf400a3 sb a5,-319(s0)
100019b2: 04e00793 li a5,78
100019b6: ecf40123 sb a5,-318(s0)
*buf++ = 'N';
100019ba: 04600793 li a5,70
100019be: ecf401a3 sb a5,-317(s0)
*buf++ = 'F';
100019c2: ec440513 addi a0,s0,-316
return buf - start;
100019c6: ec040793 addi a5,s0,-320
*buf = 0;
100019ca: 00050023 sb zero,0(a0)
return buf - start;
100019ce: 9d1d subw a0,a0,a5
if (fplus || fspace || (buf[0] == '-'))
100019d0: e9843783 ld a5,-360(s0)
100019d4: 54079663 bnez a5,10001f20 <_prf+0x920>
100019d8: 000d1863 bnez s10,100019e8 <_prf+0x3e8>
100019dc: ec044803 lbu a6,-320(s0)
100019e0: fd380813 addi a6,a6,-45
prefix = 0;
100019e4: 00183d13 seqz s10,a6
if (c >= MAXFLD + 1)
100019e8: 0c800793 li a5,200
100019ec: c6a7c7e3 blt a5,a0,1000165a <_prf+0x5a>
100019f0: 8daa mv s11,a0
100019f2: aef1 j 10001dce <_prf+0x7ce>
*buf++ = 'N';
100019f4: 6799 lui a5,0x6
100019f6: 14e7879b addiw a5,a5,334
100019fa: ecf41023 sh a5,-320(s0)
*buf++ = 'a';
100019fe: 04e00793 li a5,78
10001a02: ecf40123 sb a5,-318(s0)
*buf++ = 'N';
10001a06: ec340513 addi a0,s0,-317
10001a0a: bf75 j 100019c6 <_prf+0x3c6>
if ((exp | fract) != 0) {
10001a0c: 00dc6533 or a0,s8,a3
10001a10: c955 beqz a0,10001ac4 <_prf+0x4c4>
fract |= HIGHBIT64;
10001a12: 15fe slli a1,a1,0x3f
10001a14: 8ecd or a3,a3,a1
10001a16: ead43823 sd a3,-336(s0)
exp -= (1023 - 1); /* +1 since .1 vs 1. */
10001a1a: c02c0c1b addiw s8,s8,-1022
*buf++ = '-';
10001a1e: 02d00693 li a3,45
if (decexp && sign) {
10001a22: 00064d63 bltz a2,10001a3c <_prf+0x43c>
} else if (fplus) {
10001a26: e9843783 ld a5,-360(s0)
*buf++ = '+';
10001a2a: 02b00693 li a3,43
} else if (fplus) {
10001a2e: e799 bnez a5,10001a3c <_prf+0x43c>
} else if (fspace) {
10001a30: ec040313 addi t1,s0,-320
10001a34: 000d0863 beqz s10,10001a44 <_prf+0x444>
*buf++ = ' ';
10001a38: 02000693 li a3,32
10001a3c: ecd40023 sb a3,-320(s0)
10001a40: ec140313 addi t1,s0,-319
10001a44: eb043683 ld a3,-336(s0)
10001a48: 4581 li a1,0
decexp = 0;
10001a4a: 4b81 li s7,0
while (exp <= -3) {
10001a4c: 5579 li a0,-2
fract *= 5;
10001a4e: 4e15 li t3,5
while (exp <= -3) {
10001a50: 08ac4063 blt s8,a0,10001ad0 <_prf+0x4d0>
10001a54: c199 beqz a1,10001a5a <_prf+0x45a>
10001a56: ead43823 sd a3,-336(s0)
while (exp > 0) {
10001a5a: 0b804163 bgtz s8,10001afc <_prf+0x4fc>
10001a5e: eb043683 ld a3,-336(s0)
while (exp < (0 + 4)) {
10001a62: 4591 li a1,4
*v = (*v & 1) + (*v >> 1);
10001a64: 0016f513 andi a0,a3,1
exp++;
10001a68: 2c05 addiw s8,s8,1
*v = (*v & 1) + (*v >> 1);
10001a6a: 8285 srli a3,a3,0x1
10001a6c: 96aa add a3,a3,a0
while (exp < (0 + 4)) {
10001a6e: febc1be3 bne s8,a1,10001a64 <_prf+0x464>
10001a72: ead43823 sd a3,-336(s0)
if (precision < 0)
10001a76: 000cd363 bgez s9,10001a7c <_prf+0x47c>
precision = 6; /* Default precision if none given */
10001a7a: 4c99 li s9,6
if ((c == 'g') || (c == 'G')) {
10001a7c: 0dfaf693 andi a3,s5,223
10001a80: 04700593 li a1,71
10001a84: 0ab69563 bne a3,a1,10001b2e <_prf+0x52e>
prune_zero = false; /* Assume trailing 0's allowed */
10001a88: 4c01 li s8,0
if (!falt && (precision > 0))
10001a8a: 000d9463 bnez s11,10001a92 <_prf+0x492>
prune_zero = false; /* Assume trailing 0's allowed */
10001a8e: 01903c33 snez s8,s9
if ((decexp < (-4 + 1)) || (decexp > (precision + 1))) {
10001a92: 56f5 li a3,-3
10001a94: 00dbc663 blt s7,a3,10001aa0 <_prf+0x4a0>
10001a98: 001c869b addiw a3,s9,1
10001a9c: 0976de63 ble s7,a3,10001b38 <_prf+0x538>
if (c == 'g')
10001aa0: 06700693 li a3,103
10001aa4: 16da8963 beq s5,a3,10001c16 <_prf+0x616>
c = 'E';
10001aa8: 04500a93 li s5,69
exp = precision + 1;
10001aac: 001c859b addiw a1,s9,1
digit_count = 16;
10001ab0: 46c1 li a3,16
10001ab2: ead42623 sw a3,-340(s0)
10001ab6: 4541 li a0,16
10001ab8: 0005869b sext.w a3,a1
10001abc: 08b55863 ble a1,a0,10001b4c <_prf+0x54c>
10001ac0: 46c1 li a3,16
10001ac2: a069 j 10001b4c <_prf+0x54c>
if ((exp | fract) != 0) {
10001ac4: 4c01 li s8,0
10001ac6: b785 j 10001a26 <_prf+0x426>
*v = (*v & 1) + (*v >> 1);
10001ac8: 0016f593 andi a1,a3,1
10001acc: 8285 srli a3,a3,0x1
10001ace: 96ae add a3,a3,a1
while ((fract >> 32) >= (MAXFP1 / 5)) {
10001ad0: e7843783 ld a5,-392(s0)
10001ad4: 0206d593 srli a1,a3,0x20
10001ad8: 2c05 addiw s8,s8,1
10001ada: feb7e7e3 bltu a5,a1,10001ac8 <_prf+0x4c8>
fract *= 5;
10001ade: 03c686b3 mul a3,a3,t3
decexp--;
10001ae2: 3bfd addiw s7,s7,-1
10001ae4: 4585 li a1,1
while ((fract >> 32) <= (MAXFP1 / 2)) {
10001ae6: 800007b7 lui a5,0x80000
10001aea: 0206de93 srli t4,a3,0x20
10001aee: fff7c793 not a5,a5
10001af2: f5d7efe3 bltu a5,t4,10001a50 <_prf+0x450>
fract <<= 1;
10001af6: 0686 slli a3,a3,0x1
exp--;
10001af8: 3c7d addiw s8,s8,-1
10001afa: b7f5 j 10001ae6 <_prf+0x4e6>
_ldiv5(&fract);
10001afc: eb040513 addi a0,s0,-336
10001b00: e6643823 sd t1,-400(s0)
10001b04: a85ff0ef jal ra,10001588 <_ldiv5>
10001b08: eb043683 ld a3,-336(s0)
10001b0c: e7043303 ld t1,-400(s0)
exp--;
10001b10: 3c7d addiw s8,s8,-1
decexp++;
10001b12: 2b85 addiw s7,s7,1
10001b14: 4581 li a1,0
while ((fract >> 32) <= (MAXFP1 / 2)) {
10001b16: 800007b7 lui a5,0x80000
10001b1a: 0206d513 srli a0,a3,0x20
10001b1e: fff7c793 not a5,a5
10001b22: f2a7e9e3 bltu a5,a0,10001a54 <_prf+0x454>
fract <<= 1;
10001b26: 0686 slli a3,a3,0x1
exp--;
10001b28: 3c7d addiw s8,s8,-1
10001b2a: 4585 li a1,1
10001b2c: b7ed j 10001b16 <_prf+0x516>
if (c == 'f') {
10001b2e: 06600693 li a3,102
prune_zero = false; /* Assume trailing 0's allowed */
10001b32: 4c01 li s8,0
if (c == 'f') {
10001b34: f6da9ce3 bne s5,a3,10001aac <_prf+0x4ac>
exp = precision + decexp;
10001b38: 019b85bb addw a1,s7,s9
if (exp < 0)
10001b3c: 06600a93 li s5,102
10001b40: f605d8e3 bgez a1,10001ab0 <_prf+0x4b0>
digit_count = 16;
10001b44: 46c1 li a3,16
10001b46: ead42623 sw a3,-340(s0)
exp = 0;
10001b4a: 4681 li a3,0
ltemp = 0x0800000000000000;
10001b4c: 4585 li a1,1
10001b4e: 15ee slli a1,a1,0x3b
10001b50: eab43c23 sd a1,-328(s0)
while (exp--) {
10001b54: 5e7d li t3,-1
10001b56: 36fd addiw a3,a3,-1
10001b58: 0dc69263 bne a3,t3,10001c1c <_prf+0x61c>
fract += ltemp;
10001b5c: eb043683 ld a3,-336(s0)
10001b60: eb843583 ld a1,-328(s0)
10001b64: 96ae add a3,a3,a1
if ((fract >> 32) & 0xF0000000) {
10001b66: 45bd li a1,15
fract += ltemp;
10001b68: ead43823 sd a3,-336(s0)
if ((fract >> 32) & 0xF0000000) {
10001b6c: 05f2 slli a1,a1,0x1c
10001b6e: 9281 srli a3,a3,0x20
10001b70: 8eed and a3,a3,a1
10001b72: c295 beqz a3,10001b96 <_prf+0x596>
_ldiv5(&fract);
10001b74: eb040513 addi a0,s0,-336
10001b78: e6643823 sd t1,-400(s0)
10001b7c: a0dff0ef jal ra,10001588 <_ldiv5>
*v = (*v & 1) + (*v >> 1);
10001b80: eb043683 ld a3,-336(s0)
decexp++;
10001b84: e7043303 ld t1,-400(s0)
10001b88: 2b85 addiw s7,s7,1
*v = (*v & 1) + (*v >> 1);
10001b8a: 0016f593 andi a1,a3,1
10001b8e: 8285 srli a3,a3,0x1
10001b90: 96ae add a3,a3,a1
10001b92: ead43823 sd a3,-336(s0)
if (c == 'f') {
10001b96: 06600593 li a1,102
10001b9a: 00130693 addi a3,t1,1
10001b9e: 0eba9d63 bne s5,a1,10001c98 <_prf+0x698>
if (decexp > 0) {
10001ba2: 0b705663 blez s7,10001c4e <_prf+0x64e>
10001ba6: 86de mv a3,s7
10001ba8: 8e1a mv t3,t1
*buf++ = _get_digit(&fract, &digit_count);
10001baa: 0e05 addi t3,t3,1
10001bac: eac40593 addi a1,s0,-340
10001bb0: eb040513 addi a0,s0,-336
10001bb4: e6643023 sd t1,-416(s0)
10001bb8: e6d43423 sd a3,-408(s0)
10001bbc: e7c43823 sd t3,-400(s0)
10001bc0: e5c43c23 sd t3,-424(s0)
10001bc4: a09ff0ef jal ra,100015cc <_get_digit>
10001bc8: e7043e03 ld t3,-400(s0)
decexp--;
10001bcc: e6843683 ld a3,-408(s0)
while (decexp > 0) {
10001bd0: e6043303 ld t1,-416(s0)
*buf++ = _get_digit(&fract, &digit_count);
10001bd4: feae0fa3 sb a0,-1(t3)
decexp--;
10001bd8: 36fd addiw a3,a3,-1
while (decexp > 0) {
10001bda: fae1 bnez a3,10001baa <_prf+0x5aa>
10001bdc: fffb851b addiw a0,s7,-1
10001be0: 0505 addi a0,a0,1
10001be2: 00a306b3 add a3,t1,a0
10001be6: 4b81 li s7,0
if (falt || (precision > 0))
10001be8: 000d9463 bnez s11,10001bf0 <_prf+0x5f0>
10001bec: 020c8263 beqz s9,10001c10 <_prf+0x610>
*buf++ = '.';
10001bf0: 00168d93 addi s11,a3,1 # ffffffffffff8001 <_time_slice_prio_ceiling+0xffffffffeffee29d>
10001bf4: 02e00593 li a1,46
10001bf8: 00b68023 sb a1,0(a3)
10001bfc: 88e6 mv a7,s9
10001bfe: 86ee mv a3,s11
while (precision-- > 0) {
10001c00: 5e7d li t3,-1
*buf++ = '0';
10001c02: 03000e93 li t4,48
while (precision-- > 0) {
10001c06: 38fd addiw a7,a7,-1
10001c08: 05c89863 bne a7,t3,10001c58 <_prf+0x658>
10001c0c: 019d86b3 add a3,s11,s9
if (prune_zero) {
10001c10: 0c0c1d63 bnez s8,10001cea <_prf+0x6ea>
10001c14: a291 j 10001d58 <_prf+0x758>
c = 'e';
10001c16: 06500a93 li s5,101
10001c1a: bd49 j 10001aac <_prf+0x4ac>
_ldiv5(<emp);
10001c1c: eb840513 addi a0,s0,-328
10001c20: e7c43023 sd t3,-416(s0)
10001c24: e6643423 sd t1,-408(s0)
10001c28: e6d43823 sd a3,-400(s0)
10001c2c: 95dff0ef jal ra,10001588 <_ldiv5>
*v = (*v & 1) + (*v >> 1);
10001c30: eb843583 ld a1,-328(s0)
10001c34: e6043e03 ld t3,-416(s0)
10001c38: e6843303 ld t1,-408(s0)
10001c3c: 0015f513 andi a0,a1,1
10001c40: 8185 srli a1,a1,0x1
10001c42: 95aa add a1,a1,a0
10001c44: eab43c23 sd a1,-328(s0)
10001c48: e7043683 ld a3,-400(s0)
10001c4c: b729 j 10001b56 <_prf+0x556>
*buf++ = '0';
10001c4e: 03000593 li a1,48
10001c52: 00b30023 sb a1,0(t1)
10001c56: bf49 j 10001be8 <_prf+0x5e8>
if (decexp < 0) {
10001c58: 000b8763 beqz s7,10001c66 <_prf+0x666>
*buf++ = '0';
10001c5c: 01d68023 sb t4,0(a3)
decexp++;
10001c60: 2b85 addiw s7,s7,1
10001c62: 0685 addi a3,a3,1
10001c64: b74d j 10001c06 <_prf+0x606>
*buf++ = _get_digit(&fract, &digit_count);
10001c66: eac40593 addi a1,s0,-340
10001c6a: eb040513 addi a0,s0,-336
10001c6e: e5d43c23 sd t4,-424(s0)
10001c72: e7c43023 sd t3,-416(s0)
10001c76: e7143423 sd a7,-408(s0)
10001c7a: e6d43823 sd a3,-400(s0)
10001c7e: 94fff0ef jal ra,100015cc <_get_digit>
10001c82: e7043683 ld a3,-400(s0)
10001c86: e5843e83 ld t4,-424(s0)
10001c8a: e6043e03 ld t3,-416(s0)
10001c8e: 00a68023 sb a0,0(a3)
10001c92: e6843883 ld a7,-408(s0)
10001c96: b7f1 j 10001c62 <_prf+0x662>
*buf = _get_digit(&fract, &digit_count);
10001c98: eac40593 addi a1,s0,-340
10001c9c: eb040513 addi a0,s0,-336
10001ca0: e6643423 sd t1,-408(s0)
10001ca4: e6d43823 sd a3,-400(s0)
10001ca8: 925ff0ef jal ra,100015cc <_get_digit>
10001cac: e6843303 ld t1,-408(s0)
if (*buf++ != '0')
10001cb0: 03000593 li a1,48
10001cb4: e7043683 ld a3,-400(s0)
*buf = _get_digit(&fract, &digit_count);
10001cb8: 00a30023 sb a0,0(t1)
if (*buf++ != '0')
10001cbc: 00b50363 beq a0,a1,10001cc2 <_prf+0x6c2>
decexp--;
10001cc0: 3bfd addiw s7,s7,-1
if (falt || (precision > 0))
10001cc2: 000d9463 bnez s11,10001cca <_prf+0x6ca>
10001cc6: 020c8063 beqz s9,10001ce6 <_prf+0x6e6>
*buf++ = '.';
10001cca: 00230d93 addi s11,t1,2
10001cce: 02e00593 li a1,46
10001cd2: 00b300a3 sb a1,1(t1)
10001cd6: 88e6 mv a7,s9
10001cd8: 836e mv t1,s11
while (precision-- > 0)
10001cda: 5e7d li t3,-1
10001cdc: 38fd addiw a7,a7,-1
10001cde: 09c89463 bne a7,t3,10001d66 <_prf+0x766>
10001ce2: 019d86b3 add a3,s11,s9
if (prune_zero) {
10001ce6: 000c0f63 beqz s8,10001d04 <_prf+0x704>
while (*--buf == '0')
10001cea: 03000513 li a0,48
10001cee: fff6c583 lbu a1,-1(a3)
10001cf2: fff68713 addi a4,a3,-1
10001cf6: 08a58e63 beq a1,a0,10001d92 <_prf+0x792>
if (*buf != '.')
10001cfa: 02e00513 li a0,46
10001cfe: 00a59363 bne a1,a0,10001d04 <_prf+0x704>
while (*--buf == '0')
10001d02: 86ba mv a3,a4
if ((c == 'e') || (c == 'E')) {
10001d04: 0dfaf713 andi a4,s5,223
10001d08: 04500593 li a1,69
10001d0c: 04b71663 bne a4,a1,10001d58 <_prf+0x758>
*buf++ = (char) c;
10001d10: 01568023 sb s5,0(a3)
*buf++ = '+';
10001d14: 02b00793 li a5,43
if (decexp < 0) {
10001d18: 000bd663 bgez s7,10001d24 <_prf+0x724>
decexp = -decexp;
10001d1c: 41700bbb negw s7,s7
*buf++ = '-';
10001d20: 02d00793 li a5,45
*buf++ = '+';
10001d24: 00f680a3 sb a5,1(a3)
*buf++ = (char) ((decexp / 100) + '0');
10001d28: 06400793 li a5,100
10001d2c: 02fbc73b divw a4,s7,a5
*buf++ = (char) (decexp + '0');
10001d30: 0695 addi a3,a3,5
decexp %= 100;
10001d32: 02fbe63b remw a2,s7,a5
*buf++ = (char) ((decexp / 100) + '0');
10001d36: 0307071b addiw a4,a4,48
10001d3a: fee68ea3 sb a4,-3(a3)
*buf++ = (char) ((decexp / 10) + '0');
10001d3e: 4729 li a4,10
10001d40: 02e647bb divw a5,a2,a4
decexp %= 10;
10001d44: 02e6663b remw a2,a2,a4
*buf++ = (char) ((decexp / 10) + '0');
10001d48: 0307879b addiw a5,a5,48
10001d4c: fef68f23 sb a5,-2(a3)
*buf++ = (char) (decexp + '0');
10001d50: 0306061b addiw a2,a2,48
10001d54: fec68fa3 sb a2,-1(a3)
return buf - start;
10001d58: ec040513 addi a0,s0,-320
*buf = 0;
10001d5c: 00068023 sb zero,0(a3)
return buf - start;
10001d60: 40a6853b subw a0,a3,a0
10001d64: b1b5 j 100019d0 <_prf+0x3d0>
*buf++ = _get_digit(&fract, &digit_count);
10001d66: eac40593 addi a1,s0,-340
10001d6a: eb040513 addi a0,s0,-336
10001d6e: e7c43023 sd t3,-416(s0)
10001d72: e7143423 sd a7,-408(s0)
10001d76: e6643823 sd t1,-400(s0)
10001d7a: 853ff0ef jal ra,100015cc <_get_digit>
10001d7e: e7043303 ld t1,-400(s0)
10001d82: e6043e03 ld t3,-416(s0)
10001d86: e6843883 ld a7,-408(s0)
10001d8a: 00a30023 sb a0,0(t1)
10001d8e: 0305 addi t1,t1,1
10001d90: b7b1 j 10001cdc <_prf+0x6dc>
while (*--buf == '0')
10001d92: 86ba mv a3,a4
10001d94: bfa9 j 10001cee <_prf+0x6ee>
*int32ptr_temp = count;
10001d96: 000c3783 ld a5,0(s8)
int32ptr_temp = (int32_t *)va_arg(vargs, int32_t *);
10001d9a: 008c0993 addi s3,s8,8
*int32ptr_temp = count;
10001d9e: 0147a023 sw s4,0(a5) # ffffffff80000000 <_time_slice_prio_ceiling+0xffffffff6fff629c>
break;
10001da2: b0c5 j 10001682 <_prf+0x82>
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
10001da4: 008c0993 addi s3,s8,8
10001da8: 000c2583 lw a1,0(s8)
10001dac: ec040c13 addi s8,s0,-320
if (alt_form) {
10001db0: 040d8563 beqz s11,10001dfa <_prf+0x7fa>
*buf++ = '0';
10001db4: 03000793 li a5,48
10001db8: ecf40023 sb a5,-320(s0)
10001dbc: ec140b93 addi s7,s0,-319
if (!value) {
10001dc0: ed95 bnez a1,10001dfc <_prf+0x7fc>
*buf++ = 0;
10001dc2: ec0400a3 sb zero,-319(s0)
if (precision != -1)
10001dc6: 57fd li a5,-1
prefix = 0;
10001dc8: 4d01 li s10,0
if (precision != -1)
10001dca: 0efc9463 bne s9,a5,10001eb2 <_prf+0x8b2>
if (c < width) {
10001dce: 0f2dc563 blt s11,s2,10001eb8 <_prf+0x8b8>
10001dd2: 896e mv s2,s11
10001dd4: 0149093b addw s2,s2,s4
if (pad == ' ')
10001dd8: ec040a93 addi s5,s0,-320
if ((*func)(*cptr, dest) == EOF)
10001ddc: 5b7d li s6,-1
for (cptr = buf; c > 0; c--, cptr++, count++) {
10001dde: 8b2a02e3 beq s4,s2,10001682 <_prf+0x82>
if ((*func)(*cptr, dest) == EOF)
10001de2: e8043583 ld a1,-384(s0)
10001de6: 000ac503 lbu a0,0(s5)
10001dea: e8843783 ld a5,-376(s0)
10001dee: 9782 jalr a5
10001df0: 876505e3 beq a0,s6,1000165a <_prf+0x5a>
for (cptr = buf; c > 0; c--, cptr++, count++) {
10001df4: 0a85 addi s5,s5,1
10001df6: 2a05 addiw s4,s4,1
10001df8: b7dd j 10001dde <_prf+0x7de>
if (alt_form) {
10001dfa: 8be2 mv s7,s8
return (buf - buf0) + _to_x(buf, value, 8, precision);
10001dfc: 855e mv a0,s7
10001dfe: 86e6 mv a3,s9
10001e00: 4621 li a2,8
10001e02: f18ff0ef jal ra,1000151a <_to_x>
10001e06: 418b8bb3 sub s7,s7,s8
10001e0a: 0175053b addw a0,a0,s7
if (precision != -1)
10001e0e: 57fd li a5,-1
prefix = 0;
10001e10: 4d01 li s10,0
if (precision != -1)
10001e12: bcfc8be3 beq s9,a5,100019e8 <_prf+0x3e8>
pad = ' ';
10001e16: 02000b13 li s6,32
10001e1a: b6f9 j 100019e8 <_prf+0x3e8>
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
10001e1c: 000c2583 lw a1,0(s8)
*buf++ = '0';
10001e20: 77e1 lui a5,0xffff8
10001e22: 8307c793 xori a5,a5,-2000
len = _to_x(buf, value, 16, precision);
10001e26: 46a1 li a3,8
10001e28: 4641 li a2,16
10001e2a: ec240513 addi a0,s0,-318
*buf++ = '0';
10001e2e: ecf41023 sh a5,-320(s0)
len = _to_x(buf, value, 16, precision);
10001e32: ee8ff0ef jal ra,1000151a <_to_x>
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
10001e36: 008c0993 addi s3,s8,8
return len + (buf - buf0);
10001e3a: 2509 addiw a0,a0,2
10001e3c: bfc9 j 10001e0e <_prf+0x80e>
if ((precision >= 0) && (precision < c))
10001e3e: 000cc863 bltz s9,10001e4e <_prf+0x84e>
10001e42: 87ee mv a5,s11
10001e44: 01bcd363 ble s11,s9,10001e4a <_prf+0x84a>
10001e48: 87e6 mv a5,s9
10001e4a: 00078d9b sext.w s11,a5
if (c > 0) {
10001e4e: 820d8ae3 beqz s11,10001682 <_prf+0x82>
memcpy(buf, cptr_temp, (size_t) c);
10001e52: 866e mv a2,s11
10001e54: ec040513 addi a0,s0,-320
10001e58: 266000ef jal ra,100020be <memcpy>
10001e5c: b4ed j 10001946 <_prf+0x346>
return _to_x(buf, value, 10, precision);
10001e5e: 000c2583 lw a1,0(s8)
10001e62: 86e6 mv a3,s9
10001e64: 4629 li a2,10
10001e66: ec040513 addi a0,s0,-320
uint32_temp = (uint32_t) va_arg(vargs, uint32_t);
10001e6a: 008c0993 addi s3,s8,8
return _to_x(buf, value, 10, precision);
10001e6e: eacff0ef jal ra,1000151a <_to_x>
10001e72: bf71 j 10001e0e <_prf+0x80e>
if (*buf >= 'a' && *buf <= 'z') {
10001e74: f9f7861b addiw a2,a5,-97
10001e78: 0ff67613 andi a2,a2,255
10001e7c: 00c5e563 bltu a1,a2,10001e86 <_prf+0x886>
*buf += 'A' - 'a';
10001e80: 3781 addiw a5,a5,-32
10001e82: 00f68023 sb a5,0(a3)
for (/**/; *buf; buf++) {
10001e86: 0685 addi a3,a3,1
10001e88: 0006c783 lbu a5,0(a3)
10001e8c: f7e5 bnez a5,10001e74 <_prf+0x874>
10001e8e: b2dd j 10001874 <_prf+0x274>
if (prefix == 'X') {
10001e90: 86e2 mv a3,s8
if (*buf >= 'a' && *buf <= 'z') {
10001e92: 45e5 li a1,25
10001e94: bfd5 j 10001e88 <_prf+0x888>
if ((*func)('%', dest) == EOF) {
10001e96: e8843783 ld a5,-376(s0)
10001e9a: e8043583 ld a1,-384(s0)
10001e9e: 02500513 li a0,37
10001ea2: 9782 jalr a5
10001ea4: 57fd li a5,-1
10001ea6: faf50a63 beq a0,a5,1000165a <_prf+0x5a>
count++;
10001eaa: 2a05 addiw s4,s4,1
if (c >= MAXFLD + 1)
10001eac: 89e2 mv s3,s8
10001eae: fd4ff06f j 10001682 <_prf+0x82>
pad = ' ';
10001eb2: 02000b13 li s6,32
10001eb6: bf21 j 10001dce <_prf+0x7ce>
if (fminus) {
10001eb8: e9043703 ld a4,-368(s0)
10001ebc: 4781 li a5,0
buf[i] = ' ';
10001ebe: 02000693 li a3,32
if (fminus) {
10001ec2: eb31 bnez a4,10001f16 <_prf+0x916>
(void) memmove((buf + (width - c)), buf, (size_t) (c
10001ec4: 41b9053b subw a0,s2,s11
10001ec8: ec040593 addi a1,s0,-320
10001ecc: 8baa mv s7,a0
10001ece: 001d861b addiw a2,s11,1
10001ed2: 952e add a0,a0,a1
10001ed4: 1ac000ef jal ra,10002080 <memmove>
if (pad == ' ')
10001ed8: 02000793 li a5,32
10001edc: 00fb0463 beq s6,a5,10001ee4 <_prf+0x8e4>
10001ee0: e9a43823 sd s10,-368(s0)
c = width - c + prefix;
10001ee4: e9043783 ld a5,-368(s0)
10001ee8: e9043a83 ld s5,-368(s0)
10001eec: 00fb8bbb addw s7,s7,a5
for (i = prefix; i < c; i++)
10001ef0: 000a879b sext.w a5,s5
10001ef4: ef77d0e3 ble s7,a5,10001dd4 <_prf+0x7d4>
buf[i] = pad;
10001ef8: ec040793 addi a5,s0,-320
10001efc: 97d6 add a5,a5,s5
10001efe: 01678023 sb s6,0(a5) # ffffffffffff8000 <_time_slice_prio_ceiling+0xffffffffeffee29c>
10001f02: 0a85 addi s5,s5,1
10001f04: b7f5 j 10001ef0 <_prf+0x8f0>
buf[i] = ' ';
10001f06: 00fd8733 add a4,s11,a5
10001f0a: ec040613 addi a2,s0,-320
10001f0e: 9732 add a4,a4,a2
10001f10: 00d70023 sb a3,0(a4)
10001f14: 0785 addi a5,a5,1
for (i = c; i < width; i++)
10001f16: 00fd873b addw a4,s11,a5
10001f1a: ff2746e3 blt a4,s2,10001f06 <_prf+0x906>
10001f1e: bd5d j 10001dd4 <_prf+0x7d4>
prefix = 1;
10001f20: e9843d03 ld s10,-360(s0)
10001f24: b4d1 j 100019e8 <_prf+0x3e8>
0000000010001f26 <_stdout_hook_default>:
while (*string != '\0') {
if (_stdout_hook((int)*string) == EOF) {
return EOF;
}
string++;
10001f26: 1141 addi sp,sp,-16
10001f28: e422 sd s0,8(sp)
10001f2a: 0800 addi s0,sp,16
10001f2c: 6422 ld s0,8(sp)
10001f2e: 557d li a0,-1
10001f30: 0141 addi sp,sp,16
10001f32: 8082 ret
0000000010001f34 <__stdout_hook_install>:
{
10001f34: 1141 addi sp,sp,-16
10001f36: e422 sd s0,8(sp)
10001f38: 0800 addi s0,sp,16
}
10001f3a: 6422 ld s0,8(sp)
_stdout_hook = hook;
10001f3c: 100057b7 lui a5,0x10005
10001f40: 26a7b423 sd a0,616(a5) # 10005268 <_stdout_hook>
}
10001f44: 0141 addi sp,sp,16
10001f46: 8082 ret
0000000010001f48 <fputc>:
{
10001f48: 1141 addi sp,sp,-16
10001f4a: e422 sd s0,8(sp)
10001f4c: 0800 addi s0,sp,16
return (stdout == stream) ? _stdout_hook(c) : EOF;
10001f4e: 4789 li a5,2
10001f50: 00f59963 bne a1,a5,10001f62 <fputc+0x1a>
}
10001f54: 6422 ld s0,8(sp)
return (stdout == stream) ? _stdout_hook(c) : EOF;
10001f56: 100057b7 lui a5,0x10005
10001f5a: 2687b303 ld t1,616(a5) # 10005268 <_stdout_hook>
}
10001f5e: 0141 addi sp,sp,16
return (stdout == stream) ? _stdout_hook(c) : EOF;
10001f60: 8302 jr t1
}
10001f62: 6422 ld s0,8(sp)
10001f64: 557d li a0,-1
10001f66: 0141 addi sp,sp,16
10001f68: 8082 ret
0000000010001f6a <strcpy>:
{
const char *c1 = m1;
const char *c2 = m2;
if (!n)
return 0;
10001f6a: 1141 addi sp,sp,-16
10001f6c: e422 sd s0,8(sp)
10001f6e: 0800 addi s0,sp,16
10001f70: 87aa mv a5,a0
10001f72: 0005c703 lbu a4,0(a1) # ffffffff80000000 <_time_slice_prio_ceiling+0xffffffff6fff629c>
10001f76: e711 bnez a4,10001f82 <strcpy+0x18>
10001f78: 00078023 sb zero,0(a5)
10001f7c: 6422 ld s0,8(sp)
10001f7e: 0141 addi sp,sp,16
10001f80: 8082 ret
10001f82: 00e78023 sb a4,0(a5)
10001f86: 0585 addi a1,a1,1
10001f88: 0785 addi a5,a5,1
10001f8a: b7e5 j 10001f72 <strcpy+0x8>
0000000010001f8c <strncpy>:
10001f8c: 1141 addi sp,sp,-16
10001f8e: e422 sd s0,8(sp)
10001f90: 0800 addi s0,sp,16
10001f92: 87aa mv a5,a0
10001f94: ce11 beqz a2,10001fb0 <strncpy+0x24>
10001f96: 0005c703 lbu a4,0(a1)
10001f9a: 00178693 addi a3,a5,1
10001f9e: fff60813 addi a6,a2,-1
10001fa2: eb11 bnez a4,10001fb6 <strncpy+0x2a>
10001fa4: 963e add a2,a2,a5
10001fa6: 00078023 sb zero,0(a5)
10001faa: 0785 addi a5,a5,1
10001fac: fef61de3 bne a2,a5,10001fa6 <strncpy+0x1a>
10001fb0: 6422 ld s0,8(sp)
10001fb2: 0141 addi sp,sp,16
10001fb4: 8082 ret
10001fb6: fee68fa3 sb a4,-1(a3)
10001fba: 0585 addi a1,a1,1
10001fbc: 8642 mv a2,a6
10001fbe: 87b6 mv a5,a3
10001fc0: bfd1 j 10001f94 <strncpy+0x8>
0000000010001fc2 <strchr>:
10001fc2: 1141 addi sp,sp,-16
10001fc4: e422 sd s0,8(sp)
10001fc6: 0800 addi s0,sp,16
10001fc8: 0ff5f593 andi a1,a1,255
10001fcc: 00054783 lbu a5,0(a0)
10001fd0: 00b78563 beq a5,a1,10001fda <strchr+0x18>
10001fd4: e791 bnez a5,10001fe0 <strchr+0x1e>
10001fd6: c191 beqz a1,10001fda <strchr+0x18>
10001fd8: 4501 li a0,0
10001fda: 6422 ld s0,8(sp)
10001fdc: 0141 addi sp,sp,16
10001fde: 8082 ret
10001fe0: 0505 addi a0,a0,1
10001fe2: b7ed j 10001fcc <strchr+0xa>
0000000010001fe4 <strlen>:
10001fe4: 1141 addi sp,sp,-16
10001fe6: e422 sd s0,8(sp)
10001fe8: 0800 addi s0,sp,16
10001fea: 872a mv a4,a0
10001fec: 87aa mv a5,a0
10001fee: 0007c683 lbu a3,0(a5)
10001ff2: 40e78533 sub a0,a5,a4
10001ff6: e681 bnez a3,10001ffe <strlen+0x1a>
10001ff8: 6422 ld s0,8(sp)
10001ffa: 0141 addi sp,sp,16
10001ffc: 8082 ret
10001ffe: 0785 addi a5,a5,1
10002000: b7fd j 10001fee <strlen+0xa>
0000000010002002 <strcmp>:
10002002: 1141 addi sp,sp,-16
10002004: e422 sd s0,8(sp)
10002006: 0800 addi s0,sp,16
10002008: 00054783 lbu a5,0(a0)
1000200c: 0005c703 lbu a4,0(a1)
10002010: 00e79463 bne a5,a4,10002018 <strcmp+0x16>
10002014: e799 bnez a5,10002022 <strcmp+0x20>
10002016: 873e mv a4,a5
10002018: 6422 ld s0,8(sp)
1000201a: 40e7853b subw a0,a5,a4
1000201e: 0141 addi sp,sp,16
10002020: 8082 ret
10002022: 0505 addi a0,a0,1
10002024: 0585 addi a1,a1,1
10002026: b7cd j 10002008 <strcmp+0x6>
0000000010002028 <strncmp>:
10002028: 1141 addi sp,sp,-16
1000202a: e422 sd s0,8(sp)
1000202c: 0800 addi s0,sp,16
1000202e: 962a add a2,a2,a0
10002030: 00c50f63 beq a0,a2,1000204e <strncmp+0x26>
10002034: 00054783 lbu a5,0(a0)
10002038: 0005c703 lbu a4,0(a1)
1000203c: 00e79363 bne a5,a4,10002042 <strncmp+0x1a>
10002040: e781 bnez a5,10002048 <strncmp+0x20>
10002042: 40e7853b subw a0,a5,a4
10002046: a029 j 10002050 <strncmp+0x28>
10002048: 0505 addi a0,a0,1
1000204a: 0585 addi a1,a1,1
1000204c: b7d5 j 10002030 <strncmp+0x8>
1000204e: 4501 li a0,0
10002050: 6422 ld s0,8(sp)
10002052: 0141 addi sp,sp,16
10002054: 8082 ret
0000000010002056 <strcat>:
10002056: 7179 addi sp,sp,-48
10002058: f406 sd ra,40(sp)
1000205a: f022 sd s0,32(sp)
1000205c: ec26 sd s1,24(sp)
1000205e: 1800 addi s0,sp,48
10002060: 84aa mv s1,a0
10002062: fcb43c23 sd a1,-40(s0)
10002066: f7fff0ef jal ra,10001fe4 <strlen>
1000206a: fd843583 ld a1,-40(s0)
1000206e: 9526 add a0,a0,s1
10002070: efbff0ef jal ra,10001f6a <strcpy>
10002074: 70a2 ld ra,40(sp)
10002076: 7402 ld s0,32(sp)
10002078: 8526 mv a0,s1
1000207a: 64e2 ld s1,24(sp)
1000207c: 6145 addi sp,sp,48
1000207e: 8082 ret
0000000010002080 <memmove>:
*
* @return pointer to destination buffer <d>
*/
void *memmove(void *d, const void *s, size_t n)
{
10002080: 1141 addi sp,sp,-16
10002082: e422 sd s0,8(sp)
10002084: 0800 addi s0,sp,16
char *dest = d;
const char *src = s;
if ((size_t) (d - s) < n) {
10002086: 40b507b3 sub a5,a0,a1
1000208a: 00c7ed63 bltu a5,a2,100020a4 <memmove+0x24>
1000208e: 962e add a2,a2,a1
char *dest = d;
10002090: 87aa mv a5,a0
n--;
dest[n] = src[n];
}
} else {
/* It is safe to perform a forward-copy */
while (n > 0) {
10002092: 02c58363 beq a1,a2,100020b8 <memmove+0x38>
*dest = *src;
10002096: 0005c703 lbu a4,0(a1)
dest++;
1000209a: 0785 addi a5,a5,1
src++;
1000209c: 0585 addi a1,a1,1
*dest = *src;
1000209e: fee78fa3 sb a4,-1(a5)
100020a2: bfc5 j 10002092 <memmove+0x12>
n--;
100020a4: 167d addi a2,a2,-1
dest[n] = src[n];
100020a6: 00c587b3 add a5,a1,a2
100020aa: 0007c703 lbu a4,0(a5)
100020ae: 00c507b3 add a5,a0,a2
100020b2: 00e78023 sb a4,0(a5)
while (n > 0) {
100020b6: f67d bnez a2,100020a4 <memmove+0x24>
n--;
}
}
return d;
}
100020b8: 6422 ld s0,8(sp)
100020ba: 0141 addi sp,sp,16
100020bc: 8082 ret
00000000100020be <memcpy>:
*
* @return pointer to start of destination buffer
*/
void *memcpy(void *_Restrict d, const void *_Restrict s, size_t n)
{
100020be: 1141 addi sp,sp,-16
100020c0: e422 sd s0,8(sp)
/* attempt word-sized copying only if buffers have identical alignment */
unsigned char *d_byte = (unsigned char *)d;
const unsigned char *s_byte = (const unsigned char *)s;
if ((((unsigned int)d ^ (unsigned int)s_byte) & 0x3) == 0) {
100020c2: 00b547b3 xor a5,a0,a1
{
100020c6: 0800 addi s0,sp,16
if ((((unsigned int)d ^ (unsigned int)s_byte) & 0x3) == 0) {
100020c8: 8b8d andi a5,a5,3
100020ca: c7b1 beqz a5,10002116 <memcpy+0x58>
unsigned char *d_byte = (unsigned char *)d;
100020cc: 87aa mv a5,a0
100020ce: 963e add a2,a2,a5
s_byte = (unsigned char *)s_word;
}
/* do byte-sized copying until finished */
while (n > 0) {
100020d0: 04c79c63 bne a5,a2,10002128 <memcpy+0x6a>
*(d_byte++) = *(s_byte++);
n--;
}
return d;
}
100020d4: 6422 ld s0,8(sp)
100020d6: 0141 addi sp,sp,16
100020d8: 8082 ret
if (n == 0) {
100020da: de6d beqz a2,100020d4 <memcpy+0x16>
*(d_byte++) = *(s_byte++);
100020dc: 0585 addi a1,a1,1
100020de: fff5c703 lbu a4,-1(a1)
100020e2: 0785 addi a5,a5,1
n--;
100020e4: 167d addi a2,a2,-1
*(d_byte++) = *(s_byte++);
100020e6: fee78fa3 sb a4,-1(a5)
while (((unsigned int)d_byte) & 0x3) {
100020ea: 0037f713 andi a4,a5,3
100020ee: f775 bnez a4,100020da <memcpy+0x1c>
100020f0: 86ae mv a3,a1
100020f2: 873e mv a4,a5
100020f4: 00c78333 add t1,a5,a2
while (n >= sizeof(unsigned int)) {
100020f8: 480d li a6,3
100020fa: 40e308b3 sub a7,t1,a4
100020fe: 01186e63 bltu a6,a7,1000211a <memcpy+0x5c>
10002102: 00265713 srli a4,a2,0x2
10002106: 56f1 li a3,-4
10002108: 02d706b3 mul a3,a4,a3
1000210c: 070a slli a4,a4,0x2
1000210e: 97ba add a5,a5,a4
10002110: 95ba add a1,a1,a4
10002112: 9636 add a2,a2,a3
10002114: bf6d j 100020ce <memcpy+0x10>
unsigned char *d_byte = (unsigned char *)d;
10002116: 87aa mv a5,a0
10002118: bfc9 j 100020ea <memcpy+0x2c>
*(d_word++) = *(s_word++);
1000211a: 0691 addi a3,a3,4
1000211c: ffc6a883 lw a7,-4(a3)
10002120: 0711 addi a4,a4,4
10002122: ff172e23 sw a7,-4(a4)
10002126: bfd1 j 100020fa <memcpy+0x3c>
*(d_byte++) = *(s_byte++);
10002128: 0585 addi a1,a1,1
1000212a: fff5c703 lbu a4,-1(a1)
1000212e: 0785 addi a5,a5,1
10002130: fee78fa3 sb a4,-1(a5)
10002134: bf71 j 100020d0 <memcpy+0x12>
0000000010002136 <memset>:
*
* @return pointer to start of buffer
*/
void *memset(void *buf, int c, size_t n)
{
10002136: 1141 addi sp,sp,-16
10002138: e422 sd s0,8(sp)
1000213a: 0800 addi s0,sp,16
/* do byte-sized initialization until word-aligned or finished */
unsigned char *d_byte = (unsigned char *)buf;
unsigned char c_byte = (unsigned char)c;
1000213c: 0ff5f693 andi a3,a1,255
unsigned char *d_byte = (unsigned char *)buf;
10002140: 87aa mv a5,a0
while (((unsigned int)d_byte) & 0x3) {
10002142: 0037f713 andi a4,a5,3
10002146: e329 bnez a4,10002188 <memset+0x52>
};
/* do word-sized initialization as long as possible */
unsigned int *d_word = (unsigned int *)d_byte;
unsigned int c_word = (unsigned int)(unsigned char)c;
10002148: 0ff5f593 andi a1,a1,255
c_word |= c_word << 8;
1000214c: 0085971b slliw a4,a1,0x8
10002150: 8dd9 or a1,a1,a4
c_word |= c_word << 16;
10002152: 0105971b slliw a4,a1,0x10
10002156: 8dd9 or a1,a1,a4
10002158: 2581 sext.w a1,a1
while (n >= sizeof(unsigned int)) {
1000215a: 873e mv a4,a5
1000215c: 00c78333 add t1,a5,a2
10002160: 480d li a6,3
10002162: 40e308b3 sub a7,t1,a4
10002166: 03186763 bltu a6,a7,10002194 <memset+0x5e>
1000216a: 00265713 srli a4,a2,0x2
1000216e: 00271593 slli a1,a4,0x2
10002172: 97ae add a5,a5,a1
10002174: 55f1 li a1,-4
10002176: 02b70733 mul a4,a4,a1
1000217a: 9732 add a4,a4,a2
1000217c: 973e add a4,a4,a5
/* do byte-sized initialization until finished */
d_byte = (unsigned char *)d_word;
while (n > 0) {
1000217e: 00f71f63 bne a4,a5,1000219c <memset+0x66>
*(d_byte++) = c_byte;
n--;
}
return buf;
}
10002182: 6422 ld s0,8(sp)
10002184: 0141 addi sp,sp,16
10002186: 8082 ret
if (n == 0) {
10002188: de6d beqz a2,10002182 <memset+0x4c>
*(d_byte++) = c_byte;
1000218a: 0785 addi a5,a5,1
1000218c: fed78fa3 sb a3,-1(a5)
n--;
10002190: 167d addi a2,a2,-1
10002192: bf45 j 10002142 <memset+0xc>
*(d_word++) = c_word;
10002194: 0711 addi a4,a4,4
10002196: feb72e23 sw a1,-4(a4)
1000219a: b7e1 j 10002162 <memset+0x2c>
*(d_byte++) = c_byte;
1000219c: 0785 addi a5,a5,1
1000219e: fed78fa3 sb a3,-1(a5)
100021a2: bff1 j 1000217e <memset+0x48>
00000000100021a4 <_nop_char_out>:
* @param c Character to swallow
*
* @return 0
*/
static int _nop_char_out(int c)
{
100021a4: 1141 addi sp,sp,-16
100021a6: e422 sd s0,8(sp)
100021a8: 0800 addi s0,sp,16
ARG_UNUSED(c);
/* do nothing */
return 0;
}
100021aa: 6422 ld s0,8(sp)
100021ac: 4501 li a0,0
100021ae: 0141 addi sp,sp,16
100021b0: 8082 ret
00000000100021b2 <_printk_dec_ulong>:
* @param num Number to output
*
* @return N/A
*/
static void _printk_dec_ulong(const unsigned long num)
{
100021b2: 7139 addi sp,sp,-64
100021b4: f822 sd s0,48(sp)
100021b6: f426 sd s1,40(sp)
100021b8: f04a sd s2,32(sp)
100021ba: ec4e sd s3,24(sp)
100021bc: e456 sd s5,8(sp)
100021be: e05a sd s6,0(sp)
100021c0: fc06 sd ra,56(sp)
100021c2: e852 sd s4,16(sp)
100021c4: 0080 addi s0,sp,64
unsigned long pos = 999999999;
100021c6: 3b9ad4b7 lui s1,0x3b9ad
{
100021ca: 892a mv s2,a0
100021cc: 49a5 li s3,9
unsigned long remainder = num;
int found_largest_digit = 0;
100021ce: 4781 li a5,0
unsigned long pos = 999999999;
100021d0: 9ff48493 addi s1,s1,-1537 # 3b9ac9ff <_time_slice_prio_ceiling+0x2b9a2c9b>
while (pos >= 9) {
if (found_largest_digit || remainder > pos) {
found_largest_digit = 1;
_char_out((int)((remainder / (pos + 1)) + 48));
100021d4: 10005b37 lui s6,0x10005
}
remainder %= (pos + 1);
pos /= 10;
100021d8: 4aa9 li s5,10
100021da: 00148a13 addi s4,s1,1
if (found_largest_digit || remainder > pos) {
100021de: e399 bnez a5,100021e4 <_printk_dec_ulong+0x32>
100021e0: 0124fa63 bleu s2,s1,100021f4 <_printk_dec_ulong+0x42>
_char_out((int)((remainder / (pos + 1)) + 48));
100021e4: 03495533 divu a0,s2,s4
100021e8: 270b3783 ld a5,624(s6) # 10005270 <_char_out>
100021ec: 0305051b addiw a0,a0,48
100021f0: 9782 jalr a5
found_largest_digit = 1;
100021f2: 4785 li a5,1
100021f4: 39fd addiw s3,s3,-1
remainder %= (pos + 1);
100021f6: 03497933 remu s2,s2,s4
pos /= 10;
100021fa: 0354d4b3 divu s1,s1,s5
while (pos >= 9) {
100021fe: fc099ee3 bnez s3,100021da <_printk_dec_ulong+0x28>
}
_char_out((int)(remainder + 48));
}
10002202: 7442 ld s0,48(sp)
_char_out((int)(remainder + 48));
10002204: 100057b7 lui a5,0x10005
}
10002208: 70e2 ld ra,56(sp)
1000220a: 74a2 ld s1,40(sp)
1000220c: 69e2 ld s3,24(sp)
1000220e: 6a42 ld s4,16(sp)
10002210: 6aa2 ld s5,8(sp)
10002212: 6b02 ld s6,0(sp)
_char_out((int)(remainder + 48));
10002214: 2707b303 ld t1,624(a5) # 10005270 <_char_out>
10002218: 0309051b addiw a0,s2,48
}
1000221c: 7902 ld s2,32(sp)
1000221e: 6121 addi sp,sp,64
_char_out((int)(remainder + 48));
10002220: 8302 jr t1
0000000010002222 <__printk_hook_install>:
{
10002222: 1141 addi sp,sp,-16
10002224: e422 sd s0,8(sp)
10002226: 0800 addi s0,sp,16
}
10002228: 6422 ld s0,8(sp)
_char_out = fn;
1000222a: 100057b7 lui a5,0x10005
1000222e: 26a7b823 sd a0,624(a5) # 10005270 <_char_out>
}
10002232: 0141 addi sp,sp,16
10002234: 8082 ret
0000000010002236 <printk>:
{
10002236: 7135 addi sp,sp,-160
10002238: e8a2 sd s0,80(sp)
1000223a: e4a6 sd s1,72(sp)
1000223c: 1080 addi s0,sp,96
1000223e: e0ca sd s2,64(sp)
10002240: fc4e sd s3,56(sp)
10002242: f852 sd s4,48(sp)
10002244: f456 sd s5,40(sp)
10002246: ec86 sd ra,88(sp)
10002248: f05a sd s6,32(sp)
1000224a: ec5e sd s7,24(sp)
1000224c: e862 sd s8,16(sp)
va_start(ap, fmt);
1000224e: 00840493 addi s1,s0,8
{
10002252: 8a2a mv s4,a0
10002254: e40c sd a1,8(s0)
10002256: e810 sd a2,16(s0)
10002258: ec14 sd a3,24(s0)
1000225a: f018 sd a4,32(s0)
1000225c: f41c sd a5,40(s0)
1000225e: 03043823 sd a6,48(s0)
10002262: 03143c23 sd a7,56(s0)
va_start(ap, fmt);
10002266: fa943423 sd s1,-88(s0)
int might_format = 0; /* 1 if encountered a '%' */
1000226a: 4901 li s2,0
switch (*fmt) {
1000226c: 06900a93 li s5,105
_char_out((int)'-');
10002270: 100059b7 lui s3,0x10005
while (*fmt) {
10002274: 000a4503 lbu a0,0(s4)
10002278: ed09 bnez a0,10002292 <printk+0x5c>
}
1000227a: 60e6 ld ra,88(sp)
1000227c: 6446 ld s0,80(sp)
1000227e: 64a6 ld s1,72(sp)
10002280: 6906 ld s2,64(sp)
10002282: 79e2 ld s3,56(sp)
10002284: 7a42 ld s4,48(sp)
10002286: 7aa2 ld s5,40(sp)
10002288: 7b02 ld s6,32(sp)
1000228a: 6be2 ld s7,24(sp)
1000228c: 6c42 ld s8,16(sp)
1000228e: 610d addi sp,sp,160
10002290: 8082 ret
if (!might_format) {
10002292: 00091b63 bnez s2,100022a8 <printk+0x72>
if (*fmt != '%') {
10002296: 02500793 li a5,37
1000229a: 12f50b63 beq a0,a5,100023d0 <printk+0x19a>
_char_out((int)*fmt);
1000229e: 2709b783 ld a5,624(s3) # 10005270 <_char_out>
100022a2: 9782 jalr a5
++fmt;
100022a4: 0a05 addi s4,s4,1
100022a6: b7f9 j 10002274 <printk+0x3e>
switch (*fmt) {
100022a8: 0d550a63 beq a0,s5,1000237c <printk+0x146>
100022ac: 04aae563 bltu s5,a0,100022f6 <printk+0xc0>
100022b0: 06300793 li a5,99
100022b4: 10f50163 beq a0,a5,100023b6 <printk+0x180>
100022b8: 02a7e663 bltu a5,a0,100022e4 <printk+0xae>
100022bc: 02500793 li a5,37
100022c0: 10f50263 beq a0,a5,100023c4 <printk+0x18e>
100022c4: 05800793 li a5,88
100022c8: 06f50163 beq a0,a5,1000232a <printk+0xf4>
_char_out((int)'%');
100022cc: 27098913 addi s2,s3,624
100022d0: 00093783 ld a5,0(s2)
100022d4: 02500513 li a0,37
100022d8: 9782 jalr a5
_char_out((int)*fmt);
100022da: 00093783 ld a5,0(s2)
100022de: 000a4503 lbu a0,0(s4)
100022e2: a0ed j 100023cc <printk+0x196>
switch (*fmt) {
100022e4: 06400793 li a5,100
100022e8: 08f50a63 beq a0,a5,1000237c <printk+0x146>
100022ec: 06800793 li a5,104
100022f0: faf50ae3 beq a0,a5,100022a4 <printk+0x6e>
100022f4: bfe1 j 100022cc <printk+0x96>
100022f6: 07300793 li a5,115
100022fa: 0af50363 beq a0,a5,100023a0 <printk+0x16a>
100022fe: 04a7ef63 bltu a5,a0,1000235c <printk+0x126>
10002302: 06c00793 li a5,108
10002306: f8f50fe3 beq a0,a5,100022a4 <printk+0x6e>
1000230a: 07000793 li a5,112
1000230e: faf51fe3 bne a0,a5,100022cc <printk+0x96>
_char_out('0');
10002312: 27098913 addi s2,s3,624
10002316: 00093783 ld a5,0(s2)
1000231a: 03000513 li a0,48
1000231e: 9782 jalr a5
_char_out('x');
10002320: 00093783 ld a5,0(s2)
10002324: 07800513 li a0,120
10002328: 9782 jalr a5
unsigned long x = va_arg(
1000232a: 00848913 addi s2,s1,8
1000232e: 0004bb83 ld s7,0(s1)
nibble += nibble > 9 ? 87 : 48;
10002332: 4c25 li s8,9
unsigned long x = va_arg(
10002334: 03c00493 li s1,60
for (; size; size--) {
10002338: 5b71 li s6,-4
char nibble = (num >> ((size - 1) << 2) & 0xf);
1000233a: 009bd7b3 srl a5,s7,s1
1000233e: 8bbd andi a5,a5,15
nibble += nibble > 9 ? 87 : 48;
10002340: 05700513 li a0,87
10002344: 00fc6463 bltu s8,a5,1000234c <printk+0x116>
10002348: 03000513 li a0,48
_char_out((int)nibble);
1000234c: 2709b703 ld a4,624(s3)
10002350: 953e add a0,a0,a5
10002352: 34f1 addiw s1,s1,-4
10002354: 9702 jalr a4
for (; size; size--) {
10002356: ff6492e3 bne s1,s6,1000233a <printk+0x104>
1000235a: a081 j 1000239a <printk+0x164>
switch (*fmt) {
1000235c: 07800793 li a5,120
10002360: fcf505e3 beq a0,a5,1000232a <printk+0xf4>
10002364: 07a00793 li a5,122
10002368: f2f50ee3 beq a0,a5,100022a4 <printk+0x6e>
1000236c: 07500793 li a5,117
10002370: f4f51ee3 bne a0,a5,100022cc <printk+0x96>
unsigned long u = va_arg(
10002374: 00848913 addi s2,s1,8
_printk_dec_ulong(u);
10002378: 6088 ld a0,0(s1)
1000237a: a831 j 10002396 <printk+0x160>
long d = va_arg(ap, long);
1000237c: 00848913 addi s2,s1,8
10002380: 6084 ld s1,0(s1)
if (d < 0) {
10002382: 0004d963 bgez s1,10002394 <printk+0x15e>
_char_out((int)'-');
10002386: 2709b783 ld a5,624(s3)
1000238a: 02d00513 li a0,45
d = -d;
1000238e: 409004b3 neg s1,s1
_char_out((int)'-');
10002392: 9782 jalr a5
_printk_dec_ulong(d);
10002394: 8526 mv a0,s1
_printk_dec_ulong(u);
10002396: e1dff0ef jal ra,100021b2 <_printk_dec_ulong>
int c = va_arg(ap, int);
1000239a: 84ca mv s1,s2
might_format = 0;
1000239c: 4901 li s2,0
1000239e: b719 j 100022a4 <printk+0x6e>
char *s = va_arg(ap, char *);
100023a0: 00848913 addi s2,s1,8
100023a4: 6084 ld s1,0(s1)
while (*s)
100023a6: 0004c503 lbu a0,0(s1)
100023aa: d965 beqz a0,1000239a <printk+0x164>
_char_out((int)(*s++));
100023ac: 2709b783 ld a5,624(s3)
100023b0: 0485 addi s1,s1,1
100023b2: 9782 jalr a5
100023b4: bfcd j 100023a6 <printk+0x170>
_char_out(c);
100023b6: 2709b783 ld a5,624(s3)
100023ba: 4088 lw a0,0(s1)
int c = va_arg(ap, int);
100023bc: 00848913 addi s2,s1,8
_char_out(c);
100023c0: 9782 jalr a5
100023c2: bfe1 j 1000239a <printk+0x164>
_char_out((int)'%');
100023c4: 2709b783 ld a5,624(s3)
100023c8: 02500513 li a0,37
_char_out((int)*fmt);
100023cc: 9782 jalr a5
100023ce: b7f9 j 1000239c <printk+0x166>
might_format = 1;
100023d0: 4905 li s2,1
100023d2: bdc9 j 100022a4 <printk+0x6e>
00000000100023d4 <_ConfigAbsSyms>:
/* file is auto-generated, do not modify ! */
#include <toolchain.h>
GEN_ABS_SYM_BEGIN (_ConfigAbsSyms)
100023d4: 1141 addi sp,sp,-16
100023d6: e422 sd s0,8(sp)
100023d8: 0800 addi s0,sp,16
GEN_ABSOLUTE_SYM(CONFIG_UART_CONSOLE, 1);
GEN_ABSOLUTE_SYM(CONFIG_MICROKERNEL, 1);
GEN_ABSOLUTE_SYM(CONFIG_ENABLE_SHELL, 1);
GEN_ABSOLUTE_SYM(CONFIG_MEM_POOL_SPLIT_BEFORE_DEFRAG, 1);
GEN_ABS_SYM_END
100023da: 6422 ld s0,8(sp)
100023dc: 0141 addi sp,sp,16
100023de: 8082 ret
00000000100023e0 <shell_cmd_soc_info>:
100023e0: 1141 addi sp,sp,-16
100023e2: e406 sd ra,8(sp)
100023e4: e022 sd s0,0(sp)
100023e6: 10004537 lui a0,0x10004
100023ea: 0800 addi s0,sp,16
100023ec: 51850513 addi a0,a0,1304 # 10004518 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x130>
100023f0: e47ff0ef jal ra,10002236 <printk>
100023f4: 10004537 lui a0,0x10004
100023f8: 55850513 addi a0,a0,1368 # 10004558 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x170>
100023fc: e3bff0ef jal ra,10002236 <printk>
10002400: 10004537 lui a0,0x10004
10002404: 58850513 addi a0,a0,1416 # 10004588 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x1a0>
10002408: e2fff0ef jal ra,10002236 <printk>
1000240c: 60a2 ld ra,8(sp)
1000240e: 6402 ld s0,0(sp)
10002410: 4501 li a0,0
10002412: 0141 addi sp,sp,16
10002414: 8082 ret
0000000010002416 <riscv_gnss_soc_init>:
10002416: 1101 addi sp,sp,-32
10002418: e426 sd s1,8(sp)
1000241a: 400014b7 lui s1,0x40001
1000241e: ec06 sd ra,24(sp)
10002420: e822 sd s0,16(sp)
10002422: 0486 slli s1,s1,0x1
10002424: 1000 addi s0,sp,32
10002426: 100005b7 lui a1,0x10000
1000242a: 01048513 addi a0,s1,16 # 40001010 <_time_slice_prio_ceiling+0x2fff72ac>
1000242e: 13c58593 addi a1,a1,316 # 1000013c <_IsrWrapper>
10002432: 59d000ef jal ra,100031ce <WRITE64>
10002436: 02848513 addi a0,s1,40
1000243a: 4581 li a1,0
1000243c: 585000ef jal ra,100031c0 <WRITE32>
10002440: 60e2 ld ra,24(sp)
10002442: 6442 ld s0,16(sp)
10002444: 64a2 ld s1,8(sp)
10002446: 4501 li a0,0
10002448: 6105 addi sp,sp,32
1000244a: 8082 ret
000000001000244c <get_device_name>:
1000244c: 1141 addi sp,sp,-16
1000244e: e422 sd s0,8(sp)
10002450: 0800 addi s0,sp,16
10002452: 0f100793 li a5,241
10002456: 06f51b63 bne a0,a5,100024cc <get_device_name+0x80>
1000245a: 679d lui a5,0x7
1000245c: 0005871b sext.w a4,a1
10002460: 75578793 addi a5,a5,1877 # 7755 <__bss_num_words+0x69b5>
10002464: 04f70a63 beq a4,a5,100024b8 <get_device_name+0x6c>
10002468: 6795 lui a5,0x5
1000246a: 57778793 addi a5,a5,1399 # 5577 <__bss_num_words+0x47d7>
1000246e: 04f70a63 beq a4,a5,100024c2 <get_device_name+0x76>
10002472: f985879b addiw a5,a1,-104
10002476: 03079693 slli a3,a5,0x30
1000247a: 92c1 srli a3,a3,0x30
1000247c: 4765 li a4,25
1000247e: 00d76d63 bltu a4,a3,10002498 <get_device_name+0x4c>
10002482: 00379713 slli a4,a5,0x3
10002486: 100047b7 lui a5,0x10004
1000248a: 3e878793 addi a5,a5,1000 # 100043e8 <GNSS_SENSOR_SLV_DEVICE_NAMES>
1000248e: 97ba add a5,a5,a4
10002490: 6388 ld a0,0(a5)
10002492: 6422 ld s0,8(sp)
10002494: 0141 addi sp,sp,16
10002496: 8082 ret
10002498: b005859b addiw a1,a1,-1280
1000249c: 03059713 slli a4,a1,0x30
100024a0: 9341 srli a4,a4,0x30
100024a2: 4795 li a5,5
100024a4: 02e7e463 bltu a5,a4,100024cc <get_device_name+0x80>
100024a8: 100047b7 lui a5,0x10004
100024ac: 058e slli a1,a1,0x3
100024ae: 3b878793 addi a5,a5,952 # 100043b8 <GNSS_SENSOR_MST_DEVICE_NAMES>
100024b2: 95be add a1,a1,a5
100024b4: 6188 ld a0,0(a1)
100024b6: bff1 j 10002492 <get_device_name+0x46>
100024b8: 10004537 lui a0,0x10004
100024bc: 4c050513 addi a0,a0,1216 # 100044c0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xd8>
100024c0: bfc9 j 10002492 <get_device_name+0x46>
100024c2: 10004537 lui a0,0x10004
100024c6: 4d850513 addi a0,a0,1240 # 100044d8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xf0>
100024ca: b7e1 j 10002492 <get_device_name+0x46>
100024cc: 10004537 lui a0,0x10004
100024d0: 4b850513 addi a0,a0,1208 # 100044b8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xd0>
100024d4: bf7d j 10002492 <get_device_name+0x46>
00000000100024d6 <get_tech_name>:
/**
* @brief Get technology name
*/
const char *const get_tech_name(uint32_t tech)
{
100024d6: 1141 addi sp,sp,-16
100024d8: e422 sd s0,8(sp)
100024da: 0800 addi s0,sp,16
switch (tech) {
100024dc: 02400793 li a5,36
100024e0: 00f50c63 beq a0,a5,100024f8 <get_tech_name+0x22>
100024e4: 03100793 li a5,49
100024e8: 00f50f63 beq a0,a5,10002506 <get_tech_name+0x30>
100024ec: e115 bnez a0,10002510 <get_tech_name+0x3a>
case TECH_INFERRED: return "inferred";
100024ee: 10004537 lui a0,0x10004
100024f2: 4f050513 addi a0,a0,1264 # 100044f0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x108>
100024f6: a029 j 10002500 <get_tech_name+0x2a>
case TECH_VIRTEX6: return "Virtex6";
100024f8: 10004537 lui a0,0x10004
100024fc: 50050513 addi a0,a0,1280 # 10004500 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x118>
case TECH_KINTEX7: return "Kintex7";
default:;
}
return "unknown";
}
10002500: 6422 ld s0,8(sp)
10002502: 0141 addi sp,sp,16
10002504: 8082 ret
case TECH_KINTEX7: return "Kintex7";
10002506: 10004537 lui a0,0x10004
1000250a: 50850513 addi a0,a0,1288 # 10004508 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x120>
1000250e: bfcd j 10002500 <get_tech_name+0x2a>
return "unknown";
10002510: 10004537 lui a0,0x10004
10002514: 51050513 addi a0,a0,1296 # 10004510 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x128>
10002518: b7e5 j 10002500 <get_tech_name+0x2a>
000000001000251a <shell_cmd_soc_pnp>:
*
* This function reads information from the PNP slave device that is mapped
* into hardcoded address __PNP (0xFFFFF000).
*/
static int shell_cmd_soc_pnp(int argc, char *argv[])
{
1000251a: 7119 addi sp,sp,-128
adr_type xaddr, xmask, xsize;
volatile uint32_t *iter;
MasterDescrWord mcfg;
int mst_cnt=0, slv_cnt=0;
tech = READ32(&__PNP->tech);
1000251c: 20000537 lui a0,0x20000
{
10002520: fc86 sd ra,120(sp)
10002522: f8a2 sd s0,112(sp)
10002524: f4a6 sd s1,104(sp)
10002526: 0100 addi s0,sp,128
10002528: f0ca sd s2,96(sp)
1000252a: ecce sd s3,88(sp)
1000252c: e8d2 sd s4,80(sp)
1000252e: e4d6 sd s5,72(sp)
10002530: e0da sd s6,64(sp)
10002532: f862 sd s8,48(sp)
10002534: f466 sd s9,40(sp)
10002536: f06a sd s10,32(sp)
10002538: ec6e sd s11,24(sp)
1000253a: fc5e sd s7,56(sp)
tech = READ32(&__PNP->tech);
1000253c: e0150513 addi a0,a0,-511 # 1ffffe01 <_time_slice_prio_ceiling+0xfff609d>
10002540: 050e slli a0,a0,0x3
10002542: 463000ef jal ra,100031a4 <READ32>
10002546: 0005049b sext.w s1,a0
slaves_total = (tech >> 8) & 0xff;
printk("# RISC-V: Rocket-Chip demonstration design\n");
1000254a: 10004537 lui a0,0x10004
1000254e: 5d050513 addi a0,a0,1488 # 100045d0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x1e8>
10002552: ce5ff0ef jal ra,10002236 <printk>
hwid = READ32(&__PNP->hwid);
10002556: 00100537 lui a0,0x100
1000255a: 157d addi a0,a0,-1
1000255c: 0532 slli a0,a0,0xc
1000255e: 447000ef jal ra,100031a4 <READ32>
printk("# HW id: 0x%x\n", hwid);
10002562: 0005059b sext.w a1,a0
10002566: 10004537 lui a0,0x10004
1000256a: 60050513 addi a0,a0,1536 # 10004600 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x218>
1000256e: cc9ff0ef jal ra,10002236 <printk>
hwid = READ32(&__PNP->fwid);
10002572: 40000537 lui a0,0x40000
10002576: c0150513 addi a0,a0,-1023 # 3ffffc01 <_time_slice_prio_ceiling+0x2fff5e9d>
1000257a: 050a slli a0,a0,0x2
1000257c: 429000ef jal ra,100031a4 <READ32>
printk("# FW id: 0x%x\n", hwid);
10002580: 0005059b sext.w a1,a0
10002584: 10004537 lui a0,0x10004
10002588: 61850513 addi a0,a0,1560 # 10004618 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x230>
1000258c: cabff0ef jal ra,10002236 <printk>
printk("# Target technology: %s\n", get_tech_name(tech & 0xFF));
10002590: 0ff4f513 andi a0,s1,255
10002594: f43ff0ef jal ra,100024d6 <get_tech_name>
10002598: 85aa mv a1,a0
1000259a: 10004537 lui a0,0x10004
1000259e: 63050513 addi a0,a0,1584 # 10004630 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x248>
iter = (volatile uint32_t *)__PNP->cfg_table;
mcfg.val = READ32(iter);
100025a2: 040004b7 lui s1,0x4000
printk("# Target technology: %s\n", get_tech_name(tech & 0xFF));
100025a6: c91ff0ef jal ra,10002236 <printk>
mcfg.val = READ32(iter);
100025aa: fc148493 addi s1,s1,-63 # 3ffffc1 <__bss_num_words+0x3fff221>
100025ae: 00649513 slli a0,s1,0x6
100025b2: 3f3000ef jal ra,100031a4 <READ32>
return VENDOR_NAME;
100025b6: 10004a37 lui s4,0x10004
return UNKOWN_ID_NAME;
100025ba: 10004ab7 lui s5,0x10004
mcfg.val = READ32(iter);
100025be: 892a mv s2,a0
int mst_cnt=0, slv_cnt=0;
100025c0: 4981 li s3,0
100025c2: 4b01 li s6,0
iter = (volatile uint32_t *)__PNP->cfg_table;
100025c4: 049a slli s1,s1,0x6
get_vendor_name(vid), get_device_name(vid, did));
} else {
SlaveConfigType *pslv = (SlaveConfigType *)iter;
vid = READ16(&pslv->vid);
did = READ16(&pslv->did);
printk("# AXI4: slv%d: %s %s\n", slv_cnt++,
100025c6: 10004c37 lui s8,0x10004
xmask = READ32(&pslv->xmask);
xmask ^= 0xFFFFFFFF;
xsize = xmask + 1;
printk("# %x...%x, size = ",
100025ca: 10004cb7 lui s9,0x10004
if (xsize < 1024) {
printk("%d bytes\n", (int)xsize);
} else if (xsize < 1024*1024) {
printk("%d KB\n", (int)(xsize >> 10));
} else {
printk("%d MB\n", (int)(xsize >> 20));
100025ce: 10004d37 lui s10,0x10004
printk("%d KB\n", (int)(xsize >> 10));
100025d2: 10004db7 lui s11,0x10004
return VENDOR_NAME;
100025d6: 5b8a0a13 addi s4,s4,1464 # 100045b8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x1d0>
return UNKOWN_ID_NAME;
100025da: 4b8a8a93 addi s5,s5,1208 # 100044b8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xd0>
while (mcfg.bits.descrtype != PNP_CFG_TYPE_INVALID) {
100025de: 0089579b srliw a5,s2,0x8
100025e2: 8b8d andi a5,a5,3
100025e4: e38d bnez a5,10002606 <shell_cmd_soc_pnp+0xec>
iter = (volatile uint32_t *)((uint8_t *)iter + mcfg.bits.descrsize);
mcfg.val = READ32(iter);
}
return 0;
}
100025e6: 70e6 ld ra,120(sp)
100025e8: 7446 ld s0,112(sp)
100025ea: 74a6 ld s1,104(sp)
100025ec: 7906 ld s2,96(sp)
100025ee: 69e6 ld s3,88(sp)
100025f0: 6a46 ld s4,80(sp)
100025f2: 6aa6 ld s5,72(sp)
100025f4: 6b06 ld s6,64(sp)
100025f6: 7be2 ld s7,56(sp)
100025f8: 7c42 ld s8,48(sp)
100025fa: 7ca2 ld s9,40(sp)
100025fc: 7d02 ld s10,32(sp)
100025fe: 6de2 ld s11,24(sp)
10002600: 4501 li a0,0
10002602: 6109 addi sp,sp,128
10002604: 8082 ret
if (mcfg.bits.descrtype == PNP_CFG_TYPE_MASTER) {
10002606: 4705 li a4,1
10002608: 00648513 addi a0,s1,6
1000260c: 00448b93 addi s7,s1,4
10002610: 06e79463 bne a5,a4,10002678 <shell_cmd_soc_pnp+0x15e>
vid = READ16(&pmst->vid);
10002614: 381000ef jal ra,10003194 <READ16>
10002618: f8a43423 sd a0,-120(s0)
did = READ16(&pmst->did);
1000261c: 855e mv a0,s7
1000261e: 377000ef jal ra,10003194 <READ16>
if (vid != VENDOR_GNSSSENSOR) {
10002622: f8843783 ld a5,-120(s0)
did = READ16(&pmst->did);
10002626: 85aa mv a1,a0
if (vid != VENDOR_GNSSSENSOR) {
10002628: 0f100693 li a3,241
1000262c: 0007851b sext.w a0,a5
printk("# AXI4: mst%d: %s %s\n", mst_cnt++,
10002630: 001b071b addiw a4,s6,1
return VENDOR_NAME;
10002634: 8652 mv a2,s4
if (vid != VENDOR_GNSSSENSOR) {
10002636: 00d50363 beq a0,a3,1000263c <shell_cmd_soc_pnp+0x122>
return UNKOWN_ID_NAME;
1000263a: 8656 mv a2,s5
printk("# AXI4: mst%d: %s %s\n", mst_cnt++,
1000263c: 853e mv a0,a5
1000263e: f8e43023 sd a4,-128(s0)
10002642: f8c43423 sd a2,-120(s0)
10002646: e07ff0ef jal ra,1000244c <get_device_name>
1000264a: f8843603 ld a2,-120(s0)
1000264e: 86aa mv a3,a0
10002650: 10004537 lui a0,0x10004
10002654: 85da mv a1,s6
10002656: 65050513 addi a0,a0,1616 # 10004650 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x268>
1000265a: bddff0ef jal ra,10002236 <printk>
1000265e: f8043703 ld a4,-128(s0)
10002662: 8bce mv s7,s3
10002664: 8b3a mv s6,a4
iter = (volatile uint32_t *)((uint8_t *)iter + mcfg.bits.descrsize);
10002666: 0ff97913 andi s2,s2,255
1000266a: 94ca add s1,s1,s2
mcfg.val = READ32(iter);
1000266c: 8526 mv a0,s1
1000266e: 337000ef jal ra,100031a4 <READ32>
10002672: 892a mv s2,a0
10002674: 89de mv s3,s7
10002676: b7a5 j 100025de <shell_cmd_soc_pnp+0xc4>
vid = READ16(&pslv->vid);
10002678: 31d000ef jal ra,10003194 <READ16>
1000267c: f8a43423 sd a0,-120(s0)
did = READ16(&pslv->did);
10002680: 855e mv a0,s7
10002682: 313000ef jal ra,10003194 <READ16>
if (vid != VENDOR_GNSSSENSOR) {
10002686: f8843783 ld a5,-120(s0)
1000268a: 0f100713 li a4,241
did = READ16(&pslv->did);
1000268e: 85aa mv a1,a0
if (vid != VENDOR_GNSSSENSOR) {
10002690: 0007869b sext.w a3,a5
printk("# AXI4: slv%d: %s %s\n", slv_cnt++,
10002694: 00198b9b addiw s7,s3,1
return VENDOR_NAME;
10002698: 8652 mv a2,s4
if (vid != VENDOR_GNSSSENSOR) {
1000269a: 00e68363 beq a3,a4,100026a0 <shell_cmd_soc_pnp+0x186>
return UNKOWN_ID_NAME;
1000269e: 8656 mv a2,s5
printk("# AXI4: slv%d: %s %s\n", slv_cnt++,
100026a0: 853e mv a0,a5
100026a2: f8c43423 sd a2,-120(s0)
100026a6: da7ff0ef jal ra,1000244c <get_device_name>
100026aa: f8843603 ld a2,-120(s0)
100026ae: 86aa mv a3,a0
100026b0: 85ce mv a1,s3
100026b2: 670c0513 addi a0,s8,1648 # 10004670 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x288>
100026b6: b81ff0ef jal ra,10002236 <printk>
xaddr = READ32(&pslv->xaddr);
100026ba: 00c48513 addi a0,s1,12
100026be: 2e7000ef jal ra,100031a4 <READ32>
100026c2: 02051593 slli a1,a0,0x20
100026c6: 9181 srli a1,a1,0x20
xmask = READ32(&pslv->xmask);
100026c8: 00848513 addi a0,s1,8
xaddr = READ32(&pslv->xaddr);
100026cc: f8b43423 sd a1,-120(s0)
xmask = READ32(&pslv->xmask);
100026d0: 2d5000ef jal ra,100031a4 <READ32>
xmask ^= 0xFFFFFFFF;
100026d4: fff54613 not a2,a0
printk("# %x...%x, size = ",
100026d8: f8843583 ld a1,-120(s0)
xmask ^= 0xFFFFFFFF;
100026dc: 1602 slli a2,a2,0x20
100026de: 9201 srli a2,a2,0x20
xsize = xmask + 1;
100026e0: 00160993 addi s3,a2,1
printk("# %x...%x, size = ",
100026e4: 690c8513 addi a0,s9,1680 # 10004690 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x2a8>
100026e8: 962e add a2,a2,a1
100026ea: b4dff0ef jal ra,10002236 <printk>
if (xsize < 1024) {
100026ee: 3ff00793 li a5,1023
100026f2: 0137eb63 bltu a5,s3,10002708 <shell_cmd_soc_pnp+0x1ee>
printk("%d bytes\n", (int)xsize);
100026f6: 10004537 lui a0,0x10004
100026fa: 0009859b sext.w a1,s3
100026fe: 6a850513 addi a0,a0,1704 # 100046a8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x2c0>
printk("%d MB\n", (int)(xsize >> 20));
10002702: b35ff0ef jal ra,10002236 <printk>
10002706: b785 j 10002666 <shell_cmd_soc_pnp+0x14c>
} else if (xsize < 1024*1024) {
10002708: 001007b7 lui a5,0x100
1000270c: 00f9f763 bleu a5,s3,1000271a <shell_cmd_soc_pnp+0x200>
printk("%d KB\n", (int)(xsize >> 10));
10002710: 00a9d593 srli a1,s3,0xa
10002714: 6b8d8513 addi a0,s11,1720 # 100046b8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x2d0>
10002718: b7ed j 10002702 <shell_cmd_soc_pnp+0x1e8>
printk("%d MB\n", (int)(xsize >> 20));
1000271a: 0149d593 srli a1,s3,0x14
1000271e: 6c0d0513 addi a0,s10,1728 # 100046c0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x2d8>
10002722: b7c5 j 10002702 <shell_cmd_soc_pnp+0x1e8>
0000000010002724 <soc_is_rtl_simulation>:
* @brief Check hardware target configuration is it inferred or not.
*
* inferred hardware target is used for RTL simulation of the whole SOC design.
*/
uint32_t soc_is_rtl_simulation()
{
10002724: 1141 addi sp,sp,-16
uint32_t tech = READ32(&__PNP->tech);
10002726: 20000537 lui a0,0x20000
{
1000272a: e022 sd s0,0(sp)
1000272c: e406 sd ra,8(sp)
1000272e: 0800 addi s0,sp,16
uint32_t tech = READ32(&__PNP->tech);
10002730: e0150513 addi a0,a0,-511 # 1ffffe01 <_time_slice_prio_ceiling+0xfff609d>
10002734: 050e slli a0,a0,0x3
10002736: 26f000ef jal ra,100031a4 <READ32>
return (tech & 0xff) == TECH_INFERRED ? 1: 0;
}
1000273a: 60a2 ld ra,8(sp)
1000273c: 6402 ld s0,0(sp)
return (tech & 0xff) == TECH_INFERRED ? 1: 0;
1000273e: 0ff57513 andi a0,a0,255
}
10002742: 00153513 seqz a0,a0
10002746: 0141 addi sp,sp,16
10002748: 8082 ret
000000001000274a <Proc_2>:
/******************/
/* executed once */
/* *Int_Par_Ref == 1, becomes 4 */
One_Fifty *Int_Par_Ref;
{
1000274a: 1141 addi sp,sp,-16
1000274c: e422 sd s0,8(sp)
1000274e: 0800 addi s0,sp,16
One_Fifty Int_Loc;
Enumeration Enum_Loc;
Int_Loc = *Int_Par_Ref + 10;
do /* executed once */
if (Ch_1_Glob == 'A')
10002750: 100087b7 lui a5,0x10008
10002754: 7dc7c703 lbu a4,2012(a5) # 100087dc <Ch_1_Glob>
10002758: 04100793 li a5,65
1000275c: 00f71a63 bne a4,a5,10002770 <Proc_2+0x26>
/* then, executed */
{
Int_Loc -= 1;
10002760: 411c lw a5,0(a0)
*Int_Par_Ref = Int_Loc - Int_Glob;
10002762: 10008737 lui a4,0x10008
10002766: 7d872703 lw a4,2008(a4) # 100087d8 <Int_Glob>
Int_Loc -= 1;
1000276a: 27a5 addiw a5,a5,9
*Int_Par_Ref = Int_Loc - Int_Glob;
1000276c: 9f99 subw a5,a5,a4
1000276e: c11c sw a5,0(a0)
Enum_Loc = Ident_1;
} /* if */
while (Enum_Loc != Ident_1); /* true */
} /* Proc_2 */
10002770: 6422 ld s0,8(sp)
10002772: 0141 addi sp,sp,16
10002774: 8082 ret
0000000010002776 <Proc_3>:
/* executed once */
/* Ptr_Ref_Par becomes Ptr_Glob */
Rec_Pointer *Ptr_Ref_Par;
{
10002776: 1141 addi sp,sp,-16
10002778: e422 sd s0,8(sp)
1000277a: 0800 addi s0,sp,16
if (Ptr_Glob != Null)
1000277c: 100087b7 lui a5,0x10008
10002780: 7e07b703 ld a4,2016(a5) # 100087e0 <Ptr_Glob>
10002784: c319 beqz a4,1000278a <Proc_3+0x14>
/* then, executed */
*Ptr_Ref_Par = Ptr_Glob->Ptr_Comp;
10002786: 6318 ld a4,0(a4)
10002788: e118 sd a4,0(a0)
Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
1000278a: 7e07b603 ld a2,2016(a5)
} /* Proc_3 */
1000278e: 6422 ld s0,8(sp)
Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
10002790: 100087b7 lui a5,0x10008
10002794: 7d87a583 lw a1,2008(a5) # 100087d8 <Int_Glob>
10002798: 0641 addi a2,a2,16
1000279a: 4529 li a0,10
} /* Proc_3 */
1000279c: 0141 addi sp,sp,16
Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
1000279e: 7140006f j 10002eb2 <Proc_7>
00000000100027a2 <Proc_1>:
{
100027a2: 7179 addi sp,sp,-48
100027a4: f406 sd ra,40(sp)
100027a6: f022 sd s0,32(sp)
100027a8: ec26 sd s1,24(sp)
100027aa: e84a sd s2,16(sp)
100027ac: e44e sd s3,8(sp)
100027ae: 1800 addi s0,sp,48
REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;
100027b0: 6104 ld s1,0(a0)
structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob);
100027b2: 100089b7 lui s3,0x10008
100027b6: 7e09b583 ld a1,2016(s3) # 100087e0 <Ptr_Glob>
{
100027ba: 892a mv s2,a0
structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob);
100027bc: 03800613 li a2,56
100027c0: 8526 mv a0,s1
100027c2: 8fdff0ef jal ra,100020be <memcpy>
Ptr_Val_Par->variant.var_1.Int_Comp = 5;
100027c6: 4795 li a5,5
100027c8: 00f92823 sw a5,16(s2)
= Ptr_Val_Par->variant.var_1.Int_Comp;
100027cc: c89c sw a5,16(s1)
Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
100027ce: 00093783 ld a5,0(s2)
Proc_3 (&Next_Record->Ptr_Comp);
100027d2: 8526 mv a0,s1
Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
100027d4: e09c sd a5,0(s1)
Proc_3 (&Next_Record->Ptr_Comp);
100027d6: fa1ff0ef jal ra,10002776 <Proc_3>
if (Next_Record->Discr == Ident_1)
100027da: 449c lw a5,8(s1)
100027dc: eb8d bnez a5,1000280e <Proc_1+0x6c>
Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp,
100027de: 00c92503 lw a0,12(s2)
Next_Record->variant.var_1.Int_Comp = 6;
100027e2: 4799 li a5,6
100027e4: c89c sw a5,16(s1)
Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp,
100027e6: 00c48593 addi a1,s1,12
100027ea: 688000ef jal ra,10002e72 <Proc_6>
Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
100027ee: 7e09b783 ld a5,2016(s3)
} /* Proc_1 */
100027f2: 7402 ld s0,32(sp)
Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
100027f4: 4888 lw a0,16(s1)
Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
100027f6: 639c ld a5,0(a5)
} /* Proc_1 */
100027f8: 70a2 ld ra,40(sp)
100027fa: 6942 ld s2,16(sp)
Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
100027fc: e09c sd a5,0(s1)
} /* Proc_1 */
100027fe: 69a2 ld s3,8(sp)
Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
10002800: 01048613 addi a2,s1,16
} /* Proc_1 */
10002804: 64e2 ld s1,24(sp)
Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
10002806: 45a9 li a1,10
} /* Proc_1 */
10002808: 6145 addi sp,sp,48
Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
1000280a: 6a80006f j 10002eb2 <Proc_7>
structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
1000280e: 00093583 ld a1,0(s2)
10002812: 854a mv a0,s2
10002814: 03800613 li a2,56
10002818: 8a7ff0ef jal ra,100020be <memcpy>
} /* Proc_1 */
1000281c: 70a2 ld ra,40(sp)
1000281e: 7402 ld s0,32(sp)
10002820: 64e2 ld s1,24(sp)
10002822: 6942 ld s2,16(sp)
10002824: 69a2 ld s3,8(sp)
10002826: 6145 addi sp,sp,48
10002828: 8082 ret
000000001000282a <Proc_4>:
Proc_4 () /* without parameters */
/*******/
/* executed once */
{
1000282a: 1141 addi sp,sp,-16
1000282c: e422 sd s0,8(sp)
1000282e: 0800 addi s0,sp,16
Boolean Bool_Loc;
Bool_Loc = Ch_1_Glob == 'A';
10002830: 100087b7 lui a5,0x10008
10002834: 7dc7c783 lbu a5,2012(a5) # 100087dc <Ch_1_Glob>
Bool_Glob = Bool_Loc | Bool_Glob;
10002838: 10009737 lui a4,0x10009
1000283c: 8e872683 lw a3,-1816(a4) # 100088e8 <Bool_Glob>
Bool_Loc = Ch_1_Glob == 'A';
10002840: fbf78793 addi a5,a5,-65
10002844: 0017b793 seqz a5,a5
Bool_Glob = Bool_Loc | Bool_Glob;
10002848: 8fd5 or a5,a5,a3
Ch_2_Glob = 'B';
} /* Proc_4 */
1000284a: 6422 ld s0,8(sp)
Bool_Glob = Bool_Loc | Bool_Glob;
1000284c: 8ef72423 sw a5,-1816(a4)
Ch_2_Glob = 'B';
10002850: 100087b7 lui a5,0x10008
10002854: 04200713 li a4,66
10002858: 7ce78ea3 sb a4,2013(a5) # 100087dd <Ch_2_Glob>
} /* Proc_4 */
1000285c: 0141 addi sp,sp,16
1000285e: 8082 ret
0000000010002860 <Proc_5>:
Proc_5 () /* without parameters */
/*******/
/* executed once */
{
10002860: 1141 addi sp,sp,-16
10002862: e422 sd s0,8(sp)
10002864: 0800 addi s0,sp,16
Ch_1_Glob = 'A';
10002866: 100087b7 lui a5,0x10008
Bool_Glob = false;
} /* Proc_5 */
1000286a: 6422 ld s0,8(sp)
Ch_1_Glob = 'A';
1000286c: 04100713 li a4,65
10002870: 7ce78e23 sb a4,2012(a5) # 100087dc <Ch_1_Glob>
Bool_Glob = false;
10002874: 100097b7 lui a5,0x10009
10002878: 8e07a423 sw zero,-1816(a5) # 100088e8 <Bool_Glob>
} /* Proc_5 */
1000287c: 0141 addi sp,sp,16
1000287e: 8082 ret
0000000010002880 <shell_cmd_soc_dhry>:
{
10002880: 7115 addi sp,sp,-224
Next_Ptr_Glob = (Rec_Pointer) &_Next_Glob;
10002882: 10006737 lui a4,0x10006
{
10002886: ed86 sd ra,216(sp)
10002888: e9a2 sd s0,208(sp)
1000288a: e5a6 sd s1,200(sp)
1000288c: e1ca sd s2,192(sp)
1000288e: fd4e sd s3,184(sp)
10002890: f556 sd s5,168(sp)
10002892: f952 sd s4,176(sp)
10002894: f15a sd s6,160(sp)
10002896: ed5e sd s7,152(sp)
10002898: e962 sd s8,144(sp)
1000289a: e566 sd s9,136(sp)
1000289c: e16a sd s10,128(sp)
1000289e: fcee sd s11,120(sp)
Next_Ptr_Glob = (Rec_Pointer) &_Next_Glob;
100028a0: 01870713 addi a4,a4,24 # 10006018 <_Next_Glob>
{
100028a4: 1180 addi s0,sp,224
Ptr_Glob = (Rec_Pointer) &_Glob ;
100028a6: 100086b7 lui a3,0x10008
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
100028aa: 00875613 srli a2,a4,0x8
100028ae: 7ec684a3 sb a2,2025(a3) # 100087e9 <_Glob+0x1>
100028b2: 01075613 srli a2,a4,0x10
100028b6: 7ec68523 sb a2,2026(a3)
100028ba: 01875613 srli a2,a4,0x18
100028be: 7ec685a3 sb a2,2027(a3)
100028c2: 02075613 srli a2,a4,0x20
100028c6: 7ec68623 sb a2,2028(a3)
Next_Ptr_Glob = (Rec_Pointer) &_Next_Glob;
100028ca: 100089b7 lui s3,0x10008
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
100028ce: 02875613 srli a2,a4,0x28
100028d2: 7ee68423 sb a4,2024(a3)
100028d6: 7ec686a3 sb a2,2029(a3)
Next_Ptr_Glob = (Rec_Pointer) &_Next_Glob;
100028da: 76e9b823 sd a4,1904(s3) # 10008770 <Next_Ptr_Glob>
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
100028de: 03075613 srli a2,a4,0x30
100028e2: 9361 srli a4,a4,0x38
Ptr_Glob = (Rec_Pointer) &_Glob ;
100028e4: 7e868793 addi a5,a3,2024
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
100028e8: 7ee687a3 sb a4,2031(a3)
Ptr_Glob = (Rec_Pointer) &_Glob ;
100028ec: 10008937 lui s2,0x10008
Ptr_Glob->variant.var_1.Enum_Comp = Ident_3;
100028f0: 4709 li a4,2
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
100028f2: 7ec68723 sb a2,2030(a3)
Ptr_Glob->variant.var_1.Enum_Comp = Ident_3;
100028f6: 00e78623 sb a4,12(a5)
Ptr_Glob = (Rec_Pointer) &_Glob ;
100028fa: 7ef93023 sd a5,2016(s2) # 100087e0 <Ptr_Glob>
Ptr_Glob->Discr = Ident_1;
100028fe: 00078423 sb zero,8(a5)
10002902: 000784a3 sb zero,9(a5)
10002906: 00078523 sb zero,10(a5)
1000290a: 000785a3 sb zero,11(a5)
Ptr_Glob->variant.var_1.Enum_Comp = Ident_3;
1000290e: 000786a3 sb zero,13(a5)
10002912: 00078723 sb zero,14(a5)
10002916: 000787a3 sb zero,15(a5)
Ptr_Glob->variant.var_1.Int_Comp = 40;
1000291a: 02800713 li a4,40
strcpy (Ptr_Glob->variant.var_1.Str_Comp,
1000291e: 100055b7 lui a1,0x10005
10002922: 10008537 lui a0,0x10008
Ptr_Glob->variant.var_1.Int_Comp = 40;
10002926: 00e78823 sb a4,16(a5)
strcpy (Ptr_Glob->variant.var_1.Str_Comp,
1000292a: 92058593 addi a1,a1,-1760 # 10004920 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x538>
Ptr_Glob->variant.var_1.Int_Comp = 40;
1000292e: 000788a3 sb zero,17(a5)
10002932: 00078923 sb zero,18(a5)
10002936: 000789a3 sb zero,19(a5)
strcpy (Ptr_Glob->variant.var_1.Str_Comp,
1000293a: 7fc50513 addi a0,a0,2044 # 100087fc <_Glob+0x14>
1000293e: e2cff0ef jal ra,10001f6a <strcpy>
strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");
10002942: 100055b7 lui a1,0x10005
10002946: 94058593 addi a1,a1,-1728 # 10004940 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x558>
1000294a: f5040513 addi a0,s0,-176
1000294e: e1cff0ef jal ra,10001f6a <strcpy>
printf ("\n");
10002952: 100054b7 lui s1,0x10005
Arr_2_Glob [8][7] = 10;
10002956: 10006ab7 lui s5,0x10006
1000295a: 058a8793 addi a5,s5,88 # 10006058 <Arr_2_Glob>
1000295e: 4729 li a4,10
printf ("\n");
10002960: bd048513 addi a0,s1,-1072 # 10004bd0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x7e8>
Arr_2_Glob [8][7] = 10;
10002964: 64e7ae23 sw a4,1628(a5)
printf ("\n");
10002968: b79fe0ef jal ra,100014e0 <printf>
printf ("Dhrystone Benchmark, Version 2.1 (Language: C)\n");
1000296c: 10005537 lui a0,0x10005
10002970: 96050513 addi a0,a0,-1696 # 10004960 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x578>
10002974: b6dfe0ef jal ra,100014e0 <printf>
printf ("\n");
10002978: bd048513 addi a0,s1,-1072
1000297c: b65fe0ef jal ra,100014e0 <printf>
if (Reg)
10002980: 1000a7b7 lui a5,0x1000a
10002984: d5c7a783 lw a5,-676(a5) # 10009d5c <Reg>
10002988: 40078863 beqz a5,10002d98 <shell_cmd_soc_dhry+0x518>
printf ("Program compiled with 'register' attribute\n");
1000298c: 10005537 lui a0,0x10005
10002990: 99050513 addi a0,a0,-1648 # 10004990 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x5a8>
printf ("Program compiled without 'register' attribute\n");
10002994: b4dfe0ef jal ra,100014e0 <printf>
printf ("\n");
10002998: bd048513 addi a0,s1,-1072
1000299c: b45fe0ef jal ra,100014e0 <printf>
printf ("Execution starts, %d runs through Dhrystone\n", Number_Of_Runs);
100029a0: 10005537 lui a0,0x10005
100029a4: 6591 lui a1,0x4
100029a6: 9f050513 addi a0,a0,-1552 # 100049f0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x608>
100029aa: b37fe0ef jal ra,100014e0 <printf>
return (int)k_cycle_get_64();
100029ae: a81fe0ef jal ra,1000142e <k_cycle_get_64>
Begin_Time = (long) clock();
100029b2: 100067b7 lui a5,0x10006
100029b6: 04a7b823 sd a0,80(a5) # 10006050 <Begin_Time>
for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
100029ba: 4a05 li s4,1
100029bc: f2f43823 sd a5,-208(s0)
Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
100029c0: 10009c37 lui s8,0x10009
Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
100029c4: 10009cb7 lui s9,0x10009
Int_Glob = Run_Index;
100029c8: 10008db7 lui s11,0x10008
Proc_5();
100029cc: e95ff0ef jal ra,10002860 <Proc_5>
Proc_4();
100029d0: e5bff0ef jal ra,1000282a <Proc_4>
strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
100029d4: 100055b7 lui a1,0x10005
Int_1_Loc = 2;
100029d8: 4789 li a5,2
strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
100029da: a2058593 addi a1,a1,-1504 # 10004a20 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x638>
100029de: f7040513 addi a0,s0,-144
Int_1_Loc = 2;
100029e2: f4f42223 sw a5,-188(s0)
strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
100029e6: d84ff0ef jal ra,10001f6a <strcpy>
Enum_Loc = Ident_2;
100029ea: 4785 li a5,1
Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
100029ec: f7040593 addi a1,s0,-144
100029f0: f5040513 addi a0,s0,-176
Enum_Loc = Ident_2;
100029f4: f4f42623 sw a5,-180(s0)
Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
100029f8: 54c000ef jal ra,10002f44 <Func_2>
100029fc: 00153513 seqz a0,a0
10002a00: 8eac2423 sw a0,-1816(s8) # 100088e8 <Bool_Glob>
while (Int_1_Loc < Int_2_Loc) /* loop body executed once */
10002a04: 4b09 li s6,2
Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
10002a06: 4b95 li s7,5
while (Int_1_Loc < Int_2_Loc) /* loop body executed once */
10002a08: f4442503 lw a0,-188(s0)
10002a0c: 38ab5b63 ble a0,s6,10002da2 <shell_cmd_soc_dhry+0x522>
Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
10002a10: f4842683 lw a3,-184(s0)
10002a14: 862a mv a2,a0
10002a16: 058a8593 addi a1,s5,88
10002a1a: 820c8513 addi a0,s9,-2016 # 10008820 <Arr_1_Glob>
10002a1e: 4a6000ef jal ra,10002ec4 <Proc_8>
Proc_1 (Ptr_Glob);
10002a22: 7e093503 ld a0,2016(s2)
for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
10002a26: 04100b13 li s6,65
Int_2_Loc = 3;
10002a2a: 4d0d li s10,3
Proc_1 (Ptr_Glob);
10002a2c: d77ff0ef jal ra,100027a2 <Proc_1>
for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
10002a30: 10008bb7 lui s7,0x10008
10002a34: 7ddbc783 lbu a5,2013(s7) # 100087dd <Ch_2_Glob>
10002a38: 3967f563 bleu s6,a5,10002dc2 <shell_cmd_soc_dhry+0x542>
Int_2_Loc = Int_2_Loc * Int_1_Loc;
10002a3c: f4442783 lw a5,-188(s0)
Int_1_Loc = Int_2_Loc / Int_3_Loc;
10002a40: f4842b03 lw s6,-184(s0)
Proc_2 (&Int_1_Loc);
10002a44: f4440513 addi a0,s0,-188
Int_2_Loc = Int_2_Loc * Int_1_Loc;
10002a48: 03a7873b mulw a4,a5,s10
for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
10002a4c: 2a05 addiw s4,s4,1
Int_1_Loc = Int_2_Loc / Int_3_Loc;
10002a4e: 03674d3b divw s10,a4,s6
Int_2_Loc = Int_2_Loc * Int_1_Loc;
10002a52: f2e43c23 sd a4,-200(s0)
Int_1_Loc = Int_2_Loc / Int_3_Loc;
10002a56: f5a42223 sw s10,-188(s0)
Proc_2 (&Int_1_Loc);
10002a5a: cf1ff0ef jal ra,1000274a <Proc_2>
for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
10002a5e: 6791 lui a5,0x4
10002a60: 0785 addi a5,a5,1
10002a62: f6fa15e3 bne s4,a5,100029cc <shell_cmd_soc_dhry+0x14c>
return (int)k_cycle_get_64();
10002a66: 9c9fe0ef jal ra,1000142e <k_cycle_get_64>
End_Time = (long) clock();
10002a6a: 10008ab7 lui s5,0x10008
10002a6e: 76aab423 sd a0,1896(s5) # 10008768 <End_Time>
printf ("Execution ends\n");
10002a72: 10005537 lui a0,0x10005
10002a76: a6050513 addi a0,a0,-1440 # 10004a60 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x678>
10002a7a: a67fe0ef jal ra,100014e0 <printf>
printf ("\n");
10002a7e: bd048513 addi a0,s1,-1072
10002a82: a5ffe0ef jal ra,100014e0 <printf>
printf ("Final values of the variables used in the benchmark:\n");
10002a86: 10005537 lui a0,0x10005
10002a8a: a7050513 addi a0,a0,-1424 # 10004a70 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x688>
10002a8e: a53fe0ef jal ra,100014e0 <printf>
printf ("\n");
10002a92: bd048513 addi a0,s1,-1072
10002a96: a4bfe0ef jal ra,100014e0 <printf>
printf ("Int_Glob: %d\n", Int_Glob);
10002a9a: 100087b7 lui a5,0x10008
10002a9e: 7d87a583 lw a1,2008(a5) # 100087d8 <Int_Glob>
10002aa2: 10005537 lui a0,0x10005
10002aa6: aa850513 addi a0,a0,-1368 # 10004aa8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x6c0>
printf (" should be: %d\n", 5);
10002aaa: 10005a37 lui s4,0x10005
printf ("Int_Glob: %d\n", Int_Glob);
10002aae: a33fe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 5);
10002ab2: 4595 li a1,5
10002ab4: ac8a0513 addi a0,s4,-1336 # 10004ac8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x6e0>
10002ab8: a29fe0ef jal ra,100014e0 <printf>
printf ("Bool_Glob: %d\n", Bool_Glob);
10002abc: 100097b7 lui a5,0x10009
10002ac0: 8e87a583 lw a1,-1816(a5) # 100088e8 <Bool_Glob>
10002ac4: 10005537 lui a0,0x10005
10002ac8: ae850513 addi a0,a0,-1304 # 10004ae8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x700>
10002acc: a15fe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 1);
10002ad0: 4585 li a1,1
10002ad2: ac8a0513 addi a0,s4,-1336
10002ad6: a0bfe0ef jal ra,100014e0 <printf>
printf ("Ch_1_Glob: %c\n", Ch_1_Glob);
10002ada: 100087b7 lui a5,0x10008
10002ade: 7dc7c583 lbu a1,2012(a5) # 100087dc <Ch_1_Glob>
10002ae2: 10005537 lui a0,0x10005
10002ae6: b0850513 addi a0,a0,-1272 # 10004b08 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x720>
10002aea: 9f7fe0ef jal ra,100014e0 <printf>
printf (" should be: %c\n", 'A');
10002aee: 10005c37 lui s8,0x10005
10002af2: 04100593 li a1,65
10002af6: b28c0513 addi a0,s8,-1240 # 10004b28 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x740>
10002afa: 9e7fe0ef jal ra,100014e0 <printf>
printf ("Ch_2_Glob: %c\n", Ch_2_Glob);
10002afe: 7ddbc583 lbu a1,2013(s7)
10002b02: 10005537 lui a0,0x10005
10002b06: b4850513 addi a0,a0,-1208 # 10004b48 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x760>
10002b0a: 9d7fe0ef jal ra,100014e0 <printf>
printf (" should be: %c\n", 'B');
10002b0e: 04200593 li a1,66
10002b12: b28c0513 addi a0,s8,-1240
10002b16: 9cbfe0ef jal ra,100014e0 <printf>
printf ("Arr_1_Glob[8]: %d\n", Arr_1_Glob[8]);
10002b1a: 100097b7 lui a5,0x10009
10002b1e: 82078793 addi a5,a5,-2016 # 10008820 <Arr_1_Glob>
10002b22: 538c lw a1,32(a5)
10002b24: 10005537 lui a0,0x10005
10002b28: b6850513 addi a0,a0,-1176 # 10004b68 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x780>
10002b2c: 9b5fe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 7);
10002b30: 459d li a1,7
10002b32: ac8a0513 addi a0,s4,-1336
10002b36: 9abfe0ef jal ra,100014e0 <printf>
printf ("Arr_2_Glob[8][7]: %d\n", Arr_2_Glob[8][7]);
10002b3a: 100067b7 lui a5,0x10006
10002b3e: 05878793 addi a5,a5,88 # 10006058 <Arr_2_Glob>
10002b42: 65c7a583 lw a1,1628(a5)
10002b46: 10005537 lui a0,0x10005
10002b4a: b8850513 addi a0,a0,-1144 # 10004b88 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x7a0>
10002b4e: 993fe0ef jal ra,100014e0 <printf>
printf (" should be: Number_Of_Runs + 10\n");
10002b52: 10005537 lui a0,0x10005
10002b56: ba850513 addi a0,a0,-1112 # 10004ba8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x7c0>
10002b5a: 987fe0ef jal ra,100014e0 <printf>
printf ("Ptr_Glob->\n");
10002b5e: 10005537 lui a0,0x10005
10002b62: bd850513 addi a0,a0,-1064 # 10004bd8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x7f0>
10002b66: 97bfe0ef jal ra,100014e0 <printf>
printf (" Ptr_Comp: %d\n", (int) Ptr_Glob->Ptr_Comp);
10002b6a: 7e093783 ld a5,2016(s2)
printf (" Discr: %d\n", Ptr_Glob->Discr);
10002b6e: 10005db7 lui s11,0x10005
printf (" Enum_Comp: %d\n", Ptr_Glob->variant.var_1.Enum_Comp);
10002b72: 10005cb7 lui s9,0x10005
printf (" Ptr_Comp: %d\n", (int) Ptr_Glob->Ptr_Comp);
10002b76: 438c lw a1,0(a5)
10002b78: 100057b7 lui a5,0x10005
10002b7c: be878513 addi a0,a5,-1048 # 10004be8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x800>
10002b80: f2f43423 sd a5,-216(s0)
10002b84: 95dfe0ef jal ra,100014e0 <printf>
printf (" should be: (implementation-dependent)\n");
10002b88: 10005537 lui a0,0x10005
10002b8c: c0850513 addi a0,a0,-1016 # 10004c08 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x820>
10002b90: 951fe0ef jal ra,100014e0 <printf>
printf (" Discr: %d\n", Ptr_Glob->Discr);
10002b94: 7e093703 ld a4,2016(s2)
10002b98: c40d8513 addi a0,s11,-960 # 10004c40 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x858>
printf (" Int_Comp: %d\n", Ptr_Glob->variant.var_1.Int_Comp);
10002b9c: 10005c37 lui s8,0x10005
printf (" Discr: %d\n", Ptr_Glob->Discr);
10002ba0: 470c lw a1,8(a4)
printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp);
10002ba2: 10005bb7 lui s7,0x10005
printf (" Discr: %d\n", Ptr_Glob->Discr);
10002ba6: 93bfe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 0);
10002baa: 4581 li a1,0
10002bac: ac8a0513 addi a0,s4,-1336
10002bb0: 931fe0ef jal ra,100014e0 <printf>
printf (" Enum_Comp: %d\n", Ptr_Glob->variant.var_1.Enum_Comp);
10002bb4: 7e093703 ld a4,2016(s2)
10002bb8: c60c8513 addi a0,s9,-928 # 10004c60 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x878>
10002bbc: 474c lw a1,12(a4)
10002bbe: 923fe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 2);
10002bc2: 4589 li a1,2
10002bc4: ac8a0513 addi a0,s4,-1336
10002bc8: 919fe0ef jal ra,100014e0 <printf>
printf (" Int_Comp: %d\n", Ptr_Glob->variant.var_1.Int_Comp);
10002bcc: 7e093703 ld a4,2016(s2)
10002bd0: c80c0513 addi a0,s8,-896 # 10004c80 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x898>
10002bd4: 4b0c lw a1,16(a4)
10002bd6: 90bfe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 17);
10002bda: 45c5 li a1,17
10002bdc: ac8a0513 addi a0,s4,-1336
10002be0: 901fe0ef jal ra,100014e0 <printf>
printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp);
10002be4: 7e093583 ld a1,2016(s2)
10002be8: ca0b8513 addi a0,s7,-864 # 10004ca0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x8b8>
printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
10002bec: 10005937 lui s2,0x10005
printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp);
10002bf0: 05d1 addi a1,a1,20
10002bf2: 8effe0ef jal ra,100014e0 <printf>
printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
10002bf6: cc090513 addi a0,s2,-832 # 10004cc0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x8d8>
10002bfa: 8e7fe0ef jal ra,100014e0 <printf>
printf ("Next_Ptr_Glob->\n");
10002bfe: 10005537 lui a0,0x10005
10002c02: cf850513 addi a0,a0,-776 # 10004cf8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x910>
10002c06: 8dbfe0ef jal ra,100014e0 <printf>
printf (" Ptr_Comp: %d\n", (int) Next_Ptr_Glob->Ptr_Comp);
10002c0a: 7709b703 ld a4,1904(s3)
10002c0e: f2843783 ld a5,-216(s0)
10002c12: 430c lw a1,0(a4)
10002c14: be878513 addi a0,a5,-1048
10002c18: 8c9fe0ef jal ra,100014e0 <printf>
printf (" should be: (implementation-dependent), same as above\n");
10002c1c: 10005537 lui a0,0x10005
10002c20: d1050513 addi a0,a0,-752 # 10004d10 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x928>
10002c24: 8bdfe0ef jal ra,100014e0 <printf>
printf (" Discr: %d\n", Next_Ptr_Glob->Discr);
10002c28: 7709b783 ld a5,1904(s3)
10002c2c: c40d8513 addi a0,s11,-960
10002c30: 478c lw a1,8(a5)
10002c32: 8affe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 0);
10002c36: 4581 li a1,0
10002c38: ac8a0513 addi a0,s4,-1336
10002c3c: 8a5fe0ef jal ra,100014e0 <printf>
printf (" Enum_Comp: %d\n", Next_Ptr_Glob->variant.var_1.Enum_Comp);
10002c40: 7709b783 ld a5,1904(s3)
10002c44: c60c8513 addi a0,s9,-928
10002c48: 47cc lw a1,12(a5)
10002c4a: 897fe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 1);
10002c4e: 4585 li a1,1
10002c50: ac8a0513 addi a0,s4,-1336
10002c54: 88dfe0ef jal ra,100014e0 <printf>
printf (" Int_Comp: %d\n", Next_Ptr_Glob->variant.var_1.Int_Comp);
10002c58: 7709b783 ld a5,1904(s3)
10002c5c: c80c0513 addi a0,s8,-896
10002c60: 4b8c lw a1,16(a5)
10002c62: 87ffe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 18);
10002c66: 45c9 li a1,18
10002c68: ac8a0513 addi a0,s4,-1336
10002c6c: 875fe0ef jal ra,100014e0 <printf>
Next_Ptr_Glob->variant.var_1.Str_Comp);
10002c70: 7709b583 ld a1,1904(s3)
printf (" Str_Comp: %s\n",
10002c74: ca0b8513 addi a0,s7,-864
10002c78: 05d1 addi a1,a1,20
10002c7a: 867fe0ef jal ra,100014e0 <printf>
printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
10002c7e: cc090513 addi a0,s2,-832
10002c82: 85ffe0ef jal ra,100014e0 <printf>
printf ("Int_1_Loc: %d\n", Int_1_Loc);
10002c86: f4442583 lw a1,-188(s0)
10002c8a: 10005537 lui a0,0x10005
10002c8e: d5050513 addi a0,a0,-688 # 10004d50 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x968>
10002c92: 84ffe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 5);
10002c96: 4595 li a1,5
10002c98: ac8a0513 addi a0,s4,-1336
10002c9c: 845fe0ef jal ra,100014e0 <printf>
Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
10002ca0: f3843783 ld a5,-200(s0)
10002ca4: 459d li a1,7
printf ("Int_2_Loc: %d\n", Int_2_Loc);
10002ca6: 10005537 lui a0,0x10005
Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
10002caa: 41678b3b subw s6,a5,s6
10002cae: 02bb05bb mulw a1,s6,a1
printf ("Int_2_Loc: %d\n", Int_2_Loc);
10002cb2: d7050513 addi a0,a0,-656 # 10004d70 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x988>
10002cb6: 41a585bb subw a1,a1,s10
10002cba: 827fe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 13);
10002cbe: 45b5 li a1,13
10002cc0: ac8a0513 addi a0,s4,-1336
10002cc4: 81dfe0ef jal ra,100014e0 <printf>
printf ("Int_3_Loc: %d\n", Int_3_Loc);
10002cc8: f4842583 lw a1,-184(s0)
10002ccc: 10005537 lui a0,0x10005
10002cd0: d9050513 addi a0,a0,-624 # 10004d90 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x9a8>
10002cd4: 80dfe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 7);
10002cd8: 459d li a1,7
10002cda: ac8a0513 addi a0,s4,-1336
10002cde: 803fe0ef jal ra,100014e0 <printf>
printf ("Enum_Loc: %d\n", Enum_Loc);
10002ce2: f4c42583 lw a1,-180(s0)
10002ce6: 10005537 lui a0,0x10005
10002cea: db050513 addi a0,a0,-592 # 10004db0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x9c8>
10002cee: ff2fe0ef jal ra,100014e0 <printf>
printf (" should be: %d\n", 1);
10002cf2: 4585 li a1,1
10002cf4: ac8a0513 addi a0,s4,-1336
10002cf8: fe8fe0ef jal ra,100014e0 <printf>
printf ("Str_1_Loc: %s\n", Str_1_Loc);
10002cfc: 10005537 lui a0,0x10005
10002d00: f5040593 addi a1,s0,-176
10002d04: dd050513 addi a0,a0,-560 # 10004dd0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x9e8>
10002d08: fd8fe0ef jal ra,100014e0 <printf>
printf (" should be: DHRYSTONE PROGRAM, 1'ST STRING\n");
10002d0c: 10005537 lui a0,0x10005
10002d10: df050513 addi a0,a0,-528 # 10004df0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xa08>
10002d14: fccfe0ef jal ra,100014e0 <printf>
printf ("Str_2_Loc: %s\n", Str_2_Loc);
10002d18: 10005537 lui a0,0x10005
10002d1c: f7040593 addi a1,s0,-144
10002d20: e2850513 addi a0,a0,-472 # 10004e28 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xa40>
10002d24: fbcfe0ef jal ra,100014e0 <printf>
printf (" should be: DHRYSTONE PROGRAM, 2'ND STRING\n");
10002d28: 10005537 lui a0,0x10005
10002d2c: e4850513 addi a0,a0,-440 # 10004e48 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xa60>
10002d30: fb0fe0ef jal ra,100014e0 <printf>
printf ("\n");
10002d34: bd048513 addi a0,s1,-1072
10002d38: fa8fe0ef jal ra,100014e0 <printf>
User_Time = End_Time - Begin_Time;
10002d3c: f3043703 ld a4,-208(s0)
10002d40: 768ab783 ld a5,1896(s5)
10002d44: 10006a37 lui s4,0x10006
10002d48: 05073703 ld a4,80(a4)
10002d4c: 8f99 sub a5,a5,a4
10002d4e: 00fa3823 sd a5,16(s4) # 10006010 <User_Time>
if (User_Time < Too_Small_Time)
10002d52: 4705 li a4,1
10002d54: 0af74563 blt a4,a5,10002dfe <shell_cmd_soc_dhry+0x57e>
printf ("Measured time too small to obtain meaningful results\n");
10002d58: 10005537 lui a0,0x10005
10002d5c: e8050513 addi a0,a0,-384 # 10004e80 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xa98>
10002d60: f80fe0ef jal ra,100014e0 <printf>
printf ("Please increase number of runs\n");
10002d64: 10005537 lui a0,0x10005
10002d68: eb850513 addi a0,a0,-328 # 10004eb8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xad0>
10002d6c: f74fe0ef jal ra,100014e0 <printf>
printf ("\n");
10002d70: bd048513 addi a0,s1,-1072
10002d74: f6cfe0ef jal ra,100014e0 <printf>
}
10002d78: 60ee ld ra,216(sp)
10002d7a: 644e ld s0,208(sp)
10002d7c: 64ae ld s1,200(sp)
10002d7e: 690e ld s2,192(sp)
10002d80: 79ea ld s3,184(sp)
10002d82: 7a4a ld s4,176(sp)
10002d84: 7aaa ld s5,168(sp)
10002d86: 7b0a ld s6,160(sp)
10002d88: 6bea ld s7,152(sp)
10002d8a: 6c4a ld s8,144(sp)
10002d8c: 6caa ld s9,136(sp)
10002d8e: 6d0a ld s10,128(sp)
10002d90: 7de6 ld s11,120(sp)
10002d92: 4501 li a0,0
10002d94: 612d addi sp,sp,224
10002d96: 8082 ret
printf ("Program compiled without 'register' attribute\n");
10002d98: 10005537 lui a0,0x10005
10002d9c: 9c050513 addi a0,a0,-1600 # 100049c0 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x5d8>
10002da0: bed5 j 10002994 <shell_cmd_soc_dhry+0x114>
Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
10002da2: 02ab87bb mulw a5,s7,a0
Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
10002da6: f4840613 addi a2,s0,-184
10002daa: 458d li a1,3
Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
10002dac: 37f5 addiw a5,a5,-3
10002dae: f4f42423 sw a5,-184(s0)
Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
10002db2: 100000ef jal ra,10002eb2 <Proc_7>
Int_1_Loc += 1;
10002db6: f4442783 lw a5,-188(s0)
10002dba: 2785 addiw a5,a5,1
10002dbc: f4f42223 sw a5,-188(s0)
10002dc0: b1a1 j 10002a08 <shell_cmd_soc_dhry+0x188>
if (Enum_Loc == Func_1 (Ch_Index, 'C'))
10002dc2: 04300593 li a1,67
10002dc6: 855a mv a0,s6
10002dc8: 156000ef jal ra,10002f1e <Func_1>
10002dcc: f4c42783 lw a5,-180(s0)
10002dd0: 2501 sext.w a0,a0
10002dd2: 02a79263 bne a5,a0,10002df6 <shell_cmd_soc_dhry+0x576>
Proc_6 (Ident_1, &Enum_Loc);
10002dd6: f4c40593 addi a1,s0,-180
10002dda: 4501 li a0,0
10002ddc: 096000ef jal ra,10002e72 <Proc_6>
strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 3'RD STRING");
10002de0: 100057b7 lui a5,0x10005
10002de4: a4078593 addi a1,a5,-1472 # 10004a40 <GNSS_SENSOR_SLV_DEVICE_NAMES+0x658>
10002de8: f7040513 addi a0,s0,-144
10002dec: 97eff0ef jal ra,10001f6a <strcpy>
Int_Glob = Run_Index;
10002df0: 8d52 mv s10,s4
10002df2: 7d4dac23 sw s4,2008(s11)
for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
10002df6: 2b05 addiw s6,s6,1
10002df8: 0ffb7b13 andi s6,s6,255
10002dfc: b925 j 10002a34 <shell_cmd_soc_dhry+0x1b4>
printf ("Microseconds for one run through Dhrystone: ");
10002dfe: 10005537 lui a0,0x10005
10002e02: ed850513 addi a0,a0,-296 # 10004ed8 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xaf0>
10002e06: edafe0ef jal ra,100014e0 <printf>
Microseconds = 10ll * (int64_t)User_Time * Mic_secs_Per_Second;
10002e0a: 010a3603 ld a2,16(s4)
10002e0e: 009897b7 lui a5,0x989
10002e12: 68078793 addi a5,a5,1664 # 989680 <__bss_num_words+0x9888e0>
10002e16: 02f60633 mul a2,a2,a5
printf ("%6d.%01d \n", (int)(Microseconds/(10*div1)), (int)(Microseconds%10));
10002e1a: 0011e937 lui s2,0x11e
10002e1e: 1a390913 addi s2,s2,419 # 11e1a3 <__bss_num_words+0x11d403>
10002e22: 095e slli s2,s2,0x17
Microseconds = 10ll * (int64_t)User_Time * Mic_secs_Per_Second;
10002e24: 100067b7 lui a5,0x10006
printf ("%6d.%01d \n", (int)(Microseconds/(10*div1)), (int)(Microseconds%10));
10002e28: 49a9 li s3,10
10002e2a: 10005ab7 lui s5,0x10005
10002e2e: f08a8513 addi a0,s5,-248 # 10004f08 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xb20>
10002e32: 032655b3 divu a1,a2,s2
Microseconds = 10ll * (int64_t)User_Time * Mic_secs_Per_Second;
10002e36: 00c7b023 sd a2,0(a5) # 10006000 <Microseconds>
printf ("%6d.%01d \n", (int)(Microseconds/(10*div1)), (int)(Microseconds%10));
10002e3a: 03367633 remu a2,a2,s3
10002e3e: 2581 sext.w a1,a1
10002e40: ea0fe0ef jal ra,100014e0 <printf>
printf ("Dhrystones per Second: ");
10002e44: 10005537 lui a0,0x10005
10002e48: f1850513 addi a0,a0,-232 # 10004f18 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xb30>
10002e4c: e94fe0ef jal ra,100014e0 <printf>
printf ("%6d.%01d \n", (int)(Dhrystones_Per_Second/(10*div1)), (int)(Dhrystones_Per_Second%10));
10002e50: 010a3583 ld a1,16(s4)
Dhrystones_Per_Second = 10ll * ((int64_t)HZ * (int64_t) Number_Of_Runs);
10002e54: 100067b7 lui a5,0x10006
printf ("%6d.%01d \n", (int)(Dhrystones_Per_Second/(10*div1)), (int)(Dhrystones_Per_Second%10));
10002e58: 4601 li a2,0
10002e5a: 02b985b3 mul a1,s3,a1
10002e5e: f08a8513 addi a0,s5,-248
Dhrystones_Per_Second = 10ll * ((int64_t)HZ * (int64_t) Number_Of_Runs);
10002e62: 0127b423 sd s2,8(a5) # 10006008 <Dhrystones_Per_Second>
printf ("%6d.%01d \n", (int)(Dhrystones_Per_Second/(10*div1)), (int)(Dhrystones_Per_Second%10));
10002e66: 02b955b3 divu a1,s2,a1
10002e6a: 2581 sext.w a1,a1
10002e6c: e74fe0ef jal ra,100014e0 <printf>
10002e70: b701 j 10002d70 <shell_cmd_soc_dhry+0x4f0>
0000000010002e72 <Proc_6>:
/* executed once */
/* Enum_Val_Par == Ident_3, Enum_Ref_Par becomes Ident_2 */
Enumeration Enum_Val_Par;
Enumeration *Enum_Ref_Par;
{
10002e72: 1141 addi sp,sp,-16
10002e74: e422 sd s0,8(sp)
10002e76: 0800 addi s0,sp,16
Enumeration Enum_Par_Val;
{
Enumeration Enum_Loc;
Enum_Loc = Enum_Par_Val;
if (Enum_Loc == Ident_3)
10002e78: 4789 li a5,2
10002e7a: 02f50963 beq a0,a5,10002eac <Proc_6+0x3a>
*Enum_Ref_Par = Ident_4;
10002e7e: 470d li a4,3
10002e80: c198 sw a4,0(a1)
switch (Enum_Val_Par)
10002e82: 4705 li a4,1
10002e84: 00e50963 beq a0,a4,10002e96 <Proc_6+0x24>
10002e88: cd19 beqz a0,10002ea6 <Proc_6+0x34>
10002e8a: 4711 li a4,4
10002e8c: 02e50163 beq a0,a4,10002eae <Proc_6+0x3c>
} /* Proc_6 */
10002e90: 6422 ld s0,8(sp)
10002e92: 0141 addi sp,sp,16
10002e94: 8082 ret
if (Int_Glob > 100)
10002e96: 100087b7 lui a5,0x10008
10002e9a: 7d87a703 lw a4,2008(a5) # 100087d8 <Int_Glob>
10002e9e: 06400793 li a5,100
10002ea2: fee7d7e3 ble a4,a5,10002e90 <Proc_6+0x1e>
*Enum_Ref_Par = Ident_1;
10002ea6: 0005a023 sw zero,0(a1)
10002eaa: b7dd j 10002e90 <Proc_6+0x1e>
*Enum_Ref_Par = Ident_2;
10002eac: 4785 li a5,1
*Enum_Ref_Par = Ident_3;
10002eae: c19c sw a5,0(a1)
break;
10002eb0: b7c5 j 10002e90 <Proc_6+0x1e>
0000000010002eb2 <Proc_7>:
{
10002eb2: 1141 addi sp,sp,-16
10002eb4: e422 sd s0,8(sp)
10002eb6: 0800 addi s0,sp,16
Int_Loc = Int_1_Par_Val + 2;
10002eb8: 2509 addiw a0,a0,2
} /* Proc_7 */
10002eba: 6422 ld s0,8(sp)
*Int_Par_Ref = Int_2_Par_Val + Int_Loc;
10002ebc: 9da9 addw a1,a1,a0
10002ebe: c20c sw a1,0(a2)
} /* Proc_7 */
10002ec0: 0141 addi sp,sp,16
10002ec2: 8082 ret
0000000010002ec4 <Proc_8>:
Int_Loc = Int_1_Par_Val + 5;
10002ec4: 0056071b addiw a4,a2,5
Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
10002ec8: 00271793 slli a5,a4,0x2
10002ecc: 953e add a0,a0,a5
Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
10002ece: 0c800793 li a5,200
10002ed2: 02f707b3 mul a5,a4,a5
{
10002ed6: 1141 addi sp,sp,-16
10002ed8: e422 sd s0,8(sp)
10002eda: 0800 addi s0,sp,16
Arr_1_Par_Ref [Int_Loc] = Int_2_Par_Val;
10002edc: c114 sw a3,0(a0)
Arr_1_Par_Ref [Int_Loc+1] = Arr_1_Par_Ref [Int_Loc];
10002ede: c154 sw a3,4(a0)
Arr_1_Par_Ref [Int_Loc+30] = Int_Loc;
10002ee0: dd38 sw a4,120(a0)
for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
10002ee2: 0066081b addiw a6,a2,6
Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
10002ee6: 95be add a1,a1,a5
for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
10002ee8: 87ba mv a5,a4
10002eea: 02f85463 ble a5,a6,10002f12 <Proc_8+0x4e>
10002eee: 060a slli a2,a2,0x2
10002ef0: 95b2 add a1,a1,a2
Arr_2_Par_Ref [Int_Loc] [Int_Loc-1] += 1;
10002ef2: 499c lw a5,16(a1)
Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
10002ef4: 6605 lui a2,0x1
} /* Proc_8 */
10002ef6: 6422 ld s0,8(sp)
Arr_2_Par_Ref [Int_Loc] [Int_Loc-1] += 1;
10002ef8: 2785 addiw a5,a5,1
10002efa: c99c sw a5,16(a1)
Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
10002efc: 411c lw a5,0(a0)
10002efe: 95b2 add a1,a1,a2
Int_Glob = 5;
10002f00: 4715 li a4,5
Arr_2_Par_Ref [Int_Loc+20] [Int_Loc] = Arr_1_Par_Ref [Int_Loc];
10002f02: faf5aa23 sw a5,-76(a1)
Int_Glob = 5;
10002f06: 100087b7 lui a5,0x10008
10002f0a: 7ce7ac23 sw a4,2008(a5) # 100087d8 <Int_Glob>
} /* Proc_8 */
10002f0e: 0141 addi sp,sp,16
10002f10: 8082 ret
Arr_2_Par_Ref [Int_Loc] [Int_Index] = Int_Loc;
10002f12: 00279693 slli a3,a5,0x2
10002f16: 96ae add a3,a3,a1
10002f18: c298 sw a4,0(a3)
for (Int_Index = Int_Loc; Int_Index <= Int_Loc+1; ++Int_Index)
10002f1a: 2785 addiw a5,a5,1
10002f1c: b7f9 j 10002eea <Proc_8+0x26>
0000000010002f1e <Func_1>:
{
10002f1e: 1141 addi sp,sp,-16
10002f20: e422 sd s0,8(sp)
10002f22: 0800 addi s0,sp,16
10002f24: 0ff57513 andi a0,a0,255
10002f28: 0ff5f593 andi a1,a1,255
if (Ch_2_Loc != Ch_2_Par_Val)
10002f2c: 00b51a63 bne a0,a1,10002f40 <Func_1+0x22>
Ch_1_Glob = Ch_1_Loc;
10002f30: 100087b7 lui a5,0x10008
10002f34: 7ca78e23 sb a0,2012(a5) # 100087dc <Ch_1_Glob>
return (Ident_2);
10002f38: 4505 li a0,1
} /* Func_1 */
10002f3a: 6422 ld s0,8(sp)
10002f3c: 0141 addi sp,sp,16
10002f3e: 8082 ret
return (Ident_1);
10002f40: 4501 li a0,0
10002f42: bfe5 j 10002f3a <Func_1+0x1c>
0000000010002f44 <Func_2>:
{
10002f44: 1141 addi sp,sp,-16
10002f46: e022 sd s0,0(sp)
10002f48: e406 sd ra,8(sp)
10002f4a: 0800 addi s0,sp,16
10002f4c: 100087b7 lui a5,0x10008
if (Func_1 (Str_1_Par_Ref[Int_Loc],
10002f50: 00254603 lbu a2,2(a0)
Str_2_Par_Ref[Int_Loc+1]) == Ident_1)
10002f54: 0035c803 lbu a6,3(a1)
10002f58: 7dc7c703 lbu a4,2012(a5) # 100087dc <Ch_1_Glob>
10002f5c: 4681 li a3,0
if (Ch_2_Loc != Ch_2_Par_Val)
10002f5e: 03060563 beq a2,a6,10002f88 <Func_2+0x44>
10002f62: c299 beqz a3,10002f68 <Func_2+0x24>
10002f64: 7ce78e23 sb a4,2012(a5)
if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
10002f68: 89aff0ef jal ra,10002002 <strcmp>
return (false);
10002f6c: 4781 li a5,0
if (strcmp (Str_1_Par_Ref, Str_2_Par_Ref) > 0)
10002f6e: 00a05863 blez a0,10002f7e <Func_2+0x3a>
Int_Glob = Int_Loc;
10002f72: 100087b7 lui a5,0x10008
10002f76: 4729 li a4,10
10002f78: 7ce7ac23 sw a4,2008(a5) # 100087d8 <Int_Glob>
return (true);
10002f7c: 4785 li a5,1
} /* Func_2 */
10002f7e: 60a2 ld ra,8(sp)
10002f80: 6402 ld s0,0(sp)
10002f82: 853e mv a0,a5
10002f84: 0141 addi sp,sp,16
10002f86: 8082 ret
if (Ch_2_Loc != Ch_2_Par_Val)
10002f88: 4685 li a3,1
10002f8a: 8732 mv a4,a2
10002f8c: bfc9 j 10002f5e <Func_2+0x1a>
0000000010002f8e <nano_cpu_idle>:
* This function always exits with interrupts unlocked.
*
* void nanCpuIdle(void)
*/
void nano_cpu_idle(void) {
10002f8e: 1141 addi sp,sp,-16
10002f90: e422 sd s0,8(sp)
10002f92: 0800 addi s0,sp,16
_arch_irq_unlock(0);
}
10002f94: 6422 ld s0,8(sp)
_arch_irq_unlock(0);
10002f96: 4501 li a0,0
}
10002f98: 0141 addi sp,sp,16
_arch_irq_unlock(0);
10002f9a: 0940006f j 1000302e <_arch_irq_unlock>
0000000010002f9e <_NanoFatalErrorHandler>:
*
* @return This function does not return.
*/
FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int reason,
const NANO_ESF *pEsf)
{
10002f9e: 1141 addi sp,sp,-16
10002fa0: e022 sd s0,0(sp)
10002fa2: e406 sd ra,8(sp)
10002fa4: 0800 addi s0,sp,16
#ifdef CONFIG_PRINTK
printk("***** Unhandled interrupt vector %d occurred! \n", -1);
10002fa6: 10005537 lui a0,0x10005
10002faa: 55fd li a1,-1
10002fac: f4850513 addi a0,a0,-184 # 10004f48 <GNSS_SENSOR_SLV_DEVICE_NAMES+0xb60>
10002fb0: a86ff0ef jal ra,10002236 <printk>
10002fb4: a001 j 10002fb4 <_NanoFatalErrorHandler+0x16>
0000000010002fb6 <run_isr_handler>:
*/
void _arch_irq_disable(unsigned int irq)
{
uint32_t bit = READ32(&__IRQCTRL->irq_mask);
bit |= (1u << irq);
WRITE32(&__IRQCTRL->irq_mask, bit);
10002fb6: 100087b7 lui a5,0x10008
10002fba: 0512 slli a0,a0,0x4
10002fbc: 77878793 addi a5,a5,1912 # 10008778 <isr_demux_table>
10002fc0: 953e add a0,a0,a5
10002fc2: 6518 ld a4,8(a0)
10002fc4: cb0d beqz a4,10002ff6 <run_isr_handler+0x40>
10002fc6: 1101 addi sp,sp,-32
10002fc8: e822 sd s0,16(sp)
10002fca: e426 sd s1,8(sp)
10002fcc: ec06 sd ra,24(sp)
10002fce: 1000 addi s0,sp,32
10002fd0: 100064b7 lui s1,0x10006
10002fd4: dc04a783 lw a5,-576(s1) # 10005dc0 <_kernel>
10002fd8: 6108 ld a0,0(a0)
10002fda: 2785 addiw a5,a5,1
10002fdc: dcf4a023 sw a5,-576(s1)
10002fe0: 9702 jalr a4
10002fe2: dc04a783 lw a5,-576(s1)
10002fe6: 60e2 ld ra,24(sp)
10002fe8: 6442 ld s0,16(sp)
10002fea: 37fd addiw a5,a5,-1
10002fec: dcf4a023 sw a5,-576(s1)
10002ff0: 64a2 ld s1,8(sp)
10002ff2: 6105 addi sp,sp,32
10002ff4: 8082 ret
10002ff6: 8082 ret
0000000010002ff8 <_arch_irq_lock>:
10002ff8: 1101 addi sp,sp,-32
10002ffa: e426 sd s1,8(sp)
10002ffc: 400014b7 lui s1,0x40001
10003000: ec06 sd ra,24(sp)
10003002: e822 sd s0,16(sp)
10003004: e04a sd s2,0(sp)
10003006: 1000 addi s0,sp,32
10003008: 0486 slli s1,s1,0x1
1000300a: 02848513 addi a0,s1,40 # 40001028 <_time_slice_prio_ceiling+0x2fff72c4>
1000300e: 196000ef jal ra,100031a4 <READ32>
10003012: 0005091b sext.w s2,a0
10003016: 4585 li a1,1
10003018: 02848513 addi a0,s1,40
1000301c: 1a4000ef jal ra,100031c0 <WRITE32>
10003020: 60e2 ld ra,24(sp)
10003022: 6442 ld s0,16(sp)
10003024: 854a mv a0,s2
10003026: 64a2 ld s1,8(sp)
10003028: 6902 ld s2,0(sp)
1000302a: 6105 addi sp,sp,32
1000302c: 8082 ret
000000001000302e <_arch_irq_unlock>:
1000302e: 1141 addi sp,sp,-16
10003030: e422 sd s0,8(sp)
10003032: 0800 addi s0,sp,16
10003034: 6422 ld s0,8(sp)
10003036: 85aa mv a1,a0
10003038: 40001537 lui a0,0x40001
1000303c: 0506 slli a0,a0,0x1
1000303e: 02850513 addi a0,a0,40 # 40001028 <_time_slice_prio_ceiling+0x2fff72c4>
10003042: 0141 addi sp,sp,16
10003044: 17c0006f j 100031c0 <WRITE32>
0000000010003048 <_arch_irq_lock_state>:
10003048: 1141 addi sp,sp,-16
1000304a: e422 sd s0,8(sp)
1000304c: 0800 addi s0,sp,16
1000304e: 6422 ld s0,8(sp)
10003050: 40001537 lui a0,0x40001
10003054: 0506 slli a0,a0,0x1
10003056: 02850513 addi a0,a0,40 # 40001028 <_time_slice_prio_ceiling+0x2fff72c4>
1000305a: 0141 addi sp,sp,16
1000305c: 1480006f j 100031a4 <READ32>
0000000010003060 <_arch_irq_enable>:
10003060: 1101 addi sp,sp,-32
10003062: ec06 sd ra,24(sp)
10003064: e822 sd s0,16(sp)
10003066: e426 sd s1,8(sp)
10003068: e04a sd s2,0(sp)
1000306a: 1000 addi s0,sp,32
1000306c: 400014b7 lui s1,0x40001
10003070: 892a mv s2,a0
10003072: 00149513 slli a0,s1,0x1
10003076: 12e000ef jal ra,100031a4 <READ32>
1000307a: 4585 li a1,1
1000307c: 012595bb sllw a1,a1,s2
10003080: fff5c913 not s2,a1
10003084: 0486 slli s1,s1,0x1
10003086: 01257933 and s2,a0,s2
1000308a: 00848513 addi a0,s1,8 # 40001008 <_time_slice_prio_ceiling+0x2fff72a4>
1000308e: 132000ef jal ra,100031c0 <WRITE32>
10003092: 2901 sext.w s2,s2
10003094: 6442 ld s0,16(sp)
10003096: 60e2 ld ra,24(sp)
10003098: 85ca mv a1,s2
1000309a: 8526 mv a0,s1
1000309c: 6902 ld s2,0(sp)
1000309e: 64a2 ld s1,8(sp)
100030a0: 6105 addi sp,sp,32
100030a2: 11e0006f j 100031c0 <WRITE32>
00000000100030a6 <_irq_handler_set>:
void _irq_handler_set(
unsigned int irq,
void (*new)(void *arg),
void *arg
)
{
100030a6: 7179 addi sp,sp,-48
100030a8: f022 sd s0,32(sp)
100030aa: ec26 sd s1,24(sp)
100030ac: 1800 addi s0,sp,48
100030ae: f406 sd ra,40(sp)
100030b0: 84aa mv s1,a0
100030b2: fcb43823 sd a1,-48(s0)
100030b6: fcc43c23 sd a2,-40(s0)
int key = irq_lock();
100030ba: f3fff0ef jal ra,10002ff8 <_arch_irq_lock>
__ASSERT(irq < CONFIG_NUM_IRQS, "IRQ number too high");
isr_demux_table[irq].arg = arg;
100030be: fd843603 ld a2,-40(s0)
isr_demux_table[irq].isr = new;
100030c2: fd043583 ld a1,-48(s0)
isr_demux_table[irq].arg = arg;
100030c6: 02049793 slli a5,s1,0x20
100030ca: 10008737 lui a4,0x10008
irq_unlock(key);
}
100030ce: 7402 ld s0,32(sp)
isr_demux_table[irq].arg = arg;
100030d0: 83f1 srli a5,a5,0x1c
100030d2: 77870713 addi a4,a4,1912 # 10008778 <isr_demux_table>
100030d6: 97ba add a5,a5,a4
}
100030d8: 70a2 ld ra,40(sp)
100030da: 64e2 ld s1,24(sp)
isr_demux_table[irq].arg = arg;
100030dc: e390 sd a2,0(a5)
isr_demux_table[irq].isr = new;
100030de: e78c sd a1,8(a5)
irq_unlock(key);
100030e0: 2501 sext.w a0,a0
}
100030e2: 6145 addi sp,sp,48
irq_unlock(key);
100030e4: f4bff06f j 1000302e <_arch_irq_unlock>
00000000100030e8 <_arch_irq_connect_dynamic>:
* @return the interrupt line number
*/
int _arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
void (*routine)(void *arg), void *parameter,
uint32_t flags)
{
100030e8: 1101 addi sp,sp,-32
100030ea: e822 sd s0,16(sp)
100030ec: e426 sd s1,8(sp)
100030ee: ec06 sd ra,24(sp)
100030f0: 1000 addi s0,sp,32
100030f2: 85b2 mv a1,a2
ARG_UNUSED(flags);
_irq_handler_set(irq, routine, parameter);
100030f4: 8636 mv a2,a3
{
100030f6: 84aa mv s1,a0
_irq_handler_set(irq, routine, parameter);
100030f8: fafff0ef jal ra,100030a6 <_irq_handler_set>
return irq;
}
100030fc: 60e2 ld ra,24(sp)
100030fe: 6442 ld s0,16(sp)
10003100: 8526 mv a0,s1
10003102: 64a2 ld s1,8(sp)
10003104: 6105 addi sp,sp,32
10003106: 8082 ret
0000000010003108 <_new_thread>:
*/
extern void _new_thread(char *pStack, size_t stackSize,
void (*pEntry)(void *, void *, void *),
void *p1, void *p2, void *p3,
int prio, unsigned options)
{
10003108: 715d addi sp,sp,-80
1000310a: e486 sd ra,72(sp)
1000310c: e0a2 sd s0,64(sp)
1000310e: fc26 sd s1,56(sp)
10003110: 0880 addi s0,sp,80
10003112: f84a sd s2,48(sp)
10003114: f44e sd s3,40(sp)
10003116: f052 sd s4,32(sp)
10003118: 8a32 mv s4,a2
1000311a: 892e mv s2,a1
struct k_thread *thread;
unsigned long *pInitialCtx;
#ifdef CONFIG_INIT_STACKS
memset(pStack, 0xaa, stackSize);
1000311c: 862e mv a2,a1
1000311e: 0aa00593 li a1,170
{
10003122: 84aa mv s1,a0
10003124: 89b6 mv s3,a3
10003126: fae43823 sd a4,-80(s0)
1000312a: faf43c23 sd a5,-72(s0)
1000312e: fd043023 sd a6,-64(s0)
10003132: fd143423 sd a7,-56(s0)
memset(pStack, 0xaa, stackSize);
10003136: 800ff0ef jal ra,10002136 <memset>
thread = (struct k_thread *)pStack;
pInitialCtx =
(unsigned long *)(pStack + stackSize);
_init_thread_base(&thread->base, prio, K_PRESTART, options);
1000313a: fc043803 ld a6,-64(s0)
1000313e: fc843683 ld a3,-56(s0)
10003142: 8526 mv a0,s1
10003144: 6611 lui a2,0x4
10003146: 85c2 mv a1,a6
10003148: 62f000ef jal ra,10003f76 <_init_thread_base>
//printk("\nInitial context SP = 0x%x\n", (unsigned long)pStack);
thread->callee_saved.r[COOP_REG_RA/sizeof(uint64_t)] = (uint64_t)_thread_entry;
thread->callee_saved.r[COOP_REG_MEPC/sizeof(uint64_t)] = (uint64_t)_thread_entry;
thread->callee_saved.r[COOP_REG_A0/sizeof(uint64_t)] = (uint64_t)pEntry;
thread->callee_saved.r[COOP_REG_A1/sizeof(uint64_t)] = (uint64_t)p1;
thread->callee_saved.r[COOP_REG_A2/sizeof(uint64_t)] = (uint64_t)p2;
1000314c: fb043703 ld a4,-80(s0)
thread->callee_saved.r[COOP_REG_A3/sizeof(uint64_t)] = (uint64_t)p3;
10003150: fb843783 ld a5,-72(s0)
thread->callee_saved.r[COOP_REG_SP/sizeof(uint64_t)] =
(uint64_t)(pStack + stackSize);
#ifdef _WIN32
LIBH_create_thread(pStack, (unsigned int)stackSize, prio, options);
#endif
}
10003154: 60a6 ld ra,72(sp)
10003156: 6406 ld s0,64(sp)
thread->callee_saved.r[COOP_REG_RA/sizeof(uint64_t)] = (uint64_t)_thread_entry;
10003158: 100046b7 lui a3,0x10004
pInitialCtx =
1000315c: 9926 add s2,s2,s1
thread->callee_saved.r[COOP_REG_RA/sizeof(uint64_t)] = (uint64_t)_thread_entry;
1000315e: d5468693 addi a3,a3,-684 # 10003d54 <_thread_entry>
thread->callee_saved.r[COOP_REG_A0/sizeof(uint64_t)] = (uint64_t)pEntry;
10003162: 0f44b423 sd s4,232(s1)
thread->callee_saved.r[COOP_REG_A1/sizeof(uint64_t)] = (uint64_t)p1;
10003166: 0f34b823 sd s3,240(s1)
thread->callee_saved.r[COOP_REG_SP/sizeof(uint64_t)] =
1000316a: 0d24b423 sd s2,200(s1)
thread->init_data = NULL;
1000316e: 1604bc23 sd zero,376(s1)
thread->fn_abort = NULL;
10003172: 1804b023 sd zero,384(s1)
thread->callee_saved.key = 0;
10003176: 1604b023 sd zero,352(s1)
thread->callee_saved.preemptive = 0;
1000317a: 1604b823 sd zero,368(s1)
thread->callee_saved.r[COOP_REG_RA/sizeof(uint64_t)] = (uint64_t)_thread_entry;
1000317e: f0b4 sd a3,96(s1)
thread->callee_saved.r[COOP_REG_MEPC/sizeof(uint64_t)] = (uint64_t)_thread_entry;
10003180: e8f4 sd a3,208(s1)
thread->callee_saved.r[COOP_REG_A2/sizeof(uint64_t)] = (uint64_t)p2;
10003182: fcf8 sd a4,248(s1)
thread->callee_saved.r[COOP_REG_A3/sizeof(uint64_t)] = (uint64_t)p3;
10003184: 10f4b023 sd a5,256(s1)
}
10003188: 7942 ld s2,48(sp)
1000318a: 74e2 ld s1,56(sp)
1000318c: 79a2 ld s3,40(sp)
1000318e: 7a02 ld s4,32(sp)
10003190: 6161 addi sp,sp,80
10003192: 8082 ret
0000000010003194 <READ16>:
*/
#include <stdint.h>
uint16_t READ16(volatile uint16_t *addr)
{
10003194: 1141 addi sp,sp,-16
10003196: e422 sd s0,8(sp)
10003198: 0800 addi s0,sp,16
return *addr;
}
1000319a: 6422 ld s0,8(sp)
return *addr;
1000319c: 00055503 lhu a0,0(a0)
}
100031a0: 0141 addi sp,sp,16
100031a2: 8082 ret
00000000100031a4 <READ32>:
uint32_t READ32(volatile uint32_t *addr)
{
100031a4: 1141 addi sp,sp,-16
100031a6: e422 sd s0,8(sp)
100031a8: 0800 addi s0,sp,16
return *addr;
}
100031aa: 6422 ld s0,8(sp)
return *addr;
100031ac: 4108 lw a0,0(a0)
}
100031ae: 0141 addi sp,sp,16
100031b0: 8082 ret
00000000100031b2 <READ64>:
uint64_t READ64(volatile uint64_t *addr)
{
100031b2: 1141 addi sp,sp,-16
100031b4: e422 sd s0,8(sp)
100031b6: 0800 addi s0,sp,16
return *addr;
}
100031b8: 6422 ld s0,8(sp)
return *addr;
100031ba: 6108 ld a0,0(a0)
}
100031bc: 0141 addi sp,sp,16
100031be: 8082 ret
00000000100031c0 <WRITE32>:
void WRITE32(volatile uint32_t *addr, uint32_t val)
{
100031c0: 1141 addi sp,sp,-16
100031c2: e422 sd s0,8(sp)
100031c4: 0800 addi s0,sp,16
*addr = val;
}
100031c6: 6422 ld s0,8(sp)
*addr = val;
100031c8: c10c sw a1,0(a0)
}
100031ca: 0141 addi sp,sp,16
100031cc: 8082 ret
00000000100031ce <WRITE64>:
void WRITE64(volatile uint64_t *addr, uint64_t val)
{
100031ce: 1141 addi sp,sp,-16
100031d0: e422 sd s0,8(sp)
100031d2: 0800 addi s0,sp,16
*addr = val;
}
100031d4: 6422 ld s0,8(sp)
*addr = val;
100031d6: e10c sd a1,0(a0)
}
100031d8: 0141 addi sp,sp,16
100031da: 8082 ret
00000000100031dc <atomic_inc>:
*target ^= value;
irq_unlock(key);
return ret;
}
100031dc: 1101 addi sp,sp,-32
100031de: ec06 sd ra,24(sp)
100031e0: e822 sd s0,16(sp)
100031e2: e426 sd s1,8(sp)
100031e4: e04a sd s2,0(sp)
100031e6: 1000 addi s0,sp,32
100031e8: 892a mv s2,a0
100031ea: e0fff0ef jal ra,10002ff8 <_arch_irq_lock>
100031ee: 00092483 lw s1,0(s2)
100031f2: 2501 sext.w a0,a0
100031f4: 0014879b addiw a5,s1,1
100031f8: 00f92023 sw a5,0(s2)
100031fc: e33ff0ef jal ra,1000302e <_arch_irq_unlock>
10003200: 60e2 ld ra,24(sp)
10003202: 6442 ld s0,16(sp)
10003204: 8526 mv a0,s1
10003206: 6902 ld s2,0(sp)
10003208: 64a2 ld s1,8(sp)
1000320a: 6105 addi sp,sp,32
1000320c: 8082 ret
000000001000320e <atomic_dec>:
1000320e: 1101 addi sp,sp,-32
10003210: ec06 sd ra,24(sp)
10003212: e822 sd s0,16(sp)
10003214: e426 sd s1,8(sp)
10003216: e04a sd s2,0(sp)
10003218: 1000 addi s0,sp,32
1000321a: 892a mv s2,a0
1000321c: dddff0ef jal ra,10002ff8 <_arch_irq_lock>
10003220: 00092483 lw s1,0(s2)
10003224: 2501 sext.w a0,a0
10003226: fff4879b addiw a5,s1,-1
1000322a: 00f92023 sw a5,0(s2)
1000322e: e01ff0ef jal ra,1000302e <_arch_irq_unlock>
10003232: 60e2 ld ra,24(sp)
10003234: 6442 ld s0,16(sp)
10003236: 8526 mv a0,s1
10003238: 6902 ld s2,0(sp)
1000323a: 64a2 ld s1,8(sp)
1000323c: 6105 addi sp,sp,32
1000323e: 8082 ret
0000000010003240 <atomic_get>:
10003240: 1141 addi sp,sp,-16
10003242: e422 sd s0,8(sp)
10003244: 0800 addi s0,sp,16
10003246: 6422 ld s0,8(sp)
10003248: 4108 lw a0,0(a0)
1000324a: 0141 addi sp,sp,16
1000324c: 8082 ret
000000001000324e <atomic_or>:
1000324e: 7179 addi sp,sp,-48
10003250: f406 sd ra,40(sp)
10003252: f022 sd s0,32(sp)
10003254: ec26 sd s1,24(sp)
10003256: 1800 addi s0,sp,48
10003258: e84a sd s2,16(sp)
1000325a: 892a mv s2,a0
1000325c: fcb43c23 sd a1,-40(s0)
10003260: d99ff0ef jal ra,10002ff8 <_arch_irq_lock>
10003264: fd843583 ld a1,-40(s0)
10003268: 00092483 lw s1,0(s2)
1000326c: 2501 sext.w a0,a0
1000326e: 8dc5 or a1,a1,s1
10003270: 00b92023 sw a1,0(s2)
10003274: dbbff0ef jal ra,1000302e <_arch_irq_unlock>
10003278: 70a2 ld ra,40(sp)
1000327a: 7402 ld s0,32(sp)
1000327c: 8526 mv a0,s1
1000327e: 6942 ld s2,16(sp)
10003280: 64e2 ld s1,24(sp)
10003282: 6145 addi sp,sp,48
10003284: 8082 ret
0000000010003286 <atomic_and>:
* @param value the value to AND
*
* @return The previous value from <target>
*/
atomic_val_t atomic_and(atomic_t *target, atomic_val_t value)
{
10003286: 7179 addi sp,sp,-48
10003288: f406 sd ra,40(sp)
1000328a: f022 sd s0,32(sp)
1000328c: ec26 sd s1,24(sp)
1000328e: 1800 addi s0,sp,48
10003290: e84a sd s2,16(sp)
10003292: 892a mv s2,a0
10003294: fcb43c23 sd a1,-40(s0)
unsigned int key;
atomic_val_t ret;
key = irq_lock();
10003298: d61ff0ef jal ra,10002ff8 <_arch_irq_lock>
ret = *target;
*target &= value;
1000329c: fd843583 ld a1,-40(s0)
ret = *target;
100032a0: 00092483 lw s1,0(s2)
irq_unlock(key);
100032a4: 2501 sext.w a0,a0
*target &= value;
100032a6: 8de5 and a1,a1,s1
100032a8: 00b92023 sw a1,0(s2)
irq_unlock(key);
100032ac: d83ff0ef jal ra,1000302e <_arch_irq_unlock>
return ret;
}
100032b0: 70a2 ld ra,40(sp)
100032b2: 7402 ld s0,32(sp)
100032b4: 8526 mv a0,s1
100032b6: 6942 ld s2,16(sp)
100032b8: 64e2 ld s1,24(sp)
100032ba: 6145 addi sp,sp,48
100032bc: 8082 ret
00000000100032be <_sys_device_do_config_level>:
* off and the next one begins.
*
* @param level init level to run.
*/
void _sys_device_do_config_level(int level)
{
100032be: 1101 addi sp,sp,-32
struct device *info;
for (info = config_levels[level]; info < config_levels[level+1]; info++) {
100032c0: 00351713 slli a4,a0,0x3
100032c4: 100057b7 lui a5,0x10005
100032c8: 2505 addiw a0,a0,1
{
100032ca: e822 sd s0,16(sp)
100032cc: e426 sd s1,8(sp)
100032ce: e04a sd s2,0(sp)
for (info = config_levels[level]; info < config_levels[level+1]; info++) {
100032d0: fa878793 addi a5,a5,-88 # 10004fa8 <config_levels>
{
100032d4: ec06 sd ra,24(sp)
100032d6: 1000 addi s0,sp,32
for (info = config_levels[level]; info < config_levels[level+1]; info++) {
100032d8: 050e slli a0,a0,0x3
100032da: 973e add a4,a4,a5
100032dc: 97aa add a5,a5,a0
100032de: 6304 ld s1,0(a4)
100032e0: 0007b903 ld s2,0(a5)
100032e4: 0124e863 bltu s1,s2,100032f4 <_sys_device_do_config_level+0x36>
struct device_config *device = info->config;
device->init(info);
}
}
100032e8: 60e2 ld ra,24(sp)
100032ea: 6442 ld s0,16(sp)
100032ec: 64a2 ld s1,8(sp)
100032ee: 6902 ld s2,0(sp)
100032f0: 6105 addi sp,sp,32
100032f2: 8082 ret
device->init(info);
100032f4: 609c ld a5,0(s1)
100032f6: 8526 mv a0,s1
for (info = config_levels[level]; info < config_levels[level+1]; info++) {
100032f8: 04e1 addi s1,s1,24
device->init(info);
100032fa: 679c ld a5,8(a5)
100032fc: 9782 jalr a5
100032fe: b7dd j 100032e4 <_sys_device_do_config_level+0x26>
0000000010003300 <device_get_binding>:
struct device *device_get_binding(const char *name)
{
10003300: 7179 addi sp,sp,-48
10003302: f022 sd s0,32(sp)
10003304: ec26 sd s1,24(sp)
10003306: e84a sd s2,16(sp)
10003308: e44e sd s3,8(sp)
1000330a: f406 sd ra,40(sp)
1000330c: 1800 addi s0,sp,48
struct device *info;
for (info = __device_init_start; info != __device_init_end; info++) {
1000330e: 100054b7 lui s1,0x10005
10003312: 10005937 lui s2,0x10005
{
10003316: 89aa mv s3,a0
for (info = __device_init_start; info != __device_init_end; info++) {
10003318: 1b848493 addi s1,s1,440 # 100051b8 <__device_PRE_KERNEL_1_start>
1000331c: 23090913 addi s2,s2,560 # 10005230 <__device_MICROKERNEL_start>
10003320: 01249463 bne s1,s2,10003328 <device_get_binding+0x28>
if (info->driver_api && !strcmp(name, info->config->name)) {
return info;
}
}
return NULL;
10003324: 4481 li s1,0
10003326: a819 j 1000333c <device_get_binding+0x3c>
if (info->driver_api && !strcmp(name, info->config->name)) {
10003328: 649c ld a5,8(s1)
1000332a: e399 bnez a5,10003330 <device_get_binding+0x30>
for (info = __device_init_start; info != __device_init_end; info++) {
1000332c: 04e1 addi s1,s1,24
1000332e: bfcd j 10003320 <device_get_binding+0x20>
if (info->driver_api && !strcmp(name, info->config->name)) {
10003330: 609c ld a5,0(s1)
10003332: 854e mv a0,s3
10003334: 638c ld a1,0(a5)
10003336: ccdfe0ef jal ra,10002002 <strcmp>
1000333a: f96d bnez a0,1000332c <device_get_binding+0x2c>
}
1000333c: 70a2 ld ra,40(sp)
1000333e: 7402 ld s0,32(sp)
10003340: 8526 mv a0,s1
10003342: 6942 ld s2,16(sp)
10003344: 64e2 ld s1,24(sp)
10003346: 69a2 ld s3,8(sp)
10003348: 6145 addi sp,sp,48
1000334a: 8082 ret
000000001000334c <_ready_thread>:
* note: this works as long as:
* - the slist implementation keeps the next pointer as the first
* field of the node object type
* - list->tail->next = NULL.
*/
return k_fifo_put_list(fifo, list->head, list->tail);
1000334c: 1141 addi sp,sp,-16
1000334e: e422 sd s0,8(sp)
10003350: 0800 addi s0,sp,16
10003352: 4918 lw a4,16(a0)
10003354: 77f1 lui a5,0xffffc
10003356: 17fd addi a5,a5,-1
10003358: 8ff9 and a5,a5,a4
1000335a: c91c sw a5,16(a0)
1000335c: 0003a7b7 lui a5,0x3a
10003360: 8f7d and a4,a4,a5
10003362: eb09 bnez a4,10003374 <_ready_thread+0x28>
10003364: 6538 ld a4,72(a0)
10003366: 57fd li a5,-1
10003368: 00f71663 bne a4,a5,10003374 <_ready_thread+0x28>
1000336c: 6422 ld s0,8(sp)
1000336e: 0141 addi sp,sp,16
10003370: 3c00006f j 10003730 <_add_thread_to_ready_q>
10003374: 6422 ld s0,8(sp)
10003376: 0141 addi sp,sp,16
10003378: 8082 ret
000000001000337a <_must_switch_threads>:
1000337a: 100067b7 lui a5,0x10006
1000337e: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
10003382: 495c lw a5,20(a0)
10003384: 0007d963 bgez a5,10003396 <_must_switch_threads+0x1c>
10003388: 4501 li a0,0
1000338a: 8082 ret
1000338c: 4501 li a0,0
1000338e: 60a2 ld ra,8(sp)
10003390: 6402 ld s0,0(sp)
10003392: 0141 addi sp,sp,16
10003394: 8082 ret
10003396: 1141 addi sp,sp,-16
10003398: e022 sd s0,0(sp)
1000339a: e406 sd ra,8(sp)
1000339c: 0800 addi s0,sp,16
1000339e: 0561 addi a0,a0,24
100033a0: ea1ff0ef jal ra,10003240 <atomic_get>
100033a4: f565 bnez a0,1000338c <_must_switch_threads+0x12>
100033a6: 55c000ef jal ra,10003902 <__must_switch_threads>
100033aa: 00a03533 snez a0,a0
100033ae: b7c5 j 1000338e <_must_switch_threads+0x14>
00000000100033b0 <_abort_timeout>:
100033b0: 1141 addi sp,sp,-16
100033b2: e422 sd s0,8(sp)
100033b4: 0800 addi s0,sp,16
100033b6: 7114 ld a3,32(a0)
100033b8: 57fd li a5,-1
100033ba: 02f68663 beq a3,a5,100033e6 <_abort_timeout+0x36>
100033be: 10006737 lui a4,0x10006
100033c2: de073703 ld a4,-544(a4) # 10005de0 <_kernel+0x20>
100033c6: 611c ld a5,0(a0)
100033c8: 00e50563 beq a0,a4,100033d2 <_abort_timeout+0x22>
100033cc: 7398 ld a4,32(a5)
100033ce: 9736 add a4,a4,a3
100033d0: f398 sd a4,32(a5)
100033d2: 6518 ld a4,8(a0)
100033d4: e31c sd a5,0(a4)
100033d6: 611c ld a5,0(a0)
100033d8: e798 sd a4,8(a5)
100033da: 57fd li a5,-1
100033dc: f11c sd a5,32(a0)
100033de: 4501 li a0,0
100033e0: 6422 ld s0,8(sp)
100033e2: 0141 addi sp,sp,16
100033e4: 8082 ret
100033e6: 557d li a0,-1
100033e8: bfe5 j 100033e0 <_abort_timeout+0x30>
00000000100033ea <k_fifo_init>:
100033ea: 1141 addi sp,sp,-16
100033ec: e422 sd s0,8(sp)
100033ee: 0800 addi s0,sp,16
100033f0: 6422 ld s0,8(sp)
100033f2: 00053823 sd zero,16(a0)
100033f6: 00053c23 sd zero,24(a0)
100033fa: e108 sd a0,0(a0)
100033fc: e508 sd a0,8(a0)
100033fe: 0141 addi sp,sp,16
10003400: 8082 ret
0000000010003402 <k_fifo_put>:
10003402: 7179 addi sp,sp,-48
10003404: f022 sd s0,32(sp)
10003406: ec26 sd s1,24(sp)
10003408: e84a sd s2,16(sp)
1000340a: e44e sd s3,8(sp)
1000340c: e052 sd s4,0(sp)
1000340e: f406 sd ra,40(sp)
10003410: 1800 addi s0,sp,48
10003412: 892a mv s2,a0
10003414: 89ae mv s3,a1
10003416: be3ff0ef jal ra,10002ff8 <_arch_irq_lock>
1000341a: 00093483 ld s1,0(s2)
1000341e: 00050a1b sext.w s4,a0
10003422: 04990e63 beq s2,s1,1000347e <k_fifo_put+0x7c>
10003426: 649c ld a5,8(s1)
10003428: 6098 ld a4,0(s1)
1000342a: 02848513 addi a0,s1,40
1000342e: e398 sd a4,0(a5)
10003430: 6098 ld a4,0(s1)
10003432: e71c sd a5,8(a4)
10003434: 489c lw a5,16(s1)
10003436: 7779 lui a4,0xffffe
10003438: 177d addi a4,a4,-1
1000343a: 8ff9 and a5,a5,a4
1000343c: c89c sw a5,16(s1)
1000343e: f73ff0ef jal ra,100033b0 <_abort_timeout>
10003442: 8526 mv a0,s1
10003444: f09ff0ef jal ra,1000334c <_ready_thread>
10003448: 100067b7 lui a5,0x10006
1000344c: dc07a783 lw a5,-576(a5) # 10005dc0 <_kernel>
10003450: 1604b423 sd zero,360(s1)
10003454: 0334b023 sd s3,32(s1)
10003458: ef85 bnez a5,10003490 <k_fifo_put+0x8e>
1000345a: f21ff0ef jal ra,1000337a <_must_switch_threads>
1000345e: c90d beqz a0,10003490 <k_fifo_put+0x8e>
10003460: 7402 ld s0,32(sp)
10003462: 70a2 ld ra,40(sp)
10003464: 64e2 ld s1,24(sp)
10003466: 6942 ld s2,16(sp)
10003468: 69a2 ld s3,8(sp)
1000346a: 8552 mv a0,s4
1000346c: 6a02 ld s4,0(sp)
1000346e: 6145 addi sp,sp,48
10003470: b95fc06f j 10000004 <_Swap>
10003474: 0137b023 sd s3,0(a5)
10003478: 01393c23 sd s3,24(s2)
1000347c: a811 j 10003490 <k_fifo_put+0x8e>
1000347e: 01893783 ld a5,24(s2)
10003482: 0009b023 sd zero,0(s3)
10003486: f7fd bnez a5,10003474 <k_fifo_put+0x72>
10003488: 01393c23 sd s3,24(s2)
1000348c: 01393823 sd s3,16(s2)
10003490: 7402 ld s0,32(sp)
10003492: 70a2 ld ra,40(sp)
10003494: 64e2 ld s1,24(sp)
10003496: 6942 ld s2,16(sp)
10003498: 69a2 ld s3,8(sp)
1000349a: 8552 mv a0,s4
1000349c: 6a02 ld s4,0(sp)
1000349e: 6145 addi sp,sp,48
100034a0: b8fff06f j 1000302e <_arch_irq_unlock>
00000000100034a4 <k_fifo_get>:
}
void *k_fifo_get(struct k_fifo *fifo, int32_t timeout)
{
100034a4: 7139 addi sp,sp,-64
100034a6: f822 sd s0,48(sp)
100034a8: f426 sd s1,40(sp)
100034aa: 0080 addi s0,sp,64
100034ac: f04a sd s2,32(sp)
100034ae: ec4e sd s3,24(sp)
100034b0: fc06 sd ra,56(sp)
100034b2: 892a mv s2,a0
100034b4: fcb43423 sd a1,-56(s0)
unsigned int key;
void *data;
key = irq_lock();
100034b8: b41ff0ef jal ra,10002ff8 <_arch_irq_lock>
100034bc: 01093483 ld s1,16(s2)
100034c0: 0005099b sext.w s3,a0
if (likely(!sys_slist_is_empty(&fifo->data_q))) {
100034c4: fc843583 ld a1,-56(s0)
100034c8: c48d beqz s1,100034f2 <k_fifo_get+0x4e>
*/
static inline sys_snode_t *sys_slist_get_not_empty(sys_slist_t *list)
{
sys_snode_t *node = list->head;
list->head = node->next;
100034ca: 609c ld a5,0(s1)
if (list->tail == node) {
100034cc: 01893703 ld a4,24(s2)
list->head = node->next;
100034d0: 00f93823 sd a5,16(s2)
if (list->tail == node) {
100034d4: 00e49463 bne s1,a4,100034dc <k_fifo_get+0x38>
list->tail = list->head;
100034d8: 00f93c23 sd a5,24(s2)
irq_unlock(key);
return data;
}
if (timeout == K_NO_WAIT) {
irq_unlock(key);
100034dc: 854e mv a0,s3
100034de: b51ff0ef jal ra,1000302e <_arch_irq_unlock>
}
_pend_current_thread(&fifo->wait_q, timeout);
return _Swap(key) ? NULL : _current->base.swap_data;
}
100034e2: 70e2 ld ra,56(sp)
100034e4: 7442 ld s0,48(sp)
100034e6: 8526 mv a0,s1
100034e8: 7902 ld s2,32(sp)
100034ea: 74a2 ld s1,40(sp)
100034ec: 69e2 ld s3,24(sp)
100034ee: 6121 addi sp,sp,64
100034f0: 8082 ret
if (timeout == K_NO_WAIT) {
100034f2: d5ed beqz a1,100034dc <k_fifo_get+0x38>
_pend_current_thread(&fifo->wait_q, timeout);
100034f4: 854a mv a0,s2
100034f6: 3a6000ef jal ra,1000389c <_pend_current_thread>
return _Swap(key) ? NULL : _current->base.swap_data;
100034fa: 854e mv a0,s3
100034fc: b09fc0ef jal ra,10000004 <_Swap>
10003500: 2501 sext.w a0,a0
10003502: f165 bnez a0,100034e2 <k_fifo_get+0x3e>
10003504: 100067b7 lui a5,0x10006
10003508: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
1000350c: 7384 ld s1,32(a5)
1000350e: bfd1 j 100034e2 <k_fifo_get+0x3e>
0000000010003510 <_main>:
* init functions, then invokes application's main() routine.
*
* @return N/A
*/
static void _main(void *unused1, void *unused2, void *unused3)
{
10003510: 1141 addi sp,sp,-16
10003512: e406 sd ra,8(sp)
10003514: e022 sd s0,0(sp)
10003516: 0800 addi s0,sp,16
ARG_UNUSED(unused1);
ARG_UNUSED(unused2);
ARG_UNUSED(unused3);
_sys_device_do_config_level(_SYS_INIT_LEVEL_POST_KERNEL);
10003518: 4509 li a0,2
1000351a: da5ff0ef jal ra,100032be <_sys_device_do_config_level>
/* These 3 are deprecated */
_sys_device_do_config_level(_SYS_INIT_LEVEL_SECONDARY);
1000351e: 4515 li a0,5
10003520: d9fff0ef jal ra,100032be <_sys_device_do_config_level>
_sys_device_do_config_level(_SYS_INIT_LEVEL_NANOKERNEL);
10003524: 4519 li a0,6
10003526: d99ff0ef jal ra,100032be <_sys_device_do_config_level>
_sys_device_do_config_level(_SYS_INIT_LEVEL_MICROKERNEL);
1000352a: 451d li a0,7
1000352c: d93ff0ef jal ra,100032be <_sys_device_do_config_level>
/* Final init level before app starts */
_sys_device_do_config_level(_SYS_INIT_LEVEL_APPLICATION);
10003530: 450d li a0,3
10003532: d8dff0ef jal ra,100032be <_sys_device_do_config_level>
extern void __do_init_array_aux(void);
__do_global_ctors_aux();
__do_init_array_aux();
#endif
_init_static_threads();
10003536: 195000ef jal ra,10003eca <_init_static_threads>
*/
#if defined(MDEF_MAIN_THREAD_PRIORITY) && \
(MDEF_MAIN_THREAD_PRIORITY != CONFIG_MAIN_THREAD_PRIORITY)
k_thread_priority_set(_main_thread, MDEF_MAIN_THREAD_PRIORITY);
#endif
main();
1000353a: cc5fc0ef jal ra,100001fe <main>
/* Terminate thread normally since it has no more work to do */
_main_thread->base.flags &= ~K_ESSENTIAL;
1000353e: 100097b7 lui a5,0x10009
10003542: 90878793 addi a5,a5,-1784 # 10008908 <_main_stack>
10003546: 4b98 lw a4,16(a5)
}
10003548: 60a2 ld ra,8(sp)
1000354a: 6402 ld s0,0(sp)
_main_thread->base.flags &= ~K_ESSENTIAL;
1000354c: dff77713 andi a4,a4,-513
10003550: cb98 sw a4,16(a5)
}
10003552: 0141 addi sp,sp,16
10003554: 8082 ret
0000000010003556 <_Cstart>:
* cleared/zeroed.
*
* @return Does not return
*/
FUNC_NORETURN void _Cstart(void)
{
10003556: 7121 addi sp,sp,-448
10003558: fb22 sd s0,432(sp)
1000355a: f726 sd s1,424(sp)
1000355c: 0380 addi s0,sp,448
1000355e: ff06 sd ra,440(sp)
10003560: f34a sd s2,416(sp)
10003562: ef4e sd s3,408(sp)
10003564: eb52 sd s4,400(sp)
_current = dummy_thread;
10003566: 100064b7 lui s1,0x10006
1000356a: dc048713 addi a4,s1,-576 # 10005dc0 <_kernel>
1000356e: e4040793 addi a5,s0,-448
10003572: eb1c sd a5,16(a4)
dummy_thread->base.flags = K_ESSENTIAL;
10003574: 57fd li a5,-1
10003576: 1792 slli a5,a5,0x24
10003578: 20078793 addi a5,a5,512
1000357c: e4f43823 sd a5,-432(s0)
10003580: 100067b7 lui a5,0x10006
10003584: df878793 addi a5,a5,-520 # 10005df8 <_kernel+0x38>
10003588: 23870713 addi a4,a4,568 # ffffffffffffe238 <_time_slice_prio_ceiling+0xffffffffefff44d4>
1000358c: dc048493 addi s1,s1,-576
* @return N/A
*/
static inline void sys_dlist_init(sys_dlist_t *list)
{
list->head = (sys_dnode_t *)list;
10003590: e39c sd a5,0(a5)
list->tail = (sys_dnode_t *)list;
10003592: e79c sd a5,8(a5)
10003594: 07c1 addi a5,a5,16
for (int ii = 0; ii < K_NUM_PRIORITIES; ii++) {
10003596: fee79de3 bne a5,a4,10003590 <_Cstart+0x3a>
_new_thread(_main_stack, MAIN_STACK_SIZE,
1000359a: 100099b7 lui s3,0x10009
1000359e: 10003637 lui a2,0x10003
100035a2: 6585 lui a1,0x1
100035a4: 20000893 li a7,512
100035a8: 4801 li a6,0
100035aa: 4681 li a3,0
100035ac: 51060613 addi a2,a2,1296 # 10003510 <_main>
100035b0: 80058593 addi a1,a1,-2048 # 800 <__memory_pool_quad_block_size+0x7f0>
100035b4: 90898513 addi a0,s3,-1784 # 10008908 <_main_stack>
100035b8: 4781 li a5,0
100035ba: 4701 li a4,0
100035bc: b4dff0ef jal ra,10003108 <_new_thread>
*
* This routine must be called with interrupts locked.
*/
static inline void _mark_thread_as_started(struct k_thread *thread)
{
thread->base.flags &= ~K_PRESTART;
100035c0: 90898713 addi a4,s3,-1784
100035c4: 4b1c lw a5,16(a4)
100035c6: 7971 lui s2,0xffffc
100035c8: 197d addi s2,s2,-1
100035ca: 0127f7b3 and a5,a5,s2
100035ce: cb1c sw a5,16(a4)
_add_thread_to_ready_q(_main_thread);
100035d0: 90898513 addi a0,s3,-1784
100035d4: 15c000ef jal ra,10003730 <_add_thread_to_ready_q>
_new_thread(_idle_stack, IDLE_STACK_SIZE,
100035d8: 100099b7 lui s3,0x10009
100035dc: 10004637 lui a2,0x10004
100035e0: 20000893 li a7,512
100035e4: 483d li a6,15
100035e6: 4701 li a4,0
100035e8: 4681 li a3,0
100035ea: fd860613 addi a2,a2,-40 # 10003fd8 <idle>
100035ee: 40000593 li a1,1024
100035f2: 4781 li a5,0
100035f4: 10898513 addi a0,s3,264 # 10009108 <_idle_stack>
100035f8: b11ff0ef jal ra,10003108 <_new_thread>
100035fc: 10898a13 addi s4,s3,264
10003600: 010a2783 lw a5,16(s4)
_add_thread_to_ready_q(_idle_thread);
10003604: 10898513 addi a0,s3,264
10003608: 0127f933 and s2,a5,s2
1000360c: 012a2823 sw s2,16(s4)
10003610: 120000ef jal ra,10003730 <_add_thread_to_ready_q>
list->head = (sys_dnode_t *)list;
10003614: 100067b7 lui a5,0x10006
10003618: dd878793 addi a5,a5,-552 # 10005dd8 <_kernel+0x18>
1000361c: ec9c sd a5,24(s1)
list->tail = (sys_dnode_t *)list;
1000361e: f09c sd a5,32(s1)
extern char _interrupt_stack[];
static ALWAYS_INLINE void nanoArchInit(void)
{
_kernel.irq_stack = _interrupt_stack + CONFIG_ISR_STACK_SIZE;
10003620: 1000a7b7 lui a5,0x1000a
10003624: d0878793 addi a5,a5,-760 # 10009d08 <_end>
*/
prepare_multithreading(dummy_thread);
/* Deprecated */
_sys_device_do_config_level(_SYS_INIT_LEVEL_PRIMARY);
10003628: 4511 li a0,4
1000362a: e49c sd a5,8(s1)
1000362c: c93ff0ef jal ra,100032be <_sys_device_do_config_level>
/* perform basic hardware initialization */
_sys_device_do_config_level(_SYS_INIT_LEVEL_PRE_KERNEL_1);
10003630: 4501 li a0,0
10003632: c8dff0ef jal ra,100032be <_sys_device_do_config_level>
_sys_device_do_config_level(_SYS_INIT_LEVEL_PRE_KERNEL_2);
10003636: 4505 li a0,1
10003638: c87ff0ef jal ra,100032be <_sys_device_do_config_level>
STACK_CANARY_INIT();
/* display boot banner */
PRINT_BOOT_BANNER();
1000363c: 10005537 lui a0,0x10005
10003640: ff050513 addi a0,a0,-16 # 10004ff0 <config_levels+0x48>
10003644: bf3fe0ef jal ra,10002236 <printk>
_Swap(irq_lock());
10003648: 9b1ff0ef jal ra,10002ff8 <_arch_irq_lock>
1000364c: 2501 sext.w a0,a0
1000364e: 9b7fc0ef jal ra,10000004 <_Swap>
0000000010003652 <_get_highest_ready_prio>:
if (_is_thread_ready(thread)) {
_remove_thread_from_ready_q(thread);
thread->base.prio = prio;
_add_thread_to_ready_q(thread);
} else {
thread->base.prio = prio;
10003652: 1141 addi sp,sp,-16
10003654: e422 sd s0,8(sp)
10003656: 0800 addi s0,sp,16
10003658: 100067b7 lui a5,0x10006
1000365c: df07a783 lw a5,-528(a5) # 10005df0 <_kernel+0x30>
10003660: 4505 li a0,1
10003662: e799 bnez a5,10003670 <_get_highest_ready_prio+0x1e>
10003664: 4501 li a0,0
10003666: a801 j 10003676 <_get_highest_ready_prio+0x24>
10003668: 0017d79b srliw a5,a5,0x1
1000366c: 2781 sext.w a5,a5
1000366e: 2505 addiw a0,a0,1
10003670: 0017f713 andi a4,a5,1
10003674: db75 beqz a4,10003668 <_get_highest_ready_prio+0x16>
10003676: 6422 ld s0,8(sp)
10003678: 353d addiw a0,a0,-17
1000367a: 0141 addi sp,sp,16
1000367c: 8082 ret
000000001000367e <_is_timeout_insert_point>:
1000367e: 1141 addi sp,sp,-16
10003680: e422 sd s0,8(sp)
10003682: 0800 addi s0,sp,16
10003684: 4198 lw a4,0(a1)
10003686: 711c ld a5,32(a0)
10003688: 00e7d963 ble a4,a5,1000369a <_is_timeout_insert_point+0x1c>
1000368c: 40f707bb subw a5,a4,a5
10003690: c19c sw a5,0(a1)
10003692: 4501 li a0,0
10003694: 6422 ld s0,8(sp)
10003696: 0141 addi sp,sp,16
10003698: 8082 ret
1000369a: 8f99 sub a5,a5,a4
1000369c: f11c sd a5,32(a0)
1000369e: 4505 li a0,1
100036a0: bfd5 j 10003694 <_is_timeout_insert_point+0x16>
00000000100036a2 <_is_wait_q_insert_point>:
100036a2: 1141 addi sp,sp,-16
100036a4: e422 sd s0,8(sp)
100036a6: 0800 addi s0,sp,16
100036a8: 4948 lw a0,20(a0)
100036aa: 6422 ld s0,8(sp)
100036ac: 2581 sext.w a1,a1
100036ae: 00a5a533 slt a0,a1,a0
100036b2: 0141 addi sp,sp,16
100036b4: 8082 ret
00000000100036b6 <sys_dlist_insert_at>:
100036b6: 7139 addi sp,sp,-64
100036b8: f822 sd s0,48(sp)
100036ba: f426 sd s1,40(sp)
100036bc: f04a sd s2,32(sp)
100036be: ec4e sd s3,24(sp)
100036c0: fc06 sd ra,56(sp)
100036c2: 0080 addi s0,sp,64
100036c4: 00053983 ld s3,0(a0)
100036c8: 892a mv s2,a0
100036ca: 84ae mv s1,a1
100036cc: 03351963 bne a0,s3,100036fe <sys_dlist_insert_at+0x48>
100036d0: 00893783 ld a5,8(s2) # ffffffffffffc008 <_time_slice_prio_ceiling+0xffffffffefff22a4>
100036d4: 0124b023 sd s2,0(s1)
100036d8: e49c sd a5,8(s1)
100036da: 00893783 ld a5,8(s2)
100036de: e384 sd s1,0(a5)
100036e0: 00993423 sd s1,8(s2)
100036e4: 70e2 ld ra,56(sp)
100036e6: 7442 ld s0,48(sp)
100036e8: 74a2 ld s1,40(sp)
100036ea: 7902 ld s2,32(sp)
100036ec: 69e2 ld s3,24(sp)
100036ee: 6121 addi sp,sp,64
100036f0: 8082 ret
100036f2: 00893783 ld a5,8(s2)
100036f6: fcf98de3 beq s3,a5,100036d0 <sys_dlist_insert_at+0x1a>
100036fa: 0009b983 ld s3,0(s3)
100036fe: fc0989e3 beqz s3,100036d0 <sys_dlist_insert_at+0x1a>
10003702: 85b6 mv a1,a3
10003704: 854e mv a0,s3
10003706: fcd43023 sd a3,-64(s0)
1000370a: fcc43423 sd a2,-56(s0)
1000370e: 9602 jalr a2
10003710: fc843603 ld a2,-56(s0)
10003714: fc043683 ld a3,-64(s0)
10003718: dd69 beqz a0,100036f2 <sys_dlist_insert_at+0x3c>
1000371a: 0089b783 ld a5,8(s3)
1000371e: 0134b023 sd s3,0(s1)
10003722: e49c sd a5,8(s1)
10003724: 0089b783 ld a5,8(s3)
10003728: e384 sd s1,0(a5)
1000372a: 0099b423 sd s1,8(s3)
1000372e: bf5d j 100036e4 <sys_dlist_insert_at+0x2e>
0000000010003730 <_add_thread_to_ready_q>:
10003730: 1141 addi sp,sp,-16
10003732: e422 sd s0,8(sp)
10003734: 0800 addi s0,sp,16
10003736: 01452803 lw a6,20(a0)
1000373a: 10006637 lui a2,0x10006
1000373e: dc060593 addi a1,a2,-576 # 10005dc0 <_kernel>
10003742: 0108079b addiw a5,a6,16
10003746: 4057d71b sraiw a4,a5,0x5
1000374a: 0721 addi a4,a4,8
1000374c: 070a slli a4,a4,0x2
1000374e: 972e add a4,a4,a1
10003750: 01072883 lw a7,16(a4)
10003754: 4685 li a3,1
10003756: 00f696bb sllw a3,a3,a5
1000375a: 078d addi a5,a5,3
1000375c: 0792 slli a5,a5,0x4
1000375e: 0116e6b3 or a3,a3,a7
10003762: cb14 sw a3,16(a4)
10003764: 00878713 addi a4,a5,8
10003768: 972e add a4,a4,a1
1000376a: 97ae add a5,a5,a1
1000376c: e118 sd a4,0(a0)
1000376e: 6b98 ld a4,16(a5)
10003770: dc060613 addi a2,a2,-576
10003774: e518 sd a4,8(a0)
10003776: 6b98 ld a4,16(a5)
10003778: e308 sd a0,0(a4)
1000377a: eb88 sd a0,16(a5)
1000377c: 759c ld a5,40(a1)
1000377e: c789 beqz a5,10003788 <_add_thread_to_ready_q+0x58>
10003780: 4bd8 lw a4,20(a5)
10003782: 00e85363 ble a4,a6,10003788 <_add_thread_to_ready_q+0x58>
10003786: 87aa mv a5,a0
10003788: 6422 ld s0,8(sp)
1000378a: f61c sd a5,40(a2)
1000378c: 0141 addi sp,sp,16
1000378e: 8082 ret
0000000010003790 <_remove_thread_from_ready_q>:
10003790: 1141 addi sp,sp,-16
10003792: e422 sd s0,8(sp)
10003794: 0800 addi s0,sp,16
10003796: 6518 ld a4,8(a0)
10003798: 6114 ld a3,0(a0)
1000379a: 495c lw a5,20(a0)
1000379c: e314 sd a3,0(a4)
1000379e: 6114 ld a3,0(a0)
100037a0: 0107889b addiw a7,a5,16
100037a4: 00388593 addi a1,a7,3
100037a8: e698 sd a4,8(a3)
100037aa: 0592 slli a1,a1,0x4
100037ac: 100066b7 lui a3,0x10006
100037b0: dc068613 addi a2,a3,-576 # 10005dc0 <_kernel>
100037b4: 00858813 addi a6,a1,8
100037b8: 9832 add a6,a6,a2
100037ba: 962e add a2,a2,a1
100037bc: 6618 ld a4,8(a2)
100037be: dc068693 addi a3,a3,-576
100037c2: 01071f63 bne a4,a6,100037e0 <_remove_thread_from_ready_q+0x50>
100037c6: 4058d79b sraiw a5,a7,0x5
100037ca: 07a1 addi a5,a5,8
100037cc: 078a slli a5,a5,0x2
100037ce: 97b6 add a5,a5,a3
100037d0: 4b90 lw a2,16(a5)
100037d2: 4705 li a4,1
100037d4: 0117173b sllw a4,a4,a7
100037d8: fff74713 not a4,a4
100037dc: 8f71 and a4,a4,a2
100037de: cb98 sw a4,16(a5)
100037e0: 769c ld a5,40(a3)
100037e2: 00a79363 bne a5,a0,100037e8 <_remove_thread_from_ready_q+0x58>
100037e6: 4781 li a5,0
100037e8: 6422 ld s0,8(sp)
100037ea: f69c sd a5,40(a3)
100037ec: 0141 addi sp,sp,16
100037ee: 8082 ret
00000000100037f0 <_ms_to_ticks>:
100037f0: 0c800793 li a5,200
100037f4: 02f50533 mul a0,a0,a5
100037f8: 3e800793 li a5,1000
100037fc: 1141 addi sp,sp,-16
100037fe: e422 sd s0,8(sp)
10003800: 0800 addi s0,sp,16
10003802: 6422 ld s0,8(sp)
10003804: 3e750513 addi a0,a0,999
10003808: 02f54533 div a0,a0,a5
1000380c: 0141 addi sp,sp,16
1000380e: 2501 sext.w a0,a0
10003810: 8082 ret
0000000010003812 <_pend_thread>:
10003812: 7179 addi sp,sp,-48
10003814: f022 sd s0,32(sp)
10003816: ec26 sd s1,24(sp)
10003818: e84a sd s2,16(sp)
1000381a: e44e sd s3,8(sp)
1000381c: f406 sd ra,40(sp)
1000381e: 1800 addi s0,sp,48
10003820: 4954 lw a3,20(a0)
10003822: 89ae mv s3,a1
10003824: 8932 mv s2,a2
10003826: 10003637 lui a2,0x10003
1000382a: 84aa mv s1,a0
1000382c: 85aa mv a1,a0
1000382e: 6a260613 addi a2,a2,1698 # 100036a2 <_is_wait_q_insert_point>
10003832: 854e mv a0,s3
10003834: e83ff0ef jal ra,100036b6 <sys_dlist_insert_at>
10003838: 489c lw a5,16(s1)
1000383a: 6709 lui a4,0x2
1000383c: 8fd9 or a5,a5,a4
1000383e: c89c sw a5,16(s1)
10003840: 57fd li a5,-1
10003842: 04f90663 beq s2,a5,1000388e <_pend_thread+0x7c>
10003846: 0c800793 li a5,200
1000384a: 02f90933 mul s2,s2,a5
1000384e: 3e800793 li a5,1000
10003852: 7402 ld s0,32(sp)
10003854: 0534b023 sd s3,64(s1)
10003858: fc84 sd s1,56(s1)
1000385a: 70a2 ld ra,40(sp)
1000385c: 69a2 ld s3,8(sp)
1000385e: 04848693 addi a3,s1,72
10003862: 02848593 addi a1,s1,40
10003866: 10003637 lui a2,0x10003
1000386a: 3e790913 addi s2,s2,999
1000386e: 02f94933 div s2,s2,a5
10003872: 10006537 lui a0,0x10006
10003876: 67e60613 addi a2,a2,1662 # 1000367e <_is_timeout_insert_point>
1000387a: dd850513 addi a0,a0,-552 # 10005dd8 <_kernel+0x18>
1000387e: 2905 addiw s2,s2,1
10003880: 0524b423 sd s2,72(s1)
10003884: 64e2 ld s1,24(sp)
10003886: 6942 ld s2,16(sp)
10003888: 6145 addi sp,sp,48
1000388a: e2dff06f j 100036b6 <sys_dlist_insert_at>
1000388e: 70a2 ld ra,40(sp)
10003890: 7402 ld s0,32(sp)
10003892: 64e2 ld s1,24(sp)
10003894: 6942 ld s2,16(sp)
10003896: 69a2 ld s3,8(sp)
10003898: 6145 addi sp,sp,48
1000389a: 8082 ret
000000001000389c <_pend_current_thread>:
1000389c: 7179 addi sp,sp,-48
1000389e: f022 sd s0,32(sp)
100038a0: ec26 sd s1,24(sp)
100038a2: 1800 addi s0,sp,48
100038a4: e84a sd s2,16(sp)
100038a6: f406 sd ra,40(sp)
100038a8: 100064b7 lui s1,0x10006
100038ac: dc048493 addi s1,s1,-576 # 10005dc0 <_kernel>
100038b0: 892a mv s2,a0
100038b2: 6888 ld a0,16(s1)
100038b4: fcb43c23 sd a1,-40(s0)
100038b8: ed9ff0ef jal ra,10003790 <_remove_thread_from_ready_q>
100038bc: fd843603 ld a2,-40(s0)
100038c0: 7402 ld s0,32(sp)
100038c2: 6888 ld a0,16(s1)
100038c4: 70a2 ld ra,40(sp)
100038c6: 64e2 ld s1,24(sp)
100038c8: 85ca mv a1,s2
100038ca: 6942 ld s2,16(sp)
100038cc: 6145 addi sp,sp,48
100038ce: f45ff06f j 10003812 <_pend_thread>
00000000100038d2 <_get_next_ready_thread>:
100038d2: 1101 addi sp,sp,-32
100038d4: e822 sd s0,16(sp)
100038d6: e426 sd s1,8(sp)
100038d8: ec06 sd ra,24(sp)
100038da: 1000 addi s0,sp,32
100038dc: 100064b7 lui s1,0x10006
100038e0: dc048493 addi s1,s1,-576 # 10005dc0 <_kernel>
100038e4: 7488 ld a0,40(s1)
100038e6: e909 bnez a0,100038f8 <_get_next_ready_thread+0x26>
100038e8: d6bff0ef jal ra,10003652 <_get_highest_ready_prio>
100038ec: 2541 addiw a0,a0,16
100038ee: 050d addi a0,a0,3
100038f0: 0512 slli a0,a0,0x4
100038f2: 9526 add a0,a0,s1
100038f4: 6508 ld a0,8(a0)
100038f6: f488 sd a0,40(s1)
100038f8: 60e2 ld ra,24(sp)
100038fa: 6442 ld s0,16(sp)
100038fc: 64a2 ld s1,8(sp)
100038fe: 6105 addi sp,sp,32
10003900: 8082 ret
0000000010003902 <__must_switch_threads>:
10003902: 1141 addi sp,sp,-16
10003904: e022 sd s0,0(sp)
10003906: e406 sd ra,8(sp)
10003908: 0800 addi s0,sp,16
1000390a: d49ff0ef jal ra,10003652 <_get_highest_ready_prio>
1000390e: 100067b7 lui a5,0x10006
10003912: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
10003916: 60a2 ld ra,8(sp)
10003918: 6402 ld s0,0(sp)
1000391a: 4bdc lw a5,20(a5)
1000391c: 00f52533 slt a0,a0,a5
10003920: 0141 addi sp,sp,16
10003922: 8082 ret
0000000010003924 <_reschedule_threads>:
10003924: 1101 addi sp,sp,-32
10003926: e822 sd s0,16(sp)
10003928: e426 sd s1,8(sp)
1000392a: ec06 sd ra,24(sp)
1000392c: 1000 addi s0,sp,32
1000392e: 100067b7 lui a5,0x10006
10003932: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
10003936: 84aa mv s1,a0
10003938: 4bd8 lw a4,20(a5)
1000393a: 02074163 bltz a4,1000395c <_reschedule_threads+0x38>
1000393e: 01878513 addi a0,a5,24
10003942: 8ffff0ef jal ra,10003240 <atomic_get>
10003946: e919 bnez a0,1000395c <_reschedule_threads+0x38>
10003948: fbbff0ef jal ra,10003902 <__must_switch_threads>
1000394c: c901 beqz a0,1000395c <_reschedule_threads+0x38>
1000394e: 6442 ld s0,16(sp)
10003950: 60e2 ld ra,24(sp)
10003952: 8526 mv a0,s1
10003954: 64a2 ld s1,8(sp)
10003956: 6105 addi sp,sp,32
10003958: eacfc06f j 10000004 <_Swap>
1000395c: 6442 ld s0,16(sp)
1000395e: 60e2 ld ra,24(sp)
10003960: 8526 mv a0,s1
10003962: 64a2 ld s1,8(sp)
10003964: 6105 addi sp,sp,32
10003966: ec8ff06f j 1000302e <_arch_irq_unlock>
000000001000396a <k_sched_unlock>:
1000396a: 1101 addi sp,sp,-32
1000396c: ec06 sd ra,24(sp)
1000396e: e822 sd s0,16(sp)
10003970: e426 sd s1,8(sp)
10003972: 1000 addi s0,sp,32
10003974: e84ff0ef jal ra,10002ff8 <_arch_irq_lock>
10003978: 100067b7 lui a5,0x10006
1000397c: 0005049b sext.w s1,a0
10003980: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
10003984: 0561 addi a0,a0,24
10003986: 889ff0ef jal ra,1000320e <atomic_dec>
1000398a: 6442 ld s0,16(sp)
1000398c: 60e2 ld ra,24(sp)
1000398e: 8526 mv a0,s1
10003990: 64a2 ld s1,8(sp)
10003992: 6105 addi sp,sp,32
10003994: f91ff06f j 10003924 <_reschedule_threads>
0000000010003998 <_is_next_thread_current>:
10003998: 1141 addi sp,sp,-16
1000399a: e022 sd s0,0(sp)
1000399c: e406 sd ra,8(sp)
1000399e: 0800 addi s0,sp,16
100039a0: f33ff0ef jal ra,100038d2 <_get_next_ready_thread>
100039a4: 100067b7 lui a5,0x10006
100039a8: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
100039ac: 60a2 ld ra,8(sp)
100039ae: 6402 ld s0,0(sp)
100039b0: 40a78533 sub a0,a5,a0
100039b4: 00153513 seqz a0,a0
100039b8: 0141 addi sp,sp,16
100039ba: 8082 ret
00000000100039bc <_move_thread_to_end_of_prio_q>:
* This function, along with _add_thread_to_ready_q() and
* _remove_thread_from_ready_q(), are the _only_ places where a thread is
* taken off or put on the ready queue.
*/
void _move_thread_to_end_of_prio_q(struct k_thread *thread)
{
100039bc: 1141 addi sp,sp,-16
100039be: e422 sd s0,8(sp)
100039c0: 0800 addi s0,sp,16
return prio + CONFIG_NUM_COOP_PRIORITIES;
100039c2: 495c lw a5,20(a0)
int q_index = _get_ready_q_q_index(thread->base.prio);
sys_dlist_t *q = &_ready_q.q[q_index];
100039c4: 10006737 lui a4,0x10006
100039c8: dc070693 addi a3,a4,-576 # 10005dc0 <_kernel>
100039cc: 27c1 addiw a5,a5,16
100039ce: 078d addi a5,a5,3
100039d0: 0792 slli a5,a5,0x4
100039d2: 00878613 addi a2,a5,8
100039d6: 96b2 add a3,a3,a2
if (sys_dlist_is_tail(q, &thread->base.k_q_node)) {
100039d8: 6690 ld a2,8(a3)
100039da: 02c50563 beq a0,a2,10003a04 <_move_thread_to_end_of_prio_q+0x48>
* @return N/A
*/
static inline void sys_dlist_remove(sys_dnode_t *node)
{
node->prev->next = node->next;
100039de: 610c ld a1,0(a0)
100039e0: 6510 ld a2,8(a0)
100039e2: dc070713 addi a4,a4,-576
node->prev = list->tail;
100039e6: 97ba add a5,a5,a4
node->prev->next = node->next;
100039e8: e20c sd a1,0(a2)
node->next->prev = node->prev;
100039ea: 610c ld a1,0(a0)
100039ec: e590 sd a2,8(a1)
node->next = list;
100039ee: e114 sd a3,0(a0)
node->prev = list->tail;
100039f0: 6b94 ld a3,16(a5)
100039f2: e514 sd a3,8(a0)
list->tail->next = node;
100039f4: 6b94 ld a3,16(a5)
100039f6: e288 sd a0,0(a3)
list->tail = node;
100039f8: eb88 sd a0,16(a5)
sys_dlist_remove(&thread->base.k_q_node);
sys_dlist_append(q, &thread->base.k_q_node);
struct k_thread **cache = &_ready_q.cache;
*cache = *cache == thread ? NULL : *cache;
100039fa: 771c ld a5,40(a4)
100039fc: 00a79363 bne a5,a0,10003a02 <_move_thread_to_end_of_prio_q+0x46>
10003a00: 4781 li a5,0
10003a02: f71c sd a5,40(a4)
}
10003a04: 6422 ld s0,8(sp)
10003a06: 0141 addi sp,sp,16
10003a08: 8082 ret
0000000010003a0a <k_yield>:
void k_yield(void)
{
10003a0a: 1101 addi sp,sp,-32
10003a0c: ec06 sd ra,24(sp)
10003a0e: e822 sd s0,16(sp)
10003a10: e426 sd s1,8(sp)
10003a12: e04a sd s2,0(sp)
10003a14: 1000 addi s0,sp,32
__ASSERT(!_is_in_isr(), "");
int key = irq_lock();
_move_thread_to_end_of_prio_q(_current);
10003a16: 100064b7 lui s1,0x10006
int key = irq_lock();
10003a1a: ddeff0ef jal ra,10002ff8 <_arch_irq_lock>
_move_thread_to_end_of_prio_q(_current);
10003a1e: dc048493 addi s1,s1,-576 # 10005dc0 <_kernel>
int key = irq_lock();
10003a22: 0005091b sext.w s2,a0
_move_thread_to_end_of_prio_q(_current);
10003a26: 6888 ld a0,16(s1)
10003a28: f95ff0ef jal ra,100039bc <_move_thread_to_end_of_prio_q>
if (_current == _get_next_ready_thread()) {
10003a2c: 6884 ld s1,16(s1)
10003a2e: ea5ff0ef jal ra,100038d2 <_get_next_ready_thread>
10003a32: 00a49a63 bne s1,a0,10003a46 <k_yield+0x3c>
irq_unlock(key);
} else {
_Swap(key);
}
}
10003a36: 6442 ld s0,16(sp)
10003a38: 60e2 ld ra,24(sp)
10003a3a: 64a2 ld s1,8(sp)
irq_unlock(key);
10003a3c: 854a mv a0,s2
}
10003a3e: 6902 ld s2,0(sp)
10003a40: 6105 addi sp,sp,32
irq_unlock(key);
10003a42: decff06f j 1000302e <_arch_irq_unlock>
}
10003a46: 6442 ld s0,16(sp)
10003a48: 60e2 ld ra,24(sp)
10003a4a: 64a2 ld s1,8(sp)
_Swap(key);
10003a4c: 854a mv a0,s2
}
10003a4e: 6902 ld s2,0(sp)
10003a50: 6105 addi sp,sp,32
_Swap(key);
10003a52: db2fc06f j 10000004 <_Swap>
0000000010003a56 <k_uptime_get_32>:
}
uint32_t k_uptime_delta_32(int64_t *reftime)
{
return (uint32_t)k_uptime_delta(reftime);
}
10003a56: 1141 addi sp,sp,-16
10003a58: e422 sd s0,8(sp)
10003a5a: 0800 addi s0,sp,16
10003a5c: 100097b7 lui a5,0x10009
10003a60: 8f87e503 lwu a0,-1800(a5) # 100088f8 <_sys_clock_tick_count>
10003a64: 3e800793 li a5,1000
10003a68: 6422 ld s0,8(sp)
10003a6a: 02f50533 mul a0,a0,a5
10003a6e: 0c800793 li a5,200
10003a72: 0141 addi sp,sp,16
10003a74: 02f55533 divu a0,a0,a5
10003a78: 2501 sext.w a0,a0
10003a7a: 8082 ret
0000000010003a7c <_nano_sys_clock_tick_announce>:
* timers that have expired and wake up the fibers pending on them.
*
* @return N/A
*/
void _nano_sys_clock_tick_announce(int32_t ticks)
{
10003a7c: 715d addi sp,sp,-80
10003a7e: e0a2 sd s0,64(sp)
10003a80: fc26 sd s1,56(sp)
10003a82: f84a sd s2,48(sp)
10003a84: f44e sd s3,40(sp)
10003a86: f052 sd s4,32(sp)
10003a88: e486 sd ra,72(sp)
10003a8a: ec56 sd s5,24(sp)
10003a8c: e85a sd s6,16(sp)
10003a8e: e45e sd s7,8(sp)
10003a90: e062 sd s8,0(sp)
10003a92: 0880 addi s0,sp,80
10003a94: 84aa mv s1,a0
unsigned int key;
K_DEBUG("ticks: %d\n", ticks);
key = irq_lock();
10003a96: d62ff0ef jal ra,10002ff8 <_arch_irq_lock>
_sys_clock_tick_count += ticks;
10003a9a: 10009737 lui a4,0x10009
10003a9e: 8f873783 ld a5,-1800(a4) # 100088f8 <_sys_clock_tick_count>
return list->head == list;
10003aa2: 10006937 lui s2,0x10006
10003aa6: 100069b7 lui s3,0x10006
10003aaa: 97a6 add a5,a5,s1
10003aac: 8ef73c23 sd a5,-1800(a4)
10003ab0: dc090793 addi a5,s2,-576 # 10005dc0 <_kernel>
10003ab4: 6f9c ld a5,24(a5)
10003ab6: dd898993 addi s3,s3,-552 # 10005dd8 <_kernel+0x18>
key = irq_lock();
10003aba: 00050a1b sext.w s4,a0
10003abe: dc090913 addi s2,s2,-576
return sys_dlist_is_empty(list) ? NULL : list->head;
10003ac2: 03379563 bne a5,s3,10003aec <_nano_sys_clock_tick_announce+0x70>
if (_time_slice_duration == 0) {
10003ac6: 1000a7b7 lui a5,0x1000a
10003aca: d607a683 lw a3,-672(a5) # 10009d60 <_time_slice_duration>
10003ace: eec9 bnez a3,10003b68 <_nano_sys_clock_tick_announce+0xec>
handle_expired_timeouts(ticks);
handle_time_slicing(ticks);
irq_unlock(key);
}
10003ad0: 6406 ld s0,64(sp)
10003ad2: 60a6 ld ra,72(sp)
10003ad4: 74e2 ld s1,56(sp)
10003ad6: 7942 ld s2,48(sp)
10003ad8: 79a2 ld s3,40(sp)
10003ada: 6ae2 ld s5,24(sp)
10003adc: 6b42 ld s6,16(sp)
10003ade: 6ba2 ld s7,8(sp)
10003ae0: 6c02 ld s8,0(sp)
irq_unlock(key);
10003ae2: 8552 mv a0,s4
}
10003ae4: 7a02 ld s4,32(sp)
10003ae6: 6161 addi sp,sp,80
irq_unlock(key);
10003ae8: d46ff06f j 1000302e <_arch_irq_unlock>
if (head) {
10003aec: dfe9 beqz a5,10003ac6 <_nano_sys_clock_tick_announce+0x4a>
head->delta_ticks_from_prev -= ticks;
10003aee: 7398 ld a4,32(a5)
thread->base.flags &= ~K_PRESTART;
10003af0: 7af1 lui s5,0xffffc
thread->base.flags &= ~K_PENDING;
10003af2: 7b79 lui s6,0xffffe
10003af4: 8f05 sub a4,a4,s1
10003af6: f398 sd a4,32(a5)
sys_dlist_t *timeout_q)
{
struct _timeout *t = (void *)sys_dlist_get(timeout_q);
struct k_thread *thread = t->thread;
t->delta_ticks_from_prev = -1;
10003af8: 5bfd li s7,-1
thread->base.flags &= ~K_PRESTART;
10003afa: 1afd addi s5,s5,-1
return thread->base.flags & (K_PENDING | K_PRESTART |
10003afc: 0003ac37 lui s8,0x3a
thread->base.flags &= ~K_PENDING;
10003b00: 1b7d addi s6,s6,-1
{
sys_dlist_t *timeout_q = &_timeout_q;
struct _timeout *next;
next = (struct _timeout *)sys_dlist_peek_head(timeout_q);
while (next && next->delta_ticks_from_prev == 0) {
10003b02: 739c ld a5,32(a5)
10003b04: f3e9 bnez a5,10003ac6 <_nano_sys_clock_tick_announce+0x4a>
return list->head == list;
10003b06: 01893503 ld a0,24(s2)
static inline sys_dnode_t *sys_dlist_get(sys_dlist_t *list)
{
sys_dnode_t *node;
if (sys_dlist_is_empty(list)) {
10003b0a: 0b350363 beq a0,s3,10003bb0 <_nano_sys_clock_tick_announce+0x134>
node->prev->next = node->next;
10003b0e: 651c ld a5,8(a0)
10003b10: 6118 ld a4,0(a0)
10003b12: e398 sd a4,0(a5)
node->next->prev = node->prev;
10003b14: 6118 ld a4,0(a0)
10003b16: e71c sd a5,8(a4)
struct k_thread *thread = t->thread;
10003b18: 691c ld a5,16(a0)
t->delta_ticks_from_prev = -1;
10003b1a: 03753023 sd s7,32(a0)
if (thread != NULL) {
10003b1e: c3a9 beqz a5,10003b60 <_nano_sys_clock_tick_announce+0xe4>
if (timeout_obj->wait_q) {
10003b20: 6d18 ld a4,24(a0)
10003b22: cf01 beqz a4,10003b3a <_nano_sys_clock_tick_announce+0xbe>
node->prev->next = node->next;
10003b24: 6390 ld a2,0(a5)
10003b26: 6794 ld a3,8(a5)
10003b28: 4b98 lw a4,16(a5)
10003b2a: e290 sd a2,0(a3)
node->next->prev = node->prev;
10003b2c: 6390 ld a2,0(a5)
10003b2e: 01677733 and a4,a4,s6
10003b32: e614 sd a3,8(a2)
10003b34: cb98 sw a4,16(a5)
thread->base.timeout.wait_q = NULL;
10003b36: 0407b023 sd zero,64(a5)
thread->base.flags &= ~K_PRESTART;
10003b3a: 4b98 lw a4,16(a5)
10003b3c: 015776b3 and a3,a4,s5
10003b40: cb94 sw a3,16(a5)
return !(_is_thread_prevented_from_running(thread) ||
10003b42: 01877733 and a4,a4,s8
10003b46: e719 bnez a4,10003b54 <_nano_sys_clock_tick_announce+0xd8>
10003b48: 67b8 ld a4,72(a5)
10003b4a: 01771563 bne a4,s7,10003b54 <_nano_sys_clock_tick_announce+0xd8>
_add_thread_to_ready_q(thread);
10003b4e: 853e mv a0,a5
10003b50: be1ff0ef jal ra,10003730 <_add_thread_to_ready_q>
return list->head == list;
10003b54: 01893783 ld a5,24(s2)
return sys_dlist_is_empty(list) ? NULL : list->head;
10003b58: f73787e3 beq a5,s3,10003ac6 <_nano_sys_clock_tick_announce+0x4a>
while (next && next->delta_ticks_from_prev == 0) {
10003b5c: f3dd bnez a5,10003b02 <_nano_sys_clock_tick_announce+0x86>
10003b5e: b7a5 j 10003ac6 <_nano_sys_clock_tick_announce+0x4a>
} else if (t->func) {
10003b60: 751c ld a5,40(a0)
10003b62: dbed beqz a5,10003b54 <_nano_sys_clock_tick_announce+0xd8>
t->func(t);
10003b64: 9782 jalr a5
10003b66: b7fd j 10003b54 <_nano_sys_clock_tick_announce+0xd8>
if (_is_prio_higher(_current->base.prio, _time_slice_prio_ceiling)) {
10003b68: 01093503 ld a0,16(s2)
10003b6c: 1000a7b7 lui a5,0x1000a
10003b70: d647a783 lw a5,-668(a5) # 10009d64 <_time_slice_prio_ceiling>
10003b74: 4958 lw a4,20(a0)
10003b76: f4f74de3 blt a4,a5,10003ad0 <_nano_sys_clock_tick_announce+0x54>
#define kpriority_t uint32_t
static inline int32_t _ticks_to_ms(int32_t ticks)
{
return (ticks == TICKS_UNLIMITED) ? K_FOREVER : __ticks_to_ms(ticks);
10003b7a: 57fd li a5,-1
10003b7c: 00f48b63 beq s1,a5,10003b92 <_nano_sys_clock_tick_announce+0x116>
return (MSEC_PER_SEC * (uint64_t)ticks) / sys_clock_ticks_per_sec;
10003b80: 3e800793 li a5,1000
10003b84: 02f484b3 mul s1,s1,a5
10003b88: 0c800793 li a5,200
10003b8c: 02f4d4b3 divu s1,s1,a5
10003b90: 2481 sext.w s1,s1
_time_slice_elapsed += _ticks_to_ms(ticks);
10003b92: 10009737 lui a4,0x10009
10003b96: 8f072783 lw a5,-1808(a4) # 100088f0 <_time_slice_elapsed>
10003b9a: 9fa5 addw a5,a5,s1
if (_time_slice_elapsed >= _time_slice_duration) {
10003b9c: 00d7d563 ble a3,a5,10003ba6 <_nano_sys_clock_tick_announce+0x12a>
_time_slice_elapsed += _ticks_to_ms(ticks);
10003ba0: 8ef72823 sw a5,-1808(a4)
10003ba4: b735 j 10003ad0 <_nano_sys_clock_tick_announce+0x54>
_time_slice_elapsed = 0;
10003ba6: 8e072823 sw zero,-1808(a4)
_move_thread_to_end_of_prio_q(_current);
10003baa: e13ff0ef jal ra,100039bc <_move_thread_to_end_of_prio_q>
10003bae: b70d j 10003ad0 <_nano_sys_clock_tick_announce+0x54>
struct k_thread *thread = t->thread;
10003bb0: 01003783 ld a5,16(zero) # 10 <__memory_pool_quad_block_size>
10003bb4: 9002 ebreak
0000000010003bb6 <_is_thread_ready>:
{
unsigned int key = irq_lock();
_k_thread_single_resume(thread);
_reschedule_threads(key);
10003bb6: 1141 addi sp,sp,-16
10003bb8: e422 sd s0,8(sp)
10003bba: 0800 addi s0,sp,16
10003bbc: 491c lw a5,16(a0)
10003bbe: 0003e737 lui a4,0x3e
10003bc2: 8ff9 and a5,a5,a4
10003bc4: eb81 bnez a5,10003bd4 <_is_thread_ready+0x1e>
10003bc6: 6528 ld a0,72(a0)
10003bc8: 0505 addi a0,a0,1
10003bca: 00153513 seqz a0,a0
10003bce: 6422 ld s0,8(sp)
10003bd0: 0141 addi sp,sp,16
10003bd2: 8082 ret
10003bd4: 4501 li a0,0
10003bd6: bfe5 j 10003bce <_is_thread_ready+0x18>
0000000010003bd8 <_k_thread_single_start>:
10003bd8: 1101 addi sp,sp,-32
10003bda: e822 sd s0,16(sp)
10003bdc: e426 sd s1,8(sp)
10003bde: ec06 sd ra,24(sp)
10003be0: 1000 addi s0,sp,32
10003be2: 491c lw a5,16(a0)
10003be4: 7771 lui a4,0xffffc
10003be6: 177d addi a4,a4,-1
10003be8: 8ff9 and a5,a5,a4
10003bea: c91c sw a5,16(a0)
10003bec: 84aa mv s1,a0
10003bee: fc9ff0ef jal ra,10003bb6 <_is_thread_ready>
10003bf2: c901 beqz a0,10003c02 <_k_thread_single_start+0x2a>
10003bf4: 6442 ld s0,16(sp)
10003bf6: 60e2 ld ra,24(sp)
10003bf8: 8526 mv a0,s1
10003bfa: 64a2 ld s1,8(sp)
10003bfc: 6105 addi sp,sp,32
10003bfe: b33ff06f j 10003730 <_add_thread_to_ready_q>
10003c02: 60e2 ld ra,24(sp)
10003c04: 6442 ld s0,16(sp)
10003c06: 64a2 ld s1,8(sp)
10003c08: 6105 addi sp,sp,32
10003c0a: 8082 ret
0000000010003c0c <start_thread>:
10003c0c: 1101 addi sp,sp,-32
10003c0e: e822 sd s0,16(sp)
10003c10: e426 sd s1,8(sp)
10003c12: e04a sd s2,0(sp)
10003c14: ec06 sd ra,24(sp)
10003c16: 1000 addi s0,sp,32
10003c18: 84aa mv s1,a0
10003c1a: bdeff0ef jal ra,10002ff8 <_arch_irq_lock>
10003c1e: 489c lw a5,16(s1)
10003c20: 7771 lui a4,0xffffc
10003c22: 177d addi a4,a4,-1
10003c24: 8ff9 and a5,a5,a4
10003c26: 0005091b sext.w s2,a0
10003c2a: c89c sw a5,16(s1)
10003c2c: 8526 mv a0,s1
10003c2e: f89ff0ef jal ra,10003bb6 <_is_thread_ready>
10003c32: c915 beqz a0,10003c66 <start_thread+0x5a>
10003c34: 8526 mv a0,s1
10003c36: afbff0ef jal ra,10003730 <_add_thread_to_ready_q>
10003c3a: 100067b7 lui a5,0x10006
10003c3e: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
10003c42: 495c lw a5,20(a0)
10003c44: 0207c163 bltz a5,10003c66 <start_thread+0x5a>
10003c48: 0561 addi a0,a0,24
10003c4a: df6ff0ef jal ra,10003240 <atomic_get>
10003c4e: ed01 bnez a0,10003c66 <start_thread+0x5a>
10003c50: cb3ff0ef jal ra,10003902 <__must_switch_threads>
10003c54: c909 beqz a0,10003c66 <start_thread+0x5a>
10003c56: 6442 ld s0,16(sp)
10003c58: 60e2 ld ra,24(sp)
10003c5a: 64a2 ld s1,8(sp)
10003c5c: 854a mv a0,s2
10003c5e: 6902 ld s2,0(sp)
10003c60: 6105 addi sp,sp,32
10003c62: ba2fc06f j 10000004 <_Swap>
10003c66: 6442 ld s0,16(sp)
10003c68: 60e2 ld ra,24(sp)
10003c6a: 64a2 ld s1,8(sp)
10003c6c: 854a mv a0,s2
10003c6e: 6902 ld s2,0(sp)
10003c70: 6105 addi sp,sp,32
10003c72: bbcff06f j 1000302e <_arch_irq_unlock>
0000000010003c76 <_abort_timeout>:
10003c76: 1141 addi sp,sp,-16
10003c78: e422 sd s0,8(sp)
10003c7a: 0800 addi s0,sp,16
10003c7c: 7114 ld a3,32(a0)
10003c7e: 57fd li a5,-1
10003c80: 02f68663 beq a3,a5,10003cac <_abort_timeout+0x36>
10003c84: 10006737 lui a4,0x10006
10003c88: de073703 ld a4,-544(a4) # 10005de0 <_kernel+0x20>
10003c8c: 611c ld a5,0(a0)
10003c8e: 00e50563 beq a0,a4,10003c98 <_abort_timeout+0x22>
10003c92: 7398 ld a4,32(a5)
10003c94: 9736 add a4,a4,a3
10003c96: f398 sd a4,32(a5)
10003c98: 6518 ld a4,8(a0)
10003c9a: e31c sd a5,0(a4)
10003c9c: 611c ld a5,0(a0)
10003c9e: e798 sd a4,8(a5)
10003ca0: 57fd li a5,-1
10003ca2: f11c sd a5,32(a0)
10003ca4: 4501 li a0,0
10003ca6: 6422 ld s0,8(sp)
10003ca8: 0141 addi sp,sp,16
10003caa: 8082 ret
10003cac: 557d li a0,-1
10003cae: bfe5 j 10003ca6 <_abort_timeout+0x30>
0000000010003cb0 <schedule_new_thread.part.13>:
10003cb0: 1101 addi sp,sp,-32
10003cb2: e822 sd s0,16(sp)
10003cb4: e426 sd s1,8(sp)
10003cb6: ec06 sd ra,24(sp)
10003cb8: 1000 addi s0,sp,32
10003cba: 84aa mv s1,a0
10003cbc: 852e mv a0,a1
10003cbe: b33ff0ef jal ra,100037f0 <_ms_to_ticks>
10003cc2: 100066b7 lui a3,0x10006
10003cc6: dc068613 addi a2,a3,-576 # 10005dc0 <_kernel>
10003cca: 2505 addiw a0,a0,1
10003ccc: 6e1c ld a5,24(a2)
10003cce: e4a8 sd a0,72(s1)
10003cd0: 10006537 lui a0,0x10006
10003cd4: fc84 sd s1,56(s1)
10003cd6: 0404b023 sd zero,64(s1)
10003cda: dd850513 addi a0,a0,-552 # 10005dd8 <_kernel+0x18>
10003cde: 02848713 addi a4,s1,40
10003ce2: 02a78763 beq a5,a0,10003d10 <schedule_new_thread.part.13+0x60>
10003ce6: dc068693 addi a3,a3,-576
10003cea: 0206b803 ld a6,32(a3)
10003cee: cb91 beqz a5,10003d02 <schedule_new_thread.part.13+0x52>
10003cf0: 44ac lw a1,72(s1)
10003cf2: 7390 ld a2,32(a5)
10003cf4: 02b65a63 ble a1,a2,10003d28 <schedule_new_thread.part.13+0x78>
10003cf8: 40c5863b subw a2,a1,a2
10003cfc: c4b0 sw a2,72(s1)
10003cfe: 03079363 bne a5,a6,10003d24 <schedule_new_thread.part.13+0x74>
10003d02: f488 sd a0,40(s1)
10003d04: 0304b823 sd a6,48(s1)
10003d08: 00e83023 sd a4,0(a6)
10003d0c: f298 sd a4,32(a3)
10003d0e: a031 j 10003d1a <schedule_new_thread.part.13+0x6a>
10003d10: f49c sd a5,40(s1)
10003d12: 721c ld a5,32(a2)
10003d14: f89c sd a5,48(s1)
10003d16: e398 sd a4,0(a5)
10003d18: f218 sd a4,32(a2)
10003d1a: 60e2 ld ra,24(sp)
10003d1c: 6442 ld s0,16(sp)
10003d1e: 64a2 ld s1,8(sp)
10003d20: 6105 addi sp,sp,32
10003d22: 8082 ret
10003d24: 639c ld a5,0(a5)
10003d26: b7e1 j 10003cee <schedule_new_thread.part.13+0x3e>
10003d28: 6794 ld a3,8(a5)
10003d2a: 8e0d sub a2,a2,a1
10003d2c: f390 sd a2,32(a5)
10003d2e: f894 sd a3,48(s1)
10003d30: 6794 ld a3,8(a5)
10003d32: f49c sd a5,40(s1)
10003d34: e298 sd a4,0(a3)
10003d36: e798 sd a4,8(a5)
10003d38: b7cd j 10003d1a <schedule_new_thread.part.13+0x6a>
0000000010003d3a <_is_thread_essential>:
10003d3a: 1141 addi sp,sp,-16
10003d3c: e422 sd s0,8(sp)
10003d3e: 0800 addi s0,sp,16
10003d40: 100067b7 lui a5,0x10006
10003d44: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
10003d48: 6422 ld s0,8(sp)
10003d4a: 4b88 lw a0,16(a5)
10003d4c: 0141 addi sp,sp,16
10003d4e: 20057513 andi a0,a0,512
10003d52: 8082 ret
0000000010003d54 <_thread_entry>:
10003d54: 1141 addi sp,sp,-16
10003d56: e406 sd ra,8(sp)
10003d58: e022 sd s0,0(sp)
10003d5a: 0800 addi s0,sp,16
10003d5c: 87aa mv a5,a0
10003d5e: 852e mv a0,a1
10003d60: 85b2 mv a1,a2
10003d62: 8636 mv a2,a3
10003d64: 9782 jalr a5
10003d66: fd5ff0ef jal ra,10003d3a <_is_thread_essential>
10003d6a: c901 beqz a0,10003d7a <_thread_entry+0x26>
10003d6c: 100055b7 lui a1,0x10005
10003d70: f7858593 addi a1,a1,-136 # 10004f78 <_default_esf>
10003d74: 450d li a0,3
10003d76: a28ff0ef jal ra,10002f9e <_NanoFatalErrorHandler>
10003d7a: 100067b7 lui a5,0x10006
10003d7e: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
10003d82: 21a000ef jal ra,10003f9c <k_thread_abort>
0000000010003d86 <k_thread_spawn>:
10003d86: 1101 addi sp,sp,-32
10003d88: e822 sd s0,16(sp)
10003d8a: e426 sd s1,8(sp)
10003d8c: e04a sd s2,0(sp)
10003d8e: 1000 addi s0,sp,32
10003d90: ec06 sd ra,24(sp)
10003d92: 00042903 lw s2,0(s0)
10003d96: 84aa mv s1,a0
10003d98: b70ff0ef jal ra,10003108 <_new_thread>
10003d9c: 00091c63 bnez s2,10003db4 <k_thread_spawn+0x2e>
10003da0: 8526 mv a0,s1
10003da2: e6bff0ef jal ra,10003c0c <start_thread>
10003da6: 60e2 ld ra,24(sp)
10003da8: 6442 ld s0,16(sp)
10003daa: 8526 mv a0,s1
10003dac: 6902 ld s2,0(sp)
10003dae: 64a2 ld s1,8(sp)
10003db0: 6105 addi sp,sp,32
10003db2: 8082 ret
10003db4: 85ca mv a1,s2
10003db6: 8526 mv a0,s1
10003db8: ef9ff0ef jal ra,10003cb0 <schedule_new_thread.part.13>
10003dbc: b7ed j 10003da6 <k_thread_spawn+0x20>
0000000010003dbe <_k_thread_group_op>:
10003dbe: 7139 addi sp,sp,-64
10003dc0: f822 sd s0,48(sp)
10003dc2: f426 sd s1,40(sp)
10003dc4: f04a sd s2,32(sp)
10003dc6: ec4e sd s3,24(sp)
10003dc8: e852 sd s4,16(sp)
10003dca: e456 sd s5,8(sp)
10003dcc: fc06 sd ra,56(sp)
10003dce: e05a sd s6,0(sp)
10003dd0: 0080 addi s0,sp,64
10003dd2: 10006937 lui s2,0x10006
10003dd6: dc090793 addi a5,s2,-576 # 10005dc0 <_kernel>
10003dda: 8a2a mv s4,a0
10003ddc: 6b88 ld a0,16(a5)
10003dde: 100054b7 lui s1,0x10005
10003de2: 100059b7 lui s3,0x10005
10003de6: 0561 addi a0,a0,24
10003de8: 8aae mv s5,a1
10003dea: 28048493 addi s1,s1,640 # 10005280 <__data_ram_end>
10003dee: beeff0ef jal ra,100031dc <atomic_inc>
10003df2: dc090913 addi s2,s2,-576
10003df6: 28098993 addi s3,s3,640 # 10005280 <__data_ram_end>
10003dfa: 0334e263 bltu s1,s3,10003e1e <_k_thread_group_op+0x60>
10003dfe: 01093503 ld a0,16(s2)
10003e02: db5ff0ef jal ra,10003bb6 <_is_thread_ready>
10003e06: cd05 beqz a0,10003e3e <_k_thread_group_op+0x80>
10003e08: 7442 ld s0,48(sp)
10003e0a: 70e2 ld ra,56(sp)
10003e0c: 74a2 ld s1,40(sp)
10003e0e: 7902 ld s2,32(sp)
10003e10: 69e2 ld s3,24(sp)
10003e12: 6a42 ld s4,16(sp)
10003e14: 6aa2 ld s5,8(sp)
10003e16: 6b02 ld s6,0(sp)
10003e18: 6121 addi sp,sp,64
10003e1a: b51ff06f j 1000396a <k_sched_unlock>
10003e1e: 44bc lw a5,72(s1)
10003e20: 00fa77b3 and a5,s4,a5
10003e24: cb91 beqz a5,10003e38 <_k_thread_group_op+0x7a>
10003e26: 9d2ff0ef jal ra,10002ff8 <_arch_irq_lock>
10003e2a: 00050b1b sext.w s6,a0
10003e2e: 6088 ld a0,0(s1)
10003e30: 9a82 jalr s5
10003e32: 855a mv a0,s6
10003e34: 9faff0ef jal ra,1000302e <_arch_irq_unlock>
10003e38: 05048493 addi s1,s1,80
10003e3c: bf7d j 10003dfa <_k_thread_group_op+0x3c>
10003e3e: 9baff0ef jal ra,10002ff8 <_arch_irq_lock>
10003e42: 0005049b sext.w s1,a0
10003e46: 01093503 ld a0,16(s2)
10003e4a: 0561 addi a0,a0,24
10003e4c: bc2ff0ef jal ra,1000320e <atomic_dec>
10003e50: 7442 ld s0,48(sp)
10003e52: 70e2 ld ra,56(sp)
10003e54: 7902 ld s2,32(sp)
10003e56: 69e2 ld s3,24(sp)
10003e58: 6a42 ld s4,16(sp)
10003e5a: 6aa2 ld s5,8(sp)
10003e5c: 6b02 ld s6,0(sp)
10003e5e: 8526 mv a0,s1
10003e60: 74a2 ld s1,40(sp)
10003e62: 6121 addi sp,sp,64
10003e64: 9a0fc06f j 10000004 <_Swap>
0000000010003e68 <_k_thread_single_abort>:
}
void _k_thread_single_abort(struct k_thread *thread)
{
10003e68: 1101 addi sp,sp,-32
10003e6a: e822 sd s0,16(sp)
10003e6c: e426 sd s1,8(sp)
10003e6e: ec06 sd ra,24(sp)
10003e70: 1000 addi s0,sp,32
if (thread->fn_abort != NULL) {
10003e72: 18053783 ld a5,384(a0)
{
10003e76: 84aa mv s1,a0
if (thread->fn_abort != NULL) {
10003e78: c391 beqz a5,10003e7c <_k_thread_single_abort+0x14>
thread->fn_abort();
10003e7a: 9782 jalr a5
}
if (_is_thread_ready(thread)) {
10003e7c: 8526 mv a0,s1
10003e7e: d39ff0ef jal ra,10003bb6 <_is_thread_ready>
10003e82: cd09 beqz a0,10003e9c <_k_thread_single_abort+0x34>
_remove_thread_from_ready_q(thread);
10003e84: 8526 mv a0,s1
10003e86: 90bff0ef jal ra,10003790 <_remove_thread_from_ready_q>
thread->base.flags |= K_DEAD;
10003e8a: 489c lw a5,16(s1)
if (_is_thread_timeout_active(thread)) {
_abort_thread_timeout(thread);
}
}
_mark_thread_as_dead(thread);
}
10003e8c: 60e2 ld ra,24(sp)
10003e8e: 6442 ld s0,16(sp)
10003e90: 6721 lui a4,0x8
10003e92: 8fd9 or a5,a5,a4
10003e94: c89c sw a5,16(s1)
10003e96: 64a2 ld s1,8(sp)
10003e98: 6105 addi sp,sp,32
10003e9a: 8082 ret
10003e9c: 489c lw a5,16(s1)
if (_is_thread_pending(thread)) {
10003e9e: 03279713 slli a4,a5,0x32
10003ea2: 00075b63 bgez a4,10003eb8 <_k_thread_single_abort+0x50>
node->prev->next = node->next;
10003ea6: 6498 ld a4,8(s1)
10003ea8: 6094 ld a3,0(s1)
10003eaa: e314 sd a3,0(a4)
node->next->prev = node->prev;
10003eac: 6094 ld a3,0(s1)
10003eae: e698 sd a4,8(a3)
thread->base.flags &= ~K_PENDING;
10003eb0: 7779 lui a4,0xffffe
10003eb2: 177d addi a4,a4,-1
10003eb4: 8ff9 and a5,a5,a4
10003eb6: c89c sw a5,16(s1)
if (_is_thread_timeout_active(thread)) {
10003eb8: 64b8 ld a4,72(s1)
10003eba: 57fd li a5,-1
10003ebc: fcf707e3 beq a4,a5,10003e8a <_k_thread_single_abort+0x22>
return 0;
}
static inline int _abort_thread_timeout(struct k_thread *thread)
{
return _abort_timeout(&thread->base.timeout);
10003ec0: 02848513 addi a0,s1,40
10003ec4: db3ff0ef jal ra,10003c76 <_abort_timeout>
10003ec8: b7c9 j 10003e8a <_k_thread_single_abort+0x22>
0000000010003eca <_init_static_threads>:
void _init_static_threads(void)
{
10003eca: 7179 addi sp,sp,-48
10003ecc: f022 sd s0,32(sp)
10003ece: ec26 sd s1,24(sp)
10003ed0: e84a sd s2,16(sp)
10003ed2: e44e sd s3,8(sp)
unsigned int key;
_FOREACH_STATIC_THREAD(thread_data) {
10003ed4: 100057b7 lui a5,0x10005
{
10003ed8: f406 sd ra,40(sp)
10003eda: e052 sd s4,0(sp)
10003edc: 1800 addi s0,sp,48
_FOREACH_STATIC_THREAD(thread_data) {
10003ede: 100059b7 lui s3,0x10005
10003ee2: 28078493 addi s1,a5,640 # 10005280 <__data_ram_end>
10003ee6: 28078913 addi s2,a5,640
10003eea: 28098993 addi s3,s3,640 # 10005280 <__data_ram_end>
10003eee: 0534e463 bltu s1,s3,10003f36 <_init_static_threads+0x6c>
atomic_inc(&_current->base.sched_locked);
10003ef2: 100067b7 lui a5,0x10006
10003ef6: dd07b503 ld a0,-560(a5) # 10005dd0 <_kernel+0x10>
*
* Note that static threads defined using the legacy API have a
* delay of K_FOREVER.
*/
key = irq_lock();
_FOREACH_STATIC_THREAD(thread_data) {
10003efa: 84ca mv s1,s2
if (thread_data->init_delay != K_FOREVER) {
10003efc: 597d li s2,-1
10003efe: 0561 addi a0,a0,24
10003f00: adcff0ef jal ra,100031dc <atomic_inc>
_k_thread_group_op(K_TASK_GROUP_EXE, _k_thread_single_start);
10003f04: 100045b7 lui a1,0x10004
10003f08: bd858593 addi a1,a1,-1064 # 10003bd8 <_k_thread_single_start>
10003f0c: 4505 li a0,1
10003f0e: eb1ff0ef jal ra,10003dbe <_k_thread_group_op>
key = irq_lock();
10003f12: 8e6ff0ef jal ra,10002ff8 <_arch_irq_lock>
10003f16: 00050a1b sext.w s4,a0
_FOREACH_STATIC_THREAD(thread_data) {
10003f1a: 0534e163 bltu s1,s3,10003f5c <_init_static_threads+0x92>
schedule_new_thread(thread_data->thread,
thread_data->init_delay);
}
}
irq_unlock(key);
10003f1e: 8552 mv a0,s4
10003f20: 90eff0ef jal ra,1000302e <_arch_irq_unlock>
k_sched_unlock();
}
10003f24: 7402 ld s0,32(sp)
10003f26: 70a2 ld ra,40(sp)
10003f28: 64e2 ld s1,24(sp)
10003f2a: 6942 ld s2,16(sp)
10003f2c: 69a2 ld s3,8(sp)
10003f2e: 6a02 ld s4,0(sp)
10003f30: 6145 addi sp,sp,48
k_sched_unlock();
10003f32: a39ff06f j 1000396a <k_sched_unlock>
_new_thread(
10003f36: 749c ld a5,40(s1)
10003f38: 0344a883 lw a7,52(s1)
10003f3c: 0304a803 lw a6,48(s1)
10003f40: 7098 ld a4,32(s1)
10003f42: 6c94 ld a3,24(s1)
10003f44: 6890 ld a2,16(s1)
10003f46: 0084e583 lwu a1,8(s1)
10003f4a: 6088 ld a0,0(s1)
10003f4c: 9bcff0ef jal ra,10003108 <_new_thread>
thread_data->thread->init_data = thread_data;
10003f50: 609c ld a5,0(s1)
10003f52: 1697bc23 sd s1,376(a5)
_FOREACH_STATIC_THREAD(thread_data) {
10003f56: 05048493 addi s1,s1,80
10003f5a: bf51 j 10003eee <_init_static_threads+0x24>
if (thread_data->init_delay != K_FOREVER) {
10003f5c: 5c8c lw a1,56(s1)
10003f5e: 01258663 beq a1,s2,10003f6a <_init_static_threads+0xa0>
schedule_new_thread(thread_data->thread,
10003f62: 6088 ld a0,0(s1)
if (delay == 0) {
10003f64: e591 bnez a1,10003f70 <_init_static_threads+0xa6>
start_thread(thread);
10003f66: ca7ff0ef jal ra,10003c0c <start_thread>
_FOREACH_STATIC_THREAD(thread_data) {
10003f6a: 05048493 addi s1,s1,80
10003f6e: b775 j 10003f1a <_init_static_threads+0x50>
10003f70: d41ff0ef jal ra,10003cb0 <schedule_new_thread.part.13>
10003f74: bfdd j 10003f6a <_init_static_threads+0xa0>
0000000010003f76 <_init_thread_base>:
void _init_thread_base(struct _thread_base *thread_base, int priority,
uint32_t initial_state, unsigned int options)
{
10003f76: 1141 addi sp,sp,-16
10003f78: e422 sd s0,8(sp)
10003f7a: 0800 addi s0,sp,16
thread_base->sched_locked = 0;
/* swap_data does not need to be initialized */
_init_thread_timeout(thread_base);
}
10003f7c: 6422 ld s0,8(sp)
thread_base->flags = options | initial_state;
10003f7e: 8ed1 or a3,a3,a2
t->delta_ticks_from_prev = -1;
10003f80: 57fd li a5,-1
10003f82: c914 sw a3,16(a0)
thread_base->prio = priority;
10003f84: c94c sw a1,20(a0)
thread_base->sched_locked = 0;
10003f86: 00052c23 sw zero,24(a0)
10003f8a: e53c sd a5,72(a0)
t->wait_q = NULL;
10003f8c: 04053023 sd zero,64(a0)
t->thread = NULL;
10003f90: 02053c23 sd zero,56(a0)
t->func = func;
10003f94: 04053823 sd zero,80(a0)
}
10003f98: 0141 addi sp,sp,16
10003f9a: 8082 ret
0000000010003f9c <k_thread_abort>:
extern void _k_thread_single_abort(struct k_thread *thread);
#if !defined(CONFIG_ARCH_HAS_NANO_FIBER_ABORT)
void k_thread_abort(k_tid_t thread)
{
10003f9c: 1101 addi sp,sp,-32
10003f9e: ec06 sd ra,24(sp)
10003fa0: e822 sd s0,16(sp)
10003fa2: e426 sd s1,8(sp)
10003fa4: e04a sd s2,0(sp)
10003fa6: 1000 addi s0,sp,32
10003fa8: 892a mv s2,a0
unsigned int key;
key = irq_lock();
10003faa: 84eff0ef jal ra,10002ff8 <_arch_irq_lock>
10003fae: 0005049b sext.w s1,a0
_k_thread_single_abort(thread);
10003fb2: 854a mv a0,s2
10003fb4: eb5ff0ef jal ra,10003e68 <_k_thread_single_abort>
_thread_monitor_exit(thread);
if (_current == thread) {
10003fb8: 100067b7 lui a5,0x10006
10003fbc: dd07b783 ld a5,-560(a5) # 10005dd0 <_kernel+0x10>
_Swap(key);
10003fc0: 8526 mv a0,s1
if (_current == thread) {
10003fc2: 01279463 bne a5,s2,10003fca <k_thread_abort+0x2e>
_Swap(key);
10003fc6: 83efc0ef jal ra,10000004 <_Swap>
CODE_UNREACHABLE;
}
/* The abort handler might have altered the ready queue. */
_reschedule_threads(key);
}
10003fca: 6442 ld s0,16(sp)
10003fcc: 60e2 ld ra,24(sp)
10003fce: 64a2 ld s1,8(sp)
10003fd0: 6902 ld s2,0(sp)
10003fd2: 6105 addi sp,sp,32
_reschedule_threads(key);
10003fd4: 951ff06f j 10003924 <_reschedule_threads>
0000000010003fd8 <idle>:
#else
#define IDLE_YIELD_IF_COOP() do { } while ((0))
#endif
void idle(void *unused1, void *unused2, void *unused3)
{
10003fd8: 1141 addi sp,sp,-16
10003fda: e022 sd s0,0(sp)
10003fdc: e406 sd ra,8(sp)
10003fde: 0800 addi s0,sp,16
__idle_tsc = _tsc_read();
#endif
for (;;) {
(void)irq_lock();
10003fe0: 818ff0ef jal ra,10002ff8 <_arch_irq_lock>
nano_cpu_idle();
10003fe4: fabfe0ef jal ra,10002f8e <nano_cpu_idle>
_sys_power_save_idle(_get_next_timeout_expiry());
#ifdef CONFIG_RISCV64
// I didn't understood where preemptive switch must occurs
k_yield();
10003fe8: a23ff0ef jal ra,10003a0a <k_yield>
10003fec: bfd5 j 10003fe0 <idle+0x8>