RTEMS-6
Annotated Report
libcsupport
Mon Mar 1 00:20:48 2021
00000000400283e0 <RTEMS_Malloc_Initialize>:
Heap_Control *RTEMS_Malloc_Initialize(
const Memory_Information *mem,
Heap_Initialization_or_extend_handler extend
)
{
400283e0: a9bb7bfd stp x29, x30, [sp, #-80]!
Heap_Initialization_or_extend_handler init_or_extend;
uintptr_t page_size;
size_t i;
heap = &_Malloc_Heap;
RTEMS_Malloc_Heap = heap;
400283e4: b00006e2 adrp x2, 40105000 <Arr_2_Glob+0x1e68>
{
400283e8: 910003fd mov x29, sp
400283ec: a9025bf5 stp x21, x22, [sp, #32]
400283f0: aa0003f6 mov x22, x0
init_or_extend = _Heap_Initialize;
page_size = CPU_HEAP_ALIGNMENT;
for (i = 0; i < _Memory_Get_count( mem ); ++i) {
400283f4: f9400000 ldr x0, [x0]
{
400283f8: a90153f3 stp x19, x20, [sp, #16]
400283fc: a90363f7 stp x23, x24, [sp, #48]
40028400: a9046bf9 stp x25, x26, [sp, #64]
RTEMS_Malloc_Heap = heap;
40028404: b00006fa adrp x26, 40105000 <Arr_2_Glob+0x1e68>
40028408: 912b235a add x26, x26, #0xac8
4002840c: f904805a str x26, [x2, #2304]
for (i = 0; i < _Memory_Get_count( mem ); ++i) {
40028410: b4000420 cbz x0, 40028494 <RTEMS_Malloc_Initialize+0xb4> <== NEVER TAKEN
init_or_extend = _Heap_Initialize;
40028414: 90fffff9 adrp x25, 40024000 <memfile_read+0xe0>
40028418: 913e0339 add x25, x25, #0xf80
4002841c: aa0103f8 mov x24, x1
40028420: aa1903f7 mov x23, x25
for (i = 0; i < _Memory_Get_count( mem ); ++i) {
40028424: d2800015 mov x21, #0x0 // #0
40028428: d2800014 mov x20, #0x0 // #0
4002842c: d503201f nop
const Memory_Information *information,
size_t index
)
{
_Assert( index < _Memory_Get_count( information ) );
return &information->areas[ index ];
40028430: f94006d3 ldr x19, [x22, #8]
Memory_Area *area;
uintptr_t space_available;
area = _Memory_Get_area( mem, i );
space_available = ( *init_or_extend )(
40028434: aa1a03e0 mov x0, x26
40028438: d2800203 mov x3, #0x10 // #16
4002843c: 8b150273 add x19, x19, x21
*
* @return The free memory area size in bytes of the memory area.
*/
RTEMS_INLINE_ROUTINE uintptr_t _Memory_Get_free_size( const Memory_Area *area )
{
return (uintptr_t) area->end - (uintptr_t) area->free;
40028440: a9408a61 ldp x1, x2, [x19, #8]
40028444: cb010042 sub x2, x2, x1
40028448: d63f02e0 blr x23
_Memory_Get_free_begin( area ),
_Memory_Get_free_size( area ),
page_size
);
if ( space_available > 0 ) {
4002844c: b4000080 cbz x0, 4002845c <RTEMS_Malloc_Initialize+0x7c>
_Memory_Consume( area, _Memory_Get_free_size( area ) );
init_or_extend = extend;
40028450: aa1803f7 mov x23, x24
RTEMS_INLINE_ROUTINE void _Memory_Consume(
Memory_Area *area,
uintptr_t consume
)
{
area->free = (char *) area->free + consume;
40028454: f9400a60 ldr x0, [x19, #16]
40028458: f9000660 str x0, [x19, #8]
for (i = 0; i < _Memory_Get_count( mem ); ++i) {
4002845c: f94002c0 ldr x0, [x22]
40028460: 91000694 add x20, x20, #0x1
40028464: 910062b5 add x21, x21, #0x18
40028468: eb00029f cmp x20, x0
4002846c: 54fffe23 b.cc 40028430 <RTEMS_Malloc_Initialize+0x50> // b.lo, b.ul, b.last<== NEVER TAKEN
}
}
if ( init_or_extend == _Heap_Initialize ) {
40028470: eb1902ff cmp x23, x25
40028474: 54000100 b.eq 40028494 <RTEMS_Malloc_Initialize+0xb4> // b.none
_Internal_error( INTERNAL_ERROR_NO_MEMORY_FOR_HEAP );
}
return heap;
}
40028478: aa1a03e0 mov x0, x26
4002847c: a94153f3 ldp x19, x20, [sp, #16]
40028480: a9425bf5 ldp x21, x22, [sp, #32]
40028484: a94363f7 ldp x23, x24, [sp, #48]
40028488: a9446bf9 ldp x25, x26, [sp, #64]
4002848c: a8c57bfd ldp x29, x30, [sp], #80
40028490: d65f03c0 ret
_Internal_error( INTERNAL_ERROR_NO_MEMORY_FOR_HEAP );
40028494: 528002e0 mov w0, #0x17 // #23
40028498: 97fff382 bl 400252a0 <_Internal_error>
4002849c: 00000000 udf #0
0000000040021520 <_Console_simple_Read>:
ssize_t _Console_simple_Read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
40021520: a9bd7bfd stp x29, x30, [sp, #-48]! <== NOT EXECUTED
ssize_t n;
buf = buffer;
n = (ssize_t) count;
for ( i = 0; i < n; ++i ) {
40021524: f100005f cmp x2, #0x0 <== NOT EXECUTED
{
40021528: 910003fd mov x29, sp <== NOT EXECUTED
4002152c: f90013f5 str x21, [sp, #32] <== NOT EXECUTED
40021530: aa0203f5 mov x21, x2 <== NOT EXECUTED
for ( i = 0; i < n; ++i ) {
40021534: 540001ed b.le 40021570 <_Console_simple_Read+0x50> <== NOT EXECUTED
40021538: a90153f3 stp x19, x20, [sp, #16] <== NOT EXECUTED
4002153c: aa0103f3 mov x19, x1 <== NOT EXECUTED
40021540: 8b020034 add x20, x1, x2 <== NOT EXECUTED
40021544: 14000002 b 4002154c <_Console_simple_Read+0x2c> <== NOT EXECUTED
c = getchark();
if ( c != -1 ) {
break;
}
(void) rtems_task_wake_after( 1 );
40021548: 94000d4e bl 40024a80 <rtems_task_wake_after> <== NOT EXECUTED
c = getchark();
4002154c: 9400000d bl 40021580 <getchark> <== NOT EXECUTED
40021550: 2a0003e1 mov w1, w0 <== NOT EXECUTED
if ( c != -1 ) {
40021554: 3100043f cmn w1, #0x1 <== NOT EXECUTED
(void) rtems_task_wake_after( 1 );
40021558: 52800020 mov w0, #0x1 // #1 <== NOT EXECUTED
if ( c != -1 ) {
4002155c: 54ffff60 b.eq 40021548 <_Console_simple_Read+0x28> // b.none <== NOT EXECUTED
}
buf[ i ] = (char) c;
40021560: 38001661 strb w1, [x19], #1 <== NOT EXECUTED
for ( i = 0; i < n; ++i ) {
40021564: eb14027f cmp x19, x20 <== NOT EXECUTED
40021568: 54ffff21 b.ne 4002154c <_Console_simple_Read+0x2c> // b.any <== NOT EXECUTED
4002156c: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
}
return n;
}
40021570: aa1503e0 mov x0, x21 <== NOT EXECUTED
40021574: f94013f5 ldr x21, [sp, #32] <== NOT EXECUTED
40021578: a8c37bfd ldp x29, x30, [sp], #48 <== NOT EXECUTED
4002157c: d65f03c0 ret <== NOT EXECUTED
0000000040028250 <_Malloc_Process_deferred_frees>:
{
40028250: a9be7bfd stp x29, x30, [sp, #-32]! <== NOT EXECUTED
40028254: 910003fd mov x29, sp <== NOT EXECUTED
40028258: a90153f3 stp x19, x20, [sp, #16] <== NOT EXECUTED
__asm__ volatile (
4002825c: d53b4221 mrs x1, daif <== NOT EXECUTED
40028260: d50342df msr daifset, #0x2 <== NOT EXECUTED
return _Chain_Immutable_head( the_chain )->next;
40028264: 900006c0 adrp x0, 40100000 <_RTEMS_tasks_Information> <== NOT EXECUTED
40028268: 91108013 add x19, x0, #0x420 <== NOT EXECUTED
if ( !_Chain_Is_empty(the_chain))
4002826c: 91002274 add x20, x19, #0x8 <== NOT EXECUTED
return _Chain_Immutable_head( the_chain )->next;
40028270: f9421000 ldr x0, [x0, #1056] <== NOT EXECUTED
if ( !_Chain_Is_empty(the_chain))
40028274: eb14001f cmp x0, x20 <== NOT EXECUTED
40028278: 540001a0 b.eq 400282ac <_Malloc_Process_deferred_frees+0x5c> // b.none<== NOT EXECUTED
4002827c: d503201f nop
new_first = old_first->next;
40028280: f9400002 ldr x2, [x0]
head->next = new_first;
40028284: f9000262 str x2, [x19]
new_first->previous = head;
40028288: f9000453 str x19, [x2, #8]
__asm__ volatile (
4002828c: 92407c21 and x1, x1, #0xffffffff
40028290: d51b4221 msr daif, x1
free( to_be_freed );
40028294: 97ffffcb bl 400281c0 <free>
__asm__ volatile (
40028298: d53b4221 mrs x1, daif
4002829c: d50342df msr daifset, #0x2
return _Chain_Immutable_head( the_chain )->next;
400282a0: f9400260 ldr x0, [x19]
if ( !_Chain_Is_empty(the_chain))
400282a4: eb14001f cmp x0, x20
400282a8: 54fffec1 b.ne 40028280 <_Malloc_Process_deferred_frees+0x30> // b.any
__asm__ volatile (
400282ac: 92407c21 and x1, x1, #0xffffffff
400282b0: d51b4221 msr daif, x1
}
400282b4: a94153f3 ldp x19, x20, [sp, #16]
400282b8: a8c27bfd ldp x29, x30, [sp], #32
400282bc: d65f03c0 ret
00000000400215e0 <_gettimeofday_r>:
int _gettimeofday_r(
struct _reent *ignored_reentrancy_stuff RTEMS_UNUSED,
struct timeval *tp,
void *__tz
)
{
400215e0: a9bf7bfd stp x29, x30, [sp, #-16]!
400215e4: 910003fd mov x29, sp
if ( !tp )
400215e8: b40000c1 cbz x1, 40021600 <_gettimeofday_r+0x20> <== NEVER TAKEN
400215ec: aa0103e0 mov x0, x1
400215f0: 94000ffc bl 400255e0 <_Timecounter_Microtime>
return 0;
400215f4: 52800000 mov w0, #0x0 // #0
struct timezone *tzp = __tz;
return gettimeofday( tp, tzp );
}
400215f8: a8c17bfd ldp x29, x30, [sp], #16
400215fc: d65f03c0 ret
rtems_set_errno_and_return_minus_one( EFAULT );
40021600: 940034b0 bl 4002e8c0 <__errno> <== NOT EXECUTED
40021604: aa0003e1 mov x1, x0 <== NOT EXECUTED
40021608: 528001c2 mov w2, #0xe // #14 <== NOT EXECUTED
4002160c: 12800000 mov w0, #0xffffffff // #-1 <== NOT EXECUTED
40021610: b9000022 str w2, [x1] <== NOT EXECUTED
40021614: 17fffff9 b 400215f8 <_gettimeofday_r+0x18> <== NOT EXECUTED
...
0000000040021eb0 <_libcsupport_scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
40021eb0: a9bc7bfd stp x29, x30, [sp, #-64]!
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
40021eb4: 52800004 mov w4, #0x0 // #0
{
40021eb8: 910003fd mov x29, sp
40021ebc: a90153f3 stp x19, x20, [sp, #16]
40021ec0: aa0003f3 mov x19, x0
40021ec4: aa0103f4 mov x20, x1
40021ec8: a9020be3 stp x3, x2, [sp, #32]
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
40021ecc: 910083e3 add x3, sp, #0x20
40021ed0: 9100a3e2 add x2, sp, #0x28
40021ed4: 97fffef7 bl 40021ab0 <scanString>
40021ed8: 350000a0 cbnz w0, 40021eec <_libcsupport_scangr+0x3c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
40021edc: 52800000 mov w0, #0x0 // #0
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
40021ee0: a94153f3 ldp x19, x20, [sp, #16]
40021ee4: a8c47bfd ldp x29, x30, [sp], #64
40021ee8: d65f03c0 ret
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
40021eec: 910083e3 add x3, sp, #0x20
40021ef0: 9100a3e2 add x2, sp, #0x28
40021ef4: 91002281 add x1, x20, #0x8
40021ef8: aa1303e0 mov x0, x19
40021efc: 52800004 mov w4, #0x0 // #0
40021f00: 97fffeec bl 40021ab0 <scanString>
40021f04: 34fffec0 cbz w0, 40021edc <_libcsupport_scangr+0x2c> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
40021f08: 9100d3e1 add x1, sp, #0x34
40021f0c: aa1303e0 mov x0, x19
40021f10: 97fffea4 bl 400219a0 <scanInt>
40021f14: 34fffe40 cbz w0, 40021edc <_libcsupport_scangr+0x2c> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
40021f18: 910083e3 add x3, sp, #0x20
40021f1c: 9100a3e2 add x2, sp, #0x28
40021f20: aa1303e0 mov x0, x19
40021f24: 9100e3e1 add x1, sp, #0x38
40021f28: 52800024 mov w4, #0x1 // #1
40021f2c: 97fffee1 bl 40021ab0 <scanString>
40021f30: 34fffd60 cbz w0, 40021edc <_libcsupport_scangr+0x2c> <== NEVER TAKEN
if (grmem[0] == '\0') {
40021f34: f9401fe4 ldr x4, [sp, #56]
40021f38: d28002e1 mov x1, #0x17 // #23
grp->gr_gid = grgid;
40021f3c: b94037e0 ldr w0, [sp, #52]
40021f40: 79002280 strh w0, [x20, #16]
if (grmem[0] == '\0') {
40021f44: 39400080 ldrb w0, [x4]
40021f48: 340001c0 cbz w0, 40021f80 <_libcsupport_scangr+0xd0>
40021f4c: aa0403e2 mov x2, x4
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
40021f50: 52800023 mov w3, #0x1 // #1
40021f54: d503201f nop
if(*cp == ',')
40021f58: 7100b01f cmp w0, #0x2c
memcount++;
40021f5c: 11000461 add w1, w3, #0x1
if(*cp == ',')
40021f60: 54000081 b.ne 40021f70 <_libcsupport_scangr+0xc0> // b.any
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
40021f64: 11000860 add w0, w3, #0x2
memcount++;
40021f68: 2a0103e3 mov w3, w1
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
40021f6c: 2a0003e1 mov w1, w0
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
40021f70: 38401c40 ldrb w0, [x2, #1]!
40021f74: 35ffff20 cbnz w0, 40021f58 <_libcsupport_scangr+0xa8>
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
40021f78: d28001e0 mov x0, #0xf // #15
40021f7c: 8b21cc01 add x1, x0, w1, sxtw #3
40021f80: f94013e0 ldr x0, [sp, #32]
40021f84: eb01001f cmp x0, x1
40021f88: 54fffaa3 b.cc 40021edc <_libcsupport_scangr+0x2c> // b.lo, b.ul, b.last<== NEVER TAKEN
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
40021f8c: f94017e3 ldr x3, [sp, #40]
40021f90: 91003c63 add x3, x3, #0xf
40021f94: 927cec63 and x3, x3, #0xfffffffffffffff0
40021f98: f9000e83 str x3, [x20, #24]
if (grmem[0] == '\0') {
40021f9c: 39400080 ldrb w0, [x4]
40021fa0: 340002c0 cbz w0, 40021ff8 <_libcsupport_scangr+0x148>
grp->gr_mem[0] = grmem;
40021fa4: f9000064 str x4, [x3]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
40021fa8: 52800022 mov w2, #0x1 // #1
grp->gr_mem[memcount] = NULL;
40021fac: 91002063 add x3, x3, #0x8
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
40021fb0: f9401fe0 ldr x0, [sp, #56]
40021fb4: 39400001 ldrb w1, [x0]
40021fb8: 34000201 cbz w1, 40021ff8 <_libcsupport_scangr+0x148> <== NEVER TAKEN
40021fbc: d503201f nop
if(*cp == ',') {
40021fc0: 7100b03f cmp w1, #0x2c
grp->gr_mem[memcount++] = cp + 1;
40021fc4: 91000400 add x0, x0, #0x1
40021fc8: 93407c41 sxtw x1, w2
40021fcc: 937d7c44 sbfiz x4, x2, #3, #32
if(*cp == ',') {
40021fd0: 540000c1 b.ne 40021fe8 <_libcsupport_scangr+0x138> // b.any
*cp = '\0';
40021fd4: 381ff01f sturb wzr, [x0, #-1]
grp->gr_mem[memcount++] = cp + 1;
40021fd8: 11000442 add w2, w2, #0x1
grp->gr_mem[memcount] = NULL;
40021fdc: 91002084 add x4, x4, #0x8
grp->gr_mem[memcount++] = cp + 1;
40021fe0: f9400e83 ldr x3, [x20, #24]
40021fe4: f8217860 str x0, [x3, x1, lsl #3]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
40021fe8: 39400001 ldrb w1, [x0]
40021fec: 35fffea1 cbnz w1, 40021fc0 <_libcsupport_scangr+0x110>
grp->gr_mem[memcount] = NULL;
40021ff0: f9400e83 ldr x3, [x20, #24]
40021ff4: 8b040063 add x3, x3, x4
return 1;
40021ff8: 52800020 mov w0, #0x1 // #1
grp->gr_mem[memcount] = NULL;
40021ffc: f900007f str xzr, [x3]
return 1;
40022000: 17ffffb8 b 40021ee0 <_libcsupport_scangr+0x30>
...
0000000040021c50 <_libcsupport_scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
40021c50: a9bc7bfd stp x29, x30, [sp, #-64]!
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
40021c54: 52800004 mov w4, #0x0 // #0
{
40021c58: 910003fd mov x29, sp
40021c5c: a90153f3 stp x19, x20, [sp, #16]
40021c60: aa0003f3 mov x19, x0
40021c64: aa0103f4 mov x20, x1
40021c68: a9020be3 stp x3, x2, [sp, #32]
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
40021c6c: 910083e3 add x3, sp, #0x20
40021c70: 9100a3e2 add x2, sp, #0x28
40021c74: 97ffff8f bl 40021ab0 <scanString>
40021c78: 350000a0 cbnz w0, 40021c8c <_libcsupport_scanpw+0x3c>
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
40021c7c: 52800000 mov w0, #0x0 // #0
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
40021c80: a94153f3 ldp x19, x20, [sp, #16]
40021c84: a8c47bfd ldp x29, x30, [sp], #64
40021c88: d65f03c0 ret
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
40021c8c: 910083e3 add x3, sp, #0x20
40021c90: 9100a3e2 add x2, sp, #0x28
40021c94: 91002281 add x1, x20, #0x8
40021c98: aa1303e0 mov x0, x19
40021c9c: 52800004 mov w4, #0x0 // #0
40021ca0: 97ffff84 bl 40021ab0 <scanString>
40021ca4: 34fffec0 cbz w0, 40021c7c <_libcsupport_scanpw+0x2c> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
40021ca8: 9100e3e1 add x1, sp, #0x38
40021cac: aa1303e0 mov x0, x19
40021cb0: 97ffff3c bl 400219a0 <scanInt>
40021cb4: 34fffe40 cbz w0, 40021c7c <_libcsupport_scanpw+0x2c>
|| !scanInt(fp, &pwgid)
40021cb8: 9100f3e1 add x1, sp, #0x3c
40021cbc: aa1303e0 mov x0, x19
40021cc0: 97ffff38 bl 400219a0 <scanInt>
40021cc4: 34fffdc0 cbz w0, 40021c7c <_libcsupport_scanpw+0x2c>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
40021cc8: 910083e3 add x3, sp, #0x20
40021ccc: 9100a3e2 add x2, sp, #0x28
40021cd0: 91006281 add x1, x20, #0x18
40021cd4: aa1303e0 mov x0, x19
40021cd8: 52800004 mov w4, #0x0 // #0
40021cdc: 97ffff75 bl 40021ab0 <scanString>
40021ce0: 34fffce0 cbz w0, 40021c7c <_libcsupport_scanpw+0x2c> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
40021ce4: 910083e3 add x3, sp, #0x20
40021ce8: 9100a3e2 add x2, sp, #0x28
40021cec: 91008281 add x1, x20, #0x20
40021cf0: aa1303e0 mov x0, x19
40021cf4: 52800004 mov w4, #0x0 // #0
40021cf8: 97ffff6e bl 40021ab0 <scanString>
40021cfc: 34fffc00 cbz w0, 40021c7c <_libcsupport_scanpw+0x2c> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
40021d00: 910083e3 add x3, sp, #0x20
40021d04: 9100a3e2 add x2, sp, #0x28
40021d08: 9100a281 add x1, x20, #0x28
40021d0c: aa1303e0 mov x0, x19
40021d10: 52800004 mov w4, #0x0 // #0
40021d14: 97ffff67 bl 40021ab0 <scanString>
40021d18: 34fffb20 cbz w0, 40021c7c <_libcsupport_scanpw+0x2c> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
40021d1c: 910083e3 add x3, sp, #0x20
40021d20: 9100a3e2 add x2, sp, #0x28
40021d24: aa1303e0 mov x0, x19
40021d28: 9100c281 add x1, x20, #0x30
40021d2c: 52800024 mov w4, #0x1 // #1
40021d30: 97ffff60 bl 40021ab0 <scanString>
40021d34: 34fffa40 cbz w0, 40021c7c <_libcsupport_scanpw+0x2c>
pwd->pw_gid = pwgid;
40021d38: 294707e2 ldp w2, w1, [sp, #56]
return 1;
40021d3c: 52800020 mov w0, #0x1 // #1
pwd->pw_uid = pwuid;
40021d40: 79002282 strh w2, [x20, #16]
pwd->pw_gid = pwgid;
40021d44: 79002681 strh w1, [x20, #18]
return 1;
40021d48: 17ffffce b 40021c80 <_libcsupport_scanpw+0x30>
40021d4c: 00000000 udf #0
000000004003b950 <_read_r>:
struct _reent *ptr RTEMS_UNUSED,
int fd,
void *buf,
size_t nbytes
)
{
4003b950: a9bf7bfd stp x29, x30, [sp, #-16]!
4003b954: 2a0103e0 mov w0, w1
4003b958: aa0203e1 mov x1, x2
4003b95c: 910003fd mov x29, sp
rtems_libio_check_buffer( buffer );
4003b960: b4000242 cbz x2, 4003b9a8 <_read_r+0x58> <== NEVER TAKEN
rtems_libio_check_count( count );
4003b964: aa0303e2 mov x2, x3
4003b968: b40000e3 cbz x3, 4003b984 <_read_r+0x34> <== NEVER TAKEN
LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_READ, EBADF );
4003b96c: b0000003 adrp x3, 4003c000 <_Scheduler_Table+0x48>
4003b970: b941f863 ldr w3, [x3, #504]
4003b974: 6b03001f cmp w0, w3
4003b978: 540000c2 b.cs 4003b990 <_read_r+0x40> // b.hs, b.nlast <== NEVER TAKEN
return read( fd, buf, nbytes );
}
4003b97c: a8c17bfd ldp x29, x30, [sp], #16
4003b980: 17ffffc4 b 4003b890 <read.part.0>
rtems_libio_check_count( count );
4003b984: d2800000 mov x0, #0x0 // #0 <== NOT EXECUTED
}
4003b988: a8c17bfd ldp x29, x30, [sp], #16 <== NOT EXECUTED
4003b98c: d65f03c0 ret <== NOT EXECUTED
LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_READ, EBADF );
4003b990: 97ffcbcc bl 4002e8c0 <__errno> <== NOT EXECUTED
4003b994: aa0003e1 mov x1, x0 <== NOT EXECUTED
4003b998: 52800122 mov w2, #0x9 // #9 <== NOT EXECUTED
4003b99c: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
4003b9a0: b9000022 str w2, [x1] <== NOT EXECUTED
4003b9a4: 17fffff9 b 4003b988 <_read_r+0x38> <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
4003b9a8: 97ffcbc6 bl 4002e8c0 <__errno> <== NOT EXECUTED
4003b9ac: aa0003e1 mov x1, x0 <== NOT EXECUTED
4003b9b0: 528002c2 mov w2, #0x16 // #22 <== NOT EXECUTED
4003b9b4: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
4003b9b8: b9000022 str w2, [x1] <== NOT EXECUTED
4003b9bc: 17fffff3 b 4003b988 <_read_r+0x38> <== NOT EXECUTED
0000000040022010 <chroot>:
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
40022010: a9ad7bfd stp x29, x30, [sp, #-304]!
40022014: 910003fd mov x29, sp
40022018: a90153f3 stp x19, x20, [sp, #16]
4002201c: aa0003f3 mov x19, x0
/*
* We use the global environment for path evaluation. This makes it possible
* to escape from a chroot environment referencing an unmounted file system.
*/
rtems_filesystem_eval_path_start_with_root_and_current(
40022020: 94002dad bl 4002d6d4 <strlen>
40022024: 52800323 mov w3, #0x19 // #25
40022028: aa0003e2 mov x2, x0
4002202c: aa1303e1 mov x1, x19
40022030: 910183e0 add x0, sp, #0x60
40022034: d00006e5 adrp x5, 40100000 <_RTEMS_tasks_Information>
40022038: d00006e4 adrp x4, 40100000 <_RTEMS_tasks_Information>
4002203c: 9108e084 add x4, x4, #0x238
40022040: 9108c0a5 add x5, x5, #0x230
40022044: 9400049b bl 400232b0 <rtems_filesystem_eval_path_start_with_root_and_current>
&rtems_global_user_env.current_directory
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
40022048: f0000094 adrp x20, 40035000 <bsp_section_rodata_begin+0x3f8>
4002204c: 91266294 add x20, x20, #0x998
40022050: 910223e1 add x1, sp, #0x88
40022054: 9100c3e0 add x0, sp, #0x30
40022058: 94000696 bl 40023ab0 <rtems_filesystem_location_copy_and_detach>
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
4002205c: 9100c3e0 add x0, sp, #0x30
40022060: 940006c4 bl 40023b70 <rtems_filesystem_location_transform_to_global>
40022064: f90017e0 str x0, [sp, #40]
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
40022068: f9401000 ldr x0, [x0, #32]
4002206c: eb14001f cmp x0, x20
40022070: 54000680 b.eq 40022140 <chroot+0x130> // b.none
rtems_filesystem_global_location_t *new_root_loc =
rtems_filesystem_global_location_obtain( &new_current_loc );
40022074: 9100a3e0 add x0, sp, #0x28
40022078: 9400061e bl 400238f0 <rtems_filesystem_global_location_obtain>
(void) ( *loc->handlers->fstat_h )( loc, &st );
4002207c: f9401002 ldr x2, [x0, #32]
st.st_mode = 0;
40022080: b900dbff str wzr, [sp, #216]
40022084: aa0003f3 mov x19, x0
(void) ( *loc->handlers->fstat_h )( loc, &st );
40022088: 910323e1 add x1, sp, #0xc8
4002208c: f9401842 ldr x2, [x2, #48]
40022090: d63f0040 blr x2
return st.st_mode;
40022094: b940dbe0 ldr w0, [sp, #216]
mode_t type = rtems_filesystem_location_type( &new_root_loc->location );
if ( S_ISDIR( type ) ) {
40022098: 12140c00 and w0, w0, #0xf000
4002209c: 7140101f cmp w0, #0x4, lsl #12
400220a0: 54000201 b.ne 400220e0 <chroot+0xd0> // b.any
sc = rtems_libio_set_private_env();
400220a4: 940002bf bl 40022ba0 <rtems_libio_set_private_env>
if (sc == RTEMS_SUCCESSFUL) {
400220a8: 35000400 cbnz w0, 40022128 <chroot+0x118>
rtems_filesystem_global_location_assign(
&rtems_filesystem_root,
400220ac: 9400076d bl 40023e60 <rtems_current_user_env_get>
rtems_filesystem_global_location_assign(
400220b0: 91002000 add x0, x0, #0x8
400220b4: aa1303e1 mov x1, x19
400220b8: 940005a6 bl 40023750 <rtems_filesystem_global_location_assign>
new_root_loc
);
rtems_filesystem_global_location_assign(
&rtems_filesystem_current,
400220bc: 94000769 bl 40023e60 <rtems_current_user_env_get>
rtems_filesystem_global_location_assign(
400220c0: f94017e1 ldr x1, [sp, #40]
400220c4: 940005a3 bl 40023750 <rtems_filesystem_global_location_assign>
}
} else {
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
400220c8: 910183e0 add x0, sp, #0x60
400220cc: 94000535 bl 400235a0 <rtems_filesystem_eval_path_cleanup>
int rv = 0;
400220d0: 52800000 mov w0, #0x0 // #0
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_current_loc, false );
}
return rv;
}
400220d4: a94153f3 ldp x19, x20, [sp, #16]
400220d8: a8d37bfd ldp x29, x30, [sp], #304
400220dc: d65f03c0 ret
if ( !rtems_filesystem_location_is_null( loc ) ) {
400220e0: f9401260 ldr x0, [x19, #32]
400220e4: eb14001f cmp x0, x20
400220e8: 54000080 b.eq 400220f8 <chroot+0xe8> // b.none <== NEVER TAKEN
errno = eno;
400220ec: 94002be8 bl 4002d08c <__errno>
400220f0: 52800281 mov w1, #0x14 // #20
400220f4: b9000001 str w1, [x0]
rtems_filesystem_global_location_release( new_root_loc, true );
400220f8: 52800021 mov w1, #0x1 // #1
400220fc: aa1303e0 mov x0, x19
40022100: 94000634 bl 400239d0 <rtems_filesystem_global_location_release>
rtems_filesystem_eval_path_cleanup( &ctx );
40022104: 910183e0 add x0, sp, #0x60
40022108: 94000526 bl 400235a0 <rtems_filesystem_eval_path_cleanup>
rtems_filesystem_global_location_release( new_current_loc, false );
4002210c: f94017e0 ldr x0, [sp, #40]
40022110: 52800001 mov w1, #0x0 // #0
40022114: 9400062f bl 400239d0 <rtems_filesystem_global_location_release>
40022118: 12800000 mov w0, #0xffffffff // #-1
}
4002211c: a94153f3 ldp x19, x20, [sp, #16]
40022120: a8d37bfd ldp x29, x30, [sp], #304
40022124: d65f03c0 ret
if (sc != RTEMS_UNSATISFIED) {
40022128: 7100341f cmp w0, #0xd
4002212c: 54fffe60 b.eq 400220f8 <chroot+0xe8> // b.none <== NEVER TAKEN
errno = ENOMEM;
40022130: 94002bd7 bl 4002d08c <__errno>
40022134: 52800181 mov w1, #0xc // #12
40022138: b9000001 str w1, [x0]
4002213c: 17ffffef b 400220f8 <chroot+0xe8>
rtems_filesystem_eval_path_cleanup( &ctx );
40022140: 910183e0 add x0, sp, #0x60
40022144: 94000517 bl 400235a0 <rtems_filesystem_eval_path_cleanup>
if ( rv != 0 ) {
40022148: 17fffff1 b 4002210c <chroot+0xfc>
4002214c: 00000000 udf #0
0000000040026fd0 <endgrent>:
void endgrent(void)
{
40026fd0: a9be7bfd stp x29, x30, [sp, #-32]!
pthread_once(&grp_once, grp_init);
40026fd4: 90000001 adrp x1, 40026000 <_Thread_Kill_zombies+0x60>
40026fd8: b00006e0 adrp x0, 40103000 <_Thread_Objects+0x540>
{
40026fdc: 910003fd mov x29, sp
pthread_once(&grp_once, grp_init);
40026fe0: 9139c021 add x1, x1, #0xe70
40026fe4: 910d0000 add x0, x0, #0x340
{
40026fe8: a90153f3 stp x19, x20, [sp, #16]
pthread_once(&grp_once, grp_init);
40026fec: 97fff72d bl 40024ca0 <pthread_once>
return pthread_getspecific(grp_key);
40026ff0: b00006f4 adrp x20, 40103000 <_Thread_Objects+0x540>
40026ff4: b9433e80 ldr w0, [x20, #828]
40026ff8: 9400041a bl 40028060 <pthread_getspecific>
grp_context *ctx = grp_get_context();
if (ctx == NULL)
40026ffc: b4000180 cbz x0, 4002702c <endgrent+0x5c>
return;
if (ctx->fp != NULL) {
40027000: aa0003f3 mov x19, x0
40027004: f9400000 ldr x0, [x0]
40027008: b4000040 cbz x0, 40027010 <endgrent+0x40> <== NEVER TAKEN
fclose(ctx->fp);
4002700c: 9400209e bl 4002f284 <fclose>
}
free(ctx);
40027010: aa1303e0 mov x0, x19
40027014: 97ffff2f bl 40026cd0 <free>
pthread_setspecific(grp_key, NULL);
40027018: b9433e80 ldr w0, [x20, #828]
4002701c: d2800001 mov x1, #0x0 // #0
}
40027020: a94153f3 ldp x19, x20, [sp, #16]
40027024: a8c27bfd ldp x29, x30, [sp], #32
pthread_setspecific(grp_key, NULL);
40027028: 14000422 b 400280b0 <pthread_setspecific>
}
4002702c: a94153f3 ldp x19, x20, [sp, #16]
40027030: a8c27bfd ldp x29, x30, [sp], #32
40027034: d65f03c0 ret
...
0000000040021300 <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
40021300: d0000700 adrp x0, 40103000 <_Thread_Objects+0x540>
40021304: f9420400 ldr x0, [x0, #1032]
40021308: b4000040 cbz x0, 40021310 <endpwent+0x10> <== NEVER TAKEN
fclose(passwd_fp);
4002130c: 140037de b 4002f284 <fclose>
}
40021310: d65f03c0 ret <== NOT EXECUTED
...
0000000040021b70 <fchdir>:
/**
* compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
*/
int fchdir( int fd )
{
40021b70: a9b27bfd stp x29, x30, [sp, #-224]!
40021b74: 910003fd mov x29, sp
st.st_mode = 0;
st.st_uid = 0;
st.st_gid = 0;
LIBIO_GET_IOP( fd, iop );
40021b78: 900000c1 adrp x1, 40039000 <__trunctfdf2+0x250>
40021b7c: b94bc821 ldr w1, [x1, #3016]
{
40021b80: a90153f3 stp x19, x20, [sp, #16]
LIBIO_GET_IOP( fd, iop );
40021b84: 6b01001f cmp w0, w1
st.st_mode = 0;
40021b88: b9008bff str wzr, [sp, #136]
st.st_uid = 0;
40021b8c: 79011fff strh wzr, [sp, #142]
st.st_gid = 0;
40021b90: 790123ff strh wzr, [sp, #144]
LIBIO_GET_IOP( fd, iop );
40021b94: 54000982 b.cs 40021cc4 <fchdir+0x154> // b.hs, b.nlast
40021b98: f9001bf7 str x23, [sp, #48]
40021b9c: 52800a17 mov w23, #0x50 // #80
40021ba0: d0000713 adrp x19, 40103000 <_Thread_Heads+0x68>
40021ba4: 911a0273 add x19, x19, #0x680
40021ba8: 9b377c17 smull x23, w0, w23
__asm__ volatile (
40021bac: d53b4221 mrs x1, daif
40021bb0: d50342df msr daifset, #0x2
val = *obj;
40021bb4: b8776a62 ldr w2, [x19, x23]
*obj = val + arg;
40021bb8: 11400443 add w3, w2, #0x1, lsl #12
40021bbc: b8376a63 str w3, [x19, x23]
__asm__ volatile (
40021bc0: 92407c21 and x1, x1, #0xffffffff
40021bc4: d51b4221 msr daif, x1
40021bc8: 36400882 tbz w2, #8, 40021cd8 <fchdir+0x168>
static inline void rtems_filesystem_instance_lock(
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
40021bcc: a9025bf5 stp x21, x22, [sp, #32]
40021bd0: 93407c16 sxtw x22, w0
40021bd4: d2800a14 mov x20, #0x50 // #80
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st );
40021bd8: 910042f5 add x21, x23, #0x10
40021bdc: 9b144ed4 madd x20, x22, x20, x19
40021be0: 8b150275 add x21, x19, x21
40021be4: f9401e80 ldr x0, [x20, #56]
(*mt_entry->ops->lock_h)( mt_entry );
40021be8: f9400c01 ldr x1, [x0, #24]
40021bec: f9400021 ldr x1, [x1]
40021bf0: d63f0020 blr x1
40021bf4: f9401a82 ldr x2, [x20, #48]
40021bf8: aa1503e0 mov x0, x21
40021bfc: 9101e3e1 add x1, sp, #0x78
40021c00: f9401842 ldr x2, [x2, #48]
40021c04: d63f0040 blr x2
40021c08: 2a0003f4 mov w20, w0
if ( rv == 0 ) {
40021c0c: 340002a0 cbz w0, 40021c60 <fchdir+0xf0> <== ALWAYS TAKEN
static inline void rtems_filesystem_instance_unlock(
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
40021c10: d2800a00 mov x0, #0x50 // #80
40021c14: 9b004ec0 madd x0, x22, x0, x19
40021c18: f9401c00 ldr x0, [x0, #56]
(*mt_entry->ops->unlock_h)( mt_entry );
40021c1c: f9400c01 ldr x1, [x0, #24]
40021c20: f9400421 ldr x1, [x1, #8]
40021c24: d63f0020 blr x1
__asm__ volatile (
40021c28: d53b4220 mrs x0, daif
40021c2c: d50342df msr daifset, #0x2
*obj = val - arg;
40021c30: b8776a61 ldr w1, [x19, x23]
40021c34: 51400421 sub w1, w1, #0x1, lsl #12
40021c38: b8376a61 str w1, [x19, x23]
__asm__ volatile (
40021c3c: 92407c00 and x0, x0, #0xffffffff
40021c40: d51b4220 msr daif, x0
}
}
rtems_filesystem_instance_unlock( &iop->pathinfo );
rtems_libio_iop_drop( iop );
if ( rv == 0 ) {
40021c44: 34000254 cbz w20, 40021c8c <fchdir+0x11c>
40021c48: a9425bf5 ldp x21, x22, [sp, #32]
40021c4c: f9401bf7 ldr x23, [sp, #48]
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
40021c50: 2a1403e0 mov w0, w20
40021c54: a94153f3 ldp x19, x20, [sp, #16]
40021c58: a8ce7bfd ldp x29, x30, [sp], #224
40021c5c: d65f03c0 ret
bool access_ok = rtems_filesystem_check_access(
40021c60: 79411fe2 ldrh w2, [sp, #142]
40021c64: 52800020 mov w0, #0x1 // #1
40021c68: 794123e3 ldrh w3, [sp, #144]
40021c6c: b9408be1 ldr w1, [sp, #136]
40021c70: 9400082c bl 40023d20 <rtems_filesystem_check_access>
if ( access_ok ) {
40021c74: 72001c1f tst w0, #0xff
40021c78: 540001c0 b.eq 40021cb0 <fchdir+0x140> // b.none
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
40021c7c: aa1503e1 mov x1, x21
40021c80: 910123e0 add x0, sp, #0x48
40021c84: 940026a7 bl 4002b720 <rtems_filesystem_location_clone>
40021c88: 17ffffe2 b 40021c10 <fchdir+0xa0>
rv = rtems_filesystem_chdir( &loc );
40021c8c: 910123e0 add x0, sp, #0x48
40021c90: 94002680 bl 4002b690 <rtems_filesystem_chdir>
40021c94: 2a0003f4 mov w20, w0
}
40021c98: 2a1403e0 mov w0, w20
40021c9c: a94153f3 ldp x19, x20, [sp, #16]
rv = rtems_filesystem_chdir( &loc );
40021ca0: a9425bf5 ldp x21, x22, [sp, #32]
40021ca4: f9401bf7 ldr x23, [sp, #48]
}
40021ca8: a8ce7bfd ldp x29, x30, [sp], #224
40021cac: d65f03c0 ret
errno = EACCES;
40021cb0: 94003af7 bl 4003088c <__errno>
rv = -1;
40021cb4: 12800014 mov w20, #0xffffffff // #-1
errno = EACCES;
40021cb8: 528001a1 mov w1, #0xd // #13
40021cbc: b9000001 str w1, [x0]
rv = -1;
40021cc0: 17ffffd4 b 40021c10 <fchdir+0xa0>
LIBIO_GET_IOP( fd, iop );
40021cc4: 94003af2 bl 4003088c <__errno>
40021cc8: 12800014 mov w20, #0xffffffff // #-1
40021ccc: 52800121 mov w1, #0x9 // #9
40021cd0: b9000001 str w1, [x0]
40021cd4: 17ffffdf b 40021c50 <fchdir+0xe0>
__asm__ volatile (
40021cd8: d53b4220 mrs x0, daif
40021cdc: d50342df msr daifset, #0x2
40021ce0: b8776a61 ldr w1, [x19, x23]
40021ce4: 51400421 sub w1, w1, #0x1, lsl #12
40021ce8: b8376a61 str w1, [x19, x23]
__asm__ volatile (
40021cec: 92407c00 and x0, x0, #0xffffffff
40021cf0: d51b4220 msr daif, x0
40021cf4: 94003ae6 bl 4003088c <__errno>
40021cf8: 12800014 mov w20, #0xffffffff // #-1
40021cfc: 52800121 mov w1, #0x9 // #9
40021d00: f9401bf7 ldr x23, [sp, #48]
40021d04: b9000001 str w1, [x0]
40021d08: 17ffffd2 b 40021c50 <fchdir+0xe0>
40021d0c: 00000000 udf #0
0000000040022120 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
40022120: a9ac7bfd stp x29, x30, [sp, #-320]!
int ret;
va_list ap;
va_start( ap, cmd );
40022124: 128005ea mov w10, #0xffffffd0 // #-48
40022128: 12800fe9 mov w9, #0xffffff80 // #-128
{
4002212c: 910003fd mov x29, sp
va_start( ap, cmd );
40022130: 910443eb add x11, sp, #0x110
LIBIO_GET_IOP( fd, iop );
40022134: f00000a8 adrp x8, 40039000 <__trunctfdf2+0x250>
40022138: b94bc908 ldr w8, [x8, #3016]
{
4002213c: a9025bf5 stp x21, x22, [sp, #32]
40022140: 93407c16 sxtw x22, w0
va_start( ap, cmd );
40022144: 910503e0 add x0, sp, #0x140
{
40022148: a90363f7 stp x23, x24, [sp, #48]
LIBIO_GET_IOP( fd, iop );
4002214c: 6b0802df cmp w22, w8
va_start( ap, cmd );
40022150: a90703e0 stp x0, x0, [sp, #112]
40022154: f90043eb str x11, [sp, #128]
40022158: 291127ea stp w10, w9, [sp, #136]
{
4002215c: 3d8027e0 str q0, [sp, #144]
40022160: 3d802be1 str q1, [sp, #160]
40022164: 3d802fe2 str q2, [sp, #176]
40022168: 3d8033e3 str q3, [sp, #192]
4002216c: 3d8037e4 str q4, [sp, #208]
40022170: 3d803be5 str q5, [sp, #224]
40022174: 3d803fe6 str q6, [sp, #240]
40022178: 3d8043e7 str q7, [sp, #256]
4002217c: a9110fe2 stp x2, x3, [sp, #272]
40022180: a91217e4 stp x4, x5, [sp, #288]
40022184: a9131fe6 stp x6, x7, [sp, #304]
LIBIO_GET_IOP( fd, iop );
40022188: 54001dc2 b.cs 40022540 <fcntl+0x420> // b.hs, b.nlast
return &rtems_libio_iops[ fd ];
4002218c: 52800a02 mov w2, #0x50 // #80
40022190: a90153f3 stp x19, x20, [sp, #16]
40022194: b0000714 adrp x20, 40103000 <_Thread_Heads+0x68>
40022198: 911a0294 add x20, x20, #0x680
4002219c: 9b227ed5 smull x21, w22, w2
400221a0: 2a0103f3 mov w19, w1
400221a4: a9046bf9 stp x25, x26, [sp, #64]
400221a8: 8b150299 add x25, x20, x21
__asm__ volatile (
400221ac: d53b4220 mrs x0, daif
400221b0: d50342df msr daifset, #0x2
val = *obj;
400221b4: b8756a81 ldr w1, [x20, x21]
*obj = val + arg;
400221b8: 11400423 add w3, w1, #0x1, lsl #12
400221bc: b8356a83 str w3, [x20, x21]
__asm__ volatile (
400221c0: 92407c00 and x0, x0, #0xffffffff
400221c4: d51b4220 msr daif, x0
400221c8: 36401c61 tbz w1, #8, 40022554 <fcntl+0x434>
switch ( cmd ) {
400221cc: 7100167f cmp w19, #0x5
400221d0: 54000ac0 b.eq 40022328 <fcntl+0x208> // b.none
400221d4: 5400056d b.le 40022280 <fcntl+0x160>
400221d8: 7100227f cmp w19, #0x8
400221dc: 54000a60 b.eq 40022328 <fcntl+0x208> // b.none
400221e0: 540009cd b.le 40022318 <fcntl+0x1f8>
400221e4: 7100267f cmp w19, #0x9
400221e8: 54000a00 b.eq 40022328 <fcntl+0x208> // b.none
400221ec: 7100527f cmp w19, #0x14
400221f0: 54000b21 b.ne 40022354 <fcntl+0x234> // b.any
fd2 = va_arg( ap, int );
400221f4: b94113fa ldr w26, [sp, #272]
if ( (uint32_t) fd2 >= rtems_libio_number_iops ) {
400221f8: 6b08035f cmp w26, w8
400221fc: 54001922 b.cs 40022520 <fcntl+0x400> // b.hs, b.nlast <== NEVER TAKEN
40022200: 9b227f58 smull x24, w26, w2
40022204: a90573fb stp x27, x28, [sp, #80]
40022208: 8b18029b add x27, x20, x24
if (iop != iop2)
4002220c: eb1b033f cmp x25, x27
40022210: 54001920 b.eq 40022534 <fcntl+0x414> // b.none <== NEVER TAKEN
val = *obj;
40022214: b8786a80 ldr w0, [x20, x24]
rv = (*iop2->pathinfo.handlers->close_h)( iop2 );
40022218: 93407f5c sxtw x28, w26
if ((rtems_libio_iop_flags( iop2 ) & LIBIO_FLAGS_OPEN) != 0) {
4002221c: 36401360 tbz w0, #8, 40022488 <fcntl+0x368> <== NEVER TAKEN
rv = (*iop2->pathinfo.handlers->close_h)( iop2 );
40022220: d2800a01 mov x1, #0x50 // #80
40022224: aa1b03e0 mov x0, x27
40022228: 9b015381 madd x1, x28, x1, x20
4002222c: f9401821 ldr x1, [x1, #48]
40022230: f9400421 ldr x1, [x1, #8]
40022234: d63f0020 blr x1
40022238: 2a0003f7 mov w23, w0
if (rv == 0) {
4002223c: 34001260 cbz w0, 40022488 <fcntl+0x368> <== ALWAYS TAKEN
if (ret >= 0) {
40022240: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
40022244: 36f80517 tbz w23, #31, 400222e4 <fcntl+0x1c4> <== NOT EXECUTED
__asm__ volatile (
40022248: d53b4221 mrs x1, daif
4002224c: d50342df msr daifset, #0x2
*obj = val - arg;
40022250: b8756a82 ldr w2, [x20, x21]
40022254: 51400442 sub w2, w2, #0x1, lsl #12
40022258: b8356a82 str w2, [x20, x21]
__asm__ volatile (
4002225c: 92407c21 and x1, x1, #0xffffffff
40022260: d51b4221 msr daif, x1
40022264: a94153f3 ldp x19, x20, [sp, #16]
40022268: a9446bf9 ldp x25, x26, [sp, #64]
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
4002226c: 2a1703e0 mov w0, w23
40022270: a9425bf5 ldp x21, x22, [sp, #32]
40022274: a94363f7 ldp x23, x24, [sp, #48]
40022278: a8d47bfd ldp x29, x30, [sp], #320
4002227c: d65f03c0 ret
switch ( cmd ) {
40022280: 71000a7f cmp w19, #0x2
40022284: 54000720 b.eq 40022368 <fcntl+0x248> // b.none
40022288: 540005ad b.le 4002233c <fcntl+0x21c>
4002228c: 71000e7f cmp w19, #0x3
40022290: 54000da0 b.eq 40022444 <fcntl+0x324> // b.none
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
40022294: b94113e0 ldr w0, [sp, #272]
40022298: 9400021e bl 40022b10 <rtems_libio_fcntl_flags>
__asm__ volatile (
4002229c: d53b4221 mrs x1, daif
400222a0: d50342df msr daifset, #0x2
*obj = val & arg;
400222a4: b8756a82 ldr w2, [x20, x21]
400222a8: 12804023 mov w3, #0xfffffdfe // #-514
400222ac: 0a030042 and w2, w2, w3
400222b0: b8356a82 str w2, [x20, x21]
__asm__ volatile (
400222b4: 92407c21 and x1, x1, #0xffffffff
400222b8: d51b4221 msr daif, x1
__asm__ volatile (
400222bc: d53b4221 mrs x1, daif
400222c0: d50342df msr daifset, #0x2
*obj = val | arg;
400222c4: b8756a82 ldr w2, [x20, x21]
rtems_libio_iop_flags_set( iop, flags & mask );
400222c8: 52804023 mov w3, #0x201 // #513
400222cc: 0a030000 and w0, w0, w3
400222d0: 2a000040 orr w0, w2, w0
400222d4: b8356a80 str w0, [x20, x21]
__asm__ volatile (
400222d8: 92407c20 and x0, x1, #0xffffffff
400222dc: d51b4220 msr daif, x0
int ret = 0;
400222e0: 52800017 mov w23, #0x0 // #0
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
400222e4: d2800a02 mov x2, #0x50 // #80
400222e8: 2a1303e1 mov w1, w19
400222ec: aa1903e0 mov x0, x25
400222f0: 9b0252d6 madd x22, x22, x2, x20
400222f4: f9401ac2 ldr x2, [x22, #48]
400222f8: f9402842 ldr x2, [x2, #80]
400222fc: d63f0040 blr x2
40022300: 2a0003f3 mov w19, w0
if (err) {
40022304: 34fffa20 cbz w0, 40022248 <fcntl+0x128> <== ALWAYS TAKEN
errno = err;
40022308: 94003961 bl 4003088c <__errno> <== NOT EXECUTED
ret = -1;
4002230c: 12800017 mov w23, #0xffffffff // #-1 <== NOT EXECUTED
errno = err;
40022310: b9000013 str w19, [x0] <== NOT EXECUTED
ret = -1;
40022314: 17ffffcd b 40022248 <fcntl+0x128> <== NOT EXECUTED
switch ( cmd ) {
40022318: 71001a7f cmp w19, #0x6
4002231c: 54000060 b.eq 40022328 <fcntl+0x208> // b.none
40022320: 71001e7f cmp w19, #0x7
40022324: 54000181 b.ne 40022354 <fcntl+0x234> // b.any <== NEVER TAKEN
errno = ENOTSUP;
40022328: 94003959 bl 4003088c <__errno>
ret = -1;
4002232c: 12800017 mov w23, #0xffffffff // #-1
errno = ENOTSUP;
40022330: 528010c1 mov w1, #0x86 // #134
40022334: b9000001 str w1, [x0]
if (ret >= 0) {
40022338: 17ffffc4 b 40022248 <fcntl+0x128>
switch ( cmd ) {
4002233c: 340002d3 cbz w19, 40022394 <fcntl+0x274>
40022340: 7100067f cmp w19, #0x1
40022344: 54000081 b.ne 40022354 <fcntl+0x234> // b.any <== NEVER TAKEN
val = *obj;
40022348: b8756a97 ldr w23, [x20, x21]
ret = ((rtems_libio_iop_flags(iop) & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
4002234c: d34b2ef7 ubfx x23, x23, #11, #1
if (ret >= 0) {
40022350: 17ffffe5 b 400222e4 <fcntl+0x1c4>
errno = EINVAL;
40022354: 9400394e bl 4003088c <__errno>
ret = -1;
40022358: 12800017 mov w23, #0xffffffff // #-1
errno = EINVAL;
4002235c: 528002c1 mov w1, #0x16 // #22
40022360: b9000001 str w1, [x0]
if (ret >= 0) {
40022364: 17ffffb9 b 40022248 <fcntl+0x128>
if ( va_arg( ap, int ) )
40022368: b94113f7 ldr w23, [sp, #272]
4002236c: 34000777 cbz w23, 40022458 <fcntl+0x338>
__asm__ volatile (
40022370: d53b4220 mrs x0, daif
40022374: d50342df msr daifset, #0x2
*obj = val | arg;
40022378: b8756a81 ldr w1, [x20, x21]
4002237c: 32150021 orr w1, w1, #0x800
40022380: b8356a81 str w1, [x20, x21]
__asm__ volatile (
40022384: 92407c00 and x0, x0, #0xffffffff
40022388: d51b4220 msr daif, x0
int ret = 0;
4002238c: 52800017 mov w23, #0x0 // #0
return _Atomic_Fetch_or_uint( &iop->flags, set, ATOMIC_ORDER_RELAXED );
40022390: 17ffffd5 b 400222e4 <fcntl+0x1c4>
val = *obj;
40022394: b8756a80 ldr w0, [x20, x21]
oflag = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) );
40022398: 940001f2 bl 40022b60 <rtems_libio_to_fcntl_flags>
4002239c: 2a0003fa mov w26, w0
diop = rtems_libio_allocate();
400223a0: 94000200 bl 40022ba0 <rtems_libio_allocate>
400223a4: aa0003f8 mov x24, x0
if (diop != NULL) {
400223a8: b4000f20 cbz x0, 4002258c <fcntl+0x46c> <== NEVER TAKEN
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
400223ac: f9401f20 ldr x0, [x25, #56]
(*mt_entry->ops->lock_h)( mt_entry );
400223b0: f9400c01 ldr x1, [x0, #24]
400223b4: f9400021 ldr x1, [x1]
400223b8: d63f0020 blr x1
rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo );
400223bc: 910042a1 add x1, x21, #0x10
400223c0: 91004300 add x0, x24, #0x10
400223c4: 8b010281 add x1, x20, x1
400223c8: 940024d6 bl 4002b720 <rtems_filesystem_location_clone>
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
400223cc: f9401f20 ldr x0, [x25, #56]
(*mt_entry->ops->unlock_h)( mt_entry );
400223d0: f9400c01 ldr x1, [x0, #24]
400223d4: f9400421 ldr x1, [x1, #8]
400223d8: d63f0020 blr x1
rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 );
400223dc: f9401b04 ldr x4, [x24, #48]
400223e0: 2a1a03e2 mov w2, w26
400223e4: aa1803e0 mov x0, x24
400223e8: 52800003 mov w3, #0x0 // #0
400223ec: d2800001 mov x1, #0x0 // #0
400223f0: f9400084 ldr x4, [x4]
400223f4: d63f0080 blr x4
400223f8: 2a0003f7 mov w23, w0
if ( rv == 0 ) {
400223fc: 350003e0 cbnz w0, 40022478 <fcntl+0x358> <== NEVER TAKEN
LIBIO_FLAGS_OPEN | rtems_libio_fcntl_flags( oflag )
40022400: 2a1a03e0 mov w0, w26
40022404: 940001c3 bl 40022b10 <rtems_libio_fcntl_flags>
__asm__ volatile (
40022408: d53b4221 mrs x1, daif
4002240c: d50342df msr daifset, #0x2
*obj = val | arg;
40022410: b9400302 ldr w2, [x24]
40022414: 2a020000 orr w0, w0, w2
40022418: 32180000 orr w0, w0, #0x100
4002241c: b9000300 str w0, [x24]
__asm__ volatile (
40022420: 92407c20 and x0, x1, #0xffffffff
40022424: d51b4220 msr daif, x0
rv = rtems_libio_iop_to_descriptor( diop );
40022428: cb140318 sub x24, x24, x20
4002242c: b202e7f7 mov x23, #0xcccccccccccccccc // #-3689348814741910324
40022430: f29999b7 movk x23, #0xcccd
40022434: 9344ff18 asr x24, x24, #4
40022438: 1b177f17 mul w23, w24, w23
if (ret >= 0) {
4002243c: 37fff077 tbnz w23, #31, 40022248 <fcntl+0x128> <== NEVER TAKEN
40022440: 17ffffa9 b 400222e4 <fcntl+0x1c4>
val = *obj;
40022444: b8756a80 ldr w0, [x20, x21]
ret = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) );
40022448: 940001c6 bl 40022b60 <rtems_libio_to_fcntl_flags>
4002244c: 2a0003f7 mov w23, w0
if (ret >= 0) {
40022450: 37ffefd7 tbnz w23, #31, 40022248 <fcntl+0x128> <== NEVER TAKEN
40022454: 17ffffa4 b 400222e4 <fcntl+0x1c4>
__asm__ volatile (
40022458: d53b4220 mrs x0, daif
4002245c: d50342df msr daifset, #0x2
*obj = val & arg;
40022460: b8756a81 ldr w1, [x20, x21]
40022464: 12147821 and w1, w1, #0xfffff7ff
40022468: b8356a81 str w1, [x20, x21]
__asm__ volatile (
4002246c: 92407c00 and x0, x0, #0xffffffff
40022470: d51b4220 msr daif, x0
return _Atomic_Fetch_and_uint( &iop->flags, ~clear, ATOMIC_ORDER_RELAXED );
40022474: 17ffff9c b 400222e4 <fcntl+0x1c4>
rtems_libio_free( diop );
40022478: aa1803e0 mov x0, x24 <== NOT EXECUTED
4002247c: 940001e1 bl 40022c00 <rtems_libio_free> <== NOT EXECUTED
if (ret >= 0) {
40022480: 37ffee57 tbnz w23, #31, 40022248 <fcntl+0x128> <== NOT EXECUTED
40022484: 17ffff98 b 400222e4 <fcntl+0x1c4> <== NOT EXECUTED
val = *obj;
40022488: b8756a80 ldr w0, [x20, x21]
oflag = rtems_libio_to_fcntl_flags( rtems_libio_iop_flags( iop ) );
4002248c: 940001b5 bl 40022b60 <rtems_libio_to_fcntl_flags>
40022490: b9006fe0 str w0, [sp, #108]
rtems_libio_iop_flags_set( iop2, rtems_libio_fcntl_flags( oflag ) );
40022494: 9400019f bl 40022b10 <rtems_libio_fcntl_flags>
__asm__ volatile (
40022498: d53b4221 mrs x1, daif
4002249c: d50342df msr daifset, #0x2
*obj = val | arg;
400224a0: b8786a83 ldr w3, [x20, x24]
400224a4: 2a000063 orr w3, w3, w0
400224a8: b8386a83 str w3, [x20, x24]
__asm__ volatile (
400224ac: 92407c21 and x1, x1, #0xffffffff
400224b0: d51b4221 msr daif, x1
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
400224b4: f9401f20 ldr x0, [x25, #56]
rtems_filesystem_location_clone( &iop2->pathinfo, &iop->pathinfo );
400224b8: 91004318 add x24, x24, #0x10
(*mt_entry->ops->lock_h)( mt_entry );
400224bc: f9400c01 ldr x1, [x0, #24]
400224c0: f9400021 ldr x1, [x1]
400224c4: d63f0020 blr x1
400224c8: 910042a1 add x1, x21, #0x10
400224cc: 8b180280 add x0, x20, x24
400224d0: 8b010281 add x1, x20, x1
400224d4: 94002493 bl 4002b720 <rtems_filesystem_location_clone>
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
400224d8: f9401f20 ldr x0, [x25, #56]
(*mt_entry->ops->unlock_h)( mt_entry );
400224dc: f9400c01 ldr x1, [x0, #24]
400224e0: f9400421 ldr x1, [x1, #8]
400224e4: d63f0020 blr x1
rv = (*iop2->pathinfo.handlers->open_h)( iop2, NULL, oflag, 0 );
400224e8: d2800a01 mov x1, #0x50 // #80
400224ec: b9406fe2 ldr w2, [sp, #108]
400224f0: aa1b03e0 mov x0, x27
400224f4: 52800003 mov w3, #0x0 // #0
400224f8: 9b01539c madd x28, x28, x1, x20
400224fc: d2800001 mov x1, #0x0 // #0
40022500: f9401b84 ldr x4, [x28, #48]
40022504: f9400084 ldr x4, [x4]
40022508: d63f0080 blr x4
rv = fd2;
4002250c: 7100001f cmp w0, #0x0
40022510: 1a9a1017 csel w23, w0, w26, ne // ne = any
40022514: a94573fb ldp x27, x28, [sp, #80]
if (ret >= 0) {
40022518: 37ffe997 tbnz w23, #31, 40022248 <fcntl+0x128> <== NEVER TAKEN
4002251c: 17ffff72 b 400222e4 <fcntl+0x1c4>
rtems_set_errno_and_return_minus_one( EBADF );
40022520: 940038db bl 4003088c <__errno> <== NOT EXECUTED
40022524: 12800017 mov w23, #0xffffffff // #-1 <== NOT EXECUTED
40022528: 52800121 mov w1, #0x9 // #9 <== NOT EXECUTED
4002252c: b9000001 str w1, [x0] <== NOT EXECUTED
if (ret >= 0) {
40022530: 17ffff46 b 40022248 <fcntl+0x128> <== NOT EXECUTED
int rv = 0;
40022534: 52800017 mov w23, #0x0 // #0 <== NOT EXECUTED
40022538: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
4002253c: 17ffff6a b 400222e4 <fcntl+0x1c4> <== NOT EXECUTED
LIBIO_GET_IOP( fd, iop );
40022540: 940038d3 bl 4003088c <__errno>
40022544: 12800017 mov w23, #0xffffffff // #-1
40022548: 52800121 mov w1, #0x9 // #9
4002254c: b9000001 str w1, [x0]
40022550: 17ffff47 b 4002226c <fcntl+0x14c>
__asm__ volatile (
40022554: d53b4220 mrs x0, daif
40022558: d50342df msr daifset, #0x2
*obj = val - arg;
4002255c: b8756a81 ldr w1, [x20, x21]
40022560: 51400421 sub w1, w1, #0x1, lsl #12
40022564: b8356a81 str w1, [x20, x21]
__asm__ volatile (
40022568: 92407c00 and x0, x0, #0xffffffff
4002256c: d51b4220 msr daif, x0
40022570: 940038c7 bl 4003088c <__errno>
40022574: 12800017 mov w23, #0xffffffff // #-1
40022578: 52800121 mov w1, #0x9 // #9
4002257c: a94153f3 ldp x19, x20, [sp, #16]
40022580: a9446bf9 ldp x25, x26, [sp, #64]
40022584: b9000001 str w1, [x0]
40022588: 17ffff39 b 4002226c <fcntl+0x14c>
rv = -1;
4002258c: 12800017 mov w23, #0xffffffff // #-1 <== NOT EXECUTED
40022590: 17ffff2e b 40022248 <fcntl+0x128> <== NOT EXECUTED
...
0000000040026ac0 <fpathconf>:
*/
long fpathconf(
int fd,
int name
)
{
40026ac0: a9be7bfd stp x29, x30, [sp, #-32]!
40026ac4: 910003fd mov x29, sp
long return_value;
rtems_libio_t *iop;
const rtems_filesystem_limits_and_options_t *the_limits;
LIBIO_GET_IOP( fd, iop );
40026ac8: f0000062 adrp x2, 40035000 <bsp_section_rodata_begin+0x3f8>
40026acc: b9477842 ldr w2, [x2, #1912]
40026ad0: 6b02001f cmp w0, w2
40026ad4: 54000a62 b.cs 40026c20 <fpathconf+0x160> // b.hs, b.nlast
40026ad8: a90153f3 stp x19, x20, [sp, #16]
40026adc: 52800a14 mov w20, #0x50 // #80
40026ae0: 900006f3 adrp x19, 40102000 <_Configuration_Scheduler_priority_dflt+0x1688>
40026ae4: 913ca273 add x19, x19, #0xf28
40026ae8: 9b347c14 smull x20, w0, w20
__asm__ volatile (
40026aec: d53b4222 mrs x2, daif
40026af0: d50342df msr daifset, #0x2
val = *obj;
40026af4: b8736a83 ldr w3, [x20, x19]
*obj = val + arg;
40026af8: 11400464 add w4, w3, #0x1, lsl #12
40026afc: b8336a84 str w4, [x20, x19]
__asm__ volatile (
40026b00: 92407c42 and x2, x2, #0xffffffff
40026b04: d51b4222 msr daif, x2
40026b08: 36400983 tbz w3, #8, 40026c38 <fpathconf+0x178> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
40026b0c: 93407c00 sxtw x0, w0
40026b10: d2800a02 mov x2, #0x50 // #80
switch ( name ) {
40026b14: 7100183f cmp w1, #0x6
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
40026b18: 9b024c00 madd x0, x0, x2, x19
40026b1c: f9401c00 ldr x0, [x0, #56]
40026b20: f9402c00 ldr x0, [x0, #88]
switch ( name ) {
40026b24: 54000560 b.eq 40026bd0 <fpathconf+0x110> // b.none
40026b28: 5400030c b.gt 40026b88 <fpathconf+0xc8>
40026b2c: 71000c3f cmp w1, #0x3
40026b30: 54000540 b.eq 40026bd8 <fpathconf+0x118> // b.none
40026b34: 5400022c b.gt 40026b78 <fpathconf+0xb8>
40026b38: 7100043f cmp w1, #0x1
40026b3c: 54000560 b.eq 40026be8 <fpathconf+0x128> // b.none
40026b40: 7100083f cmp w1, #0x2
40026b44: 54000341 b.ne 40026bac <fpathconf+0xec> // b.any
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
40026b48: b9800800 ldrsw x0, [x0, #8]
break;
40026b4c: d503201f nop
__asm__ volatile (
40026b50: d53b4221 mrs x1, daif
40026b54: d50342df msr daifset, #0x2
*obj = val - arg;
40026b58: b8736a82 ldr w2, [x20, x19]
40026b5c: 51400442 sub w2, w2, #0x1, lsl #12
40026b60: b8336a82 str w2, [x20, x19]
__asm__ volatile (
40026b64: 92407c21 and x1, x1, #0xffffffff
40026b68: d51b4221 msr daif, x1
40026b6c: a94153f3 ldp x19, x20, [sp, #16]
break;
}
rtems_libio_iop_drop( iop );
return return_value;
}
40026b70: a8c27bfd ldp x29, x30, [sp], #32
40026b74: d65f03c0 ret
switch ( name ) {
40026b78: 7100103f cmp w1, #0x4
40026b7c: 54000320 b.eq 40026be0 <fpathconf+0x120> // b.none
return_value = the_limits->pipe_buf;
40026b80: b9801400 ldrsw x0, [x0, #20]
break;
40026b84: 17fffff3 b 40026b50 <fpathconf+0x90>
switch ( name ) {
40026b88: 7100243f cmp w1, #0x9
40026b8c: 54000320 b.eq 40026bf0 <fpathconf+0x130> // b.none
40026b90: 5400014d b.le 40026bb8 <fpathconf+0xf8>
40026b94: 7100283f cmp w1, #0xa
40026b98: 54000300 b.eq 40026bf8 <fpathconf+0x138> // b.none
40026b9c: 71002c3f cmp w1, #0xb
40026ba0: 54000301 b.ne 40026c00 <fpathconf+0x140> // b.any
return_value = the_limits->posix_sync_io;
40026ba4: b9802800 ldrsw x0, [x0, #40]
break;
40026ba8: 17ffffea b 40026b50 <fpathconf+0x90>
switch ( name ) {
40026bac: 350002a1 cbnz w1, 40026c00 <fpathconf+0x140> <== NEVER TAKEN
return_value = the_limits->link_max;
40026bb0: b9800000 ldrsw x0, [x0]
break;
40026bb4: 17ffffe7 b 40026b50 <fpathconf+0x90>
switch ( name ) {
40026bb8: 71001c3f cmp w1, #0x7
40026bbc: 540002e0 b.eq 40026c18 <fpathconf+0x158> // b.none
40026bc0: 7100203f cmp w1, #0x8
40026bc4: 540001e1 b.ne 40026c00 <fpathconf+0x140> // b.any <== NEVER TAKEN
return_value = the_limits->posix_vdisable;
40026bc8: b9802c00 ldrsw x0, [x0, #44]
break;
40026bcc: 17ffffe1 b 40026b50 <fpathconf+0x90>
return_value = the_limits->posix_chown_restrictions;
40026bd0: b9801c00 ldrsw x0, [x0, #28]
break;
40026bd4: 17ffffdf b 40026b50 <fpathconf+0x90>
return_value = the_limits->name_max;
40026bd8: b9800c00 ldrsw x0, [x0, #12]
break;
40026bdc: 17ffffdd b 40026b50 <fpathconf+0x90>
return_value = the_limits->path_max;
40026be0: b9801000 ldrsw x0, [x0, #16]
break;
40026be4: 17ffffdb b 40026b50 <fpathconf+0x90>
return_value = the_limits->max_canon;
40026be8: b9800400 ldrsw x0, [x0, #4]
break;
40026bec: 17ffffd9 b 40026b50 <fpathconf+0x90>
return_value = the_limits->posix_async_io;
40026bf0: b9801800 ldrsw x0, [x0, #24]
break;
40026bf4: 17ffffd7 b 40026b50 <fpathconf+0x90>
return_value = the_limits->posix_prio_io;
40026bf8: b9802400 ldrsw x0, [x0, #36]
break;
40026bfc: 17ffffd5 b 40026b50 <fpathconf+0x90>
errno = EINVAL;
40026c00: 94001923 bl 4002d08c <__errno>
40026c04: aa0003e1 mov x1, x0
40026c08: 528002c2 mov w2, #0x16 // #22
return_value = -1;
40026c0c: 92800000 mov x0, #0xffffffffffffffff // #-1
errno = EINVAL;
40026c10: b9000022 str w2, [x1]
break;
40026c14: 17ffffcf b 40026b50 <fpathconf+0x90>
return_value = the_limits->posix_no_trunc;
40026c18: b9802000 ldrsw x0, [x0, #32]
break;
40026c1c: 17ffffcd b 40026b50 <fpathconf+0x90>
LIBIO_GET_IOP( fd, iop );
40026c20: 9400191b bl 4002d08c <__errno>
40026c24: aa0003e1 mov x1, x0
40026c28: 52800122 mov w2, #0x9 // #9
40026c2c: 92800000 mov x0, #0xffffffffffffffff // #-1
40026c30: b9000022 str w2, [x1]
40026c34: 17ffffcf b 40026b70 <fpathconf+0xb0>
__asm__ volatile (
40026c38: d53b4220 mrs x0, daif <== NOT EXECUTED
40026c3c: d50342df msr daifset, #0x2 <== NOT EXECUTED
40026c40: b8736a81 ldr w1, [x20, x19] <== NOT EXECUTED
40026c44: 51400421 sub w1, w1, #0x1, lsl #12 <== NOT EXECUTED
40026c48: b8336a81 str w1, [x20, x19] <== NOT EXECUTED
__asm__ volatile (
40026c4c: 92407c00 and x0, x0, #0xffffffff <== NOT EXECUTED
40026c50: d51b4220 msr daif, x0 <== NOT EXECUTED
40026c54: 9400190e bl 4002d08c <__errno> <== NOT EXECUTED
40026c58: aa0003e1 mov x1, x0 <== NOT EXECUTED
40026c5c: 52800122 mov w2, #0x9 // #9 <== NOT EXECUTED
40026c60: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
40026c64: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40026c68: b9000022 str w2, [x1] <== NOT EXECUTED
40026c6c: 17ffffc1 b 40026b70 <fpathconf+0xb0> <== NOT EXECUTED
000000004003b640 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
4003b640: a9bd7bfd stp x29, x30, [sp, #-48]!
4003b644: 910003fd mov x29, sp
int rv;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
4003b648: b4000861 cbz x1, 4003b754 <fstat+0x114> <== NEVER TAKEN
4003b64c: a90153f3 stp x19, x20, [sp, #16]
4003b650: 93407c13 sxtw x19, w0
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Now process the stat() request.
*/
LIBIO_GET_IOP( fd, iop );
4003b654: b0000000 adrp x0, 4003c000 <_Scheduler_Table+0x48>
4003b658: b941f800 ldr w0, [x0, #504]
4003b65c: 6b00027f cmp w19, w0
4003b660: 540004e2 b.cs 4003b6fc <fstat+0xbc> // b.hs, b.nlast
return &rtems_libio_iops[ fd ];
4003b664: f90013f5 str x21, [sp, #32]
4003b668: 52800a15 mov w21, #0x50 // #80
4003b66c: aa0103e3 mov x3, x1
4003b670: f0000634 adrp x20, 40102000 <_Configuration_Scheduler_priority_dflt+0x15d0>
4003b674: 913f8294 add x20, x20, #0xfe0
4003b678: 9b357e75 smull x21, w19, w21
__asm__ volatile (
4003b67c: d53b4220 mrs x0, daif
4003b680: d50342df msr daifset, #0x2
val = *obj;
4003b684: b8746aa1 ldr w1, [x21, x20]
*obj = val + arg;
4003b688: 11400422 add w2, w1, #0x1, lsl #12
4003b68c: b8346aa2 str w2, [x21, x20]
__asm__ volatile (
4003b690: 92407c00 and x0, x0, #0xffffffff
4003b694: d51b4220 msr daif, x0
4003b698: 36400401 tbz w1, #8, 4003b718 <fstat+0xd8>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
4003b69c: aa0303e0 mov x0, x3
4003b6a0: d2800d02 mov x2, #0x68 // #104
4003b6a4: 52800001 mov w1, #0x0 // #0
4003b6a8: 97ffce13 bl 4002eef4 <memset>
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
4003b6ac: d2800a02 mov x2, #0x50 // #80
memset( sbuf, 0, sizeof(struct stat) );
4003b6b0: aa0003e3 mov x3, x0
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
4003b6b4: 910042a0 add x0, x21, #0x10
4003b6b8: aa0303e1 mov x1, x3
4003b6bc: 9b025273 madd x19, x19, x2, x20
4003b6c0: 8b000280 add x0, x20, x0
4003b6c4: f9401a62 ldr x2, [x19, #48]
4003b6c8: f9401842 ldr x2, [x2, #48]
4003b6cc: d63f0040 blr x2
__asm__ volatile (
4003b6d0: d53b4221 mrs x1, daif
4003b6d4: d50342df msr daifset, #0x2
*obj = val - arg;
4003b6d8: b8746aa2 ldr w2, [x21, x20]
4003b6dc: 51400442 sub w2, w2, #0x1, lsl #12
4003b6e0: b8346aa2 str w2, [x21, x20]
__asm__ volatile (
4003b6e4: 92407c21 and x1, x1, #0xffffffff
4003b6e8: d51b4221 msr daif, x1
4003b6ec: a94153f3 ldp x19, x20, [sp, #16]
4003b6f0: f94013f5 ldr x21, [sp, #32]
rtems_libio_iop_drop( iop );
return rv;
}
4003b6f4: a8c37bfd ldp x29, x30, [sp], #48
4003b6f8: d65f03c0 ret
LIBIO_GET_IOP( fd, iop );
4003b6fc: 97ffcc71 bl 4002e8c0 <__errno>
4003b700: aa0003e1 mov x1, x0
4003b704: 52800122 mov w2, #0x9 // #9
4003b708: 12800000 mov w0, #0xffffffff // #-1
4003b70c: a94153f3 ldp x19, x20, [sp, #16]
4003b710: b9000022 str w2, [x1]
4003b714: 17fffff8 b 4003b6f4 <fstat+0xb4>
__asm__ volatile (
4003b718: d53b4220 mrs x0, daif
4003b71c: d50342df msr daifset, #0x2
4003b720: b8746aa1 ldr w1, [x21, x20]
4003b724: 51400421 sub w1, w1, #0x1, lsl #12
4003b728: b8346aa1 str w1, [x21, x20]
__asm__ volatile (
4003b72c: 92407c00 and x0, x0, #0xffffffff
4003b730: d51b4220 msr daif, x0
4003b734: 97ffcc63 bl 4002e8c0 <__errno>
4003b738: aa0003e1 mov x1, x0
4003b73c: 52800122 mov w2, #0x9 // #9
4003b740: 12800000 mov w0, #0xffffffff // #-1
4003b744: a94153f3 ldp x19, x20, [sp, #16]
4003b748: f94013f5 ldr x21, [sp, #32]
4003b74c: b9000022 str w2, [x1]
4003b750: 17ffffe9 b 4003b6f4 <fstat+0xb4>
rtems_set_errno_and_return_minus_one( EFAULT );
4003b754: 97ffcc5b bl 4002e8c0 <__errno> <== NOT EXECUTED
4003b758: aa0003e1 mov x1, x0 <== NOT EXECUTED
4003b75c: 528001c2 mov w2, #0xe // #14 <== NOT EXECUTED
4003b760: 12800000 mov w0, #0xffffffff // #-1 <== NOT EXECUTED
4003b764: b9000022 str w2, [x1] <== NOT EXECUTED
4003b768: 17ffffe3 b 4003b6f4 <fstat+0xb4> <== NOT EXECUTED
4003b76c: 00000000 udf #0
0000000040026e90 <getgrent>:
return pthread_getspecific(grp_key);
}
struct group *getgrent(void)
{
40026e90: a9be7bfd stp x29, x30, [sp, #-32]!
pthread_once(&grp_once, grp_init);
40026e94: 90000001 adrp x1, 40026000 <_Thread_Kill_zombies+0x60>
40026e98: b00006e0 adrp x0, 40103000 <_Thread_Objects+0x540>
{
40026e9c: 910003fd mov x29, sp
pthread_once(&grp_once, grp_init);
40026ea0: 9139c021 add x1, x1, #0xe70
40026ea4: 910d0000 add x0, x0, #0x340
{
40026ea8: f9000bf3 str x19, [sp, #16]
pthread_once(&grp_once, grp_init);
40026eac: 97fff77d bl 40024ca0 <pthread_once>
return pthread_getspecific(grp_key);
40026eb0: b00006e0 adrp x0, 40103000 <_Thread_Objects+0x540>
40026eb4: b9433c00 ldr w0, [x0, #828]
40026eb8: 9400046a bl 40028060 <pthread_getspecific>
grp_context *ctx = grp_get_context();
if (ctx == NULL)
40026ebc: b40001c0 cbz x0, 40026ef4 <getgrent+0x64>
return NULL;
if (ctx->fp == NULL)
40026ec0: aa0003e2 mov x2, x0
40026ec4: f9400000 ldr x0, [x0]
40026ec8: b4000160 cbz x0, 40026ef4 <getgrent+0x64> <== NEVER TAKEN
return NULL;
if (!_libcsupport_scangr(ctx->fp, &ctx->grp, ctx->buf, sizeof(ctx->buf)))
40026ecc: 91042053 add x19, x2, #0x108
40026ed0: d2802003 mov x3, #0x100 // #256
40026ed4: 91002042 add x2, x2, #0x8
40026ed8: aa1303e1 mov x1, x19
40026edc: 97ffebf5 bl 40021eb0 <_libcsupport_scangr>
40026ee0: 340000a0 cbz w0, 40026ef4 <getgrent+0x64>
return NULL;
return &ctx->grp;
}
40026ee4: aa1303e0 mov x0, x19
40026ee8: f9400bf3 ldr x19, [sp, #16]
40026eec: a8c27bfd ldp x29, x30, [sp], #32
40026ef0: d65f03c0 ret
return NULL;
40026ef4: d2800013 mov x19, #0x0 // #0
}
40026ef8: aa1303e0 mov x0, x19
40026efc: f9400bf3 ldr x19, [sp, #16]
40026f00: a8c27bfd ldp x29, x30, [sp], #32
40026f04: d65f03c0 ret
...
0000000040021250 <getgroups>:
*/
int getgroups(
int gidsetsize,
gid_t grouplist[]
)
{
40021250: a9a77bfd stp x29, x30, [sp, #-400]!
40021254: 910003fd mov x29, sp
40021258: a9025bf5 stp x21, x22, [sp, #32]
4002125c: 2a0003f6 mov w22, w0
40021260: a90363f7 stp x23, x24, [sp, #48]
40021264: aa0103f8 mov x24, x1
char buf[256];
gid_t gid;
const char *user;
struct group *grp;
rv = getpwuid_r(getuid(), &pwd, &buf[0], sizeof(buf), &pwd_res);
40021268: 9400003a bl 40021350 <getuid>
4002126c: 910143e4 add x4, sp, #0x50
40021270: 910243e2 add x2, sp, #0x90
40021274: 910163e1 add x1, sp, #0x58
40021278: d2802003 mov x3, #0x100 // #256
4002127c: 94000301 bl 40021e80 <getpwuid_r>
40021280: 2a0003f5 mov w21, w0
if (rv != 0) {
40021284: 340000c0 cbz w0, 4002129c <getgroups+0x4c>
if (gidsetsize == 0 || rv <= gidsetsize) {
return rv;
} else {
rtems_set_errno_and_return_minus_one(EINVAL);
}
}
40021288: 2a1503e0 mov w0, w21
4002128c: a9425bf5 ldp x21, x22, [sp, #32]
40021290: a94363f7 ldp x23, x24, [sp, #48]
40021294: a8d97bfd ldp x29, x30, [sp], #400
40021298: d65f03c0 ret
gid = pwd.pw_gid;
4002129c: 7940d7f7 ldrh w23, [sp, #106]
user = pwd.pw_name;
400212a0: a90153f3 stp x19, x20, [sp, #16]
400212a4: f90023f9 str x25, [sp, #64]
400212a8: f9402ff4 ldr x20, [sp, #88]
setgrent();
400212ac: 94001719 bl 40026f10 <setgrent>
while ((grp = getgrent()) != NULL) {
400212b0: 940016f8 bl 40026e90 <getgrent>
400212b4: b4000260 cbz x0, 40021300 <getgroups+0xb0>
if (grp->gr_gid == gid) {
400212b8: 79402019 ldrh w25, [x0, #16]
400212bc: 6b17033f cmp w25, w23
400212c0: 54ffff80 b.eq 400212b0 <getgroups+0x60> // b.none
char **mem = &grp->gr_mem[0];
400212c4: f9400c13 ldr x19, [x0, #24]
while (*mem != NULL) {
400212c8: f9400260 ldr x0, [x19]
400212cc: b5000080 cbnz x0, 400212dc <getgroups+0x8c> <== ALWAYS TAKEN
400212d0: 17fffff8 b 400212b0 <getgroups+0x60> <== NOT EXECUTED
400212d4: f8408e60 ldr x0, [x19, #8]!
400212d8: b4fffec0 cbz x0, 400212b0 <getgroups+0x60>
if (strcmp(*mem, user) == 0) {
400212dc: aa1403e1 mov x1, x20
400212e0: 9400430a bl 40031f08 <strcmp>
400212e4: 35ffff80 cbnz w0, 400212d4 <getgroups+0x84>
if (rv < gidsetsize) {
400212e8: 6b1602bf cmp w21, w22
400212ec: 5400004a b.ge 400212f4 <getgroups+0xa4> // b.tcont
grouplist[rv] = grp->gr_gid;
400212f0: 7835db19 strh w25, [x24, w21, sxtw #1]
++rv;
400212f4: 110006b5 add w21, w21, #0x1
while ((grp = getgrent()) != NULL) {
400212f8: 940016e6 bl 40026e90 <getgrent>
400212fc: b5fffde0 cbnz x0, 400212b8 <getgroups+0x68>
endgrent();
40021300: 94001734 bl 40026fd0 <endgrent>
if (gidsetsize == 0 || rv <= gidsetsize) {
40021304: 710002df cmp w22, #0x0
40021308: 7a5612a4 ccmp w21, w22, #0x4, ne // ne = any
4002130c: 5400010c b.gt 4002132c <getgroups+0xdc>
}
40021310: 2a1503e0 mov w0, w21
40021314: a94153f3 ldp x19, x20, [sp, #16]
40021318: a9425bf5 ldp x21, x22, [sp, #32]
4002131c: a94363f7 ldp x23, x24, [sp, #48]
40021320: f94023f9 ldr x25, [sp, #64]
40021324: a8d97bfd ldp x29, x30, [sp], #400
40021328: d65f03c0 ret
rtems_set_errno_and_return_minus_one(EINVAL);
4002132c: 9400375c bl 4002f09c <__errno>
40021330: 12800015 mov w21, #0xffffffff // #-1
40021334: 528002c1 mov w1, #0x16 // #22
40021338: a94153f3 ldp x19, x20, [sp, #16]
4002133c: f94023f9 ldr x25, [sp, #64]
40021340: b9000001 str w1, [x0]
40021344: 17ffffd1 b 40021288 <getgroups+0x38>
...
0000000040021260 <getlogin_r>:
if ( !name )
40021260: b40002c0 cbz x0, 400212b8 <getlogin_r+0x58>
{
40021264: a9be7bfd stp x29, x30, [sp, #-32]!
if ( namesize < LOGIN_NAME_MAX )
40021268: f100203f cmp x1, #0x8
{
4002126c: 910003fd mov x29, sp
40021270: f9000bf3 str x19, [sp, #16]
40021274: aa0003f3 mov x19, x0
return ERANGE;
40021278: 52800440 mov w0, #0x22 // #34
if ( namesize < LOGIN_NAME_MAX )
4002127c: 54000129 b.ls 400212a0 <getlogin_r+0x40> // b.plast <== ALWAYS TAKEN
pw = getpwuid(getuid());
40021280: 94000030 bl 40021340 <getuid> <== NOT EXECUTED
40021284: 9400001f bl 40021300 <getpwuid> <== NOT EXECUTED
if ( pw )
40021288: b4000120 cbz x0, 400212ac <getlogin_r+0x4c> <== NOT EXECUTED
pname = pw->pw_name;
4002128c: f9400001 ldr x1, [x0] <== NOT EXECUTED
strncpy( name, pname, LOGIN_NAME_MAX );
40021290: aa1303e0 mov x0, x19 <== NOT EXECUTED
40021294: d2800122 mov x2, #0x9 // #9 <== NOT EXECUTED
40021298: 94004141 bl 4003179c <strncpy> <== NOT EXECUTED
4002129c: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
return 0;
}
400212a0: f9400bf3 ldr x19, [sp, #16]
400212a4: a8c27bfd ldp x29, x30, [sp], #32
400212a8: d65f03c0 ret
pname = "";
400212ac: b00000c1 adrp x1, 4003a000 <test_state_strings+0x58> <== NOT EXECUTED
400212b0: 9138e021 add x1, x1, #0xe38 <== NOT EXECUTED
400212b4: 17fffff7 b 40021290 <getlogin_r+0x30> <== NOT EXECUTED
return EFAULT;
400212b8: 528001c0 mov w0, #0xe // #14
}
400212bc: d65f03c0 ret
0000000040021940 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
40021940: a9af7bfd stp x29, x30, [sp, #-272]!
int rv = 0;
if (
40021944: 7100047f cmp w3, #0x1
{
40021948: 910003fd mov x29, sp
4002194c: a90153f3 stp x19, x20, [sp, #16]
if (
40021950: 54001988 b.hi 40021c80 <mount+0x340> // b.pmore
options == RTEMS_FILESYSTEM_READ_ONLY
|| options == RTEMS_FILESYSTEM_READ_WRITE
) {
rtems_filesystem_fsmount_me_t fsmount_me_h =
40021954: 2a0303f4 mov w20, w3
40021958: a9025bf5 stp x21, x22, [sp, #32]
4002195c: aa0103f5 mov x21, x1
40021960: aa0203f6 mov x22, x2
40021964: a90363f7 stp x23, x24, [sp, #48]
40021968: aa0003f7 mov x23, x0
rtems_filesystem_get_mount_handler( filesystemtype );
4002196c: aa0203e0 mov x0, x2
40021970: a9046bf9 stp x25, x26, [sp, #64]
40021974: aa0403fa mov x26, x4
40021978: 940000de bl 40021cf0 <rtems_filesystem_get_mount_handler>
4002197c: aa0003f8 mov x24, x0
if ( fsmount_me_h != NULL ) {
40021980: b40018a0 cbz x0, 40021c94 <mount+0x354>
const char *target = target_or_null != NULL ? target_or_null : "/";
40021984: a90573fb stp x27, x28, [sp, #80]
40021988: b4000ef5 cbz x21, 40021b64 <mount+0x224>
size_t target_size = strlen( target ) + 1;
4002198c: aa1503e0 mov x0, x21
40021990: aa1503fc mov x28, x21
40021994: 94003701 bl 4002f598 <strlen>
40021998: 91000419 add x25, x0, #0x1
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
4002199c: aa1603e0 mov x0, x22
400219a0: 940036fe bl 4002f598 <strlen>
400219a4: 9100041b add x27, x0, #0x1
size_t source_size = source_or_null != NULL ?
400219a8: 91032413 add x19, x0, #0xc9
strlen( source_or_null ) + 1 : 0;
400219ac: b4000c17 cbz x23, 40021b2c <mount+0x1ec>
400219b0: aa1703e0 mov x0, x23
400219b4: 940036f9 bl 4002f598 <strlen>
400219b8: 91000400 add x0, x0, #0x1
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
400219bc: 8b190261 add x1, x19, x25
strlen( source_or_null ) + 1 : 0;
400219c0: aa0003e2 mov x2, x0
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
400219c4: d2800020 mov x0, #0x1 // #1
400219c8: 8b020021 add x1, x1, x2
strlen( source_or_null ) + 1 : 0;
400219cc: f90037e2 str x2, [sp, #104]
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
400219d0: 940019d4 bl 40028120 <calloc>
400219d4: aa0003f3 mov x19, x0
if ( mt_entry != NULL ) {
400219d8: b4000f60 cbz x0, 40021bc4 <mount+0x284> <== NEVER TAKEN
char *str = (char *) mt_fs_root + sizeof( *mt_fs_root );
400219dc: 91032003 add x3, x0, #0xc8
memcpy( str, filesystemtype, filesystemtype_size );
400219e0: aa1603e1 mov x1, x22
400219e4: aa0303e0 mov x0, x3
400219e8: aa1b03e2 mov x2, x27
rtems_filesystem_global_location_t *mt_fs_root =
400219ec: 91020276 add x22, x19, #0x80
memcpy( str, filesystemtype, filesystemtype_size );
400219f0: 94003526 bl 4002ee88 <memcpy>
str += filesystemtype_size;
400219f4: 8b1b0003 add x3, x0, x27
memcpy( str, source_or_null, source_size );
400219f8: f94037e2 ldr x2, [sp, #104]
mt_entry->type = str;
400219fc: f9003660 str x0, [x19, #104]
memcpy( str, source_or_null, source_size );
40021a00: aa1703e1 mov x1, x23
40021a04: aa0303e0 mov x0, x3
str += source_size;
40021a08: 8b020077 add x23, x3, x2
memcpy( str, source_or_null, source_size );
40021a0c: 9400351f bl 4002ee88 <memcpy>
mt_entry->dev = str;
40021a10: f9003a60 str x0, [x19, #112]
memcpy( str, target, target_size );
40021a14: aa1903e2 mov x2, x25
40021a18: aa1c03e1 mov x1, x28
40021a1c: aa1703e0 mov x0, x23
40021a20: 9400351a bl 4002ee88 <memcpy>
mt_entry->mounted = true;
40021a24: 52800021 mov w1, #0x1 // #1
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
40021a28: f00000c0 adrp x0, 4003c000 <_Scheduler_Table+0x48>
40021a2c: 91246000 add x0, x0, #0x918
mt_entry->mt_fs_root = mt_fs_root;
40021a30: f9002676 str x22, [x19, #72]
mt_entry->mounted = true;
40021a34: 39014261 strb w1, [x19, #80]
mt_fs_root->reference_count = 1;
40021a38: 52800039 mov w25, #0x1 // #1
mt_entry->target = str;
40021a3c: a905de60 stp x0, x23, [x19, #88]
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
_Chain_Initialize(
40021a40: aa1603e1 mov x1, x22
filesystemtype,
&target_length
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
40021a44: 0a190294 and w20, w20, w25
mt_fs_root->location.mt_entry = mt_entry;
40021a48: f90016d3 str x19, [x22, #40]
40021a4c: 9100a260 add x0, x19, #0x28
mt_fs_root->reference_count = 1;
40021a50: b90032d9 str w25, [x22, #48]
40021a54: d2800903 mov x3, #0x48 // #72
40021a58: d2800022 mov x2, #0x1 // #1
40021a5c: 94000c69 bl 40024c00 <_Chain_Initialize>
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
40021a60: 39014674 strb w20, [x19, #81]
rv = (*fsmount_me_h)( mt_entry, data );
40021a64: aa1a03e1 mov x1, x26
40021a68: aa1303e0 mov x0, x19
40021a6c: d63f0300 blr x24
40021a70: 2a0003f4 mov w20, w0
if ( rv == 0 ) {
40021a74: 35000480 cbnz w0, 40021b04 <mount+0x1c4>
if ( target != NULL ) {
40021a78: b4000bf5 cbz x21, 40021bf4 <mount+0x2b4>
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
40021a7c: aa1503e1 mov x1, x21
40021a80: 528003e2 mov w2, #0x1f // #31
40021a84: 9102a3e0 add x0, sp, #0xa8
40021a88: 94000226 bl 40022320 <rtems_filesystem_eval_path_start>
static inline bool rtems_filesystem_location_is_instance_root(
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
40021a8c: f9401401 ldr x1, [x0, #40]
return (*mt_entry->ops->are_nodes_equal_h)(
40021a90: f9400c22 ldr x2, [x1, #24]
40021a94: f9402421 ldr x1, [x1, #72]
40021a98: f9401042 ldr x2, [x2, #32]
40021a9c: d63f0040 blr x2
if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) {
40021aa0: 72001c1f tst w0, #0xff
40021aa4: 54001081 b.ne 40021cb4 <mount+0x374> // b.any
static inline void rtems_filesystem_eval_path_extract_currentloc(
rtems_filesystem_eval_path_context_t *ctx,
rtems_filesystem_location_info_t *get
)
{
rtems_filesystem_location_copy_and_detach(
40021aa8: 910343e1 add x1, sp, #0xd0
40021aac: 9101e3e0 add x0, sp, #0x78
40021ab0: 940003e0 bl 40022a30 <rtems_filesystem_location_copy_and_detach>
mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc );
40021ab4: 9101e3e0 add x0, sp, #0x78
40021ab8: 9400040e bl 40022af0 <rtems_filesystem_location_transform_to_global>
40021abc: aa0003f5 mov x21, x0
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
40021ac0: aa1303e0 mov x0, x19
40021ac4: f94016a1 ldr x1, [x21, #40]
40021ac8: f9400c21 ldr x1, [x1, #24]
40021acc: f9402c21 ldr x1, [x1, #88]
mt_entry->mt_point_node = mt_point_node;
40021ad0: f9002275 str x21, [x19, #64]
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
40021ad4: d63f0020 blr x1
40021ad8: 2a0003f4 mov w20, w0
if ( rv == 0 ) {
40021adc: 340004c0 cbz w0, 40021b74 <mount+0x234>
rtems_filesystem_global_location_release( mt_point_node, true );
40021ae0: 2a1903e1 mov w1, w25
40021ae4: aa1503e0 mov x0, x21
40021ae8: 9400039a bl 40022950 <rtems_filesystem_global_location_release>
rtems_filesystem_eval_path_cleanup( &ctx );
40021aec: 9102a3e0 add x0, sp, #0xa8
40021af0: 94000244 bl 40022400 <rtems_filesystem_eval_path_cleanup>
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
40021af4: f9400e61 ldr x1, [x19, #24]
40021af8: aa1303e0 mov x0, x19
40021afc: f9403421 ldr x1, [x1, #104]
40021b00: d63f0020 blr x1
}
}
if ( rv != 0 ) {
free( mt_entry );
40021b04: aa1303e0 mov x0, x19
40021b08: 940019ae bl 400281c0 <free>
40021b0c: a9425bf5 ldp x21, x22, [sp, #32]
40021b10: a94363f7 ldp x23, x24, [sp, #48]
40021b14: a9446bf9 ldp x25, x26, [sp, #64]
40021b18: a94573fb ldp x27, x28, [sp, #80]
errno = EINVAL;
rv = -1;
}
return rv;
}
40021b1c: 2a1403e0 mov w0, w20
40021b20: a94153f3 ldp x19, x20, [sp, #16]
40021b24: a8d17bfd ldp x29, x30, [sp], #272
40021b28: d65f03c0 ret
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
40021b2c: 8b190261 add x1, x19, x25
40021b30: d2800020 mov x0, #0x1 // #1
40021b34: 9400197b bl 40028120 <calloc>
40021b38: aa0003f3 mov x19, x0
if ( mt_entry != NULL ) {
40021b3c: b4000440 cbz x0, 40021bc4 <mount+0x284> <== NEVER TAKEN
char *str = (char *) mt_fs_root + sizeof( *mt_fs_root );
40021b40: 91032263 add x3, x19, #0xc8
memcpy( str, filesystemtype, filesystemtype_size );
40021b44: aa1603e1 mov x1, x22
40021b48: aa0303e0 mov x0, x3
40021b4c: aa1b03e2 mov x2, x27
str += filesystemtype_size;
40021b50: 8b1b0077 add x23, x3, x27
rtems_filesystem_global_location_t *mt_fs_root =
40021b54: 91020276 add x22, x19, #0x80
memcpy( str, filesystemtype, filesystemtype_size );
40021b58: 940034cc bl 4002ee88 <memcpy>
mt_entry->type = str;
40021b5c: f9003660 str x0, [x19, #104]
if ( source_or_null != NULL ) {
40021b60: 17ffffad b 40021a14 <mount+0xd4>
const char *target = target_or_null != NULL ? target_or_null : "/";
40021b64: d00000dc adrp x28, 4003b000 <__sfvwrite_r+0x5d4>
40021b68: 913ac39c add x28, x28, #0xeb0
40021b6c: d2800059 mov x25, #0x2 // #2
40021b70: 17ffff8b b 4002199c <mount+0x5c>
rtems_libio_lock();
40021b74: 94001a13 bl 400283c0 <rtems_libio_lock>
Chain_Node *old_last;
_Assert( _Chain_Is_node_off_chain( the_node ) );
tail = _Chain_Tail( the_chain );
old_last = tail->previous;
40021b78: f00006e0 adrp x0, 40100000 <_RTEMS_tasks_Information>
40021b7c: 9104e000 add x0, x0, #0x138
the_node->next = tail;
40021b80: 91002001 add x1, x0, #0x8
40021b84: f9000261 str x1, [x19]
old_last = tail->previous;
40021b88: f9400801 ldr x1, [x0, #16]
tail->previous = the_node;
40021b8c: f9000813 str x19, [x0, #16]
old_last->next = the_node;
40021b90: f9000033 str x19, [x1]
the_node->previous = old_last;
40021b94: f9000661 str x1, [x19, #8]
rtems_libio_unlock();
40021b98: 94001a0e bl 400283d0 <rtems_libio_unlock>
rtems_filesystem_eval_path_cleanup( &ctx );
40021b9c: 9102a3e0 add x0, sp, #0xa8
40021ba0: 94000218 bl 40022400 <rtems_filesystem_eval_path_cleanup>
}
40021ba4: 2a1403e0 mov w0, w20
40021ba8: a94153f3 ldp x19, x20, [sp, #16]
40021bac: a9425bf5 ldp x21, x22, [sp, #32]
40021bb0: a94363f7 ldp x23, x24, [sp, #48]
40021bb4: a9446bf9 ldp x25, x26, [sp, #64]
40021bb8: a94573fb ldp x27, x28, [sp, #80]
40021bbc: a8d17bfd ldp x29, x30, [sp], #272
40021bc0: d65f03c0 ret
errno = ENOMEM;
40021bc4: 9400333f bl 4002e8c0 <__errno> <== NOT EXECUTED
rv = -1;
40021bc8: 12800014 mov w20, #0xffffffff // #-1 <== NOT EXECUTED
errno = ENOMEM;
40021bcc: 52800181 mov w1, #0xc // #12 <== NOT EXECUTED
40021bd0: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
40021bd4: a94363f7 ldp x23, x24, [sp, #48] <== NOT EXECUTED
40021bd8: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
40021bdc: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
40021be0: b9000001 str w1, [x0] <== NOT EXECUTED
}
40021be4: 2a1403e0 mov w0, w20 <== NOT EXECUTED
40021be8: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40021bec: a8d17bfd ldp x29, x30, [sp], #272 <== NOT EXECUTED
40021bf0: d65f03c0 ret <== NOT EXECUTED
rtems_libio_lock();
40021bf4: 940019f3 bl 400283c0 <rtems_libio_lock>
return _Chain_Immutable_head( the_chain )->next;
40021bf8: f00006e1 adrp x1, 40100000 <_RTEMS_tasks_Information>
40021bfc: 9104e020 add x0, x1, #0x138
if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) {
40021c00: 91002002 add x2, x0, #0x8
40021c04: f9409c21 ldr x1, [x1, #312]
40021c08: eb02003f cmp x1, x2
40021c0c: 54000621 b.ne 40021cd0 <mount+0x390> // b.any <== NEVER TAKEN
old_last = tail->previous;
40021c10: f9400802 ldr x2, [x0, #16]
the_node->next = tail;
40021c14: f9000261 str x1, [x19]
tail->previous = the_node;
40021c18: f9000813 str x19, [x0, #16]
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
40021c1c: 91012276 add x22, x19, #0x48
old_last->next = the_node;
40021c20: f9000053 str x19, [x2]
the_node->previous = old_last;
40021c24: f9000662 str x2, [x19, #8]
rtems_libio_unlock();
40021c28: 940019ea bl 400283d0 <rtems_libio_unlock>
40021c2c: aa1603e0 mov x0, x22
40021c30: 94000310 bl 40022870 <rtems_filesystem_global_location_obtain>
40021c34: aa0003f5 mov x21, x0
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
40021c38: aa1603e0 mov x0, x22
40021c3c: 9400030d bl 40022870 <rtems_filesystem_global_location_obtain>
40021c40: aa0003f3 mov x19, x0
&rtems_filesystem_root,
40021c44: 9400041b bl 40022cb0 <rtems_current_user_env_get>
rtems_filesystem_global_location_assign(
40021c48: 91002000 add x0, x0, #0x8
40021c4c: aa1503e1 mov x1, x21
40021c50: 940002a0 bl 400226d0 <rtems_filesystem_global_location_assign>
&rtems_filesystem_current,
40021c54: 94000417 bl 40022cb0 <rtems_current_user_env_get>
rtems_filesystem_global_location_assign(
40021c58: aa1303e1 mov x1, x19
40021c5c: 9400029d bl 400226d0 <rtems_filesystem_global_location_assign>
}
40021c60: 2a1403e0 mov w0, w20
40021c64: a94153f3 ldp x19, x20, [sp, #16]
40021c68: a9425bf5 ldp x21, x22, [sp, #32]
40021c6c: a94363f7 ldp x23, x24, [sp, #48]
40021c70: a9446bf9 ldp x25, x26, [sp, #64]
40021c74: a94573fb ldp x27, x28, [sp, #80]
40021c78: a8d17bfd ldp x29, x30, [sp], #272
40021c7c: d65f03c0 ret
errno = EINVAL;
40021c80: 94003310 bl 4002e8c0 <__errno>
rv = -1;
40021c84: 12800014 mov w20, #0xffffffff // #-1
errno = EINVAL;
40021c88: 528002c1 mov w1, #0x16 // #22
40021c8c: b9000001 str w1, [x0]
return rv;
40021c90: 17ffffa3 b 40021b1c <mount+0x1dc>
errno = EINVAL;
40021c94: 9400330b bl 4002e8c0 <__errno>
rv = -1;
40021c98: 12800014 mov w20, #0xffffffff // #-1
errno = EINVAL;
40021c9c: 528002c1 mov w1, #0x16 // #22
40021ca0: a9425bf5 ldp x21, x22, [sp, #32]
40021ca4: a94363f7 ldp x23, x24, [sp, #48]
40021ca8: a9446bf9 ldp x25, x26, [sp, #64]
40021cac: b9000001 str w1, [x0]
rv = -1;
40021cb0: 17ffff9b b 40021b1c <mount+0x1dc>
rtems_filesystem_eval_path_error( &ctx, EBUSY );
40021cb4: 52800201 mov w1, #0x10 // #16
40021cb8: 9102a3e0 add x0, sp, #0xa8
40021cbc: 940001b5 bl 40022390 <rtems_filesystem_eval_path_error>
rv = -1;
40021cc0: 12800014 mov w20, #0xffffffff // #-1
rtems_filesystem_eval_path_cleanup( &ctx );
40021cc4: 9102a3e0 add x0, sp, #0xa8
40021cc8: 940001ce bl 40022400 <rtems_filesystem_eval_path_cleanup>
if ( rv != 0 ) {
40021ccc: 17ffff8a b 40021af4 <mount+0x1b4>
errno = EINVAL;
40021cd0: 940032fc bl 4002e8c0 <__errno> <== NOT EXECUTED
rv = -1;
40021cd4: 12800014 mov w20, #0xffffffff // #-1 <== NOT EXECUTED
errno = EINVAL;
40021cd8: 528002c1 mov w1, #0x16 // #22 <== NOT EXECUTED
40021cdc: b9000001 str w1, [x0] <== NOT EXECUTED
40021ce0: 940019bc bl 400283d0 <rtems_libio_unlock> <== NOT EXECUTED
if ( rv != 0 ) {
40021ce4: 17ffff84 b 40021af4 <mount+0x1b4> <== NOT EXECUTED
...
0000000040023d20 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
40023d20: a9bc7bfd stp x29, x30, [sp, #-64]!
40023d24: 910003fd mov x29, sp
int rv = -1;
if (target != NULL) {
40023d28: b4000381 cbz x1, 40023d98 <mount_and_make_target_path+0x78>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
40023d2c: a90153f3 stp x19, x20, [sp, #16]
40023d30: aa0103f3 mov x19, x1
40023d34: aa0003f4 mov x20, x0
40023d38: 52803fe1 mov w1, #0x1ff // #511
40023d3c: aa1303e0 mov x0, x19
40023d40: a9025bf5 stp x21, x22, [sp, #32]
40023d44: aa0203f5 mov x21, x2
40023d48: 2a0303f6 mov w22, w3
40023d4c: f9001bf7 str x23, [sp, #48]
40023d50: aa0403f7 mov x23, x4
40023d54: 940002e7 bl 400248f0 <rtems_mkdir>
if (rv == 0) {
40023d58: 340000c0 cbz w0, 40023d70 <mount_and_make_target_path+0x50> <== ALWAYS TAKEN
40023d5c: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40023d60: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
40023d64: f9401bf7 ldr x23, [sp, #48] <== NOT EXECUTED
} else {
errno = EINVAL;
}
return rv;
}
40023d68: a8c47bfd ldp x29, x30, [sp], #64
40023d6c: d65f03c0 ret
rv = mount(
40023d70: aa1703e4 mov x4, x23
40023d74: 2a1603e3 mov w3, w22
40023d78: aa1503e2 mov x2, x21
40023d7c: aa1303e1 mov x1, x19
40023d80: aa1403e0 mov x0, x20
40023d84: a94153f3 ldp x19, x20, [sp, #16]
40023d88: a9425bf5 ldp x21, x22, [sp, #32]
40023d8c: f9401bf7 ldr x23, [sp, #48]
}
40023d90: a8c47bfd ldp x29, x30, [sp], #64
rv = mount(
40023d94: 17fffec7 b 400238b0 <mount>
errno = EINVAL;
40023d98: 940066ce bl 4003d8d0 <__errno>
40023d9c: aa0003e1 mov x1, x0
40023da0: 528002c2 mov w2, #0x16 // #22
int rv = -1;
40023da4: 12800000 mov w0, #0xffffffff // #-1
errno = EINVAL;
40023da8: b9000022 str w2, [x1]
return rv;
40023dac: 17ffffef b 40023d68 <mount_and_make_target_path+0x48>
000000004002a700 <open>:
/**
* POSIX 1003.1 5.3.1 - Open a File
*/
int open( const char *path, int oflag, ... )
{
4002a700: a9ab7bfd stp x29, x30, [sp, #-336]!
4002a704: 910003fd mov x29, sp
4002a708: a90153f3 stp x19, x20, [sp, #16]
4002a70c: 2a0103f4 mov w20, w1
int rv = 0;
va_list ap;
mode_t mode = 0;
rtems_libio_t *iop = NULL;
va_start( ap, oflag );
4002a710: 910543e1 add x1, sp, #0x150
{
4002a714: a9025bf5 stp x21, x22, [sp, #32]
4002a718: aa0003f6 mov x22, x0
va_start( ap, oflag );
4002a71c: 910503e0 add x0, sp, #0x140
{
4002a720: a90363f7 stp x23, x24, [sp, #48]
4002a724: 2a0203f7 mov w23, w2
va_start( ap, oflag );
4002a728: a90507e1 stp x1, x1, [sp, #80]
4002a72c: f90033e0 str x0, [sp, #96]
4002a730: 290d7fff stp wzr, wzr, [sp, #104]
{
4002a734: f900a7e2 str x2, [sp, #328]
mode = va_arg( ap, mode_t );
iop = rtems_libio_allocate();
4002a738: 94000352 bl 4002b480 <rtems_libio_allocate>
if ( iop != NULL ) {
4002a73c: b40010c0 cbz x0, 4002a954 <open+0x254>
int rwflag = oflag + 1;
4002a740: 11000685 add w5, w20, #0x1
int follow = (oflag & O_NOFOLLOW) == O_NOFOLLOW ? 0 : RTEMS_FS_FOLLOW_LINK;
4002a744: f26c029f tst x20, #0x100000
4002a748: 52800304 mov w4, #0x18 // #24
4002a74c: 1a8413e4 csel w4, wzr, w4, ne // ne = any
4002a750: aa0003f3 mov x19, x0
| (read_access ? RTEMS_FS_PERMS_READ : 0)
4002a754: f24000bf tst x5, #0x1
4002a758: 321e0080 orr w0, w4, #0x4
4002a75c: 1a841004 csel w4, w0, w4, ne // ne = any
| (write_access ? RTEMS_FS_PERMS_WRITE : 0)
4002a760: 721f00b5 ands w21, w5, #0x2
4002a764: 321f0081 orr w1, w4, #0x2
bool exclusive = (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL);
4002a768: 52814000 mov w0, #0xa00 // #2560
| (write_access ? RTEMS_FS_PERMS_WRITE : 0)
4002a76c: 1a841024 csel w4, w1, w4, ne // ne = any
bool exclusive = (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL);
4002a770: 0a000280 and w0, w20, w0
| (make ? RTEMS_FS_MAKE : 0)
4002a774: f277029f tst x20, #0x200
4002a778: 321b0081 orr w1, w4, #0x20
4002a77c: 1a841024 csel w4, w1, w4, ne // ne = any
int eval_flags = follow
4002a780: 7128001f cmp w0, #0xa00
4002a784: 321a0082 orr w2, w4, #0x40
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
4002a788: 9101c3e0 add x0, sp, #0x70
4002a78c: 1a840042 csel w2, w2, w4, eq // eq = none
4002a790: aa1603e1 mov x1, x22
4002a794: 97ffdee3 bl 40022320 <rtems_filesystem_eval_path_start>
return ctx->tokenlen > 0;
4002a798: f94047f8 ldr x24, [sp, #136]
if ( rtems_filesystem_eval_path_has_token( &ctx ) ) {
4002a79c: b5000a38 cbnz x24, 4002a8e0 <open+0x1e0>
open_dir = ( oflag & O_DIRECTORY ) == O_DIRECTORY;
4002a7a0: 120b0298 and w24, w20, #0x200000
if ( write_access || open_dir ) {
4002a7a4: 2a1802a0 orr w0, w21, w24
4002a7a8: 34000200 cbz w0, 4002a7e8 <open+0xe8>
)
{
struct stat st;
st.st_mode = 0;
(void) ( *loc->handlers->fstat_h )( loc, &st );
4002a7ac: f9405fe2 ldr x2, [sp, #184]
st.st_mode = 0;
4002a7b0: b900ebff str wzr, [sp, #232]
(void) ( *loc->handlers->fstat_h )( loc, &st );
4002a7b4: 910363e1 add x1, sp, #0xd8
4002a7b8: 910263e0 add x0, sp, #0x98
4002a7bc: f9401842 ldr x2, [x2, #48]
4002a7c0: d63f0040 blr x2
return st.st_mode;
4002a7c4: b940ebe0 ldr w0, [sp, #232]
if ( write_access && S_ISDIR( type ) ) {
4002a7c8: 34000ab5 cbz w21, 4002a91c <open+0x21c>
4002a7cc: 12140c00 and w0, w0, #0xf000
4002a7d0: 7140101f cmp w0, #0x4, lsl #12
4002a7d4: 54000b80 b.eq 4002a944 <open+0x244> // b.none
if ( open_dir && !S_ISDIR( type ) ) {
4002a7d8: 34000098 cbz w24, 4002a7e8 <open+0xe8> <== ALWAYS TAKEN
rtems_filesystem_eval_path_error( &ctx, ENOTDIR );
4002a7dc: 9101c3e0 add x0, sp, #0x70
4002a7e0: 52800281 mov w1, #0x14 // #20
4002a7e4: 97ffdeeb bl 40022390 <rtems_filesystem_eval_path_error>
rtems_filesystem_location_copy_and_detach(
4002a7e8: 910263e1 add x1, sp, #0x98
4002a7ec: 91004260 add x0, x19, #0x10
4002a7f0: 97ffe090 bl 40022a30 <rtems_filesystem_location_copy_and_detach>
rtems_filesystem_eval_path_cleanup( &ctx );
4002a7f4: 9101c3e0 add x0, sp, #0x70
4002a7f8: 97ffdf02 bl 40022400 <rtems_filesystem_eval_path_cleanup>
rtems_libio_iop_flags_set( iop, rtems_libio_fcntl_flags( oflag ) );
4002a7fc: 2a1403e0 mov w0, w20
4002a800: 9400030c bl 4002b430 <rtems_libio_fcntl_flags>
__asm__ volatile (
4002a804: d53b4221 mrs x1, daif
4002a808: d50342df msr daifset, #0x2
ISR_Level level;
(void) order;
_ISR_Local_disable( level );
val = *obj;
*obj = val | arg;
4002a80c: b9400262 ldr w2, [x19]
4002a810: 2a000040 orr w0, w2, w0
4002a814: b9000260 str w0, [x19]
__asm__ volatile (
4002a818: 92407c20 and x0, x1, #0xffffffff
4002a81c: d51b4220 msr daif, x0
rv = (*iop->pathinfo.handlers->open_h)( iop, path, oflag, mode );
4002a820: f9401a64 ldr x4, [x19, #48]
4002a824: 2a1703e3 mov w3, w23
4002a828: aa1603e1 mov x1, x22
4002a82c: 2a1403e2 mov w2, w20
4002a830: aa1303e0 mov x0, x19
4002a834: f9400084 ldr x4, [x4]
4002a838: d63f0080 blr x4
4002a83c: 2a0003f5 mov w21, w0
if ( rv == 0 ) {
4002a840: 34000100 cbz w0, 4002a860 <open+0x160>
if ( rv < 0 ) {
4002a844: 37f803f5 tbnz w21, #31, 4002a8c0 <open+0x1c0>
}
va_end( ap );
return rv;
}
4002a848: 2a1503e0 mov w0, w21
4002a84c: a94153f3 ldp x19, x20, [sp, #16]
4002a850: a9425bf5 ldp x21, x22, [sp, #32]
4002a854: a94363f7 ldp x23, x24, [sp, #48]
4002a858: a8d57bfd ldp x29, x30, [sp], #336
4002a85c: d65f03c0 ret
int fd = rtems_libio_iop_to_descriptor( iop );
4002a860: 900006c0 adrp x0, 40102000 <_Configuration_Scheduler_priority_dflt+0x15d0>
4002a864: 913f8000 add x0, x0, #0xfe0
4002a868: cb000260 sub x0, x19, x0
4002a86c: b202e7e1 mov x1, #0xcccccccccccccccc // #-3689348814741910324
4002a870: f29999a1 movk x1, #0xcccd
4002a874: 9344fc00 asr x0, x0, #4
4002a878: 9b017c00 mul x0, x0, x1
4002a87c: 2a0003f5 mov w21, w0
__asm__ volatile (
4002a880: d53b4221 mrs x1, daif
4002a884: d50342df msr daifset, #0x2
4002a888: b9400262 ldr w2, [x19]
4002a88c: 32180042 orr w2, w2, #0x100
4002a890: b9000262 str w2, [x19]
__asm__ volatile (
4002a894: 92407c21 and x1, x1, #0xffffffff
4002a898: d51b4221 msr daif, x1
if ( truncate ) {
4002a89c: 3657fd54 tbz w20, #10, 4002a844 <open+0x144>
rv = ftruncate( fd, 0 );
4002a8a0: d2800001 mov x1, #0x0 // #0
4002a8a4: 9400029b bl 4002b310 <ftruncate>
if ( rv != 0 ) {
4002a8a8: 34fffce0 cbz w0, 4002a844 <open+0x144>
(*iop->pathinfo.handlers->close_h)( iop );
4002a8ac: f9401a61 ldr x1, [x19, #48]
4002a8b0: aa1303e0 mov x0, x19
rv = -1;
4002a8b4: 12800015 mov w21, #0xffffffff // #-1
(*iop->pathinfo.handlers->close_h)( iop );
4002a8b8: f9400421 ldr x1, [x1, #8]
4002a8bc: d63f0020 blr x1
rtems_libio_free( iop );
4002a8c0: aa1303e0 mov x0, x19
4002a8c4: 94000307 bl 4002b4e0 <rtems_libio_free>
}
4002a8c8: 2a1503e0 mov w0, w21
4002a8cc: a94153f3 ldp x19, x20, [sp, #16]
4002a8d0: a9425bf5 ldp x21, x22, [sp, #32]
4002a8d4: a94363f7 ldp x23, x24, [sp, #48]
4002a8d8: a8d57bfd ldp x29, x30, [sp], #336
4002a8dc: d65f03c0 ret
return ctx->token;
4002a8e0: f90023f9 str x25, [sp, #64]
rv = rtems_filesystem_mknod(
4002a8e4: 321102e3 orr w3, w23, #0x8000
4002a8e8: f94043f9 ldr x25, [sp, #128]
4002a8ec: aa1803e2 mov x2, x24
4002a8f0: 910263e0 add x0, sp, #0x98
4002a8f4: d2800004 mov x4, #0x0 // #0
4002a8f8: aa1903e1 mov x1, x25
4002a8fc: 97ffdbc9 bl 40021820 <rtems_filesystem_mknod>
if ( rv == 0 ) {
4002a900: 35000180 cbnz w0, 4002a930 <open+0x230>
rtems_filesystem_eval_path_continue( ctx );
4002a904: 9101c3e0 add x0, sp, #0x70
ctx->pathlen = pathlen;
4002a908: a90763f9 stp x25, x24, [sp, #112]
ctx->flags = flags;
4002a90c: b90093ff str wzr, [sp, #144]
4002a910: 97ffde00 bl 40022110 <rtems_filesystem_eval_path_continue>
4002a914: f94023f9 ldr x25, [sp, #64]
4002a918: 17ffffa2 b 4002a7a0 <open+0xa0>
if ( open_dir && !S_ISDIR( type ) ) {
4002a91c: 34fff678 cbz w24, 4002a7e8 <open+0xe8> <== NEVER TAKEN
4002a920: 12140c00 and w0, w0, #0xf000
4002a924: 7140101f cmp w0, #0x4, lsl #12
4002a928: 54fff600 b.eq 4002a7e8 <open+0xe8> // b.none
4002a92c: 17ffffac b 4002a7dc <open+0xdc>
rtems_filesystem_eval_path_error( ctx, 0 );
4002a930: 9101c3e0 add x0, sp, #0x70
4002a934: 52800001 mov w1, #0x0 // #0
4002a938: 97ffde96 bl 40022390 <rtems_filesystem_eval_path_error>
4002a93c: f94023f9 ldr x25, [sp, #64]
4002a940: 17ffff98 b 4002a7a0 <open+0xa0>
rtems_filesystem_eval_path_error( &ctx, EISDIR );
4002a944: 9101c3e0 add x0, sp, #0x70
4002a948: 528002a1 mov w1, #0x15 // #21
4002a94c: 97ffde91 bl 40022390 <rtems_filesystem_eval_path_error>
if ( open_dir && !S_ISDIR( type ) ) {
4002a950: 17ffffa6 b 4002a7e8 <open+0xe8>
errno = ENFILE;
4002a954: 94000fdb bl 4002e8c0 <__errno>
rv = -1;
4002a958: 12800015 mov w21, #0xffffffff // #-1
errno = ENFILE;
4002a95c: 528002e1 mov w1, #0x17 // #23
4002a960: b9000001 str w1, [x0]
return rv;
4002a964: 17ffffb9 b 4002a848 <open+0x148>
...
000000004003b890 <read.part.0>:
#endif
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500
ssize_t pread (int __fd, void *__buf, size_t __nbytes, off_t __offset);
ssize_t pwrite (int __fd, const void *__buf, size_t __nbytes, off_t __offset);
#endif
_READ_WRITE_RETURN_TYPE read (int __fd, void *__buf, size_t __nbyte);
4003b890: a9be7bfd stp x29, x30, [sp, #-32]!
4003b894: 93407c03 sxtw x3, w0
4003b898: 910003fd mov x29, sp
4003b89c: a90153f3 stp x19, x20, [sp, #16]
4003b8a0: 52800a14 mov w20, #0x50 // #80
4003b8a4: f0000633 adrp x19, 40102000 <_Configuration_Scheduler_priority_dflt+0x15d0>
4003b8a8: 913f8273 add x19, x19, #0xfe0
4003b8ac: 9b347c74 smull x20, w3, w20
4003b8b0: 8b130280 add x0, x20, x19
__asm__ volatile (
4003b8b4: d53b4225 mrs x5, daif
4003b8b8: d50342df msr daifset, #0x2
val = *obj;
4003b8bc: b8736a84 ldr w4, [x20, x19]
*obj = val + arg;
4003b8c0: 11400486 add w6, w4, #0x1, lsl #12
4003b8c4: b8336a86 str w6, [x20, x19]
__asm__ volatile (
4003b8c8: 92407ca5 and x5, x5, #0xffffffff
4003b8cc: d51b4225 msr daif, x5
ssize_t n;
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_READ, EBADF );
4003b8d0: 52802045 mov w5, #0x102 // #258
4003b8d4: 0a050084 and w4, w4, w5
4003b8d8: 6b05009f cmp w4, w5
4003b8dc: 54000201 b.ne 4003b91c <read.part.0+0x8c> // b.any <== NEVER TAKEN
/*
* Now process the read().
*/
n = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
4003b8e0: d2800a04 mov x4, #0x50 // #80
4003b8e4: 9b044c63 madd x3, x3, x4, x19
4003b8e8: f9401863 ldr x3, [x3, #48]
4003b8ec: f9400863 ldr x3, [x3, #16]
4003b8f0: d63f0060 blr x3
__asm__ volatile (
4003b8f4: d53b4221 mrs x1, daif
4003b8f8: d50342df msr daifset, #0x2
*obj = val - arg;
4003b8fc: b8736a82 ldr w2, [x20, x19]
4003b900: 51400442 sub w2, w2, #0x1, lsl #12
4003b904: b8336a82 str w2, [x20, x19]
__asm__ volatile (
4003b908: 92407c21 and x1, x1, #0xffffffff
4003b90c: d51b4221 msr daif, x1
rtems_libio_iop_drop( iop );
return n;
}
4003b910: a94153f3 ldp x19, x20, [sp, #16]
4003b914: a8c27bfd ldp x29, x30, [sp], #32
4003b918: d65f03c0 ret
__asm__ volatile (
4003b91c: d53b4220 mrs x0, daif <== NOT EXECUTED
4003b920: d50342df msr daifset, #0x2 <== NOT EXECUTED
4003b924: b8736a81 ldr w1, [x20, x19] <== NOT EXECUTED
4003b928: 51400421 sub w1, w1, #0x1, lsl #12 <== NOT EXECUTED
4003b92c: b8336a81 str w1, [x20, x19] <== NOT EXECUTED
__asm__ volatile (
4003b930: 92407c00 and x0, x0, #0xffffffff <== NOT EXECUTED
4003b934: d51b4220 msr daif, x0 <== NOT EXECUTED
LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_READ, EBADF );
4003b938: 97ffcbe2 bl 4002e8c0 <__errno> <== NOT EXECUTED
4003b93c: aa0003e1 mov x1, x0 <== NOT EXECUTED
4003b940: 52800122 mov w2, #0x9 // #9 <== NOT EXECUTED
4003b944: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
4003b948: b9000022 str w2, [x1] <== NOT EXECUTED
4003b94c: 17fffff1 b 4003b910 <read.part.0+0x80> <== NOT EXECUTED
000000004003b9e0 <realloc>:
return new_ptr;
}
void *realloc( void *ptr, size_t size )
{
4003b9e0: a9bc7bfd stp x29, x30, [sp, #-64]!
4003b9e4: 910003fd mov x29, sp
4003b9e8: a9025bf5 stp x21, x22, [sp, #32]
Heap_Control *heap;
Heap_Resize_status status;
uintptr_t old_size;
uintptr_t avail_size;
if ( size == 0 ) {
4003b9ec: b4000961 cbz x1, 4003bb18 <realloc+0x138> <== NEVER TAKEN
free( ptr );
return NULL;
}
if ( ptr == NULL ) {
4003b9f0: a90153f3 stp x19, x20, [sp, #16]
4003b9f4: aa0103f4 mov x20, x1
4003b9f8: aa0003f3 mov x19, x0
4003b9fc: b4000840 cbz x0, 4003bb04 <realloc+0x124>
return malloc( size );
}
heap = RTEMS_Malloc_Heap;
4003ba00: d0000640 adrp x0, 40105000 <Arr_2_Glob+0x1e68>
4003ba04: f9448015 ldr x21, [x0, #2304]
switch ( _Malloc_System_state() ) {
4003ba08: 97ff971a bl 40021670 <_Malloc_System_state>
4003ba0c: 34000480 cbz w0, 4003ba9c <realloc+0xbc>
4003ba10: 7100041f cmp w0, #0x1
4003ba14: 54000381 b.ne 4003ba84 <realloc+0xa4> // b.any <== NEVER TAKEN
_Malloc_Process_deferred_frees();
status = _Heap_Resize_block( heap, ptr, size, &old_size, &avail_size );
_RTEMS_Unlock_allocator();
break;
case MALLOC_SYSTEM_STATE_NO_PROTECTION:
status = _Heap_Resize_block( heap, ptr, size, &old_size, &avail_size );
4003ba18: aa1503e0 mov x0, x21
4003ba1c: 9100e3e4 add x4, sp, #0x38
4003ba20: 9100c3e3 add x3, sp, #0x30
4003ba24: aa1403e2 mov x2, x20
4003ba28: aa1303e1 mov x1, x19
break;
default:
return NULL;
}
switch ( status ) {
4003ba2c: aa1303f5 mov x21, x19
status = _Heap_Resize_block( heap, ptr, size, &old_size, &avail_size );
4003ba30: 94000084 bl 4003bc40 <_Heap_Resize_block>
4003ba34: 2a0003f6 mov w22, w0
switch ( status ) {
4003ba38: 340004b6 cbz w22, 4003bacc <realloc+0xec>
4003ba3c: 710006df cmp w22, #0x1
4003ba40: 54000501 b.ne 4003bae0 <realloc+0x100> // b.any
new_ptr = malloc( new_size );
4003ba44: aa1403e0 mov x0, x20
case HEAP_RESIZE_SUCCESSFUL:
return ptr;
case HEAP_RESIZE_UNSATISFIED:
return new_alloc( ptr, size, old_size );
4003ba48: f9401bf6 ldr x22, [sp, #48]
new_ptr = malloc( new_size );
4003ba4c: 97ff96f5 bl 40021620 <malloc>
4003ba50: aa0003f5 mov x21, x0
if ( new_ptr == NULL ) {
4003ba54: b40003c0 cbz x0, 4003bacc <realloc+0xec>
memcpy( new_ptr, old_ptr, ( new_size < old_size ) ? new_size : old_size );
4003ba58: eb1402df cmp x22, x20
4003ba5c: aa1303e1 mov x1, x19
4003ba60: 9a9492c2 csel x2, x22, x20, ls // ls = plast
4003ba64: 97ffcd09 bl 4002ee88 <memcpy>
free( old_ptr );
4003ba68: aa1303e0 mov x0, x19
4003ba6c: 97ffb1d5 bl 400281c0 <free>
default:
errno = EINVAL;
return NULL;
}
}
4003ba70: aa1503e0 mov x0, x21
return new_ptr;
4003ba74: a94153f3 ldp x19, x20, [sp, #16]
}
4003ba78: a9425bf5 ldp x21, x22, [sp, #32]
4003ba7c: a8c47bfd ldp x29, x30, [sp], #64
4003ba80: d65f03c0 ret
4003ba84: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
switch ( _Malloc_System_state() ) {
4003ba88: d2800015 mov x21, #0x0 // #0 <== NOT EXECUTED
}
4003ba8c: aa1503e0 mov x0, x21 <== NOT EXECUTED
4003ba90: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
4003ba94: a8c47bfd ldp x29, x30, [sp], #64 <== NOT EXECUTED
4003ba98: d65f03c0 ret <== NOT EXECUTED
_RTEMS_Lock_allocator();
4003ba9c: 97ffa431 bl 40024b60 <_RTEMS_Lock_allocator>
_Malloc_Process_deferred_frees();
4003baa0: 97ffb1ec bl 40028250 <_Malloc_Process_deferred_frees>
status = _Heap_Resize_block( heap, ptr, size, &old_size, &avail_size );
4003baa4: 9100e3e4 add x4, sp, #0x38
4003baa8: 9100c3e3 add x3, sp, #0x30
4003baac: aa1403e2 mov x2, x20
4003bab0: aa1303e1 mov x1, x19
4003bab4: aa1503e0 mov x0, x21
4003bab8: 94000062 bl 4003bc40 <_Heap_Resize_block>
switch ( status ) {
4003babc: aa1303f5 mov x21, x19
status = _Heap_Resize_block( heap, ptr, size, &old_size, &avail_size );
4003bac0: 2a0003f6 mov w22, w0
_RTEMS_Unlock_allocator();
4003bac4: 97ffa42b bl 40024b70 <_RTEMS_Unlock_allocator>
switch ( status ) {
4003bac8: 35fffbb6 cbnz w22, 4003ba3c <realloc+0x5c>
}
4003bacc: aa1503e0 mov x0, x21
4003bad0: a94153f3 ldp x19, x20, [sp, #16]
4003bad4: a9425bf5 ldp x21, x22, [sp, #32]
4003bad8: a8c47bfd ldp x29, x30, [sp], #64
4003badc: d65f03c0 ret
errno = EINVAL;
4003bae0: 97ffcb78 bl 4002e8c0 <__errno>
return NULL;
4003bae4: d2800015 mov x21, #0x0 // #0
errno = EINVAL;
4003bae8: 528002c1 mov w1, #0x16 // #22
4003baec: a94153f3 ldp x19, x20, [sp, #16]
4003baf0: b9000001 str w1, [x0]
}
4003baf4: aa1503e0 mov x0, x21
4003baf8: a9425bf5 ldp x21, x22, [sp, #32]
4003bafc: a8c47bfd ldp x29, x30, [sp], #64
4003bb00: d65f03c0 ret
return malloc( size );
4003bb04: a94153f3 ldp x19, x20, [sp, #16]
4003bb08: aa0103e0 mov x0, x1
}
4003bb0c: a9425bf5 ldp x21, x22, [sp, #32]
4003bb10: a8c47bfd ldp x29, x30, [sp], #64
return malloc( size );
4003bb14: 17ff96c3 b 40021620 <malloc>
return NULL;
4003bb18: d2800015 mov x21, #0x0 // #0 <== NOT EXECUTED
free( ptr );
4003bb1c: 97ffb1a9 bl 400281c0 <free> <== NOT EXECUTED
return NULL;
4003bb20: 17ffffdb b 4003ba8c <realloc+0xac> <== NOT EXECUTED
...
000000004002e560 <rtems_assoc_32_to_string>:
const rtems_assoc_32_pair *pairs,
size_t pair_count,
const char *separator,
const char *fallback
)
{
4002e560: a9ba7bfd stp x29, x30, [sp, #-96]!
4002e564: 910003fd mov x29, sp
4002e568: a9025bf5 stp x21, x22, [sp, #32]
4002e56c: aa0203f6 mov x22, x2
4002e570: a90363f7 stp x23, x24, [sp, #48]
4002e574: aa0103f7 mov x23, x1
4002e578: f9002bfb str x27, [sp, #80]
4002e57c: aa0603fb mov x27, x6
size_t len;
size_t i;
len = 0;
for ( i = 0; i < pair_count ; ++i ) {
4002e580: b4000584 cbz x4, 4002e630 <rtems_assoc_32_to_string+0xd0> <== NEVER TAKEN
4002e584: 2a0003f8 mov w24, w0
4002e588: a90153f3 stp x19, x20, [sp, #16]
4002e58c: aa0303f4 mov x20, x3
4002e590: a9046bf9 stp x25, x26, [sp, #64]
4002e594: aa0403f9 mov x25, x4
4002e598: aa0503fa mov x26, x5
4002e59c: d2800015 mov x21, #0x0 // #0
4002e5a0: d2800013 mov x19, #0x0 // #0
4002e5a4: d503201f nop
const rtems_assoc_32_pair *p;
p = &pairs[ i ];
if ( ( value & p->bits ) != 0 ) {
4002e5a8: b9400282 ldr w2, [x20]
for ( i = 0; i < pair_count ; ++i ) {
4002e5ac: 910006b5 add x21, x21, #0x1
4002e5b0: aa1703e3 mov x3, x23
if ( ( value & p->bits ) != 0 ) {
4002e5b4: 6a02031f tst w24, w2
4002e5b8: 54000200 b.eq 4002e5f8 <rtems_assoc_32_to_string+0x98> // b.none
return buffer_size - len;
4002e5bc: eb1302c2 subs x2, x22, x19
if ( len > 0 ) {
len += strlcpy( &buffer[ len ], separator, space( buffer_size, len ) );
4002e5c0: aa1a03e1 mov x1, x26
4002e5c4: 9a9f8042 csel x2, x2, xzr, hi // hi = pmore
4002e5c8: 8b1302e0 add x0, x23, x19
if ( len > 0 ) {
4002e5cc: b4000093 cbz x19, 4002e5dc <rtems_assoc_32_to_string+0x7c>
len += strlcpy( &buffer[ len ], separator, space( buffer_size, len ) );
4002e5d0: 94001661 bl 40033f54 <strlcpy>
4002e5d4: 8b000273 add x19, x19, x0
}
len += strlcpy( &buffer[ len ], p->name, space( buffer_size, len ) );
4002e5d8: 8b1302e3 add x3, x23, x19
4002e5dc: f9400681 ldr x1, [x20, #8]
return buffer_size - len;
4002e5e0: eb16027f cmp x19, x22
4002e5e4: cb1302c2 sub x2, x22, x19
len += strlcpy( &buffer[ len ], p->name, space( buffer_size, len ) );
4002e5e8: aa0303e0 mov x0, x3
4002e5ec: 9a9f3042 csel x2, x2, xzr, cc // cc = lo, ul, last
4002e5f0: 94001659 bl 40033f54 <strlcpy>
4002e5f4: 8b000273 add x19, x19, x0
for ( i = 0; i < pair_count ; ++i ) {
4002e5f8: 91004294 add x20, x20, #0x10
4002e5fc: eb15033f cmp x25, x21
4002e600: 54fffd41 b.ne 4002e5a8 <rtems_assoc_32_to_string+0x48> // b.any
}
}
if ( len == 0 ) {
4002e604: b4000133 cbz x19, 4002e628 <rtems_assoc_32_to_string+0xc8>
len += strlcpy( buffer, fallback, buffer_size );
}
return len;
}
4002e608: aa1303e0 mov x0, x19
4002e60c: a94153f3 ldp x19, x20, [sp, #16]
4002e610: a9425bf5 ldp x21, x22, [sp, #32]
4002e614: a94363f7 ldp x23, x24, [sp, #48]
4002e618: a9446bf9 ldp x25, x26, [sp, #64]
4002e61c: f9402bfb ldr x27, [sp, #80]
4002e620: a8c67bfd ldp x29, x30, [sp], #96
4002e624: d65f03c0 ret
4002e628: a94153f3 ldp x19, x20, [sp, #16]
4002e62c: a9446bf9 ldp x25, x26, [sp, #64]
len += strlcpy( buffer, fallback, buffer_size );
4002e630: aa1603e2 mov x2, x22
4002e634: aa1b03e1 mov x1, x27
4002e638: aa1703e0 mov x0, x23
}
4002e63c: a9425bf5 ldp x21, x22, [sp, #32]
4002e640: a94363f7 ldp x23, x24, [sp, #48]
4002e644: f9402bfb ldr x27, [sp, #80]
4002e648: a8c67bfd ldp x29, x30, [sp], #96
len += strlcpy( buffer, fallback, buffer_size );
4002e64c: 14001642 b 40033f54 <strlcpy>
000000004002b5b0 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4002b5b0: a9bc7bfd stp x29, x30, [sp, #-64]!
4002b5b4: 910003fd mov x29, sp
4002b5b8: a90153f3 stp x19, x20, [sp, #16]
4002b5bc: 52800414 mov w20, #0x20 // #32
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4002b5c0: 52800033 mov w19, #0x1 // #1
{
4002b5c4: a9025bf5 stp x21, x22, [sp, #32]
4002b5c8: 2a0103f5 mov w21, w1
uint32_t local_value = 0;
4002b5cc: 52800016 mov w22, #0x0 // #0
{
4002b5d0: f9001bf7 str x23, [sp, #48]
4002b5d4: aa0003f7 mov x23, x0
4002b5d8: 14000004 b 4002b5e8 <rtems_assoc_local_by_remote_bitfield+0x38>
for (b = 1; b; b <<= 1) {
4002b5dc: 0b130273 add w19, w19, w19
4002b5e0: 71000694 subs w20, w20, #0x1
4002b5e4: 54000140 b.eq 4002b60c <rtems_assoc_local_by_remote_bitfield+0x5c> // b.none
if (b & remote_value)
4002b5e8: 6a1302bf tst w21, w19
4002b5ec: 54ffff80 b.eq 4002b5dc <rtems_assoc_local_by_remote_bitfield+0x2c> // b.none
local_value |= rtems_assoc_local_by_remote(ap, b);
4002b5f0: 2a1303e1 mov w1, w19
4002b5f4: aa1703e0 mov x0, x23
4002b5f8: 9400000e bl 4002b630 <rtems_assoc_local_by_remote>
for (b = 1; b; b <<= 1) {
4002b5fc: 0b130273 add w19, w19, w19
local_value |= rtems_assoc_local_by_remote(ap, b);
4002b600: 2a0002d6 orr w22, w22, w0
for (b = 1; b; b <<= 1) {
4002b604: 71000694 subs w20, w20, #0x1
4002b608: 54ffff01 b.ne 4002b5e8 <rtems_assoc_local_by_remote_bitfield+0x38> // b.any<== ALWAYS TAKEN
}
return local_value;
}
4002b60c: 2a1603e0 mov w0, w22
4002b610: a94153f3 ldp x19, x20, [sp, #16]
4002b614: a9425bf5 ldp x21, x22, [sp, #32]
4002b618: f9401bf7 ldr x23, [sp, #48]
4002b61c: a8c47bfd ldp x29, x30, [sp], #64
4002b620: d65f03c0 ret
...
00000000400317c0 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
400317c0: a9be7bfd stp x29, x30, [sp, #-32]!
400317c4: 910003fd mov x29, sp
400317c8: a90153f3 stp x19, x20, [sp, #16]
400317cc: aa0003f4 mov x20, x0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
400317d0: f9400000 ldr x0, [x0]
400317d4: b40001e0 cbz x0, 40031810 <rtems_assoc_ptr_by_local+0x50>
400317d8: 2a0103f3 mov w19, w1
400317dc: b0000041 adrp x1, 4003a000 <IMFS_LIMITS_AND_OPTIONS+0x18>
400317e0: 9109c021 add x1, x1, #0x270
400317e4: 94000182 bl 40031dec <strcmp>
400317e8: 350001a0 cbnz w0, 4003181c <rtems_assoc_ptr_by_local+0x5c>
default_ap = ap++;
for ( ; ap->name; ap++)
400317ec: f9400a81 ldr x1, [x20, #16]
default_ap = ap++;
400317f0: 91004280 add x0, x20, #0x10
for ( ; ap->name; ap++)
400317f4: b5000081 cbnz x1, 40031804 <rtems_assoc_ptr_by_local+0x44> <== ALWAYS TAKEN
400317f8: 1400000c b 40031828 <rtems_assoc_ptr_by_local+0x68> <== NOT EXECUTED
400317fc: f8410c02 ldr x2, [x0, #16]!
40031800: b4000142 cbz x2, 40031828 <rtems_assoc_ptr_by_local+0x68>
if (ap->local_value == local_value)
40031804: b9400802 ldr w2, [x0, #8]
40031808: 6b13005f cmp w2, w19
4003180c: 54ffff81 b.ne 400317fc <rtems_assoc_ptr_by_local+0x3c> // b.any
return ap;
return default_ap;
}
40031810: a94153f3 ldp x19, x20, [sp, #16]
40031814: a8c27bfd ldp x29, x30, [sp], #32
40031818: d65f03c0 ret
4003181c: aa1403e0 mov x0, x20
const rtems_assoc_t *default_ap = 0;
40031820: d2800014 mov x20, #0x0 // #0
40031824: 17fffff8 b 40031804 <rtems_assoc_ptr_by_local+0x44>
for ( ; ap->name; ap++)
40031828: aa1403e0 mov x0, x20
}
4003182c: a94153f3 ldp x19, x20, [sp, #16]
40031830: a8c27bfd ldp x29, x30, [sp], #32
40031834: d65f03c0 ret
0000000040021820 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
40021820: a9bd7bfd stp x29, x30, [sp, #-48]!
40021824: 910003fd mov x29, sp
40021828: a90153f3 stp x19, x20, [sp, #16]
const rtems_assoc_t *default_ap = 0;
4002182c: d2800014 mov x20, #0x0 // #0
if (rtems_assoc_is_default(ap))
40021830: f9400013 ldr x19, [x0]
40021834: b4000293 cbz x19, 40021884 <rtems_assoc_ptr_by_name+0x64>
40021838: a9025bf5 stp x21, x22, [sp, #32]
4002183c: aa0003f6 mov x22, x0
40021840: aa0103f5 mov x21, x1
40021844: aa1303e0 mov x0, x19
40021848: b00000a1 adrp x1, 40036000 <realloc+0x130>
4002184c: 91270021 add x1, x1, #0x9c0
40021850: 9400357c bl 4002ee40 <strcmp>
40021854: 35000200 cbnz w0, 40021894 <rtems_assoc_ptr_by_name+0x74>
default_ap = ap++;
for ( ; ap->name; ap++)
40021858: f9400ad3 ldr x19, [x22, #16]
default_ap = ap++;
4002185c: 910042d4 add x20, x22, #0x10
for ( ; ap->name; ap++)
40021860: b5000093 cbnz x19, 40021870 <rtems_assoc_ptr_by_name+0x50> <== ALWAYS TAKEN
40021864: 1400000f b 400218a0 <rtems_assoc_ptr_by_name+0x80> <== NOT EXECUTED
40021868: f8410e93 ldr x19, [x20, #16]!
4002186c: b40001b3 cbz x19, 400218a0 <rtems_assoc_ptr_by_name+0x80>
if (strcmp(ap->name, name) == 0)
40021870: aa1303e0 mov x0, x19
40021874: aa1503e1 mov x1, x21
40021878: 94003572 bl 4002ee40 <strcmp>
4002187c: 35ffff60 cbnz w0, 40021868 <rtems_assoc_ptr_by_name+0x48>
40021880: a9425bf5 ldp x21, x22, [sp, #32]
return ap;
return default_ap;
}
40021884: aa1403e0 mov x0, x20
40021888: a94153f3 ldp x19, x20, [sp, #16]
4002188c: a8c37bfd ldp x29, x30, [sp], #48
40021890: d65f03c0 ret
40021894: aa1603f4 mov x20, x22
const rtems_assoc_t *default_ap = 0;
40021898: d2800016 mov x22, #0x0 // #0
4002189c: 17fffff5 b 40021870 <rtems_assoc_ptr_by_name+0x50>
for ( ; ap->name; ap++)
400218a0: aa1603f4 mov x20, x22
}
400218a4: aa1403e0 mov x0, x20
400218a8: a94153f3 ldp x19, x20, [sp, #16]
for ( ; ap->name; ap++)
400218ac: a9425bf5 ldp x21, x22, [sp, #32]
}
400218b0: a8c37bfd ldp x29, x30, [sp], #48
400218b4: d65f03c0 ret
...
000000004002b660 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4002b660: a9be7bfd stp x29, x30, [sp, #-32]!
4002b664: 910003fd mov x29, sp
4002b668: a90153f3 stp x19, x20, [sp, #16]
4002b66c: aa0003f4 mov x20, x0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4002b670: f9400000 ldr x0, [x0]
4002b674: b40001e0 cbz x0, 4002b6b0 <rtems_assoc_ptr_by_remote+0x50>
4002b678: 2a0103f3 mov w19, w1
4002b67c: d0000081 adrp x1, 4003d000 <access_modes_assoc+0x10>
4002b680: 9101c021 add x1, x1, #0x70
4002b684: 94000f68 bl 4002f424 <strcmp>
4002b688: 350001a0 cbnz w0, 4002b6bc <rtems_assoc_ptr_by_remote+0x5c>
default_ap = ap++;
for ( ; ap->name; ap++)
4002b68c: f9400a81 ldr x1, [x20, #16]
default_ap = ap++;
4002b690: 91004280 add x0, x20, #0x10
for ( ; ap->name; ap++)
4002b694: b5000081 cbnz x1, 4002b6a4 <rtems_assoc_ptr_by_remote+0x44> <== ALWAYS TAKEN
4002b698: 1400000c b 4002b6c8 <rtems_assoc_ptr_by_remote+0x68> <== NOT EXECUTED
4002b69c: f8410c02 ldr x2, [x0, #16]!
4002b6a0: b4000142 cbz x2, 4002b6c8 <rtems_assoc_ptr_by_remote+0x68>
if (ap->remote_value == remote_value)
4002b6a4: b9400c02 ldr w2, [x0, #12]
4002b6a8: 6b13005f cmp w2, w19
4002b6ac: 54ffff81 b.ne 4002b69c <rtems_assoc_ptr_by_remote+0x3c> // b.any
return ap;
return default_ap;
}
4002b6b0: a94153f3 ldp x19, x20, [sp, #16]
4002b6b4: a8c27bfd ldp x29, x30, [sp], #32
4002b6b8: d65f03c0 ret
4002b6bc: aa1403e0 mov x0, x20
const rtems_assoc_t *default_ap = 0;
4002b6c0: d2800014 mov x20, #0x0 // #0
4002b6c4: 17fffff8 b 4002b6a4 <rtems_assoc_ptr_by_remote+0x44>
for ( ; ap->name; ap++)
4002b6c8: aa1403e0 mov x0, x20
}
4002b6cc: a94153f3 ldp x19, x20, [sp, #16]
4002b6d0: a8c27bfd ldp x29, x30, [sp], #32
4002b6d4: d65f03c0 ret
...
0000000040021940 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
40021940: a9bc7bfd stp x29, x30, [sp, #-64]!
40021944: 910003fd mov x29, sp
40021948: a90153f3 stp x19, x20, [sp, #16]
4002194c: 52800414 mov w20, #0x20 // #32
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
40021950: 52800033 mov w19, #0x1 // #1
{
40021954: a9025bf5 stp x21, x22, [sp, #32]
40021958: 2a0103f5 mov w21, w1
uint32_t remote_value = 0;
4002195c: 52800016 mov w22, #0x0 // #0
{
40021960: f9001bf7 str x23, [sp, #48]
40021964: aa0003f7 mov x23, x0
40021968: 14000004 b 40021978 <rtems_assoc_remote_by_local_bitfield+0x38>
for (b = 1; b; b <<= 1)
4002196c: 0b130273 add w19, w19, w19
40021970: 71000694 subs w20, w20, #0x1
40021974: 54000140 b.eq 4002199c <rtems_assoc_remote_by_local_bitfield+0x5c> // b.none
if (b & local_value)
40021978: 6a1302bf tst w21, w19
4002197c: 54ffff80 b.eq 4002196c <rtems_assoc_remote_by_local_bitfield+0x2c> // b.none
remote_value |= rtems_assoc_remote_by_local(ap, b);
40021980: 2a1303e1 mov w1, w19
40021984: aa1703e0 mov x0, x23
40021988: 9400000e bl 400219c0 <rtems_assoc_remote_by_local>
for (b = 1; b; b <<= 1)
4002198c: 0b130273 add w19, w19, w19
remote_value |= rtems_assoc_remote_by_local(ap, b);
40021990: 2a0002d6 orr w22, w22, w0
for (b = 1; b; b <<= 1)
40021994: 71000694 subs w20, w20, #0x1
40021998: 54ffff01 b.ne 40021978 <rtems_assoc_remote_by_local_bitfield+0x38> // b.any<== ALWAYS TAKEN
return remote_value;
}
4002199c: 2a1603e0 mov w0, w22
400219a0: a94153f3 ldp x19, x20, [sp, #16]
400219a4: a9425bf5 ldp x21, x22, [sp, #32]
400219a8: f9401bf7 ldr x23, [sp, #48]
400219ac: a8c47bfd ldp x29, x30, [sp], #64
400219b0: d65f03c0 ret
...
000000004002c320 <rtems_cache_coherent_add_area>:
void rtems_cache_coherent_add_area(
void *area_begin,
uintptr_t area_size
)
{
4002c320: a9bd7bfd stp x29, x30, [sp, #-48]!
4002c324: 910003fd mov x29, sp
4002c328: b00006c2 adrp x2, 40105000 <Arr_2_Glob+0x1e68>
if ( _System_state_Is_up( _System_state_Get()) ) {
4002c32c: b94a0842 ldr w2, [x2, #2568]
{
4002c330: a90153f3 stp x19, x20, [sp, #16]
4002c334: aa0003f3 mov x19, x0
4002c338: aa0103f4 mov x20, x1
4002c33c: a9025bf5 stp x21, x22, [sp, #32]
if ( _System_state_Is_up( _System_state_Get()) ) {
4002c340: 7100085f cmp w2, #0x2
4002c344: 54000160 b.eq 4002c370 <rtems_cache_coherent_add_area+0x50> // b.none
Heap_Control *heap = cache_coherent_heap;
4002c348: b0000715 adrp x21, 4010d000 <bsp_interrupt_handler_table+0x7310>
4002c34c: f946bea0 ldr x0, [x21, #3448]
if ( heap == NULL ) {
4002c350: b4000280 cbz x0, 4002c3a0 <rtems_cache_coherent_add_area+0x80>
_Heap_Extend( heap, area_begin, area_size, 0 );
4002c354: aa0103e2 mov x2, x1
4002c358: aa1303e1 mov x1, x19
_RTEMS_Unlock_allocator();
} else {
add_area( area_begin, area_size );
}
}
4002c35c: a94153f3 ldp x19, x20, [sp, #16]
_Heap_Extend( heap, area_begin, area_size, 0 );
4002c360: d2800003 mov x3, #0x0 // #0
}
4002c364: a9425bf5 ldp x21, x22, [sp, #32]
4002c368: a8c37bfd ldp x29, x30, [sp], #48
_Heap_Extend( heap, area_begin, area_size, 0 );
4002c36c: 17fff321 b 40028ff0 <_Heap_Extend>
_RTEMS_Lock_allocator();
4002c370: 97ffe1fc bl 40024b60 <_RTEMS_Lock_allocator>
Heap_Control *heap = cache_coherent_heap;
4002c374: b0000715 adrp x21, 4010d000 <bsp_interrupt_handler_table+0x7310>
4002c378: f946bea0 ldr x0, [x21, #3448]
if ( heap == NULL ) {
4002c37c: b40002c0 cbz x0, 4002c3d4 <rtems_cache_coherent_add_area+0xb4> <== NEVER TAKEN
_Heap_Extend( heap, area_begin, area_size, 0 );
4002c380: aa1403e2 mov x2, x20
4002c384: aa1303e1 mov x1, x19
4002c388: d2800003 mov x3, #0x0 // #0
4002c38c: 97fff319 bl 40028ff0 <_Heap_Extend>
}
4002c390: a94153f3 ldp x19, x20, [sp, #16]
4002c394: a9425bf5 ldp x21, x22, [sp, #32]
4002c398: a8c37bfd ldp x29, x30, [sp], #48
_RTEMS_Unlock_allocator();
4002c39c: 17ffe1f5 b 40024b70 <_RTEMS_Unlock_allocator>
ok = _Heap_Initialize( heap, area_begin, area_size, 0 );
4002c3a0: b0000716 adrp x22, 4010d000 <bsp_interrupt_handler_table+0x7310>
4002c3a4: 913602d6 add x22, x22, #0xd80
4002c3a8: aa0103e2 mov x2, x1
4002c3ac: aa1603e0 mov x0, x22
4002c3b0: aa1303e1 mov x1, x19
4002c3b4: d2800003 mov x3, #0x0 // #0
4002c3b8: 97ffe2f2 bl 40024f80 <_Heap_Initialize>
if ( ok ) {
4002c3bc: b4000040 cbz x0, 4002c3c4 <rtems_cache_coherent_add_area+0xa4> <== NEVER TAKEN
cache_coherent_heap = heap;
4002c3c0: f906beb6 str x22, [x21, #3448]
}
4002c3c4: a94153f3 ldp x19, x20, [sp, #16]
4002c3c8: a9425bf5 ldp x21, x22, [sp, #32]
4002c3cc: a8c37bfd ldp x29, x30, [sp], #48
4002c3d0: d65f03c0 ret
ok = _Heap_Initialize( heap, area_begin, area_size, 0 );
4002c3d4: b0000716 adrp x22, 4010d000 <bsp_interrupt_handler_table+0x7310> <== NOT EXECUTED
4002c3d8: 913602d6 add x22, x22, #0xd80 <== NOT EXECUTED
4002c3dc: aa1403e2 mov x2, x20 <== NOT EXECUTED
4002c3e0: aa1303e1 mov x1, x19 <== NOT EXECUTED
4002c3e4: aa1603e0 mov x0, x22 <== NOT EXECUTED
4002c3e8: d2800003 mov x3, #0x0 // #0 <== NOT EXECUTED
4002c3ec: 97ffe2e5 bl 40024f80 <_Heap_Initialize> <== NOT EXECUTED
if ( ok ) {
4002c3f0: b4fffd00 cbz x0, 4002c390 <rtems_cache_coherent_add_area+0x70> <== NOT EXECUTED
cache_coherent_heap = heap;
4002c3f4: f906beb6 str x22, [x21, #3448] <== NOT EXECUTED
4002c3f8: 17ffffe6 b 4002c390 <rtems_cache_coherent_add_area+0x70> <== NOT EXECUTED
4002c3fc: 00000000 udf #0
00000000400222d0 <rtems_cache_coherent_free>:
void rtems_cache_coherent_free( void *ptr )
{
400222d0: a9be7bfd stp x29, x30, [sp, #-32]!
400222d4: 910003fd mov x29, sp
400222d8: f9000bf3 str x19, [sp, #16]
400222dc: aa0003f3 mov x19, x0
Heap_Control *heap;
_RTEMS_Lock_allocator();
400222e0: 94000de4 bl 40025a70 <_RTEMS_Lock_allocator>
heap = cache_coherent_heap;
400222e4: d0000700 adrp x0, 40104000 <data+0xd40>
400222e8: f9423400 ldr x0, [x0, #1128]
if ( heap != NULL ) {
400222ec: b4000100 cbz x0, 4002230c <rtems_cache_coherent_free+0x3c> <== NEVER TAKEN
if ( _Heap_Free( heap, ptr ) ) {
400222f0: aa1303e1 mov x1, x19
400222f4: 94001073 bl 400264c0 <_Heap_Free>
400222f8: 72001c1f tst w0, #0xff
400222fc: 54000080 b.eq 4002230c <rtems_cache_coherent_free+0x3c> // b.none <== NEVER TAKEN
if ( heap != NULL ) {
_Heap_Free( heap, ptr );
}
_RTEMS_Unlock_allocator();
}
40022300: f9400bf3 ldr x19, [sp, #16]
40022304: a8c27bfd ldp x29, x30, [sp], #32
_RTEMS_Unlock_allocator();
40022308: 14000dde b 40025a80 <_RTEMS_Unlock_allocator>
heap = RTEMS_Malloc_Heap;
4002230c: d0000700 adrp x0, 40104000 <data+0xd40> <== NOT EXECUTED
40022310: f9428c00 ldr x0, [x0, #1304] <== NOT EXECUTED
if ( heap != NULL ) {
40022314: b4ffff60 cbz x0, 40022300 <rtems_cache_coherent_free+0x30> <== NOT EXECUTED
_Heap_Free( heap, ptr );
40022318: aa1303e1 mov x1, x19 <== NOT EXECUTED
4002231c: 94001069 bl 400264c0 <_Heap_Free> <== NOT EXECUTED
}
40022320: f9400bf3 ldr x19, [sp, #16] <== NOT EXECUTED
40022324: a8c27bfd ldp x29, x30, [sp], #32 <== NOT EXECUTED
_RTEMS_Unlock_allocator();
40022328: 14000dd6 b 40025a80 <_RTEMS_Unlock_allocator> <== NOT EXECUTED
4002232c: 00000000 udf #0
0000000040022730 <rtems_filesystem_do_unmount>:
}
void rtems_filesystem_do_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
40022730: a9be7bfd stp x29, x30, [sp, #-32]!
40022734: 910003fd mov x29, sp
40022738: f9000bf3 str x19, [sp, #16]
4002273c: aa0003f3 mov x19, x0
rtems_libio_lock();
40022740: 94001720 bl 400283c0 <rtems_libio_lock>
previous = the_node->previous;
40022744: a9400261 ldp x1, x0, [x19]
next->previous = previous;
40022748: f9000420 str x0, [x1, #8]
previous->next = next;
4002274c: f9000001 str x1, [x0]
rtems_libio_unlock();
40022750: 94001720 bl 400283d0 <rtems_libio_unlock>
release_with_count(global_loc, 1);
40022754: f9402260 ldr x0, [x19, #64]
40022758: 52800021 mov w1, #0x1 // #1
4002275c: 94000011 bl 400227a0 <release_with_count>
rtems_filesystem_mt_lock();
rtems_chain_extract_unprotected(&mt_entry->mt_node);
rtems_filesystem_mt_unlock();
rtems_filesystem_global_location_release(mt_entry->mt_point_node, false);
(*mt_entry->ops->fsunmount_me_h)(mt_entry);
40022760: f9400e61 ldr x1, [x19, #24]
40022764: aa1303e0 mov x0, x19
40022768: f9403421 ldr x1, [x1, #104]
4002276c: d63f0020 blr x1
if (mt_entry->unmount_task != 0) {
40022770: b9407a60 ldr w0, [x19, #120]
40022774: 34000080 cbz w0, 40022784 <rtems_filesystem_do_unmount+0x54> <== NEVER TAKEN
*
* @param id is the identifier of the task to receive the transient event.
*/
static inline rtems_status_code rtems_event_transient_send( rtems_id id )
{
return rtems_event_system_send( id, RTEMS_EVENT_SYSTEM_TRANSIENT );
40022778: 52b00001 mov w1, #0x80000000 // #-2147483648
4002277c: 9400087d bl 40024970 <rtems_event_system_send>
rtems_status_code sc =
rtems_event_transient_send(mt_entry->unmount_task);
if (sc != RTEMS_SUCCESSFUL) {
40022780: 350000a0 cbnz w0, 40022794 <rtems_filesystem_do_unmount+0x64> <== NEVER TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
}
}
free(mt_entry);
40022784: aa1303e0 mov x0, x19
}
40022788: f9400bf3 ldr x19, [sp, #16]
4002278c: a8c27bfd ldp x29, x30, [sp], #32
free(mt_entry);
40022790: 1400168c b 400281c0 <free>
rtems_fatal_error_occurred(0xdeadbeef);
40022794: 5297dde0 mov w0, #0xbeef // #48879 <== NOT EXECUTED
40022798: 72bbd5a0 movk w0, #0xdead, lsl #16 <== NOT EXECUTED
4002279c: 940008e9 bl 40024b40 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000000040022110 <rtems_filesystem_eval_path_continue>:
{
40022110: a9be7bfd stp x29, x30, [sp, #-32]!
40022114: 910003fd mov x29, sp
40022118: a90153f3 stp x19, x20, [sp, #16]
4002211c: aa0003f3 mov x19, x0
while (ctx->pathlen > 0) {
40022120: f9400400 ldr x0, [x0, #8]
40022124: b4000100 cbz x0, 40022144 <rtems_filesystem_eval_path_continue+0x34>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
40022128: f9402a61 ldr x1, [x19, #80]
4002212c: aa1303e0 mov x0, x19
40022130: f9400c21 ldr x1, [x1, #24]
40022134: f9400821 ldr x1, [x1, #16]
40022138: d63f0020 blr x1
while (ctx->pathlen > 0) {
4002213c: f9400660 ldr x0, [x19, #8]
40022140: b5ffff40 cbnz x0, 40022128 <rtems_filesystem_eval_path_continue+0x18>
if (rtems_filesystem_eval_path_has_token(ctx)) {
40022144: f9400e60 ldr x0, [x19, #24]
return ctx->flags;
40022148: b9402261 ldr w1, [x19, #32]
4002214c: b40000e0 cbz x0, 40022168 <rtems_filesystem_eval_path_continue+0x58>
if (make) {
40022150: 36280361 tbz w1, #5, 400221bc <rtems_filesystem_eval_path_continue+0xac>
check_access(ctx, RTEMS_FS_PERMS_WRITE);
40022154: aa1303e0 mov x0, x19
40022158: 52800041 mov w1, #0x2 // #2
}
4002215c: a94153f3 ldp x19, x20, [sp, #16]
40022160: a8c27bfd ldp x29, x30, [sp], #32
check_access(ctx, RTEMS_FS_PERMS_WRITE);
40022164: 17ffffa3 b 40021ff0 <check_access>
if (!exclusive) {
40022168: 373000a1 tbnz w1, #6, 4002217c <rtems_filesystem_eval_path_continue+0x6c>
check_access(ctx, ctx->flags);
4002216c: aa1303e0 mov x0, x19
}
40022170: a94153f3 ldp x19, x20, [sp, #16]
40022174: a8c27bfd ldp x29, x30, [sp], #32
check_access(ctx, ctx->flags);
40022178: 17ffff9e b 40021ff0 <check_access>
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
4002217c: f9402661 ldr x1, [x19, #72]
ctx->pathlen = 0;
40022180: a9007e7f stp xzr, xzr, [x19]
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
40022184: d00000c0 adrp x0, 4003c000 <_Scheduler_Table+0x48>
40022188: 91278000 add x0, x0, #0x9e0
ctx->token = NULL;
4002218c: f9000a7f str xzr, [x19, #16]
return loc->handlers == &rtems_filesystem_null_handlers;
40022190: 9100a274 add x20, x19, #0x28
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
40022194: eb00003f cmp x1, x0
40022198: 54000320 b.eq 400221fc <rtems_filesystem_eval_path_continue+0xec> // b.none
errno = eno;
4002219c: 940031c9 bl 4002e8c0 <__errno>
400221a0: aa0003e1 mov x1, x0
400221a4: 52800222 mov w2, #0x11 // #17
rtems_filesystem_location_detach(&ctx->currentloc);
400221a8: aa1403e0 mov x0, x20
}
400221ac: a94153f3 ldp x19, x20, [sp, #16]
errno = eno;
400221b0: b9000022 str w2, [x1]
}
400221b4: a8c27bfd ldp x29, x30, [sp], #32
rtems_filesystem_location_detach(&ctx->currentloc);
400221b8: 1400012a b 40022660 <rtems_filesystem_location_detach>
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
400221bc: f9402661 ldr x1, [x19, #72]
ctx->pathlen = 0;
400221c0: a9007e7f stp xzr, xzr, [x19]
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
400221c4: d00000c0 adrp x0, 4003c000 <_Scheduler_Table+0x48>
400221c8: 91278000 add x0, x0, #0x9e0
ctx->tokenlen = 0;
400221cc: a9017e7f stp xzr, xzr, [x19, #16]
400221d0: 9100a274 add x20, x19, #0x28
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
400221d4: eb00003f cmp x1, x0
400221d8: 54000120 b.eq 400221fc <rtems_filesystem_eval_path_continue+0xec> // b.none<== NEVER TAKEN
errno = eno;
400221dc: 940031b9 bl 4002e8c0 <__errno>
400221e0: aa0003e1 mov x1, x0
400221e4: 52800042 mov w2, #0x2 // #2
rtems_filesystem_location_detach(&ctx->currentloc);
400221e8: aa1403e0 mov x0, x20
}
400221ec: a94153f3 ldp x19, x20, [sp, #16]
errno = eno;
400221f0: b9000022 str w2, [x1]
}
400221f4: a8c27bfd ldp x29, x30, [sp], #32
rtems_filesystem_location_detach(&ctx->currentloc);
400221f8: 1400011a b 40022660 <rtems_filesystem_location_detach>
}
400221fc: a94153f3 ldp x19, x20, [sp, #16]
40022200: a8c27bfd ldp x29, x30, [sp], #32
40022204: d65f03c0 ret
...
00000000400288b0 <rtems_filesystem_eval_path_eat_delimiter>:
void rtems_filesystem_eval_path_eat_delimiter(
rtems_filesystem_eval_path_context_t *ctx
)
{
const char *current = ctx->path;
const char *end = current + ctx->pathlen;
400288b0: a9400c01 ldp x1, x3, [x0]
return c == '/' || c == '\\';
400288b4: 52800b84 mov w4, #0x5c // #92
400288b8: 8b030023 add x3, x1, x3
while (current != end && rtems_filesystem_is_delimiter(*current)) {
400288bc: eb03003f cmp x1, x3
400288c0: 540000a1 b.ne 400288d4 <rtems_filesystem_eval_path_eat_delimiter+0x24> // b.any<== ALWAYS TAKEN
400288c4: 1400000b b 400288f0 <rtems_filesystem_eval_path_eat_delimiter+0x40> <== NOT EXECUTED
++current;
400288c8: 91000421 add x1, x1, #0x1
while (current != end && rtems_filesystem_is_delimiter(*current)) {
400288cc: eb01007f cmp x3, x1
400288d0: 54000100 b.eq 400288f0 <rtems_filesystem_eval_path_eat_delimiter+0x40> // b.none
400288d4: 39400022 ldrb w2, [x1]
400288d8: 7100bc5f cmp w2, #0x2f
400288dc: 7a441044 ccmp w2, w4, #0x4, ne // ne = any
400288e0: 54ffff40 b.eq 400288c8 <rtems_filesystem_eval_path_eat_delimiter+0x18> // b.none
}
ctx->path = current;
ctx->pathlen = (size_t) (end - current);
400288e4: cb010063 sub x3, x3, x1
400288e8: a9000c01 stp x1, x3, [x0]
}
400288ec: d65f03c0 ret
ctx->pathlen = (size_t) (end - current);
400288f0: d2800003 mov x3, #0x0 // #0
400288f4: a9000c01 stp x1, x3, [x0]
}
400288f8: d65f03c0 ret
400288fc: 00000000 udf #0
0000000040028660 <rtems_filesystem_eval_path_generic>:
void rtems_filesystem_eval_path_generic(
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const rtems_filesystem_eval_path_generic_config *config
)
{
40028660: a9bb7bfd stp x29, x30, [sp, #-80]!
40028664: 910003fd mov x29, sp
40028668: a90153f3 stp x19, x20, [sp, #16]
4002866c: aa0003f3 mov x19, x0
40028670: aa0203f4 mov x20, x2
40028674: a9025bf5 stp x21, x22, [sp, #32]
¤tloc->mt_entry->mt_point_node
);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
} else {
/* This is the root file system */
status = (*config->eval_token)(ctx, arg, ".", 1);
40028678: 900000b6 adrp x22, 4003c000 <_Scheduler_Table+0x48>
4002867c: 913ae2d6 add x22, x22, #0xeb8
{
40028680: aa0103f5 mov x21, x1
40028684: a90363f7 stp x23, x24, [sp, #48]
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
40028688: 900000b8 adrp x24, 4003c000 <_Scheduler_Table+0x48>
4002868c: 913b0318 add x24, x24, #0xec0
return &ctx->currentloc;
40028690: 9100a017 add x23, x0, #0x28
{
40028694: a9046bf9 stp x25, x26, [sp, #64]
rtems_filesystem_eval_path_next_token(ctx);
40028698: aa1303e0 mov x0, x19
4002869c: 94000099 bl 40028900 <rtems_filesystem_eval_path_next_token>
*tokenlen = ctx->tokenlen;
400286a0: a941667a ldp x26, x25, [x19, #16]
if (tokenlen > 0) {
400286a4: b4000539 cbz x25, 40028748 <rtems_filesystem_eval_path_generic+0xe8>
if ((*config->is_directory)(ctx, arg)) {
400286a8: f9400283 ldr x3, [x20]
400286ac: aa1503e1 mov x1, x21
400286b0: aa1303e0 mov x0, x19
400286b4: d63f0060 blr x3
400286b8: 72001c1f tst w0, #0xff
400286bc: 54000e40 b.eq 40028884 <rtems_filesystem_eval_path_generic+0x224> // b.none
return tokenlen == 1 && token [0] == '.';
400286c0: f100073f cmp x25, #0x1
400286c4: 54000200 b.eq 40028704 <rtems_filesystem_eval_path_generic+0xa4> // b.none
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
400286c8: f1000b3f cmp x25, #0x2
400286cc: 54000081 b.ne 400286dc <rtems_filesystem_eval_path_generic+0x7c> // b.any
400286d0: 39400340 ldrb w0, [x26]
400286d4: 7100b81f cmp w0, #0x2e
400286d8: 54000700 b.eq 400287b8 <rtems_filesystem_eval_path_generic+0x158> // b.none
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
400286dc: f9400684 ldr x4, [x20, #8]
400286e0: aa1903e3 mov x3, x25
400286e4: aa1a03e2 mov x2, x26
400286e8: aa1503e1 mov x1, x21
400286ec: aa1303e0 mov x0, x19
400286f0: d63f0080 blr x4
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
400286f4: 7100081f cmp w0, #0x2
400286f8: 54000240 b.eq 40028740 <rtems_filesystem_eval_path_generic+0xe0> // b.none
while (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE) {
400286fc: 34fffce0 cbz w0, 40028698 <rtems_filesystem_eval_path_generic+0x38>
40028700: 14000012 b 40028748 <rtems_filesystem_eval_path_generic+0xe8>
return tokenlen == 1 && token [0] == '.';
40028704: 39400340 ldrb w0, [x26]
40028708: 7100b81f cmp w0, #0x2e
4002870c: 54fffe81 b.ne 400286dc <rtems_filesystem_eval_path_generic+0x7c> // b.any
if (rtems_filesystem_eval_path_has_path(ctx)) {
40028710: f9400660 ldr x0, [x19, #8]
40028714: b5000060 cbnz x0, 40028720 <rtems_filesystem_eval_path_generic+0xc0>
if ((eval_flags & RTEMS_FS_REJECT_TERMINAL_DOT) == 0) {
40028718: b9402260 ldr w0, [x19, #32]
4002871c: 374003e0 tbnz w0, #8, 40028798 <rtems_filesystem_eval_path_generic+0x138>
status = (*config->eval_token)(ctx, arg, ".", 1);
40028720: f9400684 ldr x4, [x20, #8]
40028724: aa1603e2 mov x2, x22
40028728: aa1503e1 mov x1, x21
4002872c: aa1303e0 mov x0, x19
40028730: d2800023 mov x3, #0x1 // #1
40028734: d63f0080 blr x4
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
40028738: 7100081f cmp w0, #0x2
4002873c: 54fffe01 b.ne 400286fc <rtems_filesystem_eval_path_generic+0x9c> // b.any<== ALWAYS TAKEN
if (rtems_filesystem_eval_path_has_path(ctx)) {
40028740: f9400660 ldr x0, [x19, #8]
40028744: b50000e0 cbnz x0, 40028760 <rtems_filesystem_eval_path_generic+0x100>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
40028748: a94153f3 ldp x19, x20, [sp, #16]
4002874c: a9425bf5 ldp x21, x22, [sp, #32]
40028750: a94363f7 ldp x23, x24, [sp, #48]
40028754: a9446bf9 ldp x25, x26, [sp, #64]
40028758: a8c57bfd ldp x29, x30, [sp], #80
4002875c: d65f03c0 ret
rtems_filesystem_eval_path_eat_delimiter(ctx);
40028760: aa1303e0 mov x0, x19
40028764: 94000053 bl 400288b0 <rtems_filesystem_eval_path_eat_delimiter>
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
40028768: b9402260 ldr w0, [x19, #32]
if (
4002876c: 36380060 tbz w0, #7, 40028778 <rtems_filesystem_eval_path_generic+0x118>
|| rtems_filesystem_eval_path_has_path(ctx)
40028770: f9400660 ldr x0, [x19, #8]
40028774: b4fffea0 cbz x0, 40028748 <rtems_filesystem_eval_path_generic+0xe8>
rtems_filesystem_eval_path_error(ctx, ENOENT);
40028778: aa1303e0 mov x0, x19
4002877c: 52800041 mov w1, #0x2 // #2
}
40028780: a94153f3 ldp x19, x20, [sp, #16]
40028784: a9425bf5 ldp x21, x22, [sp, #32]
40028788: a94363f7 ldp x23, x24, [sp, #48]
4002878c: a9446bf9 ldp x25, x26, [sp, #64]
40028790: a8c57bfd ldp x29, x30, [sp], #80
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
40028794: 17ffe6ff b 40022390 <rtems_filesystem_eval_path_error>
rtems_filesystem_eval_path_error(ctx, EINVAL);
40028798: aa1303e0 mov x0, x19
4002879c: 528002c1 mov w1, #0x16 // #22
}
400287a0: a94153f3 ldp x19, x20, [sp, #16]
400287a4: a9425bf5 ldp x21, x22, [sp, #32]
400287a8: a94363f7 ldp x23, x24, [sp, #48]
400287ac: a9446bf9 ldp x25, x26, [sp, #64]
400287b0: a8c57bfd ldp x29, x30, [sp], #80
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
400287b4: 17ffe6f7 b 40022390 <rtems_filesystem_eval_path_error>
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
400287b8: 39400740 ldrb w0, [x26, #1]
400287bc: 7100b81f cmp w0, #0x2e
400287c0: 54fff8e1 b.ne 400286dc <rtems_filesystem_eval_path_generic+0x7c> // b.any<== NEVER TAKEN
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
400287c4: f94016e2 ldr x2, [x23, #40]
400287c8: f9402e61 ldr x1, [x19, #88]
&& (*mt_entry->ops->are_nodes_equal_h)( loc, rootloc );
400287cc: f9400c43 ldr x3, [x2, #24]
400287d0: f9401420 ldr x0, [x1, #40]
400287d4: f9401063 ldr x3, [x3, #32]
400287d8: eb00005f cmp x2, x0
400287dc: 540002e0 b.eq 40028838 <rtems_filesystem_eval_path_generic+0x1d8> // b.none
return (*mt_entry->ops->are_nodes_equal_h)( loc, mt_fs_root );
400287e0: f9402441 ldr x1, [x2, #72]
400287e4: aa1703e0 mov x0, x23
400287e8: d63f0060 blr x3
} else if (is_fs_root(currentloc)) {
400287ec: 72001c1f tst w0, #0xff
400287f0: 540003c0 b.eq 40028868 <rtems_filesystem_eval_path_generic+0x208> // b.none
if (currentloc->mt_entry->mt_point_node != NULL) {
400287f4: f94016e1 ldr x1, [x23, #40]
400287f8: f9402020 ldr x0, [x1, #64]
400287fc: b4fff920 cbz x0, 40028720 <rtems_filesystem_eval_path_generic+0xc0> <== NEVER TAKEN
ctx->pathlen += tokenlen;
40028800: a9400a63 ldp x3, x2, [x19]
rtems_filesystem_eval_path_restart(
40028804: aa1303e0 mov x0, x19
size_t tokenlen = ctx->tokenlen;
40028808: f9400e64 ldr x4, [x19, #24]
4002880c: 91010021 add x1, x1, #0x40
}
40028810: a9425bf5 ldp x21, x22, [sp, #32]
ctx->path -= tokenlen;
40028814: cb040063 sub x3, x3, x4
ctx->pathlen += tokenlen;
40028818: 8b040042 add x2, x2, x4
4002881c: a94363f7 ldp x23, x24, [sp, #48]
40028820: a9446bf9 ldp x25, x26, [sp, #64]
40028824: a9000a63 stp x3, x2, [x19]
ctx->tokenlen = 0;
40028828: f9000e7f str xzr, [x19, #24]
4002882c: a94153f3 ldp x19, x20, [sp, #16]
40028830: a8c57bfd ldp x29, x30, [sp], #80
rtems_filesystem_eval_path_restart(
40028834: 17ffe707 b 40022450 <rtems_filesystem_eval_path_restart>
&& (*mt_entry->ops->are_nodes_equal_h)( loc, rootloc );
40028838: aa1703e0 mov x0, x23
4002883c: d63f0060 blr x3
40028840: 72001c1f tst w0, #0xff
40028844: 54fff6e1 b.ne 40028720 <rtems_filesystem_eval_path_generic+0xc0> // b.any
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
40028848: f94016e2 ldr x2, [x23, #40]
return (*mt_entry->ops->are_nodes_equal_h)( loc, mt_fs_root );
4002884c: f9400c40 ldr x0, [x2, #24]
40028850: f9402441 ldr x1, [x2, #72]
40028854: f9401003 ldr x3, [x0, #32]
40028858: aa1703e0 mov x0, x23
4002885c: d63f0060 blr x3
} else if (is_fs_root(currentloc)) {
40028860: 72001c1f tst w0, #0xff
40028864: 54fffc81 b.ne 400287f4 <rtems_filesystem_eval_path_generic+0x194> // b.any<== NEVER TAKEN
status = (*config->eval_token)(ctx, arg, "..", 2);
40028868: f9400684 ldr x4, [x20, #8]
4002886c: aa1803e2 mov x2, x24
40028870: aa1503e1 mov x1, x21
40028874: aa1303e0 mov x0, x19
40028878: d2800043 mov x3, #0x2 // #2
4002887c: d63f0080 blr x4
40028880: 17ffff9d b 400286f4 <rtems_filesystem_eval_path_generic+0x94>
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
40028884: aa1303e0 mov x0, x19
40028888: 52800281 mov w1, #0x14 // #20
}
4002888c: a94153f3 ldp x19, x20, [sp, #16]
40028890: a9425bf5 ldp x21, x22, [sp, #32]
40028894: a94363f7 ldp x23, x24, [sp, #48]
40028898: a9446bf9 ldp x25, x26, [sp, #64]
4002889c: a8c57bfd ldp x29, x30, [sp], #80
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
400288a0: 17ffe6bc b 40022390 <rtems_filesystem_eval_path_error>
...
0000000040028900 <rtems_filesystem_eval_path_next_token>:
const char *end = current + ctx->pathlen;
40028900: a9401001 ldp x1, x4, [x0]
40028904: 52800b83 mov w3, #0x5c // #92
40028908: 8b040024 add x4, x1, x4
while (current != end && rtems_filesystem_is_delimiter(*current)) {
4002890c: eb04003f cmp x1, x4
40028910: 540000a1 b.ne 40028924 <rtems_filesystem_eval_path_next_token+0x24> // b.any
40028914: 1400001b b 40028980 <rtems_filesystem_eval_path_next_token+0x80>
++current;
40028918: 91000421 add x1, x1, #0x1
while (current != end && rtems_filesystem_is_delimiter(*current)) {
4002891c: eb01009f cmp x4, x1
40028920: 54000300 b.eq 40028980 <rtems_filesystem_eval_path_next_token+0x80> // b.none
40028924: 39400022 ldrb w2, [x1]
40028928: 7100bc5f cmp w2, #0x2f
4002892c: 7a431044 ccmp w2, w3, #0x4, ne // ne = any
40028930: 54ffff40 b.eq 40028918 <rtems_filesystem_eval_path_next_token+0x18> // b.none
{
const char *begin = ctx->path;
const char *end = begin + ctx->pathlen;
const char *current = begin;
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
40028934: eb010086 subs x6, x4, x1
ctx->pathlen = (size_t) (end - current);
40028938: a9001801 stp x1, x6, [x0]
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
4002893c: aa0103e2 mov x2, x1
40028940: 52800b85 mov w5, #0x5c // #92
40028944: 540000a1 b.ne 40028958 <rtems_filesystem_eval_path_next_token+0x58> // b.any<== ALWAYS TAKEN
40028948: 14000018 b 400289a8 <rtems_filesystem_eval_path_next_token+0xa8> <== NOT EXECUTED
++current;
4002894c: 91000442 add x2, x2, #0x1
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
40028950: eb04005f cmp x2, x4
40028954: 54000220 b.eq 40028998 <rtems_filesystem_eval_path_next_token+0x98> // b.none
40028958: 39400043 ldrb w3, [x2]
4002895c: 7100bc7f cmp w3, #0x2f
40028960: 7a451064 ccmp w3, w5, #0x4, ne // ne = any
40028964: 54ffff41 b.ne 4002894c <rtems_filesystem_eval_path_next_token+0x4c> // b.any
}
ctx->path = current;
ctx->pathlen = (size_t) (end - current);
40028968: cb020083 sub x3, x4, x2
ctx->token = begin;
ctx->tokenlen = (size_t) (current - begin);
4002896c: cb010046 sub x6, x2, x1
40028970: aa0203e4 mov x4, x2
ctx->pathlen = (size_t) (end - current);
40028974: a9000c04 stp x4, x3, [x0]
ctx->tokenlen = (size_t) (current - begin);
40028978: a9011801 stp x1, x6, [x0, #16]
rtems_filesystem_eval_path_context_t *ctx
)
{
rtems_filesystem_eval_path_eat_delimiter(ctx);
next_token(ctx);
}
4002897c: d65f03c0 ret
ctx->tokenlen = (size_t) (current - begin);
40028980: aa0103e4 mov x4, x1
ctx->pathlen = (size_t) (end - current);
40028984: d2800003 mov x3, #0x0 // #0
ctx->tokenlen = (size_t) (current - begin);
40028988: d2800006 mov x6, #0x0 // #0
ctx->pathlen = (size_t) (end - current);
4002898c: a9000c04 stp x4, x3, [x0]
ctx->tokenlen = (size_t) (current - begin);
40028990: a9011801 stp x1, x6, [x0, #16]
}
40028994: d65f03c0 ret
40028998: d2800003 mov x3, #0x0 // #0
ctx->pathlen = (size_t) (end - current);
4002899c: a9000c04 stp x4, x3, [x0]
ctx->tokenlen = (size_t) (current - begin);
400289a0: a9011801 stp x1, x6, [x0, #16]
}
400289a4: d65f03c0 ret
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
400289a8: aa0603e3 mov x3, x6 <== NOT EXECUTED
400289ac: d2800006 mov x6, #0x0 // #0 <== NOT EXECUTED
400289b0: 17fffff7 b 4002898c <rtems_filesystem_eval_path_next_token+0x8c> <== NOT EXECUTED
...
00000000400224d0 <rtems_filesystem_eval_path_recursive>:
{
400224d0: a9bc7bfd stp x29, x30, [sp, #-64]!
400224d4: 910003fd mov x29, sp
400224d8: a90153f3 stp x19, x20, [sp, #16]
400224dc: aa0003f3 mov x19, x0
if (pathlen > 0) {
400224e0: b4000662 cbz x2, 400225ac <rtems_filesystem_eval_path_recursive+0xdc> <== NEVER TAKEN
400224e4: a9025bf5 stp x21, x22, [sp, #32]
400224e8: aa0103f5 mov x21, x1
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
400224ec: b9402401 ldr w1, [x0, #36]
400224f0: 71007c3f cmp w1, #0x1f
400224f4: 540003ac b.gt 40022568 <rtems_filesystem_eval_path_recursive+0x98>
size_t saved_pathlen = ctx->pathlen;
400224f8: f9400416 ldr x22, [x0, #8]
400224fc: f9001bf7 str x23, [sp, #48]
40022500: aa0203f4 mov x20, x2
return c == '/' || c == '\\';
40022504: 52800b83 mov w3, #0x5c // #92
if (rtems_filesystem_is_delimiter(path [0])) {
40022508: 394002a2 ldrb w2, [x21]
const char *saved_path = ctx->path;
4002250c: f9400017 ldr x23, [x0]
40022510: 7100bc5f cmp w2, #0x2f
if (rtems_filesystem_is_delimiter(path [0])) {
40022514: 7a431044 ccmp w2, w3, #0x4, ne // ne = any
40022518: 540006e0 b.eq 400225f4 <rtems_filesystem_eval_path_recursive+0x124> // b.none
++ctx->recursionlevel;
4002251c: 11000421 add w1, w1, #0x1
ctx->pathlen = pathlen;
40022520: a9005275 stp x21, x20, [x19]
++ctx->recursionlevel;
40022524: b9002661 str w1, [x19, #36]
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
40022528: f9402a61 ldr x1, [x19, #80]
4002252c: aa1303e0 mov x0, x19
40022530: f9400c21 ldr x1, [x1, #24]
40022534: f9400821 ldr x1, [x1, #16]
40022538: d63f0020 blr x1
while (ctx->pathlen > 0) {
4002253c: f9400660 ldr x0, [x19, #8]
40022540: b5ffff40 cbnz x0, 40022528 <rtems_filesystem_eval_path_recursive+0x58>
ctx->pathlen = saved_pathlen;
40022544: a9005a77 stp x23, x22, [x19]
--ctx->recursionlevel;
40022548: b9402660 ldr w0, [x19, #36]
4002254c: a9425bf5 ldp x21, x22, [sp, #32]
40022550: 51000400 sub w0, w0, #0x1
40022554: f9401bf7 ldr x23, [sp, #48]
40022558: b9002660 str w0, [x19, #36]
}
4002255c: a94153f3 ldp x19, x20, [sp, #16]
40022560: a8c47bfd ldp x29, x30, [sp], #64
40022564: d65f03c0 ret
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
40022568: f9402401 ldr x1, [x0, #72]
ctx->pathlen = 0;
4002256c: a9007e7f stp xzr, xzr, [x19]
return loc->handlers == &rtems_filesystem_null_handlers;
40022570: 9100a014 add x20, x0, #0x28
ctx->tokenlen = 0;
40022574: a9017e7f stp xzr, xzr, [x19, #16]
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
40022578: d00000c0 adrp x0, 4003c000 <_Scheduler_Table+0x48>
4002257c: 91278000 add x0, x0, #0x9e0
40022580: eb00003f cmp x1, x0
40022584: 54000340 b.eq 400225ec <rtems_filesystem_eval_path_recursive+0x11c> // b.none<== NEVER TAKEN
errno = eno;
40022588: 940030ce bl 4002e8c0 <__errno>
4002258c: aa0003e1 mov x1, x0
40022590: 52800b82 mov w2, #0x5c // #92
rtems_filesystem_location_detach(&ctx->currentloc);
40022594: aa1403e0 mov x0, x20
}
40022598: a94153f3 ldp x19, x20, [sp, #16]
rtems_filesystem_location_detach(&ctx->currentloc);
4002259c: a9425bf5 ldp x21, x22, [sp, #32]
errno = eno;
400225a0: b9000022 str w2, [x1]
}
400225a4: a8c47bfd ldp x29, x30, [sp], #64
rtems_filesystem_location_detach(&ctx->currentloc);
400225a8: 1400002e b 40022660 <rtems_filesystem_location_detach>
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
400225ac: f9402401 ldr x1, [x0, #72] <== NOT EXECUTED
ctx->pathlen = 0;
400225b0: a9007e7f stp xzr, xzr, [x19] <== NOT EXECUTED
400225b4: 9100a014 add x20, x0, #0x28 <== NOT EXECUTED
ctx->tokenlen = 0;
400225b8: a9017e7f stp xzr, xzr, [x19, #16] <== NOT EXECUTED
if (!rtems_filesystem_location_is_null(&ctx->currentloc)) {
400225bc: d00000c0 adrp x0, 4003c000 <_Scheduler_Table+0x48> <== NOT EXECUTED
400225c0: 91278000 add x0, x0, #0x9e0 <== NOT EXECUTED
400225c4: eb00003f cmp x1, x0 <== NOT EXECUTED
400225c8: 54fffca0 b.eq 4002255c <rtems_filesystem_eval_path_recursive+0x8c> // b.none<== NOT EXECUTED
errno = eno;
400225cc: 940030bd bl 4002e8c0 <__errno> <== NOT EXECUTED
400225d0: aa0003e1 mov x1, x0 <== NOT EXECUTED
400225d4: 52800042 mov w2, #0x2 // #2 <== NOT EXECUTED
rtems_filesystem_location_detach(&ctx->currentloc);
400225d8: aa1403e0 mov x0, x20 <== NOT EXECUTED
}
400225dc: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
errno = eno;
400225e0: b9000022 str w2, [x1] <== NOT EXECUTED
}
400225e4: a8c47bfd ldp x29, x30, [sp], #64 <== NOT EXECUTED
rtems_filesystem_location_detach(&ctx->currentloc);
400225e8: 1400001e b 40022660 <rtems_filesystem_location_detach> <== NOT EXECUTED
400225ec: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
400225f0: 17ffffdb b 4002255c <rtems_filesystem_eval_path_recursive+0x8c> <== NOT EXECUTED
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
400225f4: 91016001 add x1, x0, #0x58
400225f8: 97ffff96 bl 40022450 <rtems_filesystem_eval_path_restart>
++ctx->recursionlevel;
400225fc: b9402661 ldr w1, [x19, #36]
40022600: 17ffffc7 b 4002251c <rtems_filesystem_eval_path_recursive+0x4c>
...
0000000040024e40 <rtems_filesystem_eval_path_start_with_parent>:
{
40024e40: a9ba7bfd stp x29, x30, [sp, #-96]!
40024e44: 910003fd mov x29, sp
40024e48: a90153f3 stp x19, x20, [sp, #16]
40024e4c: aa0103f4 mov x20, x1
40024e50: a9025bf5 stp x21, x22, [sp, #32]
40024e54: aa0003f5 mov x21, x0
40024e58: 2a0203f6 mov w22, w2
size_t pathlen = strlen(path);
40024e5c: aa0103e0 mov x0, x1
{
40024e60: a90363f7 stp x23, x24, [sp, #48]
40024e64: aa0303f7 mov x23, x3
40024e68: 2a0403f8 mov w24, w4
40024e6c: a9046bf9 stp x25, x26, [sp, #64]
40024e70: f9002bfb str x27, [sp, #80]
size_t pathlen = strlen(path);
40024e74: 94004235 bl 40035748 <strlen>
return c == '/' || c == '\\';
40024e78: 52800b81 mov w1, #0x5c // #92
40024e7c: aa0003f9 mov x25, x0
40024e80: aa0003f3 mov x19, x0
while (pathlen > 0) {
40024e84: 14000006 b 40024e9c <rtems_filesystem_eval_path_start_with_parent+0x5c>
if (rtems_filesystem_is_delimiter(path [i])) {
40024e88: 38656a86 ldrb w6, [x20, x5]
40024e8c: 7100bcdf cmp w6, #0x2f
40024e90: 7a4110c4 ccmp w6, w1, #0x4, ne // ne = any
40024e94: 54000480 b.eq 40024f24 <rtems_filesystem_eval_path_start_with_parent+0xe4> // b.none
pathlen = i;
40024e98: aa0503f3 mov x19, x5
size_t i = pathlen - 1;
40024e9c: d1000665 sub x5, x19, #0x1
while (pathlen > 0) {
40024ea0: b5ffff53 cbnz x19, 40024e88 <rtems_filesystem_eval_path_start_with_parent+0x48>
const char *name = NULL;
40024ea4: d280001b mov x27, #0x0 // #0
if (pathlen > 0) {
40024ea8: b5000359 cbnz x25, 40024f10 <rtems_filesystem_eval_path_start_with_parent+0xd0>
&rtems_filesystem_root,
40024eac: 9400029d bl 40025920 <rtems_current_user_env_get>
40024eb0: aa0003fa mov x26, x0
&rtems_filesystem_current
40024eb4: 9400029b bl 40025920 <rtems_current_user_env_get>
currentloc = rtems_filesystem_eval_path_start_with_root_and_current(
40024eb8: aa0003e5 mov x5, x0
40024ebc: 91002344 add x4, x26, #0x8
40024ec0: 2a1803e3 mov w3, w24
40024ec4: aa1303e2 mov x2, x19
40024ec8: aa1403e1 mov x1, x20
40024ecc: aa1503e0 mov x0, x21
40024ed0: 97ffff7c bl 40024cc0 <rtems_filesystem_eval_path_start_with_root_and_current>
rtems_filesystem_location_clone(parentloc, currentloc);
40024ed4: aa0003e1 mov x1, x0
40024ed8: aa1703e0 mov x0, x23
40024edc: 94002931 bl 4002f3a0 <rtems_filesystem_location_clone>
ctx->pathlen = namelen;
40024ee0: a90066bb stp x27, x25, [x21]
rtems_filesystem_eval_path_continue(ctx);
40024ee4: aa1503e0 mov x0, x21
ctx->flags = eval_flags;
40024ee8: b90022b6 str w22, [x21, #32]
rtems_filesystem_eval_path_continue(ctx);
40024eec: 97ffff35 bl 40024bc0 <rtems_filesystem_eval_path_continue>
return &ctx->currentloc;
40024ef0: 9100a2a0 add x0, x21, #0x28
}
40024ef4: a94153f3 ldp x19, x20, [sp, #16]
40024ef8: a9425bf5 ldp x21, x22, [sp, #32]
40024efc: a94363f7 ldp x23, x24, [sp, #48]
40024f00: a9446bf9 ldp x25, x26, [sp, #64]
40024f04: f9402bfb ldr x27, [sp, #80]
40024f08: a8c67bfd ldp x29, x30, [sp], #96
40024f0c: d65f03c0 ret
if (pathlen > 0) {
40024f10: aa1403fb mov x27, x20
parentpathlen = 1;
40024f14: d2800033 mov x19, #0x1 // #1
parentpath = ".";
40024f18: d00000f4 adrp x20, 40042000 <test_state_strings+0x50>
40024f1c: 91126294 add x20, x20, #0x498
40024f20: 17ffffe3 b 40024eac <rtems_filesystem_eval_path_start_with_parent+0x6c>
const char *name = NULL;
40024f24: d280001b mov x27, #0x0 // #0
if (pathlen > 0) {
40024f28: b4fffc39 cbz x25, 40024eac <rtems_filesystem_eval_path_start_with_parent+0x6c><== NEVER TAKEN
namelen = pathlen - parentpathlen;
40024f2c: cb130339 sub x25, x25, x19
name = path + parentpathlen;
40024f30: 8b13029b add x27, x20, x19
namelen = pathlen - parentpathlen;
40024f34: 17ffffde b 40024eac <rtems_filesystem_eval_path_start_with_parent+0x6c>
...
0000000040021cf0 <rtems_filesystem_get_mount_handler>:
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
40021cf0: b4000500 cbz x0, 40021d90 <rtems_filesystem_get_mount_handler+0xa0> <== NEVER TAKEN
{
40021cf4: a9bc7bfd stp x29, x30, [sp, #-64]!
40021cf8: 910003fd mov x29, sp
40021cfc: a90153f3 stp x19, x20, [sp, #16]
40021d00: aa0003f3 mov x19, x0
while ( table_entry->type && !stop ) {
40021d04: f00000d4 adrp x20, 4003c000 <_Scheduler_Table+0x48>
40021d08: f940ee80 ldr x0, [x20, #472]
40021d0c: 91076294 add x20, x20, #0x1d8
40021d10: b40000e0 cbz x0, 40021d2c <rtems_filesystem_get_mount_handler+0x3c> <== NEVER TAKEN
40021d14: d503201f nop
if ( strcmp( entry->type, fa->type ) != 0 ) {
40021d18: aa1303e1 mov x1, x19
40021d1c: 940035c2 bl 4002f424 <strcmp>
40021d20: 34000300 cbz w0, 40021d80 <rtems_filesystem_get_mount_handler+0x90>
while ( table_entry->type && !stop ) {
40021d24: f8410e80 ldr x0, [x20, #16]!
40021d28: b5ffff80 cbnz x0, 40021d18 <rtems_filesystem_get_mount_handler+0x28>
rtems_libio_lock();
40021d2c: a9025bf5 stp x21, x22, [sp, #32]
40021d30: 940019a4 bl 400283c0 <rtems_libio_lock>
return _Chain_Immutable_head( the_chain )->next;
40021d34: f00006e0 adrp x0, 40100000 <_RTEMS_tasks_Information>
40021d38: 91054016 add x22, x0, #0x150
40021d3c: f940a814 ldr x20, [x0, #336]
for (
40021d40: 910022d6 add x22, x22, #0x8
40021d44: eb16029f cmp x20, x22
40021d48: 540002e0 b.eq 40021da4 <rtems_filesystem_get_mount_handler+0xb4> // b.none<== ALWAYS TAKEN
40021d4c: d503201f nop
if ( strcmp( entry->type, fa->type ) != 0 ) {
40021d50: f9400a80 ldr x0, [x20, #16] <== NOT EXECUTED
40021d54: aa1303e1 mov x1, x19 <== NOT EXECUTED
40021d58: 940035b3 bl 4002f424 <strcmp> <== NOT EXECUTED
40021d5c: 350001e0 cbnz w0, 40021d98 <rtems_filesystem_get_mount_handler+0xa8><== NOT EXECUTED
fa->mount_h = entry->mount_h;
40021d60: f9400e80 ldr x0, [x20, #24] <== NOT EXECUTED
return &the_chain->Tail.Node;
40021d64: f9001fe0 str x0, [sp, #56]
rtems_libio_unlock();
40021d68: 9400199a bl 400283d0 <rtems_libio_unlock>
rtems_filesystem_iterate( find_handler, &fa );
}
return fa.mount_h;
}
40021d6c: a94153f3 ldp x19, x20, [sp, #16]
return fa.mount_h;
40021d70: a9425bf5 ldp x21, x22, [sp, #32]
40021d74: f9401fe0 ldr x0, [sp, #56]
}
40021d78: a8c47bfd ldp x29, x30, [sp], #64
40021d7c: d65f03c0 ret
fa->mount_h = entry->mount_h;
40021d80: f9400680 ldr x0, [x20, #8]
}
40021d84: a94153f3 ldp x19, x20, [sp, #16]
40021d88: a8c47bfd ldp x29, x30, [sp], #64
40021d8c: d65f03c0 ret
find_arg fa = {
40021d90: d2800000 mov x0, #0x0 // #0 <== NOT EXECUTED
}
40021d94: d65f03c0 ret <== NOT EXECUTED
return the_node->next;
40021d98: f9400294 ldr x20, [x20] <== NOT EXECUTED
for (
40021d9c: eb16029f cmp x20, x22 <== NOT EXECUTED
40021da0: 54fffd81 b.ne 40021d50 <rtems_filesystem_get_mount_handler+0x60> // b.any<== NOT EXECUTED
find_arg fa = {
40021da4: d2800000 mov x0, #0x0 // #0
40021da8: 17ffffef b 40021d64 <rtems_filesystem_get_mount_handler+0x74>
40021dac: 00000000 udf #0
0000000040022870 <rtems_filesystem_global_location_obtain>:
{
40022870: a9be7bfd stp x29, x30, [sp, #-32]!
40022874: 910003fd mov x29, sp
40022878: a90153f3 stp x19, x20, [sp, #16]
if (deferred_released_global_locations != NULL) {
4002287c: f0000713 adrp x19, 40105000 <Arr_2_Glob+0x1e68>
40022880: f944f661 ldr x1, [x19, #2536]
{
40022884: aa0003f4 mov x20, x0
if (deferred_released_global_locations != NULL) {
40022888: b4000341 cbz x1, 400228f0 <rtems_filesystem_global_location_obtain+0x80>
__asm__ volatile (
4002288c: 9127a273 add x19, x19, #0x9e8
40022890: d53b4222 mrs x2, daif
40022894: d50342df msr daifset, #0x2
current = deferred_released_global_locations;
40022898: f9400260 ldr x0, [x19]
int count = 0;
4002289c: 52800001 mov w1, #0x0 // #0
if (current != NULL) {
400228a0: b40000e0 cbz x0, 400228bc <rtems_filesystem_global_location_obtain+0x4c><== NEVER TAKEN
400228a4: d503201f nop
deferred_released_global_locations = current->deferred_released_next;
400228a8: f9401c01 ldr x1, [x0, #56]
400228ac: f9000261 str x1, [x19]
count = current->deferred_released_count;
400228b0: b9404001 ldr w1, [x0, #64]
current->deferred_released_next = NULL;
400228b4: f9001c1f str xzr, [x0, #56]
current->deferred_released_count = 0;
400228b8: b900401f str wzr, [x0, #64]
__asm__ volatile (
400228bc: 92407c42 and x2, x2, #0xffffffff
400228c0: d51b4222 msr daif, x2
if (current != NULL) {
400228c4: b4000160 cbz x0, 400228f0 <rtems_filesystem_global_location_obtain+0x80><== NEVER TAKEN
release_with_count(current, count);
400228c8: 97ffffb6 bl 400227a0 <release_with_count>
__asm__ volatile (
400228cc: d53b4222 mrs x2, daif
400228d0: d50342df msr daifset, #0x2
current = deferred_released_global_locations;
400228d4: f9400260 ldr x0, [x19]
int count = 0;
400228d8: 52800001 mov w1, #0x0 // #0
if (current != NULL) {
400228dc: b5fffe60 cbnz x0, 400228a8 <rtems_filesystem_global_location_obtain+0x38>
__asm__ volatile (
400228e0: 92407c42 and x2, x2, #0xffffffff
400228e4: d51b4222 msr daif, x2
if (current != NULL) {
400228e8: b5ffff00 cbnz x0, 400228c8 <rtems_filesystem_global_location_obtain+0x58><== NEVER TAKEN
400228ec: d503201f nop
__asm__ volatile (
400228f0: d53b4233 mrs x19, daif
400228f4: d50342df msr daifset, #0x2
global_loc = *global_loc_ptr;
400228f8: f9400280 ldr x0, [x20]
if (global_loc == NULL || !global_loc->location.mt_entry->mounted) {
400228fc: b4000080 cbz x0, 4002290c <rtems_filesystem_global_location_obtain+0x9c>
40022900: f9401401 ldr x1, [x0, #40]
40022904: 39414021 ldrb w1, [x1, #80]
40022908: 350000e1 cbnz w1, 40022924 <rtems_filesystem_global_location_obtain+0xb4>
errno = ENXIO;
4002290c: 94002fed bl 4002e8c0 <__errno>
40022910: aa0003e2 mov x2, x0
global_loc = &rtems_filesystem_global_location_null;
40022914: d00006e1 adrp x1, 40100000 <_RTEMS_tasks_Information>
40022918: 9105a020 add x0, x1, #0x168
errno = ENXIO;
4002291c: 528000c1 mov w1, #0x6 // #6
40022920: b9000041 str w1, [x2]
++global_loc->reference_count;
40022924: b9403001 ldr w1, [x0, #48]
40022928: 11000421 add w1, w1, #0x1
4002292c: b9003001 str w1, [x0, #48]
__asm__ volatile (
40022930: 92407e73 and x19, x19, #0xffffffff
40022934: d51b4233 msr daif, x19
}
40022938: a94153f3 ldp x19, x20, [sp, #16]
4002293c: a8c27bfd ldp x29, x30, [sp], #32
40022940: d65f03c0 ret
...
0000000040022950 <rtems_filesystem_global_location_release>:
if (!deferred) {
40022950: 72001c3f tst w1, #0xff
{
40022954: aa0003e1 mov x1, x0
if (!deferred) {
40022958: 54000260 b.eq 400229a4 <rtems_filesystem_global_location_release+0x54> // b.none
__asm__ volatile (
4002295c: d53b4220 mrs x0, daif
40022960: d50342df msr daifset, #0x2
if (global_loc->deferred_released_count == 0) {
40022964: b9404022 ldr w2, [x1, #64]
40022968: 340000c2 cbz w2, 40022980 <rtems_filesystem_global_location_release+0x30><== ALWAYS TAKEN
++global_loc->deferred_released_count;
4002296c: 11000442 add w2, w2, #0x1 <== NOT EXECUTED
40022970: b9004022 str w2, [x1, #64] <== NOT EXECUTED
__asm__ volatile (
40022974: 92407c00 and x0, x0, #0xffffffff <== NOT EXECUTED
40022978: d51b4220 msr daif, x0 <== NOT EXECUTED
}
4002297c: d65f03c0 ret <== NOT EXECUTED
rtems_filesystem_global_location_t *head =
40022980: f0000702 adrp x2, 40105000 <Arr_2_Glob+0x1e68>
40022984: f944f444 ldr x4, [x2, #2536]
global_loc->deferred_released_count = 1;
40022988: 52800023 mov w3, #0x1 // #1
deferred_released_global_locations = global_loc;
4002298c: f904f441 str x1, [x2, #2536]
global_loc->deferred_released_next = head;
40022990: f9001c24 str x4, [x1, #56]
global_loc->deferred_released_count = 1;
40022994: b9004023 str w3, [x1, #64]
40022998: 92407c00 and x0, x0, #0xffffffff
4002299c: d51b4220 msr daif, x0
}
400229a0: d65f03c0 ret
release_with_count(global_loc, 1);
400229a4: 52800021 mov w1, #0x1 // #1
400229a8: 17ffff7e b 400227a0 <release_with_count>
400229ac: 00000000 udf #0
0000000040021450 <rtems_filesystem_initialize>:
{
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
40021450: f00000c0 adrp x0, 4003c000 <_Scheduler_Table+0x48>
40021454: 9106c004 add x4, x0, #0x1b0
{
40021458: a9bf7bfd stp x29, x30, [sp, #-16]!
4002145c: 910003fd mov x29, sp
rv = mount(
40021460: a9408881 ldp x1, x2, [x4, #8]
40021464: b9401883 ldr w3, [x4, #24]
40021468: f940d800 ldr x0, [x0, #432]
4002146c: f9401084 ldr x4, [x4, #32]
40021470: 94000134 bl 40021940 <mount>
root_config->target,
root_config->filesystemtype,
root_config->options,
root_config->data
);
if ( rv != 0 )
40021474: 35000100 cbnz w0, 40021494 <rtems_filesystem_initialize+0x44> <== NEVER TAKEN
* Traditionally RTEMS devices are under "/dev" so install this directory.
*
* If the mkdir() fails, we can't print anything so just fatal error.
*/
rv = mkdir( "/dev", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH );
40021478: f00000c0 adrp x0, 4003c000 <_Scheduler_Table+0x48>
4002147c: 52803da1 mov w1, #0x1ed // #493
40021480: 91218000 add x0, x0, #0x860
40021484: 940000e3 bl 40021810 <mkdir>
if ( rv != 0 )
40021488: 350000c0 cbnz w0, 400214a0 <rtems_filesystem_initialize+0x50> <== NEVER TAKEN
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
4002148c: a8c17bfd ldp x29, x30, [sp], #16
40021490: d65f03c0 ret
rtems_fatal_error_occurred( 0xABCD0002 );
40021494: 52800040 mov w0, #0x2 // #2 <== NOT EXECUTED
40021498: 72b579a0 movk w0, #0xabcd, lsl #16 <== NOT EXECUTED
4002149c: 94000da9 bl 40024b40 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_fatal_error_occurred( 0xABCD0003 );
400214a0: 52800060 mov w0, #0x3 // #3 <== NOT EXECUTED
400214a4: 72b579a0 movk w0, #0xabcd, lsl #16 <== NOT EXECUTED
400214a8: 94000da6 bl 40024b40 <rtems_fatal_error_occurred> <== NOT EXECUTED
400214ac: 00000000 udf #0
00000000400229b0 <rtems_filesystem_location_remove_from_mt_entry>:
__asm__ volatile (
400229b0: d53b4222 mrs x2, daif
400229b4: d50342df msr daifset, #0x2
previous = the_node->previous;
400229b8: a9400c04 ldp x4, x3, [x0]
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
400229bc: f9401401 ldr x1, [x0, #40]
400229c0: 39414025 ldrb w5, [x1, #80]
next->previous = previous;
400229c4: f9000483 str x3, [x4, #8]
previous->next = next;
400229c8: f9000064 str x4, [x3]
400229cc: 34000085 cbz w5, 400229dc <rtems_filesystem_location_remove_from_mt_entry+0x2c>
__asm__ volatile (
400229d0: 92407c42 and x2, x2, #0xffffffff
400229d4: d51b4222 msr daif, x2
}
400229d8: d65f03c0 ret
&& rtems_chain_has_only_one_node( &mt_entry->location_chain )
400229dc: f9401426 ldr x6, [x1, #40]
return _Chain_Immutable_tail( the_chain )->previous;
400229e0: 9100c023 add x3, x1, #0x30
400229e4: f9400465 ldr x5, [x3, #8]
400229e8: 92407c42 and x2, x2, #0xffffffff
return _Chain_Immutable_head( the_chain )->next;
400229ec: 9100a024 add x4, x1, #0x28
400229f0: eb0500df cmp x6, x5
400229f4: 540000a1 b.ne 40022a08 <rtems_filesystem_location_remove_from_mt_entry+0x58> // b.any
&& mt_entry->mt_fs_root->reference_count == 1;
400229f8: f9402425 ldr x5, [x1, #72]
400229fc: b94030a5 ldr w5, [x5, #48]
40022a00: 710004bf cmp w5, #0x1
40022a04: 54000060 b.eq 40022a10 <rtems_filesystem_location_remove_from_mt_entry+0x60> // b.none<== NEVER TAKEN
40022a08: d51b4222 msr daif, x2
40022a0c: d65f03c0 ret
head->next = tail;
40022a10: f9001423 str x3, [x1, #40] <== NOT EXECUTED
head->previous = NULL;
40022a14: f900049f str xzr, [x4, #8] <== NOT EXECUTED
tail->previous = head;
40022a18: f9000464 str x4, [x3, #8] <== NOT EXECUTED
40022a1c: d51b4222 msr daif, x2 <== NOT EXECUTED
rtems_filesystem_do_unmount(loc->mt_entry);
40022a20: f9401400 ldr x0, [x0, #40] <== NOT EXECUTED
40022a24: 17ffff43 b 40022730 <rtems_filesystem_do_unmount> <== NOT EXECUTED
...
0000000040022af0 <rtems_filesystem_location_transform_to_global>:
{
40022af0: a9bd7bfd stp x29, x30, [sp, #-48]!
40022af4: 910003fd mov x29, sp
40022af8: a90153f3 stp x19, x20, [sp, #16]
40022afc: aa0003f4 mov x20, x0
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
40022b00: d2800900 mov x0, #0x48 // #72
40022b04: 97fffac7 bl 40021620 <malloc>
if (global_loc != NULL) {
40022b08: b4000360 cbz x0, 40022b74 <rtems_filesystem_location_transform_to_global+0x84><== NEVER TAKEN
40022b0c: aa0003f3 mov x19, x0
global_loc->reference_count = 1;
40022b10: 52800020 mov w0, #0x1 // #1
dst->node_access_2 = src->node_access_2;
40022b14: a9410682 ldp x2, x1, [x20, #16]
40022b18: a9010662 stp x2, x1, [x19, #16]
dst->mt_entry = src->mt_entry;
40022b1c: a9420682 ldp x2, x1, [x20, #32]
40022b20: a9020662 stp x2, x1, [x19, #32]
global_loc->reference_count = 1;
40022b24: b9003260 str w0, [x19, #48]
global_loc->deferred_released_next = NULL;
40022b28: f9001e7f str xzr, [x19, #56]
global_loc->deferred_released_count = 0;
40022b2c: b900427f str wzr, [x19, #64]
__asm__ volatile (
40022b30: d53b4221 mrs x1, daif
40022b34: d50342df msr daifset, #0x2
40022b38: f9401660 ldr x0, [x19, #40]
old_last = tail->previous;
40022b3c: 9100c000 add x0, x0, #0x30
40022b40: f9400402 ldr x2, [x0, #8]
the_node->next = tail;
40022b44: f9000260 str x0, [x19]
tail->previous = the_node;
40022b48: f9000413 str x19, [x0, #8]
old_last->next = the_node;
40022b4c: f9000053 str x19, [x2]
the_node->previous = old_last;
40022b50: f9000662 str x2, [x19, #8]
__asm__ volatile (
40022b54: 92407c20 and x0, x1, #0xffffffff
40022b58: d51b4220 msr daif, x0
rtems_filesystem_location_remove_from_mt_entry(loc);
40022b5c: aa1403e0 mov x0, x20
40022b60: 97ffff94 bl 400229b0 <rtems_filesystem_location_remove_from_mt_entry>
}
40022b64: aa1303e0 mov x0, x19
40022b68: a94153f3 ldp x19, x20, [sp, #16]
40022b6c: a8c37bfd ldp x29, x30, [sp], #48
40022b70: d65f03c0 ret
rtems_filesystem_location_free(loc);
40022b74: aa1403e0 mov x0, x20 <== NOT EXECUTED
40022b78: 940015d2 bl 400282c0 <rtems_filesystem_location_free> <== NOT EXECUTED
return rtems_filesystem_global_location_obtain( &global_loc );
40022b7c: 9100a3e0 add x0, sp, #0x28 <== NOT EXECUTED
rtems_filesystem_global_location_t *global_loc = NULL;
40022b80: f90017ff str xzr, [sp, #40] <== NOT EXECUTED
return rtems_filesystem_global_location_obtain( &global_loc );
40022b84: 97ffff3b bl 40022870 <rtems_filesystem_global_location_obtain> <== NOT EXECUTED
40022b88: aa0003f3 mov x19, x0 <== NOT EXECUTED
errno = ENOMEM;
40022b8c: 94002f4d bl 4002e8c0 <__errno> <== NOT EXECUTED
40022b90: 52800181 mov w1, #0xc // #12 <== NOT EXECUTED
40022b94: b9000001 str w1, [x0] <== NOT EXECUTED
return global_loc;
40022b98: 17fffff3 b 40022b64 <rtems_filesystem_location_transform_to_global+0x74><== NOT EXECUTED
40022b9c: 00000000 udf #0
0000000040021820 <rtems_filesystem_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
40021820: a9bc7bfd stp x29, x30, [sp, #-64]!
40021824: 910003fd mov x29, sp
40021828: a90153f3 stp x19, x20, [sp, #16]
4002182c: 2a0303f4 mov w20, w3
40021830: aa0003f3 mov x19, x0
40021834: a9025bf5 stp x21, x22, [sp, #32]
40021838: aa0103f5 mov x21, x1
4002183c: aa0203f6 mov x22, x2
40021840: f9001bf7 str x23, [sp, #48]
40021844: aa0403f7 mov x23, x4
int rv = 0;
mode &= ~rtems_filesystem_umask;
40021848: 9400051a bl 40022cb0 <rtems_current_user_env_get>
4002184c: b9401005 ldr w5, [x0, #16]
40021850: 0a250283 bic w3, w20, w5
switch (mode & S_IFMT) {
40021854: 12140c65 and w5, w3, #0xf000
40021858: 714010bf cmp w5, #0x4, lsl #12
4002185c: 54000240 b.eq 400218a4 <rtems_filesystem_mknod+0x84> // b.none
40021860: 540001c9 b.ls 40021898 <rtems_filesystem_mknod+0x78> // b.plast
40021864: 514018a5 sub w5, w5, #0x6, lsl #12
40021868: 121278a5 and w5, w5, #0xffffdfff
4002186c: 340001c5 cbz w5, 400218a4 <rtems_filesystem_mknod+0x84> <== ALWAYS TAKEN
case S_IFDIR:
case S_IFIFO:
case S_IFREG:
break;
default:
errno = EINVAL;
40021870: 94003414 bl 4002e8c0 <__errno>
40021874: aa0003e1 mov x1, x0
40021878: 528002c2 mov w2, #0x16 // #22
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
}
return rv;
}
4002187c: 12800000 mov w0, #0xffffffff // #-1
40021880: a94153f3 ldp x19, x20, [sp, #16]
40021884: a9425bf5 ldp x21, x22, [sp, #32]
40021888: f9401bf7 ldr x23, [sp, #48]
errno = EINVAL;
4002188c: b9000022 str w2, [x1]
}
40021890: a8c47bfd ldp x29, x30, [sp], #64
40021894: d65f03c0 ret
switch (mode & S_IFMT) {
40021898: 514004a5 sub w5, w5, #0x1, lsl #12
4002189c: 721348bf tst w5, #0xffffe000
400218a0: 54fffe81 b.ne 40021870 <rtems_filesystem_mknod+0x50> // b.any
const rtems_filesystem_operations_table *ops = parentloc->mt_entry->ops;
400218a4: f9401665 ldr x5, [x19, #40]
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
400218a8: aa1703e4 mov x4, x23
400218ac: aa1603e2 mov x2, x22
400218b0: aa1503e1 mov x1, x21
400218b4: aa1303e0 mov x0, x19
400218b8: f9400ca5 ldr x5, [x5, #24]
}
400218bc: a94153f3 ldp x19, x20, [sp, #16]
400218c0: a9425bf5 ldp x21, x22, [sp, #32]
400218c4: f9401bf7 ldr x23, [sp, #48]
400218c8: a8c47bfd ldp x29, x30, [sp], #64
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
400218cc: f94014a5 ldr x5, [x5, #40]
400218d0: aa0503f0 mov x16, x5
400218d4: d61f0200 br x16
...
0000000040021480 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
40021480: a9bc7bfd stp x29, x30, [sp, #-64]!
40021484: 910003fd mov x29, sp
40021488: a90153f3 stp x19, x20, [sp, #16]
4002148c: aa0003f4 mov x20, x0
40021490: a9025bf5 stp x21, x22, [sp, #32]
40021494: aa0103f5 mov x21, x1
rtems_chain_control *chain = &filesystem_chain;
size_t type_size = strlen(type) + 1;
40021498: 940032c9 bl 4002dfbc <strlen>
4002149c: 91000416 add x22, x0, #0x1
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
400214a0: 91008400 add x0, x0, #0x21
400214a4: 9400178f bl 400272e0 <malloc>
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
400214a8: b4000880 cbz x0, 400215b8 <rtems_filesystem_register+0x138>
rtems_set_errno_and_return_minus_one( ENOMEM );
memcpy(type_storage, type, type_size);
400214ac: 91008003 add x3, x0, #0x20
400214b0: aa0003f3 mov x19, x0
400214b4: aa1603e2 mov x2, x22
400214b8: aa1403e1 mov x1, x20
400214bc: aa0303e0 mov x0, x3
400214c0: 94003157 bl 4002da1c <memcpy>
fsn->entry.type = type_storage;
fsn->entry.mount_h = mount_h;
400214c4: a9015660 stp x0, x21, [x19, #16]
rtems_libio_lock();
400214c8: 9400177e bl 400272c0 <rtems_libio_lock>
while ( table_entry->type && !stop ) {
400214cc: 900000a0 adrp x0, 40035000 <realloc+0x130>
400214d0: 9121a015 add x21, x0, #0x868
400214d4: f9443400 ldr x0, [x0, #2152]
400214d8: b40000c0 cbz x0, 400214f0 <rtems_filesystem_register+0x70> <== NEVER TAKEN
if ( strcmp( entry->type, fa->type ) != 0 ) {
400214dc: aa1403e1 mov x1, x20
400214e0: 9400323c bl 4002ddd0 <strcmp>
400214e4: 34000440 cbz w0, 4002156c <rtems_filesystem_register+0xec> <== NEVER TAKEN
while ( table_entry->type && !stop ) {
400214e8: f8410ea0 ldr x0, [x21, #16]!
400214ec: b5ffff80 cbnz x0, 400214dc <rtems_filesystem_register+0x5c> <== NEVER TAKEN
rtems_libio_lock();
400214f0: f9001bf7 str x23, [sp, #48]
400214f4: 94001773 bl 400272c0 <rtems_libio_lock>
return _Chain_Immutable_head( the_chain )->next;
400214f8: f00006e0 adrp x0, 40100000 <_RTEMS_tasks_Information>
400214fc: 91054015 add x21, x0, #0x150
for (
40021500: 910022b7 add x23, x21, #0x8
40021504: f940a816 ldr x22, [x0, #336]
40021508: eb1702df cmp x22, x23
4002150c: 54000500 b.eq 400215ac <rtems_filesystem_register+0x12c> // b.none
if ( strcmp( entry->type, fa->type ) != 0 ) {
40021510: f9400ac0 ldr x0, [x22, #16]
40021514: aa1403e1 mov x1, x20
40021518: 9400322e bl 4002ddd0 <strcmp>
4002151c: 350002c0 cbnz w0, 40021574 <rtems_filesystem_register+0xf4>
fa->mount_h = entry->mount_h;
40021520: f9400ed4 ldr x20, [x22, #24]
rtems_libio_unlock();
40021524: 9400176b bl 400272d0 <rtems_libio_unlock>
40021528: f9401bf7 ldr x23, [sp, #48]
4002152c: d503201f nop
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
40021530: b50002d4 cbnz x20, 40021588 <rtems_filesystem_register+0x108>
40021534: f00006f5 adrp x21, 40100000 <_RTEMS_tasks_Information>
40021538: 910542b5 add x21, x21, #0x150
old_last = tail->previous;
4002153c: f9400aa0 ldr x0, [x21, #16]
the_node->next = tail;
40021540: 910022a1 add x1, x21, #0x8
40021544: f9000261 str x1, [x19]
tail->previous = the_node;
40021548: f9000ab3 str x19, [x21, #16]
old_last->next = the_node;
4002154c: f9000013 str x19, [x0]
the_node->previous = old_last;
40021550: f9000660 str x0, [x19, #8]
rtems_libio_unlock();
free( fsn );
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
40021554: 9400175f bl 400272d0 <rtems_libio_unlock>
return 0;
40021558: 52800000 mov w0, #0x0 // #0
}
4002155c: a94153f3 ldp x19, x20, [sp, #16]
40021560: a9425bf5 ldp x21, x22, [sp, #32]
40021564: a8c47bfd ldp x29, x30, [sp], #64
40021568: d65f03c0 ret
fa->mount_h = entry->mount_h;
4002156c: f94006b4 ldr x20, [x21, #8] <== NOT EXECUTED
if ( !stop ) {
40021570: 17fffff0 b 40021530 <rtems_filesystem_register+0xb0> <== NOT EXECUTED
return the_node->next;
40021574: f94002d6 ldr x22, [x22]
for (
40021578: eb1702df cmp x22, x23
4002157c: 54fffca1 b.ne 40021510 <rtems_filesystem_register+0x90> // b.any
find_arg fa = {
40021580: d2800014 mov x20, #0x0 // #0
40021584: 17ffffe8 b 40021524 <rtems_filesystem_register+0xa4>
rtems_libio_unlock();
40021588: 94001752 bl 400272d0 <rtems_libio_unlock>
free( fsn );
4002158c: aa1303e0 mov x0, x19
40021590: 940016cc bl 400270c0 <free>
rtems_set_errno_and_return_minus_one( EINVAL );
40021594: 940030c2 bl 4002d89c <__errno>
40021598: aa0003e1 mov x1, x0
4002159c: 528002c2 mov w2, #0x16 // #22
400215a0: 12800000 mov w0, #0xffffffff // #-1
400215a4: b9000022 str w2, [x1]
400215a8: 17ffffed b 4002155c <rtems_filesystem_register+0xdc>
rtems_libio_unlock();
400215ac: 94001749 bl 400272d0 <rtems_libio_unlock>
return fa.mount_h;
400215b0: f9401bf7 ldr x23, [sp, #48]
400215b4: 17ffffe2 b 4002153c <rtems_filesystem_register+0xbc>
rtems_set_errno_and_return_minus_one( ENOMEM );
400215b8: 940030b9 bl 4002d89c <__errno>
400215bc: aa0003e1 mov x1, x0
400215c0: 52800182 mov w2, #0xc // #12
400215c4: 12800000 mov w0, #0xffffffff // #-1
400215c8: b9000022 str w2, [x1]
400215cc: 17ffffe4 b 4002155c <rtems_filesystem_register+0xdc>
00000000400211d0 <rtems_gxx_key_create>:
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
400211d0: a9bd7bfd stp x29, x30, [sp, #-48]!
400211d4: 910003fd mov x29, sp
400211d8: f90013f5 str x21, [sp, #32]
400211dc: aa0003f5 mov x21, x0
int eno;
pthread_key_t *pkey;
pkey = malloc( sizeof( *pkey ) );
400211e0: d2800080 mov x0, #0x4 // #4
{
400211e4: a90153f3 stp x19, x20, [sp, #16]
400211e8: aa0103f4 mov x20, x1
pkey = malloc( sizeof( *pkey ) );
400211ec: 940000a9 bl 40021490 <malloc>
*key = pkey;
400211f0: f90002a0 str x0, [x21]
if ( pkey == NULL )
400211f4: b4000260 cbz x0, 40021240 <rtems_gxx_key_create+0x70> <== NEVER TAKEN
printk(
"gxx_wrappers: create key=%x, dtor=%x, pkey=%x\n", key, dtor, pkey
);
#endif
eno = pthread_key_create(pkey, dtor);
400211f8: aa1403e1 mov x1, x20
400211fc: aa0003f3 mov x19, x0
40021200: 94000d7c bl 400247f0 <pthread_key_create>
40021204: 2a0003f4 mov w20, w0
if ( eno != 0 ) {
40021208: 350000c0 cbnz w0, 40021220 <rtems_gxx_key_create+0x50> <== NEVER TAKEN
free( pkey );
*key = NULL;
}
return eno;
}
4002120c: 2a1403e0 mov w0, w20
40021210: a94153f3 ldp x19, x20, [sp, #16]
40021214: f94013f5 ldr x21, [sp, #32]
40021218: a8c37bfd ldp x29, x30, [sp], #48
4002121c: d65f03c0 ret
free( pkey );
40021220: aa1303e0 mov x0, x19 <== NOT EXECUTED
40021224: 94002357 bl 40029f80 <free> <== NOT EXECUTED
*key = NULL;
40021228: f90002bf str xzr, [x21] <== NOT EXECUTED
}
4002122c: 2a1403e0 mov w0, w20 <== NOT EXECUTED
40021230: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40021234: f94013f5 ldr x21, [sp, #32] <== NOT EXECUTED
40021238: a8c37bfd ldp x29, x30, [sp], #48 <== NOT EXECUTED
4002123c: d65f03c0 ret <== NOT EXECUTED
return ENOMEM;
40021240: 52800194 mov w20, #0xc // #12 <== NOT EXECUTED
40021244: 17fffff2 b 4002120c <rtems_gxx_key_create+0x3c> <== NOT EXECUTED
...
00000000400213d0 <rtems_gxx_recursive_mutex_init>:
void rtems_gxx_recursive_mutex_init(__gthread_recursive_mutex_t *mutex)
{
400213d0: a9bf7bfd stp x29, x30, [sp, #-16]!
status = rtems_semaphore_create(
400213d4: aa0003e4 mov x4, x0
400213d8: 52800003 mov w3, #0x0 // #0
{
400213dc: 910003fd mov x29, sp
status = rtems_semaphore_create(
400213e0: 52886640 mov w0, #0x4332 // #17202
400213e4: 72a8e860 movk w0, #0x4743, lsl #16
400213e8: 52800a82 mov w2, #0x54 // #84
400213ec: 52800021 mov w1, #0x1 // #1
400213f0: 94000e04 bl 40024c00 <rtems_semaphore_create>
if ( status != RTEMS_SUCCESSFUL ) {
400213f4: 35000060 cbnz w0, 40021400 <rtems_gxx_recursive_mutex_init+0x30> <== NEVER TAKEN
rtems_gxx_mutex_init(mutex);
}
400213f8: a8c17bfd ldp x29, x30, [sp], #16
400213fc: d65f03c0 ret
_Internal_error( INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED );
40021400: 528002c0 mov w0, #0x16 // #22 <== NOT EXECUTED
40021404: 940012df bl 40025f80 <_Internal_error> <== NOT EXECUTED
...
00000000400216b0 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
400216b0: a9bc7bfd stp x29, x30, [sp, #-64]!
400216b4: 910003fd mov x29, sp
400216b8: 90000723 adrp x3, 40105000 <Arr_2_Glob+0x1e68>
400216bc: b94a0863 ldr w3, [x3, #2568]
400216c0: a90153f3 stp x19, x20, [sp, #16]
400216c4: aa0103f3 mov x19, x1
if ( _System_state_Is_up( state ) ) {
400216c8: 7100087f cmp w3, #0x2
{
400216cc: a9025bf5 stp x21, x22, [sp, #32]
400216d0: aa0003f5 mov x21, x0
400216d4: aa0203f6 mov x22, x2
400216d8: f9001bf7 str x23, [sp, #48]
Heap_Control *heap = RTEMS_Malloc_Heap;
400216dc: 90000720 adrp x0, 40105000 <Arr_2_Glob+0x1e68>
400216e0: f9448017 ldr x23, [x0, #2304]
if ( _System_state_Is_up( state ) ) {
400216e4: 54000260 b.eq 40021730 <rtems_heap_allocate_aligned_with_boundary+0x80> // b.none
} else if ( _System_state_Is_before_multitasking( state ) ) {
400216e8: 7100047f cmp w3, #0x1
400216ec: 540002a0 b.eq 40021740 <rtems_heap_allocate_aligned_with_boundary+0x90> // b.none
boundary
);
_RTEMS_Unlock_allocator();
break;
case MALLOC_SYSTEM_STATE_NO_PROTECTION:
p = _Heap_Allocate_aligned_with_boundary(
400216f0: aa0203e3 mov x3, x2
400216f4: aa1703e0 mov x0, x23
400216f8: aa0103e2 mov x2, x1
400216fc: aa1503e1 mov x1, x21
40021700: 94000d54 bl 40024c50 <_Heap_Allocate_aligned_with_boundary>
40021704: aa0003f4 mov x20, x0
* Do not attempt to allocate memory if not in correct system state.
*/
return NULL;
}
if ( p == NULL && alignment == 0 && boundary == 0 ) {
40021708: aa130293 orr x19, x20, x19
4002170c: b5000313 cbnz x19, 4002176c <rtems_heap_allocate_aligned_with_boundary+0xbc><== ALWAYS TAKEN
40021710: b4000496 cbz x22, 400217a0 <rtems_heap_allocate_aligned_with_boundary+0xf0><== ALWAYS TAKEN
return NULL;
40021714: d2800014 mov x20, #0x0 // #0
*/
if ( p != NULL && rtems_malloc_dirty_helper != NULL )
(*rtems_malloc_dirty_helper)( p, size );
return p;
}
40021718: aa1403e0 mov x0, x20
4002171c: a94153f3 ldp x19, x20, [sp, #16]
40021720: a9425bf5 ldp x21, x22, [sp, #32]
40021724: f9401bf7 ldr x23, [sp, #48]
40021728: a8c47bfd ldp x29, x30, [sp], #64
4002172c: d65f03c0 ret
40021730: 90000720 adrp x0, 40105000 <Arr_2_Glob+0x1e68>
40021734: 91290000 add x0, x0, #0xa40
40021738: b9401800 ldr w0, [x0, #24]
if ( _Thread_Dispatch_is_enabled() ) {
4002173c: 35fffec0 cbnz w0, 40021714 <rtems_heap_allocate_aligned_with_boundary+0x64>
_RTEMS_Lock_allocator();
40021740: 94000d08 bl 40024b60 <_RTEMS_Lock_allocator>
_Malloc_Process_deferred_frees();
40021744: 94001ac3 bl 40028250 <_Malloc_Process_deferred_frees>
p = _Heap_Allocate_aligned_with_boundary(
40021748: aa1303e2 mov x2, x19
4002174c: aa1603e3 mov x3, x22
40021750: aa1503e1 mov x1, x21
40021754: aa1703e0 mov x0, x23
40021758: 94000d3e bl 40024c50 <_Heap_Allocate_aligned_with_boundary>
4002175c: aa0003f4 mov x20, x0
if ( p == NULL && alignment == 0 && boundary == 0 ) {
40021760: aa130293 orr x19, x20, x19
_RTEMS_Unlock_allocator();
40021764: 94000d03 bl 40024b70 <_RTEMS_Unlock_allocator>
if ( p == NULL && alignment == 0 && boundary == 0 ) {
40021768: b4fffd53 cbz x19, 40021710 <rtems_heap_allocate_aligned_with_boundary+0x60>
if ( p != NULL && rtems_malloc_dirty_helper != NULL )
4002176c: b4fffd54 cbz x20, 40021714 <rtems_heap_allocate_aligned_with_boundary+0x64>
40021770: 90000720 adrp x0, 40105000 <Arr_2_Glob+0x1e68>
40021774: f9447c02 ldr x2, [x0, #2296]
40021778: b4fffd02 cbz x2, 40021718 <rtems_heap_allocate_aligned_with_boundary+0x68>
(*rtems_malloc_dirty_helper)( p, size );
4002177c: aa1503e1 mov x1, x21
40021780: aa1403e0 mov x0, x20
40021784: d63f0040 blr x2
}
40021788: aa1403e0 mov x0, x20
4002178c: a94153f3 ldp x19, x20, [sp, #16]
40021790: a9425bf5 ldp x21, x22, [sp, #32]
40021794: f9401bf7 ldr x23, [sp, #48]
40021798: a8c47bfd ldp x29, x30, [sp], #64
4002179c: d65f03c0 ret
p = (*rtems_malloc_extend_handler)( heap, size );
400217a0: f00000c0 adrp x0, 4003c000 <_Scheduler_Table+0x48>
400217a4: f9448802 ldr x2, [x0, #2320]
400217a8: aa1503e1 mov x1, x21
400217ac: aa1703e0 mov x0, x23
400217b0: d63f0040 blr x2
400217b4: aa0003f4 mov x20, x0
400217b8: 17ffffed b 4002176c <rtems_heap_allocate_aligned_with_boundary+0xbc>
400217bc: 00000000 udf #0
0000000040021820 <rtems_heap_extend_via_sbrk>:
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
)
{
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
40021820: d0000702 adrp x2, 40103000 <_Thread_Objects+0x220>
40021824: f9430042 ldr x2, [x2, #1536]
ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size;
ptrdiff_t misaligned = sbrk_amount != 0 ? sbrk_size % sbrk_amount : 0;
40021828: b5000062 cbnz x2, 40021834 <rtems_heap_extend_via_sbrk+0x14>
}
}
}
return return_this;
}
4002182c: d2800000 mov x0, #0x0 // #0
40021830: d65f03c0 ret
{
40021834: a9bd7bfd stp x29, x30, [sp, #-48]!
40021838: 910003fd mov x29, sp
4002183c: f90013f5 str x21, [sp, #32]
40021840: aa0003f5 mov x21, x0
ptrdiff_t misaligned = sbrk_amount != 0 ? sbrk_size % sbrk_amount : 0;
40021844: 9ac20c20 sdiv x0, x1, x2
{
40021848: a90153f3 stp x19, x20, [sp, #16]
4002184c: aa0103f3 mov x19, x1
ptrdiff_t misaligned = sbrk_amount != 0 ? sbrk_size % sbrk_amount : 0;
40021850: 9b028400 msub x0, x0, x2, x1
sbrk_size += sbrk_amount - misaligned;
40021854: cb000054 sub x20, x2, x0
40021858: f100001f cmp x0, #0x0
4002185c: 8b140034 add x20, x1, x20
40021860: 9a811294 csel x20, x20, x1, ne // ne = any
if ( sbrk_size > 0 && sbrk_amount > 0 ) {
40021864: f100029f cmp x20, #0x0
40021868: fa40c844 ccmp x2, #0x0, #0x4, gt
4002186c: 540002ad b.le 400218c0 <rtems_heap_extend_via_sbrk+0xa0> <== NEVER TAKEN
void *area_begin = sbrk( sbrk_size );
40021870: aa1403e0 mov x0, x20
40021874: 97fffd2b bl 40020d20 <sbrk>
40021878: aa0003e1 mov x1, x0
if ( area_begin != (void *) -1 ) {
4002187c: b100041f cmn x0, #0x1
40021880: 54000200 b.eq 400218c0 <rtems_heap_extend_via_sbrk+0xa0> // b.none
bool ok = _Protected_heap_Extend( heap, area_begin, sbrk_size );
40021884: aa1403e2 mov x2, x20
40021888: aa1503e0 mov x0, x21
4002188c: 94000fc9 bl 400257b0 <_Protected_heap_Extend>
if ( ok ) {
40021890: 72001c1f tst w0, #0xff
40021894: 54000120 b.eq 400218b8 <rtems_heap_extend_via_sbrk+0x98> // b.none
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
40021898: aa1303e1 mov x1, x19
4002189c: aa1503e0 mov x0, x21
}
400218a0: a94153f3 ldp x19, x20, [sp, #16]
400218a4: d2800003 mov x3, #0x0 // #0
400218a8: f94013f5 ldr x21, [sp, #32]
400218ac: d2800002 mov x2, #0x0 // #0
400218b0: a8c37bfd ldp x29, x30, [sp], #48
400218b4: 14000fa7 b 40025750 <_Protected_heap_Allocate_aligned_with_boundary>
sbrk( -sbrk_size );
400218b8: cb1403e0 neg x0, x20
400218bc: 97fffd19 bl 40020d20 <sbrk>
}
400218c0: d2800000 mov x0, #0x0 // #0
400218c4: a94153f3 ldp x19, x20, [sp, #16]
400218c8: f94013f5 ldr x21, [sp, #32]
400218cc: a8c37bfd ldp x29, x30, [sp], #48
400218d0: d65f03c0 ret
...
0000000040024350 <rtems_libio_set_private_env>:
{
40024350: a9bc7bfd stp x29, x30, [sp, #-64]!
40024354: 910003fd mov x29, sp
40024358: a90153f3 stp x19, x20, [sp, #16]
if (uses_global_env) {
4002435c: f0001034 adrp x20, 4022b000 <image_bin+0x1f2f0>
40024360: 913de294 add x20, x20, #0xf78
{
40024364: a9025bf5 stp x21, x22, [sp, #32]
rtems_user_env_t *old_env = rtems_current_user_env;
40024368: 94000606 bl 40025b80 <rtems_current_user_env_get>
rtems_status_code sc = RTEMS_SUCCESSFUL;
4002436c: 52800015 mov w21, #0x0 // #0
if (uses_global_env) {
40024370: eb14001f cmp x0, x20
40024374: 540000c0 b.eq 4002438c <rtems_libio_set_private_env+0x3c> // b.none
}
40024378: 2a1503e0 mov w0, w21
4002437c: a94153f3 ldp x19, x20, [sp, #16]
40024380: a9425bf5 ldp x21, x22, [sp, #32]
40024384: a8c47bfd ldp x29, x30, [sp], #64
40024388: d65f03c0 ret
Thread_Life_state life_state =
4002438c: aa0003f3 mov x19, x0
_Thread_Set_life_protection(THREAD_LIFE_PROTECTED);
40024390: 52800020 mov w0, #0x1 // #1
40024394: f9001bf7 str x23, [sp, #48]
40024398: 94002426 bl 4002d430 <_Thread_Set_life_protection>
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
4002439c: d2800b01 mov x1, #0x58 // #88
_Thread_Set_life_protection(THREAD_LIFE_PROTECTED);
400243a0: 2a0003f7 mov w23, w0
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
400243a4: d2800020 mov x0, #0x1 // #1
400243a8: 97fffb12 bl 40022ff0 <calloc>
400243ac: aa0003f6 mov x22, x0
if (new_env != NULL) {
400243b0: b4000560 cbz x0, 4002445c <rtems_libio_set_private_env+0x10c>
*new_env = *old_env;
400243b4: aa1303e1 mov x1, x19
400243b8: d2800b02 mov x2, #0x58 // #88
400243bc: 94006f4c bl 400400ec <memcpy>
rtems_filesystem_global_location_obtain(&old_env->root_directory);
400243c0: f0001020 adrp x0, 4022b000 <image_bin+0x1f2f0>
400243c4: 913e0000 add x0, x0, #0xf80
400243c8: 9400045e bl 40025540 <rtems_filesystem_global_location_obtain>
400243cc: aa0003e1 mov x1, x0
new_env->root_directory =
400243d0: f90006c1 str x1, [x22, #8]
rtems_filesystem_global_location_obtain(&old_env->current_directory);
400243d4: aa1303e0 mov x0, x19
400243d8: 9400045a bl 40025540 <rtems_filesystem_global_location_obtain>
return loc->handlers == &rtems_filesystem_null_handlers;
400243dc: f94006c2 ldr x2, [x22, #8]
if (
400243e0: 900001a1 adrp x1, 40058000 <_Console_simple_Handlers+0x78>
400243e4: 91090021 add x1, x1, #0x240
400243e8: f9401042 ldr x2, [x2, #32]
new_env->current_directory =
400243ec: f90002c0 str x0, [x22]
if (
400243f0: eb01005f cmp x2, x1
400243f4: 540001e0 b.eq 40024430 <rtems_libio_set_private_env+0xe0> // b.none
&& !rtems_filesystem_global_location_is_null(new_env->current_directory)
400243f8: f9401002 ldr x2, [x0, #32]
400243fc: eb01005f cmp x2, x1
40024400: 54000180 b.eq 40024430 <rtems_libio_set_private_env+0xe0> // b.none<== NEVER TAKEN
40024404: f0001040 adrp x0, 4022f000 <_RTEMS_tasks_Objects+0xaf8>
executing->user_environment = new_env;
40024408: f947b000 ldr x0, [x0, #3936]
4002440c: f9014416 str x22, [x0, #648]
_Thread_Set_life_protection(life_state);
40024410: 2a1703e0 mov w0, w23
40024414: 94002407 bl 4002d430 <_Thread_Set_life_protection>
}
40024418: 2a1503e0 mov w0, w21
4002441c: a94153f3 ldp x19, x20, [sp, #16]
40024420: a9425bf5 ldp x21, x22, [sp, #32]
_Thread_Set_life_protection(life_state);
40024424: f9401bf7 ldr x23, [sp, #48]
}
40024428: a8c47bfd ldp x29, x30, [sp], #64
4002442c: d65f03c0 ret
if (!uses_global_env) {
40024430: eb1402df cmp x22, x20
sc = RTEMS_UNSATISFIED;
40024434: 528001b5 mov w21, #0xd // #13
if (!uses_global_env) {
40024438: 54fffec0 b.eq 40024410 <rtems_libio_set_private_env+0xc0> // b.none<== NEVER TAKEN
rtems_filesystem_global_location_release(env->current_directory, false);
4002443c: 52800001 mov w1, #0x0 // #0
40024440: 94000478 bl 40025620 <rtems_filesystem_global_location_release>
rtems_filesystem_global_location_release(env->root_directory, false);
40024444: f94006c0 ldr x0, [x22, #8]
40024448: 52800001 mov w1, #0x0 // #0
4002444c: 94000475 bl 40025620 <rtems_filesystem_global_location_release>
free(env);
40024450: aa1603e0 mov x0, x22
40024454: 97fffba7 bl 400232f0 <free>
}
40024458: 17ffffee b 40024410 <rtems_libio_set_private_env+0xc0>
sc = RTEMS_NO_MEMORY;
4002445c: 52800355 mov w21, #0x1a // #26
40024460: 17ffffec b 40024410 <rtems_libio_set_private_env+0xc0>
...
00000000400248f0 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
400248f0: a9b57bfd stp x29, x30, [sp, #-176]!
400248f4: 910003fd mov x29, sp
400248f8: a90153f3 stp x19, x20, [sp, #16]
400248fc: a9025bf5 stp x21, x22, [sp, #32]
40024900: 2a0103f6 mov w22, w1
int success = 0;
char *dup_path = strdup(path);
40024904: 940071c5 bl 40041018 <strdup>
if (dup_path != NULL) {
40024908: b4000c00 cbz x0, 40024a88 <rtems_mkdir+0x198>
4002490c: a90363f7 stp x23, x24, [sp, #48]
40024910: aa0003f5 mov x21, x0
if (p[0] == '/') /* Skip leading '/'. */
40024914: aa0003f3 mov x19, x0
40024918: 39400002 ldrb w2, [x0]
4002491c: 7100bc5f cmp w2, #0x2f
40024920: 54000061 b.ne 4002492c <rtems_mkdir+0x3c> // b.any
if (p[0] == '\0')
40024924: 39400402 ldrb w2, [x0, #1]
++p;
40024928: 91000413 add x19, x0, #0x1
if (p[0] == '\0')
4002492c: 91000673 add x19, x19, #0x1
*p = '/';
40024930: 52800014 mov w20, #0x0 // #0
40024934: 52800020 mov w0, #0x1 // #1
40024938: 528005f7 mov w23, #0x2f // #47
if (p[0] == '\0')
4002493c: 340001e2 cbz w2, 40024978 <rtems_mkdir+0x88> <== NEVER TAKEN
else if (p[0] != '/')
40024940: 7100bc5f cmp w2, #0x2f
40024944: 54000161 b.ne 40024970 <rtems_mkdir+0x80> // b.any
*p = '\0';
40024948: 381ff27f sturb wzr, [x19, #-1]
if (!last && p[1] == '\0')
4002494c: 39400278 ldrb w24, [x19]
if (first) {
40024950: 35000900 cbnz w0, 40024a70 <rtems_mkdir+0x180>
if (last)
40024954: 340001f8 cbz w24, 40024990 <rtems_mkdir+0xa0> <== NEVER TAKEN
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
40024958: aa1503e0 mov x0, x21
4002495c: 52803fe1 mov w1, #0x1ff // #511
40024960: 97fffb88 bl 40023780 <mkdir>
40024964: 37f805a0 tbnz w0, #31, 40024a18 <rtems_mkdir+0x128>
*p = '/';
40024968: 52800000 mov w0, #0x0 // #0
4002496c: 381ff277 sturb w23, [x19, #-1]
if (p[0] == '\0')
40024970: 38401662 ldrb w2, [x19], #1
40024974: 35fffe62 cbnz w2, 40024940 <rtems_mkdir+0x50>
if (first) {
40024978: 340000c0 cbz w0, 40024990 <rtems_mkdir+0xa0>
oumask = umask(0);
4002497c: 52800000 mov w0, #0x0 // #0
40024980: 940003bc bl 40025870 <umask>
40024984: 2a0003f4 mov w20, w0
(void)umask(numask);
40024988: 12187400 and w0, w0, #0xffffff3f
4002498c: 940003b9 bl 40025870 <umask>
(void)umask(oumask);
40024990: 2a1403e0 mov w0, w20
40024994: 940003b7 bl 40025870 <umask>
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
40024998: 2a1603e1 mov w1, w22
4002499c: aa1503e0 mov x0, x21
400249a0: 97fffb78 bl 40023780 <mkdir>
400249a4: 37f80140 tbnz w0, #31, 400249cc <rtems_mkdir+0xdc>
400249a8: 52800013 mov w19, #0x0 // #0
success = build(dup_path, mode);
free(dup_path);
400249ac: aa1503e0 mov x0, x21
400249b0: 97fffa50 bl 400232f0 <free>
}
return success != 0 ? 0 : -1;
400249b4: a94363f7 ldp x23, x24, [sp, #48]
}
400249b8: 2a1303e0 mov w0, w19
400249bc: a94153f3 ldp x19, x20, [sp, #16]
400249c0: a9425bf5 ldp x21, x22, [sp, #32]
400249c4: a8cb7bfd ldp x29, x30, [sp], #176
400249c8: d65f03c0 ret
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
400249cc: 52800038 mov w24, #0x1 // #1
if (errno == EEXIST || errno == EISDIR) {
400249d0: 940063c0 bl 4003d8d0 <__errno>
400249d4: b9400000 ldr w0, [x0]
400249d8: 7100441f cmp w0, #0x11
400249dc: 540000a0 b.eq 400249f0 <rtems_mkdir+0x100> // b.none
400249e0: 940063bc bl 4003d8d0 <__errno>
400249e4: b9400000 ldr w0, [x0]
400249e8: 7100541f cmp w0, #0x15
400249ec: 540001a1 b.ne 40024a20 <rtems_mkdir+0x130> // b.any <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
400249f0: 910123e1 add x1, sp, #0x48
400249f4: aa1503e0 mov x0, x21
400249f8: 94000036 bl 40024ad0 <stat>
400249fc: 37f80120 tbnz w0, #31, 40024a20 <rtems_mkdir+0x130> <== NEVER TAKEN
} else if (!S_ISDIR(sb.st_mode)) {
40024a00: b9405be0 ldr w0, [sp, #88]
40024a04: 12140c00 and w0, w0, #0xf000
40024a08: 7140101f cmp w0, #0x4, lsl #12
40024a0c: 54000141 b.ne 40024a34 <rtems_mkdir+0x144> // b.any
if (last)
40024a10: 35fffcd8 cbnz w24, 400249a8 <rtems_mkdir+0xb8>
40024a14: 17ffffd5 b 40024968 <rtems_mkdir+0x78>
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
40024a18: 52800018 mov w24, #0x0 // #0
40024a1c: 17ffffed b 400249d0 <rtems_mkdir+0xe0>
if (!first && !last)
40024a20: 350001f8 cbnz w24, 40024a5c <rtems_mkdir+0x16c> <== ALWAYS TAKEN
(void)umask(oumask);
40024a24: 2a1403e0 mov w0, w20
40024a28: 12800013 mov w19, #0xffffffff // #-1
40024a2c: 94000391 bl 40025870 <umask>
40024a30: 17ffffdf b 400249ac <rtems_mkdir+0xbc>
if (last)
40024a34: 340000d8 cbz w24, 40024a4c <rtems_mkdir+0x15c>
errno = EEXIST;
40024a38: 940063a6 bl 4003d8d0 <__errno>
40024a3c: 12800013 mov w19, #0xffffffff // #-1
40024a40: 52800221 mov w1, #0x11 // #17
40024a44: b9000001 str w1, [x0]
40024a48: 17ffffd9 b 400249ac <rtems_mkdir+0xbc>
errno = ENOTDIR;
40024a4c: 940063a1 bl 4003d8d0 <__errno>
40024a50: 52800281 mov w1, #0x14 // #20
40024a54: b9000001 str w1, [x0]
if (!first && !last)
40024a58: 17fffff3 b 40024a24 <rtems_mkdir+0x134>
free(dup_path);
40024a5c: aa1503e0 mov x0, x21
return success != 0 ? 0 : -1;
40024a60: 12800013 mov w19, #0xffffffff // #-1
free(dup_path);
40024a64: 97fffa23 bl 400232f0 <free>
return success != 0 ? 0 : -1;
40024a68: a94363f7 ldp x23, x24, [sp, #48]
40024a6c: 17ffffd3 b 400249b8 <rtems_mkdir+0xc8>
oumask = umask(0);
40024a70: 52800000 mov w0, #0x0 // #0
40024a74: 9400037f bl 40025870 <umask>
40024a78: 2a0003f4 mov w20, w0
(void)umask(numask);
40024a7c: 12187400 and w0, w0, #0xffffff3f
40024a80: 9400037c bl 40025870 <umask>
first = 0;
40024a84: 17ffffb4 b 40024954 <rtems_mkdir+0x64>
return success != 0 ? 0 : -1;
40024a88: 12800013 mov w19, #0xffffffff // #-1
40024a8c: 17ffffcb b 400249b8 <rtems_mkdir+0xc8>
000000004002c520 <rtems_printf>:
int rtems_printf(
const rtems_printer *printer,
const char *format,
...
)
{
4002c520: a9b07bfd stp x29, x30, [sp, #-256]!
4002c524: 910003fd mov x29, sp
4002c528: 3d8017e0 str q0, [sp, #80]
4002c52c: 3d801be1 str q1, [sp, #96]
4002c530: 3d801fe2 str q2, [sp, #112]
4002c534: 3d8023e3 str q3, [sp, #128]
4002c538: 3d8027e4 str q4, [sp, #144]
4002c53c: 3d802be5 str q5, [sp, #160]
4002c540: 3d802fe6 str q6, [sp, #176]
4002c544: 3d8033e7 str q7, [sp, #192]
4002c548: a90d0fe2 stp x2, x3, [sp, #208]
4002c54c: a90e17e4 stp x4, x5, [sp, #224]
4002c550: a90f1fe6 stp x6, x7, [sp, #240]
4002c554: b4000260 cbz x0, 4002c5a0 <rtems_printf+0x80>
4002c558: f9400403 ldr x3, [x0, #8]
4002c55c: b4000223 cbz x3, 4002c5a0 <rtems_printf+0x80> <== NEVER TAKEN
int len = 0;
if ( rtems_print_printer_valid( printer ) ) {
va_list ap;
va_start( ap, format );
4002c560: 910403e2 add x2, sp, #0x100
4002c564: a9030be2 stp x2, x2, [sp, #48]
4002c568: 910343e6 add x6, sp, #0xd0
4002c56c: 128005e5 mov w5, #0xffffffd0 // #-48
4002c570: 12800fe4 mov w4, #0xffffff80 // #-128
4002c574: f90023e6 str x6, [sp, #64]
len = printer->printer( printer->context, format, ap );
4002c578: 910043e2 add x2, sp, #0x10
va_start( ap, format );
4002c57c: 290913e5 stp w5, w4, [sp, #72]
len = printer->printer( printer->context, format, ap );
4002c580: a94317e4 ldp x4, x5, [sp, #48]
4002c584: f9400000 ldr x0, [x0]
4002c588: a90117e4 stp x4, x5, [sp, #16]
4002c58c: a94417e4 ldp x4, x5, [sp, #64]
4002c590: a90217e4 stp x4, x5, [sp, #32]
4002c594: d63f0060 blr x3
va_end( ap );
}
return len;
}
4002c598: a8d07bfd ldp x29, x30, [sp], #256
4002c59c: d65f03c0 ret
int len = 0;
4002c5a0: 52800000 mov w0, #0x0 // #0
}
4002c5a4: a8d07bfd ldp x29, x30, [sp], #256
4002c5a8: d65f03c0 ret
4002c5ac: 00000000 udf #0
0000000040024530 <rtems_termios_close>:
{
40024530: a9bd7bfd stp x29, x30, [sp, #-48]!
40024534: 910003fd mov x29, sp
40024538: a90153f3 stp x19, x20, [sp, #16]
4002453c: aa0003f4 mov x20, x0
_Mutex_Acquire( mutex );
40024540: 900006f3 adrp x19, 40100000 <_IO_Driver_address_table>
40024544: 910b6273 add x19, x19, #0x2d8
struct rtems_termios_tty *tty = args->iop->data1;
40024548: f9400281 ldr x1, [x20]
{
4002454c: f90013f5 str x21, [sp, #32]
40024550: aa1303e0 mov x0, x19
struct rtems_termios_tty *tty = args->iop->data1;
40024554: f9402435 ldr x21, [x1, #72]
40024558: 940011b2 bl 40028c20 <_Mutex_Acquire>
if (tty->refcount == 1) {
4002455c: b94012a2 ldr w2, [x21, #16]
40024560: 7100045f cmp w2, #0x1
40024564: 54000160 b.eq 40024590 <rtems_termios_close+0x60> // b.none <== ALWAYS TAKEN
if (--tty->refcount == 0) {
40024568: 51000442 sub w2, w2, #0x1 <== NOT EXECUTED
4002456c: b90012a2 str w2, [x21, #16] <== NOT EXECUTED
40024570: 340001c2 cbz w2, 400245a8 <rtems_termios_close+0x78> <== NOT EXECUTED
_Mutex_Release( mutex );
40024574: aa1303e0 mov x0, x19 <== NOT EXECUTED
40024578: 940011c6 bl 40028c90 <_Mutex_Release> <== NOT EXECUTED
}
4002457c: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
40024580: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40024584: f94013f5 ldr x21, [sp, #32] <== NOT EXECUTED
40024588: a8c37bfd ldp x29, x30, [sp], #48 <== NOT EXECUTED
4002458c: d65f03c0 ret <== NOT EXECUTED
rtems_termios_ttyTail = tty->back;
40024590: a94002a1 ldp x1, x0, [x21]
if (tty->forw == NULL) {
40024594: b4000261 cbz x1, 400245e0 <rtems_termios_close+0xb0> <== ALWAYS TAKEN
tty->forw->back = tty->back;
40024598: f9000420 str x0, [x1, #8] <== NOT EXECUTED
if (tty->back == NULL) {
4002459c: b40001c0 cbz x0, 400245d4 <rtems_termios_close+0xa4> <== NOT EXECUTED
tty->back->forw = tty->forw;
400245a0: f9000001 str x1, [x0] <== NOT EXECUTED
if (--tty->refcount == 0) {
400245a4: b90012bf str wzr, [x21, #16]
rtems_termios_destroy_tty (tty, arg, true);
400245a8: aa1403e1 mov x1, x20
400245ac: 52800022 mov w2, #0x1 // #1
400245b0: aa1503e0 mov x0, x21
400245b4: 97fff987 bl 40022bd0 <rtems_termios_destroy_tty>
400245b8: aa1303e0 mov x0, x19
400245bc: 940011b5 bl 40028c90 <_Mutex_Release>
}
400245c0: 52800000 mov w0, #0x0 // #0
400245c4: a94153f3 ldp x19, x20, [sp, #16]
400245c8: f94013f5 ldr x21, [sp, #32]
400245cc: a8c37bfd ldp x29, x30, [sp], #48
400245d0: d65f03c0 ret
rtems_termios_ttyHead = tty->forw;
400245d4: f00006e0 adrp x0, 40103000 <_Thread_Objects+0x4a8> <== NOT EXECUTED
400245d8: f9054801 str x1, [x0, #2704] <== NOT EXECUTED
rtems_termios_ttyHead->back = NULL;
400245dc: 17fffff2 b 400245a4 <rtems_termios_close+0x74> <== NOT EXECUTED
rtems_termios_ttyTail = tty->back;
400245e0: f00006e1 adrp x1, 40103000 <_Thread_Objects+0x4a8>
400245e4: f9054c20 str x0, [x1, #2712]
if ( rtems_termios_ttyTail != NULL ) {
400245e8: b40000a0 cbz x0, 400245fc <rtems_termios_close+0xcc> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
400245ec: f900001f str xzr, [x0] <== NOT EXECUTED
tty->back->forw = tty->forw;
400245f0: f94002a1 ldr x1, [x21] <== NOT EXECUTED
400245f4: f9000001 str x1, [x0] <== NOT EXECUTED
400245f8: 17ffffeb b 400245a4 <rtems_termios_close+0x74> <== NOT EXECUTED
rtems_termios_ttyHead = tty->forw;
400245fc: f00006e0 adrp x0, 40103000 <_Thread_Objects+0x4a8>
40024600: f905481f str xzr, [x0, #2704]
if ( rtems_termios_ttyHead != NULL ) {
40024604: 17ffffe8 b 400245a4 <rtems_termios_close+0x74>
...
0000000040025180 <rtems_termios_dequeue_characters>:
{
40025180: a9bf7bfd stp x29, x30, [sp, #-16]!
40025184: 910003fd mov x29, sp
tty->t_dqlen += len;
40025188: b9413803 ldr w3, [x0, #312]
if (tty->handler.mode == TERMIOS_TASK_DRIVEN) {
4002518c: b941e004 ldr w4, [x0, #480]
tty->t_dqlen += len;
40025190: 0b010063 add w3, w3, w1
40025194: b9013803 str w3, [x0, #312]
if (tty->handler.mode == TERMIOS_TASK_DRIVEN) {
40025198: 7100089f cmp w4, #0x2
4002519c: 540001a0 b.eq 400251d0 <rtems_termios_dequeue_characters+0x50> // b.none
if (tty->t_line == PPPDISC ) {
400251a0: b9420c01 ldr w1, [x0, #524]
400251a4: 7100143f cmp w1, #0x5
400251a8: 54000060 b.eq 400251b4 <rtems_termios_dequeue_characters+0x34> // b.none
}
400251ac: a8c17bfd ldp x29, x30, [sp], #16
return rtems_termios_refill_transmitter(tty);
400251b0: 17fff7e8 b 40023150 <rtems_termios_refill_transmitter>
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
400251b4: d00006e1 adrp x1, 40103000 <_Thread_Objects+0x4a8>
400251b8: f944fc21 ldr x1, [x1, #2552]
400251bc: b4000041 cbz x1, 400251c4 <rtems_termios_dequeue_characters+0x44> <== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
400251c0: d63f0020 blr x1
}
400251c4: 52800000 mov w0, #0x0 // #0
400251c8: a8c17bfd ldp x29, x30, [sp], #16
400251cc: d65f03c0 ret
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
400251d0: b9420800 ldr w0, [x0, #520]
400251d4: 2a0403e1 mov w1, w4
400251d8: 94000972 bl 400277a0 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
400251dc: 34ffff40 cbz w0, 400251c4 <rtems_termios_dequeue_characters+0x44> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
400251e0: 94000bc4 bl 400280f0 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
000000004002f660 <rtems_termios_enqueue_raw_characters>:
{
4002f660: a9b87bfd stp x29, x30, [sp, #-128]!
4002f664: 910003fd mov x29, sp
4002f668: a90153f3 stp x19, x20, [sp, #16]
4002f66c: aa0003f3 mov x19, x0
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
4002f670: b9820c00 ldrsw x0, [x0, #524]
{
4002f674: a9025bf5 stp x21, x22, [sp, #32]
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
4002f678: 90000716 adrp x22, 4010f000 <bsp_interrupt_handler_table+0x7430>
4002f67c: 913402d6 add x22, x22, #0xd00
4002f680: 8b001ac0 add x0, x22, x0, lsl #6
{
4002f684: a90363f7 stp x23, x24, [sp, #48]
4002f688: aa0103f4 mov x20, x1
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
4002f68c: f9401003 ldr x3, [x0, #32]
4002f690: b4000383 cbz x3, 4002f700 <rtems_termios_enqueue_raw_characters+0xa0>
while (len--) {
4002f694: 34000162 cbz w2, 4002f6c0 <rtems_termios_enqueue_raw_characters+0x60> <== NEVER TAKEN
4002f698: 8b224035 add x21, x1, w2, uxtw
4002f69c: 14000004 b 4002f6ac <rtems_termios_enqueue_raw_characters+0x4c>
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
4002f6a0: b9820e60 ldrsw x0, [x19, #524]
4002f6a4: 8b001ac0 add x0, x22, x0, lsl #6
4002f6a8: f9401003 ldr x3, [x0, #32]
4002f6ac: aa1303e1 mov x1, x19
4002f6b0: 38401680 ldrb w0, [x20], #1
4002f6b4: d63f0060 blr x3
while (len--) {
4002f6b8: eb15029f cmp x20, x21
4002f6bc: 54ffff21 b.ne 4002f6a0 <rtems_termios_enqueue_raw_characters+0x40> // b.any
if (tty->tty_rcv.sw_pfn != NULL && !tty->tty_rcvwakeup) {
4002f6c0: f9411662 ldr x2, [x19, #552]
return 0;
4002f6c4: 52800017 mov w23, #0x0 // #0
if (tty->tty_rcv.sw_pfn != NULL && !tty->tty_rcvwakeup) {
4002f6c8: b4000102 cbz x2, 4002f6e8 <rtems_termios_enqueue_raw_characters+0x88>
4002f6cc: 3948e260 ldrb w0, [x19, #568]
4002f6d0: 350000c0 cbnz w0, 4002f6e8 <rtems_termios_enqueue_raw_characters+0x88><== NEVER TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4002f6d4: f9411a61 ldr x1, [x19, #560]
tty->tty_rcvwakeup = true;
4002f6d8: 52800020 mov w0, #0x1 // #1
4002f6dc: 3908e260 strb w0, [x19, #568]
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4002f6e0: 9101e260 add x0, x19, #0x78
4002f6e4: d63f0040 blr x2
}
4002f6e8: 2a1703e0 mov w0, w23
4002f6ec: a94153f3 ldp x19, x20, [sp, #16]
4002f6f0: a9425bf5 ldp x21, x22, [sp, #32]
4002f6f4: a94363f7 ldp x23, x24, [sp, #48]
4002f6f8: a8c87bfd ldp x29, x30, [sp], #128
4002f6fc: d65f03c0 ret
int dropped = 0;
4002f700: 52800017 mov w23, #0x0 // #0
while (len--) {
4002f704: 34000ac2 cbz w2, 4002f85c <rtems_termios_enqueue_raw_characters+0x1fc> <== NEVER TAKEN
4002f708: a9046bf9 stp x25, x26, [sp, #64]
4002f70c: 8b224035 add x21, x1, w2, uxtw
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4002f710: 9101e278 add x24, x19, #0x78
rtems_termios_device_context *ctx = tty->device_context;
4002f714: f941267a ldr x26, [x19, #584]
bool flow_rcv = false; /* true, if flow control char received */
4002f718: 52800016 mov w22, #0x0 // #0
int dropped = 0;
4002f71c: 52800017 mov w23, #0x0 // #0
4002f720: a90573fb stp x27, x28, [sp, #80]
4002f724: d503201f nop
if (tty->flow_ctrl & FL_MDXON) {
4002f728: b941fa61 ldr w1, [x19, #504]
c = *buf++;
4002f72c: 38401680 ldrb w0, [x20], #1
if (tty->flow_ctrl & FL_MDXON) {
4002f730: 364800e1 tbz w1, #9, 4002f74c <rtems_termios_enqueue_raw_characters+0xec>
if (c == tty->termios.c_cc[VSTOP]) {
4002f734: 39425661 ldrb w1, [x19, #149]
if (c == tty->termios.c_cc[VSTART]) {
4002f738: 39425262 ldrb w2, [x19, #148]
if (c == tty->termios.c_cc[VSTOP]) {
4002f73c: 6b00003f cmp w1, w0
4002f740: 54000e80 b.eq 4002f910 <rtems_termios_enqueue_raw_characters+0x2b0> // b.none
else if (c == tty->termios.c_cc[VSTART]) {
4002f744: 6b02001f cmp w0, w2
4002f748: 54000a00 b.eq 4002f888 <rtems_termios_enqueue_raw_characters+0x228> // b.none<== NEVER TAKEN
if (flow_rcv) {
4002f74c: 35000a76 cbnz w22, 4002f898 <rtems_termios_enqueue_raw_characters+0x238><== NEVER TAKEN
if (c == '\r' && (tty->termios.c_iflag & IGNCR) != 0) {
4002f750: 7100341f cmp w0, #0xd
4002f754: 54000ea0 b.eq 4002f928 <rtems_termios_enqueue_raw_characters+0x2c8> // b.none
c = iprocEarly (c, tty);
4002f758: aa1303e1 mov x1, x19
4002f75c: 97fff6cd bl 4002d290 <iprocEarly>
( *context->lock_acquire )( context, lock_context );
4002f760: f9401342 ldr x2, [x26, #32]
4002f764: 12001c1c and w28, w0, #0xff
4002f768: 9101e3e1 add x1, sp, #0x78
4002f76c: aa1a03e0 mov x0, x26
4002f770: 2a1c03f9 mov w25, w28
4002f774: d63f0040 blr x2
head = tty->rawInBuf.Head;
4002f778: b940b265 ldr w5, [x19, #176]
oldTail = tty->rawInBuf.Tail;
4002f77c: b940b661 ldr w1, [x19, #180]
newTail = (oldTail + 1) % tty->rawInBuf.Size;
4002f780: b940ba62 ldr w2, [x19, #184]
4002f784: 11000421 add w1, w1, #0x1
if ((tty->flow_ctrl & FL_IREQXOF) != 0 && (((newTail - head) %
4002f788: b941fa63 ldr w3, [x19, #504]
newTail = (oldTail + 1) % tty->rawInBuf.Size;
4002f78c: 1ac2083b udiv w27, w1, w2
4002f790: 1b02877b msub w27, w27, w2, w1
if ((tty->flow_ctrl & FL_IREQXOF) != 0 && (((newTail - head) %
4002f794: 360003e3 tbz w3, #0, 4002f810 <rtems_termios_enqueue_raw_characters+0x1b0><== ALWAYS TAKEN
tty->rawInBuf.Size) > tty->highwater)) {
4002f798: b940ba62 ldr w2, [x19, #184] <== NOT EXECUTED
if ((tty->flow_ctrl & FL_IREQXOF) != 0 && (((newTail - head) %
4002f79c: 4b050361 sub w1, w27, w5 <== NOT EXECUTED
4002f7a0: b9420263 ldr w3, [x19, #512] <== NOT EXECUTED
4002f7a4: 1ac20820 udiv w0, w1, w2 <== NOT EXECUTED
4002f7a8: 1b028401 msub w1, w0, w2, w1 <== NOT EXECUTED
4002f7ac: 6b03003f cmp w1, w3 <== NOT EXECUTED
4002f7b0: 54000309 b.ls 4002f810 <rtems_termios_enqueue_raw_characters+0x1b0> // b.plast<== NOT EXECUTED
tty->flow_ctrl |= FL_IREQXOF;
4002f7b4: b941fa61 ldr w1, [x19, #504] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
4002f7b8: 52808042 mov w2, #0x402 // #1026 <== NOT EXECUTED
tty->flow_ctrl |= FL_IREQXOF;
4002f7bc: 32000021 orr w1, w1, #0x1 <== NOT EXECUTED
4002f7c0: b901fa61 str w1, [x19, #504] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
4002f7c4: b941fa60 ldr w0, [x19, #504] <== NOT EXECUTED
4002f7c8: 0a020000 and w0, w0, w2 <== NOT EXECUTED
4002f7cc: 7110001f cmp w0, #0x400 <== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
4002f7d0: b941fa60 ldr w0, [x19, #504] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
4002f7d4: 54000e00 b.eq 4002f994 <rtems_termios_enqueue_raw_characters+0x334> // b.none<== NOT EXECUTED
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
4002f7d8: 52802081 mov w1, #0x104 // #260 <== NOT EXECUTED
4002f7dc: 0a010000 and w0, w0, w1 <== NOT EXECUTED
4002f7e0: 7104001f cmp w0, #0x100 <== NOT EXECUTED
4002f7e4: 54000161 b.ne 4002f810 <rtems_termios_enqueue_raw_characters+0x1b0> // b.any<== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
4002f7e8: b941fa60 ldr w0, [x19, #504] <== NOT EXECUTED
if (tty->flow.stop_remote_tx != NULL) {
4002f7ec: f940f661 ldr x1, [x19, #488] <== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
4002f7f0: 321e0000 orr w0, w0, #0x4 <== NOT EXECUTED
4002f7f4: b901fa60 str w0, [x19, #504] <== NOT EXECUTED
if (tty->flow.stop_remote_tx != NULL) {
4002f7f8: b40000c1 cbz x1, 4002f810 <rtems_termios_enqueue_raw_characters+0x1b0> <== NOT EXECUTED
tty->flow.stop_remote_tx(ctx);
4002f7fc: aa1a03e0 mov x0, x26 <== NOT EXECUTED
4002f800: b9006fe5 str w5, [sp, #108] <== NOT EXECUTED
4002f804: d63f0020 blr x1 <== NOT EXECUTED
4002f808: b9406fe5 ldr w5, [sp, #108] <== NOT EXECUTED
4002f80c: d503201f nop <== NOT EXECUTED
if (newTail != head) {
4002f810: 6b1b00bf cmp w5, w27
4002f814: 54000900 b.eq 4002f934 <rtems_termios_enqueue_raw_characters+0x2d4> // b.none
tty->rawInBuf.theBuf[newTail] = c;
4002f818: f9405660 ldr x0, [x19, #168]
4002f81c: 383b4819 strb w25, [x0, w27, uxtw]
tty->rawInBuf.Tail = newTail;
4002f820: b900b67b str w27, [x19, #180]
if (tty->tty_rcv.sw_pfn != NULL && !tty->tty_rcvwakeup) {
4002f824: f9411660 ldr x0, [x19, #552]
4002f828: b4000a60 cbz x0, 4002f974 <rtems_termios_enqueue_raw_characters+0x314>
4002f82c: 3948e260 ldrb w0, [x19, #568]
( *context->lock_release )( context, lock_context );
4002f830: f9401742 ldr x2, [x26, #40]
4002f834: 34000c80 cbz w0, 4002f9c4 <rtems_termios_enqueue_raw_characters+0x364>
4002f838: 9101e3e1 add x1, sp, #0x78
4002f83c: aa1a03e0 mov x0, x26
4002f840: d63f0040 blr x2
while (len--) {
4002f844: eb1402bf cmp x21, x20
4002f848: 54fff701 b.ne 4002f728 <rtems_termios_enqueue_raw_characters+0xc8> // b.any<== NEVER TAKEN
4002f84c: d503201f nop
tty->rawInBufDropped += dropped;
4002f850: a9446bf9 ldp x25, x26, [sp, #64]
4002f854: 2a1703e2 mov w2, w23
4002f858: a94573fb ldp x27, x28, [sp, #80]
_Semaphore_Post_binary( &binary_semaphore->Semaphore );
4002f85c: 91030260 add x0, x19, #0xc0
4002f860: b940f661 ldr w1, [x19, #244]
4002f864: 0b020021 add w1, w1, w2
4002f868: b900f661 str w1, [x19, #244]
4002f86c: 94000259 bl 400301d0 <_Semaphore_Post_binary>
}
4002f870: 2a1703e0 mov w0, w23
4002f874: a94153f3 ldp x19, x20, [sp, #16]
4002f878: a9425bf5 ldp x21, x22, [sp, #32]
4002f87c: a94363f7 ldp x23, x24, [sp, #48]
4002f880: a8c87bfd ldp x29, x30, [sp], #128
4002f884: d65f03c0 ret
tty->flow_ctrl &= ~FL_ORCVXOF;
4002f888: b941fa60 ldr w0, [x19, #504] <== NOT EXECUTED
4002f88c: 121b7800 and w0, w0, #0xffffffef <== NOT EXECUTED
4002f890: b901fa60 str w0, [x19, #504] <== NOT EXECUTED
if (flow_rcv) {
4002f894: d503201f nop <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
4002f898: b941fa60 ldr w0, [x19, #504]
4002f89c: 52800036 mov w22, #0x1 // #1
4002f8a0: 121c0400 and w0, w0, #0x30
4002f8a4: 7100801f cmp w0, #0x20
4002f8a8: 54000080 b.eq 4002f8b8 <rtems_termios_enqueue_raw_characters+0x258> // b.none<== NEVER TAKEN
while (len--) {
4002f8ac: eb1402bf cmp x21, x20
4002f8b0: 54fff3c1 b.ne 4002f728 <rtems_termios_enqueue_raw_characters+0xc8> // b.any<== NEVER TAKEN
4002f8b4: 17ffffe7 b 4002f850 <rtems_termios_enqueue_raw_characters+0x1f0>
( *context->lock_acquire )( context, lock_context );
4002f8b8: f9401342 ldr x2, [x26, #32] <== NOT EXECUTED
4002f8bc: 9101e3e1 add x1, sp, #0x78 <== NOT EXECUTED
4002f8c0: aa1a03e0 mov x0, x26 <== NOT EXECUTED
4002f8c4: d63f0040 blr x2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
4002f8c8: b941fa60 ldr w0, [x19, #504] <== NOT EXECUTED
if (tty->rawOutBufState != rob_idle) {
4002f8cc: b9413e61 ldr w1, [x19, #316] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
4002f8d0: 121a7800 and w0, w0, #0xffffffdf <== NOT EXECUTED
4002f8d4: b901fa60 str w0, [x19, #504] <== NOT EXECUTED
if (tty->rawOutBufState != rob_idle) {
4002f8d8: 34000101 cbz w1, 4002f8f8 <rtems_termios_enqueue_raw_characters+0x298> <== NOT EXECUTED
ctx, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
4002f8dc: b9410664 ldr w4, [x19, #260] <== NOT EXECUTED
(*tty->handler.write)(
4002f8e0: aa1a03e0 mov x0, x26 <== NOT EXECUTED
ctx, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
4002f8e4: f9407e61 ldr x1, [x19, #248] <== NOT EXECUTED
(*tty->handler.write)(
4002f8e8: d2800022 mov x2, #0x1 // #1 <== NOT EXECUTED
4002f8ec: f940e663 ldr x3, [x19, #456] <== NOT EXECUTED
4002f8f0: 8b244021 add x1, x1, w4, uxtw <== NOT EXECUTED
4002f8f4: d63f0060 blr x3 <== NOT EXECUTED
( *context->lock_release )( context, lock_context );
4002f8f8: f9401742 ldr x2, [x26, #40] <== NOT EXECUTED
4002f8fc: 9101e3e1 add x1, sp, #0x78 <== NOT EXECUTED
4002f900: aa1a03e0 mov x0, x26 <== NOT EXECUTED
}
4002f904: 52800036 mov w22, #0x1 // #1 <== NOT EXECUTED
( *context->lock_release )( context, lock_context );
4002f908: d63f0040 blr x2 <== NOT EXECUTED
}
4002f90c: 17ffffe8 b 4002f8ac <rtems_termios_enqueue_raw_characters+0x24c> <== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
4002f910: b941fa60 ldr w0, [x19, #504]
if (c == tty->termios.c_cc[VSTART]) {
4002f914: 6b02003f cmp w1, w2
4002f918: 54000380 b.eq 4002f988 <rtems_termios_enqueue_raw_characters+0x328> // b.none<== NEVER TAKEN
tty->flow_ctrl |= FL_ORCVXOF;
4002f91c: 321c0000 orr w0, w0, #0x10
4002f920: b901fa60 str w0, [x19, #504]
4002f924: 17ffffdd b 4002f898 <rtems_termios_enqueue_raw_characters+0x238>
if (c == '\r' && (tty->termios.c_iflag & IGNCR) != 0) {
4002f928: b9407a61 ldr w1, [x19, #120]
4002f92c: 363ff161 tbz w1, #7, 4002f758 <rtems_termios_enqueue_raw_characters+0xf8>
4002f930: 17ffffdf b 4002f8ac <rtems_termios_enqueue_raw_characters+0x24c>
if (tty->tty_rcv.sw_pfn != NULL && !tty->tty_rcvwakeup) {
4002f934: f9411660 ldr x0, [x19, #552]
++dropped;
4002f938: 110006f7 add w23, w23, #0x1
( *context->lock_release )( context, lock_context );
4002f93c: f9401742 ldr x2, [x26, #40]
if (tty->tty_rcv.sw_pfn != NULL && !tty->tty_rcvwakeup) {
4002f940: b4fff7c0 cbz x0, 4002f838 <rtems_termios_enqueue_raw_characters+0x1d8> <== NEVER TAKEN
4002f944: 3948e260 ldrb w0, [x19, #568]
4002f948: 35fff780 cbnz w0, 4002f838 <rtems_termios_enqueue_raw_characters+0x1d8><== NEVER TAKEN
tty->tty_rcvwakeup = true;
4002f94c: 52800020 mov w0, #0x1 // #1
4002f950: 3908e260 strb w0, [x19, #568]
4002f954: 9101e3e1 add x1, sp, #0x78
4002f958: aa1a03e0 mov x0, x26
4002f95c: d63f0040 blr x2
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4002f960: f9411662 ldr x2, [x19, #552]
4002f964: aa1803e0 mov x0, x24
4002f968: f9411a61 ldr x1, [x19, #560]
4002f96c: d63f0040 blr x2
4002f970: 17ffffcf b 4002f8ac <rtems_termios_enqueue_raw_characters+0x24c>
4002f974: f9401742 ldr x2, [x26, #40]
4002f978: 9101e3e1 add x1, sp, #0x78
4002f97c: aa1a03e0 mov x0, x26
4002f980: d63f0040 blr x2
if (callReciveCallback) {
4002f984: 17ffffca b 4002f8ac <rtems_termios_enqueue_raw_characters+0x24c>
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
4002f988: 521c0000 eor w0, w0, #0x10 <== NOT EXECUTED
4002f98c: b901fa60 str w0, [x19, #504] <== NOT EXECUTED
4002f990: 17ffffc2 b 4002f898 <rtems_termios_enqueue_raw_characters+0x238> <== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
4002f994: 362804c0 tbz w0, #5, 4002fa2c <rtems_termios_enqueue_raw_characters+0x3cc><== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
4002f998: b941fa63 ldr w3, [x19, #504] <== NOT EXECUTED
(*tty->handler.write)(ctx,
4002f99c: 91025661 add x1, x19, #0x95 <== NOT EXECUTED
4002f9a0: f940e666 ldr x6, [x19, #456] <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
4002f9a4: 321f0063 orr w3, w3, #0x2 <== NOT EXECUTED
4002f9a8: b901fa63 str w3, [x19, #504] <== NOT EXECUTED
(*tty->handler.write)(ctx,
4002f9ac: aa1a03e0 mov x0, x26 <== NOT EXECUTED
4002f9b0: d2800022 mov x2, #0x1 // #1 <== NOT EXECUTED
4002f9b4: b9006fe5 str w5, [sp, #108] <== NOT EXECUTED
4002f9b8: d63f00c0 blr x6 <== NOT EXECUTED
4002f9bc: b9406fe5 ldr w5, [sp, #108] <== NOT EXECUTED
4002f9c0: 17ffff94 b 4002f810 <rtems_termios_enqueue_raw_characters+0x1b0> <== NOT EXECUTED
if ((tty->termios.c_lflag & ICANON) != 0) {
4002f9c4: b9408660 ldr w0, [x19, #132]
4002f9c8: 36400220 tbz w0, #8, 4002fa0c <rtems_termios_enqueue_raw_characters+0x3ac>
c == tty->termios.c_cc[VEOL] || c == tty->termios.c_cc[VEOL2];
4002f9cc: 71002b9f cmp w28, #0xa
4002f9d0: 54fffbe0 b.eq 4002f94c <rtems_termios_enqueue_raw_characters+0x2ec> // b.none
return c == '\n' || c == tty->termios.c_cc[VEOF] ||
4002f9d4: 39422260 ldrb w0, [x19, #136]
4002f9d8: 6b1c001f cmp w0, w28
4002f9dc: 54fffb80 b.eq 4002f94c <rtems_termios_enqueue_raw_characters+0x2ec> // b.none
4002f9e0: 39422660 ldrb w0, [x19, #137]
4002f9e4: 6b1c001f cmp w0, w28
4002f9e8: 54fffb20 b.eq 4002f94c <rtems_termios_enqueue_raw_characters+0x2ec> // b.none
if (mustCallReceiveCallback (tty, c, newTail, head)) {
4002f9ec: 39422a60 ldrb w0, [x19, #138]
4002f9f0: 6b1c001f cmp w0, w28
4002f9f4: 54fffac0 b.eq 4002f94c <rtems_termios_enqueue_raw_characters+0x2ec> // b.none
4002f9f8: 9101e3e1 add x1, sp, #0x78
4002f9fc: aa1a03e0 mov x0, x26
4002fa00: 52800016 mov w22, #0x0 // #0
4002fa04: d63f0040 blr x2
if (callReciveCallback) {
4002fa08: 17ffffa9 b 4002f8ac <rtems_termios_enqueue_raw_characters+0x24c>
unsigned int rawContentSize = (newTail - head) % tty->rawInBuf.Size;
4002fa0c: b940ba61 ldr w1, [x19, #184]
4002fa10: 4b05037b sub w27, w27, w5
return rawContentSize >= tty->termios.c_cc[VMIN];
4002fa14: 39426263 ldrb w3, [x19, #152]
unsigned int rawContentSize = (newTail - head) % tty->rawInBuf.Size;
4002fa18: 1ac10b60 udiv w0, w27, w1
4002fa1c: 1b01ec1b msub w27, w0, w1, w27
if (mustCallReceiveCallback (tty, c, newTail, head)) {
4002fa20: 6b03037f cmp w27, w3
4002fa24: 54fff942 b.cs 4002f94c <rtems_termios_enqueue_raw_characters+0x2ec> // b.hs, b.nlast
4002fa28: 17fffff4 b 4002f9f8 <rtems_termios_enqueue_raw_characters+0x398>
if ((tty->flow_ctrl & FL_OSTOP) ||
4002fa2c: b9413e60 ldr w0, [x19, #316] <== NOT EXECUTED
4002fa30: 35ffef00 cbnz w0, 4002f810 <rtems_termios_enqueue_raw_characters+0x1b0><== NOT EXECUTED
4002fa34: 17ffffd9 b 4002f998 <rtems_termios_enqueue_raw_characters+0x338> <== NOT EXECUTED
...
000000004002f060 <rtems_termios_ioctl>:
{
4002f060: a9bb7bfd stp x29, x30, [sp, #-80]!
4002f064: 910003fd mov x29, sp
4002f068: a90153f3 stp x19, x20, [sp, #16]
4002f06c: aa0003f4 mov x20, x0
struct rtems_termios_tty *tty = args->iop->data1;
4002f070: f9400000 ldr x0, [x0]
{
4002f074: a9025bf5 stp x21, x22, [sp, #32]
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
4002f078: f9400a96 ldr x22, [x20, #16]
struct rtems_termios_tty *tty = args->iop->data1;
4002f07c: f9402415 ldr x21, [x0, #72]
{
4002f080: f9001bf7 str x23, [sp, #48]
args->ioctl_return = 0;
4002f084: b9001a9f str wzr, [x20, #24]
rtems_mutex_lock (&tty->osem);
4002f088: 910102b7 add x23, x21, #0x40
_Mutex_Acquire( mutex );
4002f08c: aa1703e0 mov x0, x23
4002f090: 97ffd74c bl 40024dc0 <_Mutex_Acquire>
switch (args->command) {
4002f094: f9400693 ldr x19, [x20, #8]
4002f098: d28e8200 mov x0, #0x7410 // #29712
4002f09c: f2b00080 movk x0, #0x8004, lsl #16
4002f0a0: eb00027f cmp x19, x0
4002f0a4: 54001b80 b.eq 4002f414 <rtems_termios_ioctl+0x3b4> // b.none
4002f0a8: 54000d29 b.ls 4002f24c <rtems_termios_ioctl+0x1ec> // b.plast
4002f0ac: d28e8180 mov x0, #0x740c // #29708
4002f0b0: f2b00200 movk x0, #0x8010, lsl #16
4002f0b4: eb00027f cmp x19, x0
4002f0b8: 54001540 b.eq 4002f360 <rtems_termios_ioctl+0x300> // b.none
4002f0bc: 54000f49 b.ls 4002f2a4 <rtems_termios_ioctl+0x244> // b.plast
4002f0c0: 928e8260 mov x0, #0xffffffffffff8bec // #-29716
4002f0c4: f2affa60 movk x0, #0x7fd3, lsl #16
4002f0c8: 8b000260 add x0, x19, x0
4002f0cc: f100081f cmp x0, #0x2
4002f0d0: 540018c8 b.hi 4002f3e8 <rtems_termios_ioctl+0x388> // b.pmore
tty->termios = *(struct termios *)args->buffer;
4002f0d4: f9400a81 ldr x1, [x20, #16]
4002f0d8: 9101e2b6 add x22, x21, #0x78
4002f0dc: aa1603e0 mov x0, x22
4002f0e0: d2800582 mov x2, #0x2c // #44
4002f0e4: 94000a55 bl 40031a38 <memcpy>
if (args->command == TIOCSETAW || args->command == TIOCSETAF) {
4002f0e8: 928e8280 mov x0, #0xffffffffffff8beb // #-29717
4002f0ec: f2affa60 movk x0, #0x7fd3, lsl #16
4002f0f0: 8b000273 add x19, x19, x0
4002f0f4: f100067f cmp x19, #0x1
4002f0f8: 54002329 b.ls 4002f55c <rtems_termios_ioctl+0x4fc> // b.plast
if (( tty->flow_ctrl & FL_MDXON) &&
4002f0fc: b941faa1 ldr w1, [x21, #504]
rtems_termios_device_context *ctx = tty->device_context;
4002f100: f94126b3 ldr x19, [x21, #584]
if (( tty->flow_ctrl & FL_MDXON) &&
4002f104: 364803a1 tbz w1, #9, 4002f178 <rtems_termios_ioctl+0x118>
!(tty->termios.c_iflag & IXON)) {
4002f108: b9407aa0 ldr w0, [x21, #120]
if (( tty->flow_ctrl & FL_MDXON) &&
4002f10c: 37480360 tbnz w0, #9, 4002f178 <rtems_termios_ioctl+0x118>
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
4002f110: b941faa0 ldr w0, [x21, #504]
4002f114: 12804201 mov w1, #0xfffffdef // #-529
4002f118: 0a010000 and w0, w0, w1
4002f11c: b901faa0 str w0, [x21, #504]
if (tty->flow_ctrl & FL_OSTOP) {
4002f120: b941faa0 ldr w0, [x21, #504]
4002f124: 362802a0 tbz w0, #5, 4002f178 <rtems_termios_ioctl+0x118> <== ALWAYS TAKEN
( *context->lock_acquire )( context, lock_context );
4002f128: f9401262 ldr x2, [x19, #32] <== NOT EXECUTED
4002f12c: 910123e1 add x1, sp, #0x48 <== NOT EXECUTED
4002f130: aa1303e0 mov x0, x19 <== NOT EXECUTED
4002f134: d63f0040 blr x2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
4002f138: b941faa0 ldr w0, [x21, #504] <== NOT EXECUTED
if (tty->rawOutBufState != rob_idle) {
4002f13c: b9413ea1 ldr w1, [x21, #316] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
4002f140: 121a7800 and w0, w0, #0xffffffdf <== NOT EXECUTED
4002f144: b901faa0 str w0, [x21, #504] <== NOT EXECUTED
if (tty->rawOutBufState != rob_idle) {
4002f148: 34000101 cbz w1, 4002f168 <rtems_termios_ioctl+0x108> <== NOT EXECUTED
ctx, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
4002f14c: b94106a4 ldr w4, [x21, #260] <== NOT EXECUTED
(*tty->handler.write)(
4002f150: aa1303e0 mov x0, x19 <== NOT EXECUTED
ctx, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
4002f154: f9407ea1 ldr x1, [x21, #248] <== NOT EXECUTED
(*tty->handler.write)(
4002f158: d2800022 mov x2, #0x1 // #1 <== NOT EXECUTED
4002f15c: f940e6a3 ldr x3, [x21, #456] <== NOT EXECUTED
4002f160: 8b244021 add x1, x1, w4, uxtw <== NOT EXECUTED
4002f164: d63f0060 blr x3 <== NOT EXECUTED
( *context->lock_release )( context, lock_context );
4002f168: f9401662 ldr x2, [x19, #40] <== NOT EXECUTED
4002f16c: 910123e1 add x1, sp, #0x48 <== NOT EXECUTED
4002f170: aa1303e0 mov x0, x19 <== NOT EXECUTED
4002f174: d63f0040 blr x2 <== NOT EXECUTED
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
4002f178: b941faa1 ldr w1, [x21, #504]
4002f17c: 36500061 tbz w1, #10, 4002f188 <rtems_termios_ioctl+0x128>
4002f180: b9407aa0 ldr w0, [x21, #120]
4002f184: 365021e0 tbz w0, #10, 4002f5c0 <rtems_termios_ioctl+0x560> <== ALWAYS TAKEN
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
4002f188: b941faa2 ldr w2, [x21, #504]
4002f18c: b94082a1 ldr w1, [x21, #128]
4002f190: 12100421 and w1, w1, #0x30000
4002f194: 36400222 tbz w2, #8, 4002f1d8 <rtems_termios_ioctl+0x178> <== ALWAYS TAKEN
4002f198: 35000221 cbnz w1, 4002f1dc <rtems_termios_ioctl+0x17c> <== NOT EXECUTED
tty->flow_ctrl &= ~(FL_MDRTS);
4002f19c: b941faa0 ldr w0, [x21, #504] <== NOT EXECUTED
4002f1a0: 12177800 and w0, w0, #0xfffffeff <== NOT EXECUTED
4002f1a4: b901faa0 str w0, [x21, #504] <== NOT EXECUTED
if ((tty->flow_ctrl & FL_IRTSOFF) &&
4002f1a8: b941faa0 ldr w0, [x21, #504] <== NOT EXECUTED
4002f1ac: 361022a0 tbz w0, #2, 4002f600 <rtems_termios_ioctl+0x5a0> <== NOT EXECUTED
(tty->flow.start_remote_tx != NULL)) {
4002f1b0: f940faa1 ldr x1, [x21, #496] <== NOT EXECUTED
if ((tty->flow_ctrl & FL_IRTSOFF) &&
4002f1b4: b4002261 cbz x1, 4002f600 <rtems_termios_ioctl+0x5a0> <== NOT EXECUTED
tty->flow.start_remote_tx(ctx);
4002f1b8: aa1303e0 mov x0, x19 <== NOT EXECUTED
4002f1bc: d63f0020 blr x1 <== NOT EXECUTED
if (tty->termios.c_cflag & CRTSCTS) {
4002f1c0: b94082a1 ldr w1, [x21, #128] <== NOT EXECUTED
tty->flow_ctrl &= ~(FL_IRTSOFF);
4002f1c4: b941faa0 ldr w0, [x21, #504] <== NOT EXECUTED
if (tty->termios.c_cflag & CRTSCTS) {
4002f1c8: 12100421 and w1, w1, #0x30000 <== NOT EXECUTED
tty->flow_ctrl &= ~(FL_IRTSOFF);
4002f1cc: 121d7800 and w0, w0, #0xfffffffb <== NOT EXECUTED
4002f1d0: b901faa0 str w0, [x21, #504] <== NOT EXECUTED
4002f1d4: d503201f nop <== NOT EXECUTED
if (tty->termios.c_cflag & CRTSCTS) {
4002f1d8: 34000081 cbz w1, 4002f1e8 <rtems_termios_ioctl+0x188> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
4002f1dc: b941faa0 ldr w0, [x21, #504] <== NOT EXECUTED
4002f1e0: 32180000 orr w0, w0, #0x100 <== NOT EXECUTED
4002f1e4: b901faa0 str w0, [x21, #504] <== NOT EXECUTED
if (tty->termios.c_iflag & IXOFF) {
4002f1e8: b9407aa0 ldr w0, [x21, #120]
4002f1ec: 36500080 tbz w0, #10, 4002f1fc <rtems_termios_ioctl+0x19c>
tty->flow_ctrl |= FL_MDXOF;
4002f1f0: b941faa1 ldr w1, [x21, #504]
4002f1f4: 32160021 orr w1, w1, #0x400
4002f1f8: b901faa1 str w1, [x21, #504]
if (tty->termios.c_iflag & IXON) {
4002f1fc: 36480080 tbz w0, #9, 4002f20c <rtems_termios_ioctl+0x1ac>
tty->flow_ctrl |= FL_MDXON;
4002f200: b941faa0 ldr w0, [x21, #504]
4002f204: 32170000 orr w0, w0, #0x200
4002f208: b901faa0 str w0, [x21, #504]
if (tty->termios.c_lflag & ICANON) {
4002f20c: b94086a0 ldr w0, [x21, #132]
4002f210: 374016c0 tbnz w0, #8, 4002f4e8 <rtems_termios_ioctl+0x488>
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
4002f214: 394266a1 ldrb w1, [x21, #153]
4002f218: d0000040 adrp x0, 40039000 <__trunctfdf2+0x2a0>
4002f21c: b948f400 ldr w0, [x0, #2292]
rtems_clock_get_ticks_per_second() / 10;
4002f220: 529999a3 mov w3, #0xcccd // #52429
4002f224: 72b99983 movk w3, #0xcccc, lsl #16
if (tty->termios.c_cc[VMIN])
4002f228: 394262a2 ldrb w2, [x21, #152]
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
4002f22c: 1b007c20 mul w0, w1, w0
rtems_clock_get_ticks_per_second() / 10;
4002f230: 9ba37c00 umull x0, w0, w3
4002f234: d363fc00 lsr x0, x0, #35
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
4002f238: b900a6a0 str w0, [x21, #164]
if (tty->termios.c_cc[VTIME]) {
4002f23c: 35001b61 cbnz w1, 4002f5a8 <rtems_termios_ioctl+0x548>
if (tty->termios.c_cc[VMIN]) {
4002f240: 35001542 cbnz w2, 4002f4e8 <rtems_termios_ioctl+0x488>
tty->rawInBufSemaphoreWait = false;
4002f244: 3903a2bf strb wzr, [x21, #232]
4002f248: 140000ab b 4002f4f4 <rtems_termios_ioctl+0x494>
switch (args->command) {
4002f24c: d28e8340 mov x0, #0x741a // #29722
4002f250: f2a80080 movk x0, #0x4004, lsl #16
4002f254: eb00027f cmp x19, x0
4002f258: 54001280 b.eq 4002f4a8 <rtems_termios_ioctl+0x448> // b.none
4002f25c: 540004e9 b.ls 4002f2f8 <rtems_termios_ioctl+0x298> // b.plast
4002f260: d28e8260 mov x0, #0x7413 // #29715
4002f264: f2a80580 movk x0, #0x402c, lsl #16
4002f268: eb00027f cmp x19, x0
4002f26c: 54000be1 b.ne 4002f3e8 <rtems_termios_ioctl+0x388> // b.any <== NEVER TAKEN
*(struct termios *)args->buffer = tty->termios;
4002f270: f9400a80 ldr x0, [x20, #16]
4002f274: 9101e2a1 add x1, x21, #0x78
4002f278: d2800582 mov x2, #0x2c // #44
sc = RTEMS_SUCCESSFUL;
4002f27c: 52800013 mov w19, #0x0 // #0
*(struct termios *)args->buffer = tty->termios;
4002f280: 940009ee bl 40031a38 <memcpy>
_Mutex_Release( mutex );
4002f284: aa1703e0 mov x0, x23
4002f288: 97ffd6ea bl 40024e30 <_Mutex_Release>
}
4002f28c: 2a1303e0 mov w0, w19
4002f290: a94153f3 ldp x19, x20, [sp, #16]
4002f294: a9425bf5 ldp x21, x22, [sp, #32]
4002f298: f9401bf7 ldr x23, [sp, #48]
4002f29c: a8c57bfd ldp x29, x30, [sp], #80
4002f2a0: d65f03c0 ret
switch (args->command) {
4002f2a4: d28e8360 mov x0, #0x741b // #29723
4002f2a8: f2b00080 movk x0, #0x8004, lsl #16
4002f2ac: eb00027f cmp x19, x0
4002f2b0: 54000720 b.eq 4002f394 <rtems_termios_ioctl+0x334> // b.none
4002f2b4: d28e8160 mov x0, #0x740b // #29707
4002f2b8: f2b00200 movk x0, #0x8010, lsl #16
4002f2bc: eb00027f cmp x19, x0
4002f2c0: 54000941 b.ne 4002f3e8 <rtems_termios_ioctl+0x388> // b.any <== NEVER TAKEN
tty->tty_snd = *wakeup;
4002f2c4: f94002c0 ldr x0, [x22]
4002f2c8: f9010ea0 str x0, [x21, #536]
sc = RTEMS_SUCCESSFUL;
4002f2cc: 52800013 mov w19, #0x0 // #0
tty->tty_snd = *wakeup;
4002f2d0: f94006c0 ldr x0, [x22, #8]
4002f2d4: f90112a0 str x0, [x21, #544]
4002f2d8: aa1703e0 mov x0, x23
4002f2dc: 97ffd6d5 bl 40024e30 <_Mutex_Release>
}
4002f2e0: 2a1303e0 mov w0, w19
4002f2e4: a94153f3 ldp x19, x20, [sp, #16]
4002f2e8: a9425bf5 ldp x21, x22, [sp, #32]
4002f2ec: f9401bf7 ldr x23, [sp, #48]
4002f2f0: a8c57bfd ldp x29, x30, [sp], #80
4002f2f4: d65f03c0 ret
switch (args->command) {
4002f2f8: d28e8bc0 mov x0, #0x745e // #29790
4002f2fc: f2a40000 movk x0, #0x2000, lsl #16
4002f300: eb00027f cmp x19, x0
4002f304: 54000bc0 b.eq 4002f47c <rtems_termios_ioctl+0x41c> // b.none
4002f308: d28ccfe0 mov x0, #0x667f // #26239
4002f30c: f2a80080 movk x0, #0x4004, lsl #16
4002f310: eb00027f cmp x19, x0
4002f314: 540006a1 b.ne 4002f3e8 <rtems_termios_ioctl+0x388> // b.any <== ALWAYS TAKEN
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
4002f318: b940b6a0 ldr w0, [x21, #180] <== NOT EXECUTED
4002f31c: b940b2a1 ldr w1, [x21, #176] <== NOT EXECUTED
if ( rawnc < 0 )
4002f320: 6b010001 subs w1, w0, w1 <== NOT EXECUTED
4002f324: 54000fc4 b.mi 4002f51c <rtems_termios_ioctl+0x4bc> // b.first <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
4002f328: 294d0ea0 ldp w0, w3, [x21, #104] <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
4002f32c: 52800013 mov w19, #0x0 // #0 <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
4002f330: f9400a82 ldr x2, [x20, #16] <== NOT EXECUTED
4002f334: 4b030000 sub w0, w0, w3 <== NOT EXECUTED
4002f338: 0b010000 add w0, w0, w1 <== NOT EXECUTED
4002f33c: b9000040 str w0, [x2] <== NOT EXECUTED
4002f340: aa1703e0 mov x0, x23 <== NOT EXECUTED
4002f344: 97ffd6bb bl 40024e30 <_Mutex_Release> <== NOT EXECUTED
}
4002f348: 2a1303e0 mov w0, w19 <== NOT EXECUTED
4002f34c: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
4002f350: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
4002f354: f9401bf7 ldr x23, [sp, #48] <== NOT EXECUTED
4002f358: a8c57bfd ldp x29, x30, [sp], #80 <== NOT EXECUTED
4002f35c: d65f03c0 ret <== NOT EXECUTED
tty->tty_rcv = *wakeup;
4002f360: f94002c0 ldr x0, [x22]
4002f364: f90116a0 str x0, [x21, #552]
sc = RTEMS_SUCCESSFUL;
4002f368: 52800013 mov w19, #0x0 // #0
tty->tty_rcv = *wakeup;
4002f36c: f94006c0 ldr x0, [x22, #8]
4002f370: f9011aa0 str x0, [x21, #560]
4002f374: aa1703e0 mov x0, x23
4002f378: 97ffd6ae bl 40024e30 <_Mutex_Release>
}
4002f37c: 2a1303e0 mov w0, w19
4002f380: a94153f3 ldp x19, x20, [sp, #16]
4002f384: a9425bf5 ldp x21, x22, [sp, #32]
4002f388: f9401bf7 ldr x23, [sp, #48]
4002f38c: a8c57bfd ldp x29, x30, [sp], #80
4002f390: d65f03c0 ret
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
4002f394: b9820ea0 ldrsw x0, [x21, #524]
4002f398: 90000716 adrp x22, 4010f000 <bsp_interrupt_handler_table+0x7430>
4002f39c: 913402d6 add x22, x22, #0xd00
sc = RTEMS_SUCCESSFUL;
4002f3a0: 52800013 mov w19, #0x0 // #0
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
4002f3a4: 8b001ac0 add x0, x22, x0, lsl #6
4002f3a8: f9400401 ldr x1, [x0, #8]
4002f3ac: b4000081 cbz x1, 4002f3bc <rtems_termios_ioctl+0x35c>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
4002f3b0: aa1503e0 mov x0, x21
4002f3b4: d63f0020 blr x1
4002f3b8: 2a0003f3 mov w19, w0
tty->t_line=*(int*)(args->buffer);
4002f3bc: f9400a80 ldr x0, [x20, #16]
4002f3c0: b9400000 ldr w0, [x0]
4002f3c4: b9020ea0 str w0, [x21, #524]
tty->t_sc = NULL; /* ensure that no more valid data */
4002f3c8: f9010abf str xzr, [x21, #528]
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
4002f3cc: 937a7c00 sbfiz x0, x0, #6, #32
4002f3d0: f8606ac1 ldr x1, [x22, x0]
4002f3d4: b4fff581 cbz x1, 4002f284 <rtems_termios_ioctl+0x224>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
4002f3d8: aa1503e0 mov x0, x21
4002f3dc: d63f0020 blr x1
4002f3e0: 2a0003f3 mov w19, w0
4002f3e4: 17ffffa8 b 4002f284 <rtems_termios_ioctl+0x224>
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
4002f3e8: b9820ea0 ldrsw x0, [x21, #524]
4002f3ec: 90000701 adrp x1, 4010f000 <bsp_interrupt_handler_table+0x7430>
4002f3f0: 91340021 add x1, x1, #0xd00
4002f3f4: 8b001820 add x0, x1, x0, lsl #6
4002f3f8: f9401802 ldr x2, [x0, #48]
4002f3fc: b4000f02 cbz x2, 4002f5dc <rtems_termios_ioctl+0x57c>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
4002f400: aa1403e1 mov x1, x20
4002f404: aa1503e0 mov x0, x21
4002f408: d63f0040 blr x2
4002f40c: 2a0003f3 mov w19, w0
4002f410: 17ffff9d b 4002f284 <rtems_termios_ioctl+0x224>
flags = *((int *)args->buffer);
4002f414: f9400a80 ldr x0, [x20, #16]
4002f418: b9400000 ldr w0, [x0]
if (flags == 0) {
4002f41c: 350005e0 cbnz w0, 4002f4d8 <rtems_termios_ioctl+0x478> <== ALWAYS TAKEN
4002f420: 52800033 mov w19, #0x1 // #1 <== NOT EXECUTED
rtems_termios_device_context *ctx = tty->device_context;
4002f424: f94126b4 ldr x20, [x21, #584]
( *context->lock_acquire )( context, lock_context );
4002f428: 910123e1 add x1, sp, #0x48
4002f42c: aa1403e0 mov x0, x20
4002f430: f9401282 ldr x2, [x20, #32]
4002f434: d63f0040 blr x2
( *context->lock_release )( context, lock_context );
4002f438: f9401682 ldr x2, [x20, #40]
tty->rawOutBuf.Tail = 0;
4002f43c: b90106bf str wzr, [x21, #260]
tty->rawOutBuf.Head = 0;
4002f440: b90102bf str wzr, [x21, #256]
4002f444: 910123e1 add x1, sp, #0x48
tty->rawOutBufState = rob_idle;
4002f448: b9013ebf str wzr, [x21, #316]
4002f44c: aa1403e0 mov x0, x20
4002f450: d63f0040 blr x2
if (flags & FREAD) {
4002f454: 350006b3 cbnz w19, 4002f528 <rtems_termios_ioctl+0x4c8>
RTEMS_SUCCESSFUL : RTEMS_IO_ERROR;
4002f458: 52800013 mov w19, #0x0 // #0
4002f45c: aa1703e0 mov x0, x23
4002f460: 97ffd674 bl 40024e30 <_Mutex_Release>
}
4002f464: 2a1303e0 mov w0, w19
4002f468: a94153f3 ldp x19, x20, [sp, #16]
4002f46c: a9425bf5 ldp x21, x22, [sp, #32]
4002f470: f9401bf7 ldr x23, [sp, #48]
4002f474: a8c57bfd ldp x29, x30, [sp], #80
4002f478: d65f03c0 ret
drainOutput (tty);
4002f47c: aa1503e0 mov x0, x21
4002f480: 97fff7c8 bl 4002d3a0 <drainOutput>
4002f484: aa1703e0 mov x0, x23
sc = RTEMS_SUCCESSFUL;
4002f488: 52800013 mov w19, #0x0 // #0
4002f48c: 97ffd669 bl 40024e30 <_Mutex_Release>
}
4002f490: 2a1303e0 mov w0, w19
4002f494: a94153f3 ldp x19, x20, [sp, #16]
4002f498: a9425bf5 ldp x21, x22, [sp, #32]
4002f49c: f9401bf7 ldr x23, [sp, #48]
4002f4a0: a8c57bfd ldp x29, x30, [sp], #80
4002f4a4: d65f03c0 ret
*(int*)(args->buffer)=tty->t_line;
4002f4a8: f9400a80 ldr x0, [x20, #16]
sc = RTEMS_SUCCESSFUL;
4002f4ac: 52800013 mov w19, #0x0 // #0
*(int*)(args->buffer)=tty->t_line;
4002f4b0: b9420ea1 ldr w1, [x21, #524]
4002f4b4: b9000001 str w1, [x0]
4002f4b8: aa1703e0 mov x0, x23
4002f4bc: 97ffd65d bl 40024e30 <_Mutex_Release>
}
4002f4c0: 2a1303e0 mov w0, w19
4002f4c4: a94153f3 ldp x19, x20, [sp, #16]
4002f4c8: a9425bf5 ldp x21, x22, [sp, #32]
4002f4cc: f9401bf7 ldr x23, [sp, #48]
4002f4d0: a8c57bfd ldp x29, x30, [sp], #80
4002f4d4: d65f03c0 ret
if (flags & FREAD) {
4002f4d8: 12000013 and w19, w0, #0x1
if (flags & FWRITE) {
4002f4dc: 370ffa40 tbnz w0, #1, 4002f424 <rtems_termios_ioctl+0x3c4>
if (flags & FREAD) {
4002f4e0: 34fffbd3 cbz w19, 4002f458 <rtems_termios_ioctl+0x3f8> <== NEVER TAKEN
4002f4e4: 14000011 b 4002f528 <rtems_termios_ioctl+0x4c8>
tty->rawInBufSemaphoreWait = true;
4002f4e8: 52800020 mov w0, #0x1 // #1
4002f4ec: 3903a2a0 strb w0, [x21, #232]
tty->rawInBufSemaphoreFirstTimeout = 0;
4002f4f0: 291dfebf stp wzr, wzr, [x21, #236]
if (tty->handler.set_attributes) {
4002f4f4: f940eaa2 ldr x2, [x21, #464]
4002f4f8: b4fffb02 cbz x2, 4002f458 <rtems_termios_ioctl+0x3f8>
sc = (*tty->handler.set_attributes)(tty->device_context, &tty->termios) ?
4002f4fc: f94126a0 ldr x0, [x21, #584]
4002f500: aa1603e1 mov x1, x22
RTEMS_SUCCESSFUL : RTEMS_IO_ERROR;
4002f504: 52800373 mov w19, #0x1b // #27
sc = (*tty->handler.set_attributes)(tty->device_context, &tty->termios) ?
4002f508: d63f0040 blr x2
RTEMS_SUCCESSFUL : RTEMS_IO_ERROR;
4002f50c: 72001c1f tst w0, #0xff
4002f510: 54ffeba0 b.eq 4002f284 <rtems_termios_ioctl+0x224> // b.none
4002f514: 52800013 mov w19, #0x0 // #0
4002f518: 17ffffd1 b 4002f45c <rtems_termios_ioctl+0x3fc>
rawnc += tty->rawInBuf.Size;
4002f51c: b940baa0 ldr w0, [x21, #184] <== NOT EXECUTED
4002f520: 0b000021 add w1, w1, w0 <== NOT EXECUTED
4002f524: 17ffff81 b 4002f328 <rtems_termios_ioctl+0x2c8> <== NOT EXECUTED
rtems_termios_device_context *ctx = tty->device_context;
4002f528: f94126b4 ldr x20, [x21, #584]
( *context->lock_acquire )( context, lock_context );
4002f52c: 910123e1 add x1, sp, #0x48
sc = RTEMS_SUCCESSFUL;
4002f530: 52800013 mov w19, #0x0 // #0
4002f534: aa1403e0 mov x0, x20
4002f538: f9401282 ldr x2, [x20, #32]
4002f53c: d63f0040 blr x2
( *context->lock_release )( context, lock_context );
4002f540: f9401682 ldr x2, [x20, #40]
tty->rawInBuf.Tail = 0;
4002f544: b900b6bf str wzr, [x21, #180]
tty->rawInBuf.Head = 0;
4002f548: b900b2bf str wzr, [x21, #176]
4002f54c: 910123e1 add x1, sp, #0x48
4002f550: aa1403e0 mov x0, x20
4002f554: d63f0040 blr x2
}
4002f558: 17ffff4b b 4002f284 <rtems_termios_ioctl+0x224>
drainOutput (tty);
4002f55c: aa1503e0 mov x0, x21
4002f560: 97fff790 bl 4002d3a0 <drainOutput>
if (args->command == TIOCSETAF) {
4002f564: f9400681 ldr x1, [x20, #8]
4002f568: d28e82c0 mov x0, #0x7416 // #29718
4002f56c: f2b00580 movk x0, #0x802c, lsl #16
4002f570: eb00003f cmp x1, x0
4002f574: 54ffdc41 b.ne 4002f0fc <rtems_termios_ioctl+0x9c> // b.any
rtems_termios_device_context *ctx = tty->device_context;
4002f578: f94126b3 ldr x19, [x21, #584]
( *context->lock_acquire )( context, lock_context );
4002f57c: 910123e1 add x1, sp, #0x48
4002f580: aa1303e0 mov x0, x19
4002f584: f9401262 ldr x2, [x19, #32]
4002f588: d63f0040 blr x2
( *context->lock_release )( context, lock_context );
4002f58c: f9401662 ldr x2, [x19, #40]
tty->rawInBuf.Tail = 0;
4002f590: b900b6bf str wzr, [x21, #180]
tty->rawInBuf.Head = 0;
4002f594: b900b2bf str wzr, [x21, #176]
4002f598: 910123e1 add x1, sp, #0x48
4002f59c: aa1303e0 mov x0, x19
4002f5a0: d63f0040 blr x2
}
4002f5a4: 17fffed6 b 4002f0fc <rtems_termios_ioctl+0x9c>
tty->rawInBufSemaphoreFirstTimeout = 0;
4002f5a8: 7100005f cmp w2, #0x0
tty->rawInBufSemaphoreWait = true;
4002f5ac: 52800022 mov w2, #0x1 // #1
tty->rawInBufSemaphoreFirstTimeout = 0;
4002f5b0: 1a9f0001 csel w1, w0, wzr, eq // eq = none
tty->rawInBufSemaphoreWait = true;
4002f5b4: 3903a2a2 strb w2, [x21, #232]
tty->rawInBufSemaphoreFirstTimeout = 0;
4002f5b8: 291d86a0 stp w0, w1, [x21, #236]
4002f5bc: 17ffffce b 4002f4f4 <rtems_termios_ioctl+0x494>
tty->flow_ctrl &= ~(FL_MDXOF);
4002f5c0: b941faa0 ldr w0, [x21, #504]
4002f5c4: 12157800 and w0, w0, #0xfffffbff
4002f5c8: b901faa0 str w0, [x21, #504]
tty->flow_ctrl &= ~(FL_ISNTXOF);
4002f5cc: b941faa0 ldr w0, [x21, #504]
4002f5d0: 121e7800 and w0, w0, #0xfffffffd
4002f5d4: b901faa0 str w0, [x21, #504]
4002f5d8: 17fffeec b 4002f188 <rtems_termios_ioctl+0x128>
} else if (tty->handler.ioctl) {
4002f5dc: f940eea3 ldr x3, [x21, #472]
4002f5e0: b4000183 cbz x3, 4002f610 <rtems_termios_ioctl+0x5b0> <== ALWAYS TAKEN
args->ioctl_return = (*tty->handler.ioctl) (tty->device_context,
4002f5e4: f9400a82 ldr x2, [x20, #16] <== NOT EXECUTED
4002f5e8: aa1303e1 mov x1, x19 <== NOT EXECUTED
4002f5ec: f94126a0 ldr x0, [x21, #584] <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
4002f5f0: 52800013 mov w19, #0x0 // #0 <== NOT EXECUTED
args->ioctl_return = (*tty->handler.ioctl) (tty->device_context,
4002f5f4: d63f0060 blr x3 <== NOT EXECUTED
4002f5f8: b9001a80 str w0, [x20, #24] <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
4002f5fc: 17ffff22 b 4002f284 <rtems_termios_ioctl+0x224> <== NOT EXECUTED
tty->flow_ctrl &= ~(FL_IRTSOFF);
4002f600: b941faa0 ldr w0, [x21, #504] <== NOT EXECUTED
4002f604: 121d7800 and w0, w0, #0xfffffffb <== NOT EXECUTED
4002f608: b901faa0 str w0, [x21, #504] <== NOT EXECUTED
if (tty->termios.c_cflag & CRTSCTS) {
4002f60c: 17fffef7 b 4002f1e8 <rtems_termios_ioctl+0x188> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
4002f610: 52800153 mov w19, #0xa // #10
4002f614: 17ffff1c b 4002f284 <rtems_termios_ioctl+0x224>
...
0000000040024440 <rtems_termios_open>:
{
40024440: a9bc7bfd stp x29, x30, [sp, #-64]!
40024444: 910003fd mov x29, sp
40024448: a9025bf5 stp x21, x22, [sp, #32]
_Mutex_Acquire( mutex );
4002444c: 900006f5 adrp x21, 40100000 <_IO_Driver_address_table>
40024450: 910b62b5 add x21, x21, #0x2d8
40024454: aa0203f6 mov x22, x2
40024458: a90153f3 stp x19, x20, [sp, #16]
4002445c: 2a0003f3 mov w19, w0
40024460: 2a0103f4 mov w20, w1
40024464: aa1503e0 mov x0, x21
40024468: a90363f7 stp x23, x24, [sp, #48]
4002446c: aa0303f7 mov x23, x3
40024470: 940011ec bl 40028c20 <_Mutex_Acquire>
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
40024474: f00006f8 adrp x24, 40103000 <_Thread_Objects+0x4a8>
40024478: f9454b03 ldr x3, [x24, #2704]
4002447c: b5000083 cbnz x3, 4002448c <rtems_termios_open+0x4c> <== NEVER TAKEN
40024480: 14000009 b 400244a4 <rtems_termios_open+0x64>
40024484: f9400063 ldr x3, [x3] <== NOT EXECUTED
40024488: b40000e3 cbz x3, 400244a4 <rtems_termios_open+0x64> <== NOT EXECUTED
if ((tty->major == major) && (tty->minor == minor))
4002448c: b9401464 ldr w4, [x3, #20] <== NOT EXECUTED
40024490: 6b13009f cmp w4, w19 <== NOT EXECUTED
40024494: 54ffff81 b.ne 40024484 <rtems_termios_open+0x44> // b.any <== NOT EXECUTED
40024498: b9401860 ldr w0, [x3, #24] <== NOT EXECUTED
4002449c: 6b14001f cmp w0, w20 <== NOT EXECUTED
400244a0: 54ffff21 b.ne 40024484 <rtems_termios_open+0x44> // b.any <== NOT EXECUTED
tty = rtems_termios_open_tty(
400244a4: aa1703e5 mov x5, x23
400244a8: aa1603e2 mov x2, x22
400244ac: 2a1403e1 mov w1, w20
400244b0: 2a1303e0 mov w0, w19
400244b4: d2800004 mov x4, #0x0 // #0
400244b8: 97fffa06 bl 40022cd0 <rtems_termios_open_tty>
if (tty == NULL) {
400244bc: b40002c0 cbz x0, 40024514 <rtems_termios_open+0xd4>
if (tty->refcount == 1) {
400244c0: b9401001 ldr w1, [x0, #16]
400244c4: 7100043f cmp w1, #0x1
400244c8: 54000120 b.eq 400244ec <rtems_termios_open+0xac> // b.none <== ALWAYS TAKEN
_Mutex_Release( mutex );
400244cc: aa1503e0 mov x0, x21
400244d0: 940011f0 bl 40028c90 <_Mutex_Release>
return RTEMS_SUCCESSFUL;
400244d4: 52800000 mov w0, #0x0 // #0
}
400244d8: a94153f3 ldp x19, x20, [sp, #16]
400244dc: a9425bf5 ldp x21, x22, [sp, #32]
400244e0: a94363f7 ldp x23, x24, [sp, #48]
400244e4: a8c47bfd ldp x29, x30, [sp], #64
400244e8: d65f03c0 ret
tty->forw = rtems_termios_ttyHead;
400244ec: f9454b01 ldr x1, [x24, #2704]
tty->back = NULL;
400244f0: a9007c01 stp x1, xzr, [x0]
if (rtems_termios_ttyHead != NULL)
400244f4: b4000041 cbz x1, 400244fc <rtems_termios_open+0xbc> <== ALWAYS TAKEN
rtems_termios_ttyHead->back = tty;
400244f8: f9000420 str x0, [x1, #8] <== NOT EXECUTED
if (rtems_termios_ttyTail == NULL)
400244fc: f00006e1 adrp x1, 40103000 <_Thread_Objects+0x4a8>
40024500: f9454c22 ldr x2, [x1, #2712]
rtems_termios_ttyHead = tty;
40024504: f9054b00 str x0, [x24, #2704]
if (rtems_termios_ttyTail == NULL)
40024508: b5fffe22 cbnz x2, 400244cc <rtems_termios_open+0x8c> <== NEVER TAKEN
rtems_termios_ttyTail = tty;
4002450c: f9054c20 str x0, [x1, #2712]
40024510: 17ffffef b 400244cc <rtems_termios_open+0x8c>
40024514: aa1503e0 mov x0, x21
40024518: 940011de bl 40028c90 <_Mutex_Release>
return RTEMS_NO_MEMORY;
4002451c: 52800340 mov w0, #0x1a // #26
40024520: 17ffffee b 400244d8 <rtems_termios_open+0x98>
...
0000000040024ea0 <rtems_termios_register_isig_handler>:
{
40024ea0: aa0003e1 mov x1, x0
if (handler == NULL) {
40024ea4: b40000a0 cbz x0, 40024eb8 <rtems_termios_register_isig_handler+0x18> <== NEVER TAKEN
termios_isig_handler = handler;
40024ea8: 900006e2 adrp x2, 40100000 <_IO_Driver_address_table>
return RTEMS_SUCCESSFUL;
40024eac: 52800000 mov w0, #0x0 // #0
termios_isig_handler = handler;
40024eb0: f9010841 str x1, [x2, #528]
}
40024eb4: d65f03c0 ret
return RTEMS_INVALID_ADDRESS;
40024eb8: 52800120 mov w0, #0x9 // #9 <== NOT EXECUTED
}
40024ebc: d65f03c0 ret <== NOT EXECUTED
0000000040027230 <rtems_termios_set_best_baud>:
{
const rtems_assoc_t *current = &rtems_termios_baud_table[ 0 ];
const rtems_assoc_t *last = current;
speed_t spd;
while ( current->name != NULL && current->local_value < baud ) {
40027230: b00000a2 adrp x2, 4003c000 <bsp_section_rodata_begin+0x8d8>
40027234: 913fe045 add x5, x2, #0xff8
40027238: f947fc43 ldr x3, [x2, #4088]
const rtems_assoc_t *current = &rtems_termios_baud_table[ 0 ];
4002723c: aa0503e2 mov x2, x5
while ( current->name != NULL && current->local_value < baud ) {
40027240: b50000c3 cbnz x3, 40027258 <rtems_termios_set_best_baud+0x28> <== ALWAYS TAKEN
40027244: 14000010 b 40027284 <rtems_termios_set_best_baud+0x54> <== NOT EXECUTED
40027248: f9400843 ldr x3, [x2, #16]
4002724c: aa0203e5 mov x5, x2
40027250: aa0403e2 mov x2, x4
40027254: b4000183 cbz x3, 40027284 <rtems_termios_set_best_baud+0x54>
40027258: b9400843 ldr w3, [x2, #8]
last = current;
++current;
4002725c: 91004044 add x4, x2, #0x10
while ( current->name != NULL && current->local_value < baud ) {
40027260: 6b01007f cmp w3, w1
40027264: 54ffff23 b.cc 40027248 <rtems_termios_set_best_baud+0x18> // b.lo, b.ul, b.last
}
if ( current->name != NULL ) {
uint32_t mid = (last->local_value + current->local_value) / UINT32_C( 2 );
40027268: b94008a4 ldr w4, [x5, #8]
4002726c: 0b040063 add w3, w3, w4
spd = baud <= mid ? last->remote_value : current->remote_value;
40027270: 6b43043f cmp w1, w3, lsr #1
40027274: 54000108 b.hi 40027294 <rtems_termios_set_best_baud+0x64> // b.pmore
40027278: b9400ca1 ldr w1, [x5, #12]
} else {
spd = B460800;
}
term->c_ispeed = spd;
term->c_ospeed = spd;
4002727c: 29048401 stp w1, w1, [x0, #36]
}
40027280: d65f03c0 ret
spd = B460800;
40027284: 52810001 mov w1, #0x800 // #2048
40027288: 72a000e1 movk w1, #0x7, lsl #16
term->c_ospeed = spd;
4002728c: 29048401 stp w1, w1, [x0, #36]
}
40027290: d65f03c0 ret
spd = baud <= mid ? last->remote_value : current->remote_value;
40027294: b9400c41 ldr w1, [x2, #12]
term->c_ospeed = spd;
40027298: 29048401 stp w1, w1, [x0, #36]
}
4002729c: d65f03c0 ret
000000004002a190 <rtems_verror>:
int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
4002a190: a9ba7bfd stp x29, x30, [sp, #-96]!
4002a194: 910003fd mov x29, sp
4002a198: a90153f3 stp x19, x20, [sp, #16]
4002a19c: aa0203f4 mov x20, x2
4002a1a0: a9025bf5 stp x21, x22, [sp, #32]
4002a1a4: aa0003f5 mov x21, x0
4002a1a8: aa0103f6 mov x22, x1
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
4002a1ac: 36e800c0 tbz w0, #29, 4002a1c4 <rtems_verror+0x34>
if (rtems_panic_in_progress++)
4002a1b0: d00006c2 adrp x2, 40104000 <_Thread_Objects+0x1f0>
4002a1b4: b946d840 ldr w0, [x2, #1752]
4002a1b8: 11000401 add w1, w0, #0x1
4002a1bc: b906d841 str w1, [x2, #1752]
4002a1c0: 350004a0 cbnz w0, 4002a254 <rtems_verror+0xc4> <== NEVER TAKEN
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
4002a1c4: f9001bf7 str x23, [sp, #48]
4002a1c8: 97ffdd36 bl 400216a0 <__getreent>
4002a1cc: f9400800 ldr x0, [x0, #16]
status = error_flag & ~RTEMS_ERROR_MASK;
4002a1d0: 120172b7 and w23, w21, #0x8fffffff
(void) fflush(stdout); /* in case stdout/stderr same */
4002a1d4: 94003506 bl 400375ec <fflush>
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
4002a1d8: 37f00595 tbnz w21, #30, 4002a288 <rtems_verror+0xf8>
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu16 "] ", rtems_object_get_local_node());
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
4002a1dc: 97ffdd31 bl 400216a0 <__getreent>
4002a1e0: f9400281 ldr x1, [x20]
4002a1e4: f90023e1 str x1, [sp, #64]
4002a1e8: 910103e2 add x2, sp, #0x40
4002a1ec: f9400681 ldr x1, [x20, #8]
4002a1f0: f90027e1 str x1, [sp, #72]
4002a1f4: f9400a81 ldr x1, [x20, #16]
4002a1f8: f9002be1 str x1, [sp, #80]
4002a1fc: f9400e81 ldr x1, [x20, #24]
4002a200: f9002fe1 str x1, [sp, #88]
4002a204: aa1603e1 mov x1, x22
4002a208: f9400c00 ldr x0, [x0, #24]
4002a20c: 940063b3 bl 400430d8 <vfprintf>
4002a210: 2a0003f3 mov w19, w0
if (status)
4002a214: 350007b7 cbnz w23, 4002a308 <rtems_verror+0x178>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
4002a218: 97ffdd22 bl 400216a0 <__getreent>
4002a21c: f9400c00 ldr x0, [x0, #24]
4002a220: f0000141 adrp x1, 40055000 <state_pairs+0x1f0>
4002a224: 9112a021 add x1, x1, #0x4a8
4002a228: 9400385f bl 400383a4 <fprintf>
4002a22c: 0b000273 add w19, w19, w0
(void) fflush(stderr);
4002a230: 97ffdd1c bl 400216a0 <__getreent>
4002a234: f9400c00 ldr x0, [x0, #24]
4002a238: 940034ed bl 400375ec <fflush>
return chars_written;
}
4002a23c: 2a1303e0 mov w0, w19
4002a240: a94153f3 ldp x19, x20, [sp, #16]
4002a244: a9425bf5 ldp x21, x22, [sp, #32]
return chars_written;
4002a248: f9401bf7 ldr x23, [sp, #48]
}
4002a24c: a8c67bfd ldp x29, x30, [sp], #96
4002a250: d65f03c0 ret
disable_level = cpu_self->thread_dispatch_disable_level;
4002a254: d00006c0 adrp x0, 40104000 <_Thread_Objects+0x1f0> <== NOT EXECUTED
4002a258: 91190000 add x0, x0, #0x640 <== NOT EXECUTED
if (rtems_panic_in_progress > 2)
4002a25c: 7100083f cmp w1, #0x2 <== NOT EXECUTED
return 0;
4002a260: 52800013 mov w19, #0x0 // #0 <== NOT EXECUTED
4002a264: b9401801 ldr w1, [x0, #24] <== NOT EXECUTED
cpu_self->thread_dispatch_disable_level = disable_level + 1;
4002a268: 11000421 add w1, w1, #0x1 <== NOT EXECUTED
4002a26c: b9001801 str w1, [x0, #24] <== NOT EXECUTED
if (rtems_panic_in_progress > 2)
4002a270: 54fffaad b.le 4002a1c4 <rtems_verror+0x34> <== NOT EXECUTED
}
4002a274: 2a1303e0 mov w0, w19 <== NOT EXECUTED
4002a278: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
4002a27c: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
4002a280: a8c67bfd ldp x29, x30, [sp], #96 <== NOT EXECUTED
4002a284: d65f03c0 ret <== NOT EXECUTED
local_errno = errno;
4002a288: 94003353 bl 40036fd4 <__errno>
4002a28c: b9400015 ldr w21, [x0]
chars_written += vfprintf(stderr, printf_format, arglist);
4002a290: 97ffdd04 bl 400216a0 <__getreent>
4002a294: f9400282 ldr x2, [x20]
4002a298: f90023e2 str x2, [sp, #64]
4002a29c: aa1603e1 mov x1, x22
4002a2a0: f9400682 ldr x2, [x20, #8]
4002a2a4: f90027e2 str x2, [sp, #72]
4002a2a8: f9400a82 ldr x2, [x20, #16]
4002a2ac: f9002be2 str x2, [sp, #80]
4002a2b0: f9400e82 ldr x2, [x20, #24]
4002a2b4: f9002fe2 str x2, [sp, #88]
4002a2b8: 910103e2 add x2, sp, #0x40
4002a2bc: f9400c00 ldr x0, [x0, #24]
4002a2c0: 94006386 bl 400430d8 <vfprintf>
4002a2c4: 2a0003f3 mov w19, w0
if (status)
4002a2c8: 35000237 cbnz w23, 4002a30c <rtems_verror+0x17c>
if (local_errno) {
4002a2cc: 710002bf cmp w21, #0x0
4002a2d0: 34fffa55 cbz w21, 4002a218 <rtems_verror+0x88>
if ((local_errno > 0) && *strerror(local_errno))
4002a2d4: 540000ad b.le 4002a2e8 <rtems_verror+0x158>
4002a2d8: 2a1503e0 mov w0, w21
4002a2dc: 94005009 bl 4003e300 <strerror>
4002a2e0: 39400000 ldrb w0, [x0]
4002a2e4: 350002c0 cbnz w0, 4002a33c <rtems_verror+0x1ac> <== ALWAYS TAKEN
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
4002a2e8: 97ffdcee bl 400216a0 <__getreent>
4002a2ec: f9400c00 ldr x0, [x0, #24]
4002a2f0: 2a1503e2 mov w2, w21
4002a2f4: b0000141 adrp x1, 40053000 <trans_two+0xb8>
4002a2f8: 9108a021 add x1, x1, #0x228
4002a2fc: 9400382a bl 400383a4 <fprintf>
4002a300: 0b000273 add w19, w19, w0
4002a304: 17ffffc5 b 4002a218 <rtems_verror+0x88>
int local_errno = 0;
4002a308: 52800015 mov w21, #0x0 // #0
fprintf(stderr, " (status: %s)", rtems_status_text(status));
4002a30c: 97ffdce5 bl 400216a0 <__getreent>
4002a310: aa0003e1 mov x1, x0
4002a314: 2a1703e0 mov w0, w23
4002a318: f9400c34 ldr x20, [x1, #24]
4002a31c: 940008dd bl 4002c690 <rtems_status_text>
4002a320: b0000141 adrp x1, 40053000 <trans_two+0xb8>
4002a324: aa0003e2 mov x2, x0
4002a328: 91082021 add x1, x1, #0x208
4002a32c: aa1403e0 mov x0, x20
4002a330: 9400381d bl 400383a4 <fprintf>
chars_written +=
4002a334: 0b000273 add w19, w19, w0
4002a338: 17ffffe5 b 4002a2cc <rtems_verror+0x13c>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
4002a33c: 97ffdcd9 bl 400216a0 <__getreent>
4002a340: aa0003e1 mov x1, x0
4002a344: 2a1503e0 mov w0, w21
4002a348: f9400c34 ldr x20, [x1, #24]
4002a34c: 94004fed bl 4003e300 <strerror>
4002a350: b0000141 adrp x1, 40053000 <trans_two+0xb8>
4002a354: aa0003e2 mov x2, x0
4002a358: 91086021 add x1, x1, #0x218
4002a35c: aa1403e0 mov x0, x20
4002a360: 94003811 bl 400383a4 <fprintf>
4002a364: 0b000273 add w19, w19, w0
4002a368: 17ffffac b 4002a218 <rtems_verror+0x88>
4002a36c: 00000000 udf #0
000000004002c4c0 <rtems_vprintf>:
*
* @return true The printer is valid else false is returned.
*/
static inline bool rtems_print_printer_valid(const rtems_printer *printer)
{
return printer != NULL && printer->printer != NULL;
4002c4c0: b4000260 cbz x0, 4002c50c <rtems_vprintf+0x4c> <== NEVER TAKEN
4002c4c4: f9400404 ldr x4, [x0, #8]
4002c4c8: b4000224 cbz x4, 4002c50c <rtems_vprintf+0x4c> <== NEVER TAKEN
va_list ap
)
{
int len = 0;
if ( rtems_print_printer_valid( printer ) ) {
len = printer->printer( printer->context, format, ap );
4002c4cc: aa0203e3 mov x3, x2
{
4002c4d0: a9bd7bfd stp x29, x30, [sp, #-48]!
4002c4d4: 910003fd mov x29, sp
len = printer->printer( printer->context, format, ap );
4002c4d8: f9400065 ldr x5, [x3]
4002c4dc: 910043e2 add x2, sp, #0x10
4002c4e0: f9400000 ldr x0, [x0]
4002c4e4: f9000be5 str x5, [sp, #16]
4002c4e8: f9400465 ldr x5, [x3, #8]
4002c4ec: f9000fe5 str x5, [sp, #24]
4002c4f0: f9400865 ldr x5, [x3, #16]
4002c4f4: f90013e5 str x5, [sp, #32]
4002c4f8: f9400c63 ldr x3, [x3, #24]
4002c4fc: f90017e3 str x3, [sp, #40]
4002c500: d63f0080 blr x4
}
return len;
}
4002c504: a8c37bfd ldp x29, x30, [sp], #48
4002c508: d65f03c0 ret
int len = 0;
4002c50c: 52800000 mov w0, #0x0 // #0 <== NOT EXECUTED
}
4002c510: d65f03c0 ret <== NOT EXECUTED
...
0000000040026f10 <setgrent>:
void setgrent(void)
{
40026f10: a9bd7bfd stp x29, x30, [sp, #-48]!
pthread_once(&grp_once, grp_init);
40026f14: 90000001 adrp x1, 40026000 <_Thread_Kill_zombies+0x60>
40026f18: b00006e0 adrp x0, 40103000 <_Thread_Objects+0x540>
{
40026f1c: 910003fd mov x29, sp
pthread_once(&grp_once, grp_init);
40026f20: 9139c021 add x1, x1, #0xe70
40026f24: 910d0000 add x0, x0, #0x340
{
40026f28: a90153f3 stp x19, x20, [sp, #16]
pthread_once(&grp_once, grp_init);
40026f2c: 97fff75d bl 40024ca0 <pthread_once>
return pthread_getspecific(grp_key);
40026f30: b00006f4 adrp x20, 40103000 <_Thread_Objects+0x540>
40026f34: b9433e80 ldr w0, [x20, #828]
40026f38: 9400044a bl 40028060 <pthread_getspecific>
grp_context *ctx = grp_get_context();
if (ctx == NULL) {
40026f3c: aa0003f3 mov x19, x0
40026f40: b40001c0 cbz x0, 40026f78 <setgrent+0x68>
return;
}
}
_libcsupport_pwdgrp_init();
40026f44: 97ffeb3b bl 40021c30 <_libcsupport_pwdgrp_init>
if (ctx->fp != NULL)
40026f48: f9400260 ldr x0, [x19]
40026f4c: b4000040 cbz x0, 40026f54 <setgrent+0x44>
fclose(ctx->fp);
40026f50: 940020cd bl 4002f284 <fclose>
ctx->fp = fopen("/etc/group", "r");
40026f54: 900000a1 adrp x1, 4003a000 <rtems_filesystem_default_pathconf+0x48>
40026f58: f0000080 adrp x0, 40039000 <__sfp_handle_exceptions+0x50>
40026f5c: 91002021 add x1, x1, #0x8
40026f60: 912c0000 add x0, x0, #0xb00
40026f64: 940023ce bl 4002fe9c <fopen>
40026f68: f9000260 str x0, [x19]
}
40026f6c: a94153f3 ldp x19, x20, [sp, #16]
40026f70: a8c37bfd ldp x29, x30, [sp], #48
40026f74: d65f03c0 ret
ctx = calloc(1, sizeof(*ctx));
40026f78: d2802501 mov x1, #0x128 // #296
40026f7c: d2800020 mov x0, #0x1 // #1
40026f80: f90013f5 str x21, [sp, #32]
40026f84: 97fffee7 bl 40026b20 <calloc>
40026f88: aa0003f5 mov x21, x0
40026f8c: aa0003f3 mov x19, x0
if (ctx == NULL)
40026f90: b4000180 cbz x0, 40026fc0 <setgrent+0xb0> <== NEVER TAKEN
eno = pthread_setspecific(grp_key, ctx);
40026f94: b9433e80 ldr w0, [x20, #828]
40026f98: aa1503e1 mov x1, x21
40026f9c: 94000445 bl 400280b0 <pthread_setspecific>
if (eno != 0) {
40026fa0: 35000060 cbnz w0, 40026fac <setgrent+0x9c> <== NEVER TAKEN
40026fa4: f94013f5 ldr x21, [sp, #32]
40026fa8: 17ffffe7 b 40026f44 <setgrent+0x34>
free(ctx);
40026fac: aa1503e0 mov x0, x21 <== NOT EXECUTED
}
40026fb0: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
free(ctx);
40026fb4: f94013f5 ldr x21, [sp, #32] <== NOT EXECUTED
}
40026fb8: a8c37bfd ldp x29, x30, [sp], #48 <== NOT EXECUTED
free(ctx);
40026fbc: 17ffff45 b 40026cd0 <free> <== NOT EXECUTED
40026fc0: f94013f5 ldr x21, [sp, #32] <== NOT EXECUTED
40026fc4: 17ffffea b 40026f6c <setgrent+0x5c> <== NOT EXECUTED
...
0000000040023be0 <unmount>:
* in some form is supported on most UNIX and POSIX systems. This
* routine is necessary to mount instantiations of a file system
* into the file system name space.
*/
int unmount( const char *path )
{
40023be0: a9b77bfd stp x29, x30, [sp, #-144]!
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
40023be4: aa0003e1 mov x1, x0
40023be8: 52800302 mov w2, #0x18 // #24
{
40023bec: 910003fd mov x29, sp
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
40023bf0: 9100a3e0 add x0, sp, #0x28
{
40023bf4: a90153f3 stp x19, x20, [sp, #16]
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
40023bf8: 97fffd6a bl 400231a0 <rtems_filesystem_eval_path_start>
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
40023bfc: f9401413 ldr x19, [x0, #40]
40023c00: f9400e62 ldr x2, [x19, #24]
40023c04: f9402661 ldr x1, [x19, #72]
40023c08: f9401042 ldr x2, [x2, #32]
40023c0c: d63f0040 blr x2
if ( rtems_filesystem_location_is_instance_root( currentloc ) ) {
40023c10: 72001c1f tst w0, #0xff
40023c14: 54000660 b.eq 40023ce0 <unmount+0x100> // b.none
&rtems_filesystem_root->location;
40023c18: 9400007e bl 40023e10 <rtems_current_user_env_get>
40023c1c: f9400414 ldr x20, [x0, #8]
&rtems_filesystem_current->location;
40023c20: 9400007c bl 40023e10 <rtems_current_user_env_get>
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
40023c24: f9401681 ldr x1, [x20, #40]
40023c28: eb01027f cmp x19, x1
40023c2c: 540004a0 b.eq 40023cc0 <unmount+0xe0> // b.none
40023c30: f9400000 ldr x0, [x0]
40023c34: f9401400 ldr x0, [x0, #40]
40023c38: eb00027f cmp x19, x0
40023c3c: 54000420 b.eq 40023cc0 <unmount+0xe0> // b.none
if ( !contains_root_or_current_directory( mt_entry ) ) {
const rtems_filesystem_operations_table *mt_point_ops =
mt_entry->mt_point_node->location.mt_entry->ops;
40023c40: f9402261 ldr x1, [x19, #64]
rv = (*mt_point_ops->unmount_h)( mt_entry );
40023c44: aa1303e0 mov x0, x19
const rtems_filesystem_operations_table *mt_point_ops =
40023c48: f9401421 ldr x1, [x1, #40]
rv = (*mt_point_ops->unmount_h)( mt_entry );
40023c4c: f9400c21 ldr x1, [x1, #24]
40023c50: f9403021 ldr x1, [x1, #96]
40023c54: d63f0020 blr x1
40023c58: 2a0003f4 mov w20, w0
if ( rv == 0 ) {
40023c5c: 340000e0 cbz w0, 40023c78 <unmount+0x98>
} else {
errno = EACCES;
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
40023c60: 9100a3e0 add x0, sp, #0x28
40023c64: 97fffdc7 bl 40023380 <rtems_filesystem_eval_path_cleanup>
rtems_fatal_error_occurred( 0xdeadbeef );
}
}
return rv;
}
40023c68: 2a1403e0 mov w0, w20
40023c6c: a94153f3 ldp x19, x20, [sp, #16]
40023c70: a8c97bfd ldp x29, x30, [sp], #144
40023c74: d65f03c0 ret
rtems_id self_task_id = rtems_task_self();
40023c78: 94000e3a bl 40027560 <rtems_task_self>
__asm__ volatile (
40023c7c: d53b4221 mrs x1, daif
40023c80: d50342df msr daifset, #0x2
mt_entry->mounted = false;
40023c84: 3901427f strb wzr, [x19, #80]
mt_entry->unmount_task = self_task_id;
40023c88: b9007a60 str w0, [x19, #120]
__asm__ volatile (
40023c8c: 92407c20 and x0, x1, #0xffffffff
40023c90: d51b4220 msr daif, x0
rtems_filesystem_eval_path_cleanup( &ctx );
40023c94: 9100a3e0 add x0, sp, #0x28
40023c98: 97fffdba bl 40023380 <rtems_filesystem_eval_path_cleanup>
return rtems_event_system_receive(
40023c9c: 910093e3 add x3, sp, #0x24
40023ca0: 52800002 mov w2, #0x0 // #0
40023ca4: 52800001 mov w1, #0x0 // #0
40023ca8: 52b00000 mov w0, #0x80000000 // #-2147483648
40023cac: 94000de1 bl 40027430 <rtems_event_system_receive>
if ( sc != RTEMS_SUCCESSFUL ) {
40023cb0: 34fffdc0 cbz w0, 40023c68 <unmount+0x88> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
40023cb4: 5297dde0 mov w0, #0xbeef // #48879 <== NOT EXECUTED
40023cb8: 72bbd5a0 movk w0, #0xdead, lsl #16 <== NOT EXECUTED
40023cbc: 94000e7d bl 400276b0 <rtems_fatal_error_occurred> <== NOT EXECUTED
errno = EBUSY;
40023cc0: 94005b2b bl 4003a96c <__errno>
40023cc4: aa0003e1 mov x1, x0
40023cc8: 52800202 mov w2, #0x10 // #16
rtems_filesystem_eval_path_cleanup( &ctx );
40023ccc: 9100a3e0 add x0, sp, #0x28
rv = -1;
40023cd0: 12800014 mov w20, #0xffffffff // #-1
errno = EBUSY;
40023cd4: b9000022 str w2, [x1]
rtems_filesystem_eval_path_cleanup( &ctx );
40023cd8: 97fffdaa bl 40023380 <rtems_filesystem_eval_path_cleanup>
if ( rv == 0 ) {
40023cdc: 17ffffe3 b 40023c68 <unmount+0x88>
errno = EACCES;
40023ce0: 94005b23 bl 4003a96c <__errno>
40023ce4: aa0003e1 mov x1, x0
40023ce8: 528001a2 mov w2, #0xd // #13
rtems_filesystem_eval_path_cleanup( &ctx );
40023cec: 9100a3e0 add x0, sp, #0x28
rv = -1;
40023cf0: 12800014 mov w20, #0xffffffff // #-1
errno = EACCES;
40023cf4: b9000022 str w2, [x1]
rtems_filesystem_eval_path_cleanup( &ctx );
40023cf8: 97fffda2 bl 40023380 <rtems_filesystem_eval_path_cleanup>
if ( rv == 0 ) {
40023cfc: 17ffffdb b 40023c68 <unmount+0x88>
000000004003bb30 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
4003bb30: a9be7bfd stp x29, x30, [sp, #-32]!
4003bb34: 910003fd mov x29, sp
rtems_libio_t *iop;
ssize_t n;
rtems_libio_check_buffer( buffer );
4003bb38: b4000781 cbz x1, 4003bc28 <write+0xf8> <== NEVER TAKEN
rtems_libio_check_count( count );
4003bb3c: 93407c03 sxtw x3, w0
4003bb40: d2800000 mov x0, #0x0 // #0
4003bb44: b4000462 cbz x2, 4003bbd0 <write+0xa0>
LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_WRITE, EBADF );
4003bb48: b0000000 adrp x0, 4003c000 <_Scheduler_Table+0x48>
4003bb4c: b941f800 ldr w0, [x0, #504]
4003bb50: 6b00007f cmp w3, w0
4003bb54: 54000422 b.cs 4003bbd8 <write+0xa8> // b.hs, b.nlast
4003bb58: a90153f3 stp x19, x20, [sp, #16]
4003bb5c: 52800a14 mov w20, #0x50 // #80
4003bb60: f0000633 adrp x19, 40102000 <_Configuration_Scheduler_priority_dflt+0x15d0>
4003bb64: 913f8273 add x19, x19, #0xfe0
4003bb68: 9b347c74 smull x20, w3, w20
4003bb6c: 8b130280 add x0, x20, x19
__asm__ volatile (
4003bb70: d53b4225 mrs x5, daif
4003bb74: d50342df msr daifset, #0x2
val = *obj;
4003bb78: b8736a84 ldr w4, [x20, x19]
*obj = val + arg;
4003bb7c: 11400486 add w6, w4, #0x1, lsl #12
4003bb80: b8336a86 str w6, [x20, x19]
__asm__ volatile (
4003bb84: 92407ca5 and x5, x5, #0xffffffff
4003bb88: d51b4225 msr daif, x5
4003bb8c: 52802085 mov w5, #0x104 // #260
4003bb90: 0a050084 and w4, w4, w5
4003bb94: 6b05009f cmp w4, w5
4003bb98: 540002c1 b.ne 4003bbf0 <write+0xc0> // b.any
/*
* Now process the write() request.
*/
n = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
4003bb9c: d2800a04 mov x4, #0x50 // #80
4003bba0: 9b044c63 madd x3, x3, x4, x19
4003bba4: f9401863 ldr x3, [x3, #48]
4003bba8: f9400c63 ldr x3, [x3, #24]
4003bbac: d63f0060 blr x3
__asm__ volatile (
4003bbb0: d53b4221 mrs x1, daif
4003bbb4: d50342df msr daifset, #0x2
*obj = val - arg;
4003bbb8: b8736a82 ldr w2, [x20, x19]
4003bbbc: 51400442 sub w2, w2, #0x1, lsl #12
4003bbc0: b8336a82 str w2, [x20, x19]
__asm__ volatile (
4003bbc4: 92407c21 and x1, x1, #0xffffffff
4003bbc8: d51b4221 msr daif, x1
4003bbcc: a94153f3 ldp x19, x20, [sp, #16]
rtems_libio_iop_drop( iop );
return n;
}
4003bbd0: a8c27bfd ldp x29, x30, [sp], #32
4003bbd4: d65f03c0 ret
LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_WRITE, EBADF );
4003bbd8: 97ffcb3a bl 4002e8c0 <__errno>
4003bbdc: aa0003e1 mov x1, x0
4003bbe0: 52800122 mov w2, #0x9 // #9
4003bbe4: 92800000 mov x0, #0xffffffffffffffff // #-1
4003bbe8: b9000022 str w2, [x1]
4003bbec: 17fffff9 b 4003bbd0 <write+0xa0>
__asm__ volatile (
4003bbf0: d53b4220 mrs x0, daif
4003bbf4: d50342df msr daifset, #0x2
4003bbf8: b8736a81 ldr w1, [x20, x19]
4003bbfc: 51400421 sub w1, w1, #0x1, lsl #12
4003bc00: b8336a81 str w1, [x20, x19]
__asm__ volatile (
4003bc04: 92407c00 and x0, x0, #0xffffffff
4003bc08: d51b4220 msr daif, x0
4003bc0c: 97ffcb2d bl 4002e8c0 <__errno>
4003bc10: aa0003e1 mov x1, x0
4003bc14: 52800122 mov w2, #0x9 // #9
4003bc18: 92800000 mov x0, #0xffffffffffffffff // #-1
4003bc1c: a94153f3 ldp x19, x20, [sp, #16]
4003bc20: b9000022 str w2, [x1]
4003bc24: 17ffffeb b 4003bbd0 <write+0xa0>
rtems_libio_check_buffer( buffer );
4003bc28: 97ffcb26 bl 4002e8c0 <__errno> <== NOT EXECUTED
4003bc2c: aa0003e1 mov x1, x0 <== NOT EXECUTED
4003bc30: 528002c2 mov w2, #0x16 // #22 <== NOT EXECUTED
4003bc34: 92800000 mov x0, #0xffffffffffffffff // #-1 <== NOT EXECUTED
4003bc38: b9000022 str w2, [x1] <== NOT EXECUTED
4003bc3c: 17ffffe5 b 4003bbd0 <write+0xa0> <== NOT EXECUTED