RTEMS-5
Annotated Report
Fri Aug 10 14:09:25 2018
40002bd4 <devFS_Show>:
#include <rtems/devfs.h>
#include <rtems/bspIo.h>
void devFS_Show(void)
{
40002bd4: 9d e3 bf a0 save %sp, -96, %sp
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
40002bd8: 40 00 02 86 call 400035f0 <rtems_current_user_env_get>
40002bdc: 01 00 00 00 nop
if (rootloc->mt_entry->ops == &devFS_ops) {
40002be0: c2 02 20 04 ld [ %o0 + 4 ], %g1
40002be4: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
40002be8: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
40002bec: 03 10 00 34 sethi %hi(0x4000d000), %g1
40002bf0: 82 10 62 1c or %g1, 0x21c, %g1 ! 4000d21c <devFS_ops>
40002bf4: 80 a0 c0 01 cmp %g3, %g1
40002bf8: 22 80 00 04 be,a 40002c08 <devFS_Show+0x34>
<== ALWAYS TAKEN
40002bfc: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2
(unsigned long) current->minor
);
}
}
}
}
40002c00: 81 c7 e0 08 ret
40002c04: 81 e8 00 00 restore
size_t n = data->count;
40002c08: c2 00 a0 04 ld [ %g2 + 4 ], %g1
for (i = 0; i < n; ++i) {
40002c0c: 80 a0 60 00 cmp %g1, 0
40002c10: 02 bf ff fc be 40002c00 <devFS_Show+0x2c>
<== NEVER TAKEN
40002c14: f8 00 80 00 ld [ %g2 ], %i4
40002c18: b3 28 60 02 sll %g1, 2, %i1
printk("/");
40002c1c: 21 10 00 34 sethi %hi(0x4000d000), %l0
40002c20: b2 06 40 01 add %i1, %g1, %i1
printk(
40002c24: 31 10 00 34 sethi %hi(0x4000d000), %i0
40002c28: b3 2e 60 02 sll %i1, 2, %i1
printk("%c", current->name [j]);
40002c2c: 35 10 00 34 sethi %hi(0x4000d000), %i2
40002c30: b2 07 00 19 add %i4, %i1, %i1
printk("/");
40002c34: a0 14 22 68 or %l0, 0x268, %l0
printk(
40002c38: b0 16 22 78 or %i0, 0x278, %i0
printk("%c", current->name [j]);
40002c3c: 10 80 00 05 b 40002c50 <devFS_Show+0x7c>
40002c40: b4 16 a2 70 or %i2, 0x270, %i2
for (i = 0; i < n; ++i) {
40002c44: 80 a7 00 19 cmp %i4, %i1
40002c48: 02 bf ff ee be 40002c00 <devFS_Show+0x2c>
40002c4c: 01 00 00 00 nop
if (current->name != NULL) {
40002c50: c2 07 00 00 ld [ %i4 ], %g1
40002c54: 80 a0 60 00 cmp %g1, 0
40002c58: 22 bf ff fb be,a 40002c44 <devFS_Show+0x70>
<== ALWAYS TAKEN
40002c5c: b8 07 20 14 add %i4, 0x14, %i4
size_t m = current->namelen;
40002c60: f6 07 20 04 ld [ %i4 + 4 ], %i3
<== NOT EXECUTED
printk("/");
40002c64: 40 00 02 4d call 40003598 <printk>
<== NOT EXECUTED
40002c68: 90 10 00 10 mov %l0, %o0
<== NOT EXECUTED
for (j = 0; j < m; ++j) {
40002c6c: 80 a6 e0 00 cmp %i3, 0
<== NOT EXECUTED
40002c70: 22 80 00 0c be,a 40002ca0 <devFS_Show+0xcc>
<== NOT EXECUTED
40002c74: d4 07 20 0c ld [ %i4 + 0xc ], %o2
<== NOT EXECUTED
40002c78: ba 10 20 00 clr %i5
<== NOT EXECUTED
printk("%c", current->name [j]);
40002c7c: c2 07 00 00 ld [ %i4 ], %g1
<== NOT EXECUTED
40002c80: d2 48 40 1d ldsb [ %g1 + %i5 ], %o1
<== NOT EXECUTED
40002c84: 40 00 02 45 call 40003598 <printk>
<== NOT EXECUTED
40002c88: 90 10 00 1a mov %i2, %o0
<== NOT EXECUTED
for (j = 0; j < m; ++j) {
40002c8c: ba 07 60 01 inc %i5
<== NOT EXECUTED
40002c90: 80 a6 c0 1d cmp %i3, %i5
<== NOT EXECUTED
40002c94: 32 bf ff fb bne,a 40002c80 <devFS_Show+0xac>
<== NOT EXECUTED
40002c98: c2 07 00 00 ld [ %i4 ], %g1
<== NOT EXECUTED
printk(
40002c9c: d4 07 20 0c ld [ %i4 + 0xc ], %o2
<== NOT EXECUTED
40002ca0: d2 07 20 08 ld [ %i4 + 8 ], %o1
<== NOT EXECUTED
40002ca4: 40 00 02 3d call 40003598 <printk>
<== NOT EXECUTED
40002ca8: 90 10 00 18 mov %i0, %o0
<== NOT EXECUTED
40002cac: 10 bf ff e6 b 40002c44 <devFS_Show+0x70>
<== NOT EXECUTED
40002cb0: b8 07 20 14 add %i4, 0x14, %i4
<== NOT EXECUTED
40009fe4 <devFS_close>:
int devFS_close(
rtems_libio_t *iop
)
{
const devFS_node *np = iop->pathinfo.node_access;
40009fe4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
<== NOT EXECUTED
return rtems_deviceio_close( iop, np->major, np->minor );
40009fe8: d4 00 60 0c ld [ %g1 + 0xc ], %o2
<== NOT EXECUTED
40009fec: d2 00 60 08 ld [ %g1 + 8 ], %o1
<== NOT EXECUTED
40009ff0: 82 13 c0 00 mov %o7, %g1
<== NOT EXECUTED
40009ff4: 7f ff e5 a3 call 40003680 <rtems_deviceio_close>
<== NOT EXECUTED
40009ff8: 9e 10 40 00 mov %g1, %o7
<== NOT EXECUTED
40009ffc <devFS_eval_path>:
}
void devFS_eval_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
40009ffc: 9d e3 bf a0 save %sp, -96, %sp
*/
static inline const devFS_data *devFS_get_data(
const rtems_filesystem_location_info_t *loc
)
{
return (const devFS_data *) loc->mt_entry->immutable_fs_info;
4000a000: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
4000a004: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
size_t n = data->count;
4000a008: f4 00 60 04 ld [ %g1 + 4 ], %i2
4000a00c: e2 06 00 00 ld [ %i0 ], %l1
4000a010: f2 06 20 04 ld [ %i0 + 4 ], %i1
devFS_node *nodes = data->nodes;
4000a014: fa 00 40 00 ld [ %g1 ], %i5
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
4000a018: 80 a6 a0 00 cmp %i2, 0
4000a01c: 02 80 00 36 be 4000a0f4 <devFS_eval_path+0xf8>
4000a020: e4 06 20 10 ld [ %i0 + 0x10 ], %l2
devFS_node *node = NULL;
4000a024: a0 10 20 00 clr %l0
devFS_node *free_node = NULL;
4000a028: b6 10 20 00 clr %i3
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
4000a02c: 10 80 00 0e b 4000a064 <devFS_eval_path+0x68>
4000a030: b8 10 20 00 clr %i4
if (
4000a034: 80 a6 40 01 cmp %i1, %g1
4000a038: 02 80 00 11 be 4000a07c <devFS_eval_path+0x80>
4000a03c: 94 10 00 19 mov %i1, %o2
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
4000a040: 80 a6 e0 00 cmp %i3, 0
4000a044: 02 80 00 05 be 4000a058 <devFS_eval_path+0x5c>
<== NEVER TAKEN
4000a048: b8 07 20 01 inc %i4
4000a04c: 80 a4 20 00 cmp %l0, 0
4000a050: 12 80 00 13 bne 4000a09c <devFS_eval_path+0xa0>
4000a054: 80 8c a0 40 btst 0x40, %l2
4000a058: 80 a6 80 1c cmp %i2, %i4
4000a05c: 02 80 00 18 be 4000a0bc <devFS_eval_path+0xc0>
4000a060: ba 07 60 14 add %i5, 0x14, %i5
if (current->name != NULL) {
4000a064: d0 07 40 00 ld [ %i5 ], %o0
4000a068: 80 a2 20 00 cmp %o0, 0
4000a06c: 32 bf ff f2 bne,a 4000a034 <devFS_eval_path+0x38>
4000a070: c2 07 60 04 ld [ %i5 + 4 ], %g1
4000a074: 10 bf ff f3 b 4000a040 <devFS_eval_path+0x44>
4000a078: b6 10 00 1d mov %i5, %i3
&& memcmp(current->name, path, pathlen) == 0
4000a07c: 40 00 08 69 call 4000c220 <memcmp>
4000a080: 92 10 00 11 mov %l1, %o1
4000a084: 80 a2 20 00 cmp %o0, 0
4000a088: 22 bf ff ee be,a 4000a040 <devFS_eval_path+0x44>
4000a08c: a0 10 00 1d mov %i5, %l0
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
4000a090: 10 bf ff ed b 4000a044 <devFS_eval_path+0x48>
4000a094: 80 a6 e0 00 cmp %i3, 0
&free_node
);
int eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (node != NULL) {
if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) {
4000a098: 80 8c a0 40 btst 0x40, %l2
<== NOT EXECUTED
4000a09c: 12 80 00 06 bne 4000a0b4 <devFS_eval_path+0xb8>
4000a0a0: 01 00 00 00 nop
currentloc->node_access = node;
4000a0a4: e0 26 20 20 st %l0, [ %i0 + 0x20 ]
ctx->pathlen = 0;
4000a0a8: c0 26 20 04 clr [ %i0 + 4 ]
4000a0ac: 81 c7 e0 08 ret
4000a0b0: 81 e8 00 00 restore
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, EEXIST);
4000a0b4: 7f ff e5 d8 call 40003814 <rtems_filesystem_eval_path_error>
4000a0b8: 93 e8 20 11 restore %g0, 0x11, %o1
if (node != NULL) {
4000a0bc: 80 a4 20 00 cmp %l0, 0
4000a0c0: 12 bf ff f6 bne 4000a098 <devFS_eval_path+0x9c>
<== NEVER TAKEN
4000a0c4: 80 8c a0 20 btst 0x20, %l2
}
} else {
if ((eval_flags & RTEMS_FS_MAKE) != 0) {
4000a0c8: 02 80 00 0e be 4000a100 <devFS_eval_path+0x104>
4000a0cc: 80 a6 e0 00 cmp %i3, 0
if (free_node != NULL) {
4000a0d0: 02 80 00 0e be 4000a108 <devFS_eval_path+0x10c>
<== NEVER TAKEN
4000a0d4: 82 10 21 ff mov 0x1ff, %g1
free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO;
4000a0d8: c2 26 e0 10 st %g1, [ %i3 + 0x10 ]
currentloc->node_access = free_node;
4000a0dc: f6 26 20 20 st %i3, [ %i0 + 0x20 ]
ctx->token = token;
4000a0e0: e2 26 20 08 st %l1, [ %i0 + 8 ]
ctx->tokenlen = tokenlen;
4000a0e4: f2 26 20 0c st %i1, [ %i0 + 0xc ]
ctx->pathlen = 0;
4000a0e8: c0 26 20 04 clr [ %i0 + 4 ]
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
4000a0ec: 81 c7 e0 08 ret
4000a0f0: 81 e8 00 00 restore
if ((eval_flags & RTEMS_FS_MAKE) != 0) {
4000a0f4: 80 8c a0 20 btst 0x20, %l2
4000a0f8: 12 80 00 04 bne 4000a108 <devFS_eval_path+0x10c>
<== ALWAYS TAKEN
4000a0fc: 01 00 00 00 nop
rtems_filesystem_eval_path_error(ctx, ENOENT);
4000a100: 7f ff e5 c5 call 40003814 <rtems_filesystem_eval_path_error>
4000a104: 93 e8 20 02 restore %g0, 2, %o1
rtems_filesystem_eval_path_error(ctx, ENOSPC);
4000a108: 7f ff e5 c3 call 40003814 <rtems_filesystem_eval_path_error>
4000a10c: 93 e8 20 1c restore %g0, 0x1c, %o1
4000d1dc <devFS_file_handlers>:
4000d1dc: 40 00 2c cc 40 00 9f e4 40 00 2c e4 40 00 2d 38 @.,.@...@.,.@.-8
4000d1ec: 40 00 2c b4 40 00 9c 78 40 00 2c fc 40 00 9c 04 @.,.@..x@.,.@...
4000d1fc: 40 00 9b e8 40 00 9b e8 40 00 9b c0 40 00 9d e8 @...@...@...@...
4000d20c: 40 00 9c 3c 40 00 9e 28 40 00 9f 68 40 00 9d b0 @..<@..(@..h@...
40002ae0 <devFS_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
40002ae0: 9d e3 bf a0 save %sp, -96, %sp
int rv = 0;
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
40002ae4: 80 a6 a0 03 cmp %i2, 3
40002ae8: 22 80 00 18 be,a 40002b48 <devFS_mknod+0x68>
40002aec: c2 4e 40 00 ldsb [ %i1 ], %g1
if (S_ISBLK(mode) || S_ISCHR(mode)) {
40002af0: 03 00 00 2c sethi %hi(0xb000), %g1
40002af4: 05 00 00 08 sethi %hi(0x2000), %g2
40002af8: 82 0e c0 01 and %i3, %g1, %g1
40002afc: 80 a0 40 02 cmp %g1, %g2
40002b00: 12 80 00 29 bne 40002ba4 <devFS_mknod+0xc4>
40002b04: 01 00 00 00 nop
char *dupname = malloc(namelen);
40002b08: 40 00 01 5e call 40003080 <malloc>
40002b0c: 90 10 00 1a mov %i2, %o0
if (dupname != NULL) {
40002b10: 84 92 20 00 orcc %o0, 0, %g2
40002b14: 02 80 00 2a be 40002bbc <devFS_mknod+0xdc>
40002b18: 94 10 00 1a mov %i2, %o2
devFS_node *node = parentloc->node_access;
40002b1c: c2 06 20 08 ld [ %i0 + 8 ], %g1
node->name = dupname;
40002b20: c4 20 40 00 st %g2, [ %g1 ]
node->namelen = namelen;
40002b24: f4 20 60 04 st %i2, [ %g1 + 4 ]
node->major = rtems_filesystem_dev_major_t(dev);
node->minor = rtems_filesystem_dev_minor_t(dev);
node->mode = mode;
memcpy(dupname, name, namelen);
40002b28: 92 10 00 19 mov %i1, %o1
node->major = rtems_filesystem_dev_major_t(dev);
40002b2c: f8 20 60 08 st %i4, [ %g1 + 8 ]
int rv = 0;
40002b30: b0 10 20 00 clr %i0
node->minor = rtems_filesystem_dev_minor_t(dev);
40002b34: fa 20 60 0c st %i5, [ %g1 + 0xc ]
memcpy(dupname, name, namelen);
40002b38: 40 00 25 e3 call 4000c2c4 <memcpy>
40002b3c: f6 20 60 10 st %i3, [ %g1 + 0x10 ]
40002b40: 81 c7 e0 08 ret
40002b44: 81 e8 00 00 restore
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
40002b48: 80 a0 60 64 cmp %g1, 0x64
40002b4c: 12 bf ff ea bne 40002af4 <devFS_mknod+0x14>
<== NEVER TAKEN
40002b50: 03 00 00 2c sethi %hi(0xb000), %g1
40002b54: c2 4e 60 01 ldsb [ %i1 + 1 ], %g1
40002b58: 80 a0 60 65 cmp %g1, 0x65
40002b5c: 12 bf ff e6 bne 40002af4 <devFS_mknod+0x14>
<== NEVER TAKEN
40002b60: 03 00 00 2c sethi %hi(0xb000), %g1
40002b64: c2 4e 60 02 ldsb [ %i1 + 2 ], %g1
40002b68: 80 a0 60 76 cmp %g1, 0x76
40002b6c: 12 bf ff e2 bne 40002af4 <devFS_mknod+0x14>
<== NEVER TAKEN
40002b70: 03 00 00 2c sethi %hi(0xb000), %g1
} else {
errno = ENOTSUP;
rv = -1;
}
} else {
if (!S_ISDIR(mode)) {
40002b74: 03 00 00 3c sethi %hi(0xf000), %g1
40002b78: b6 0e c0 01 and %i3, %g1, %i3
40002b7c: 03 00 00 10 sethi %hi(0x4000), %g1
40002b80: 80 a6 c0 01 cmp %i3, %g1
40002b84: 02 bf ff ef be 40002b40 <devFS_mknod+0x60>
<== ALWAYS TAKEN
40002b88: b0 10 20 00 clr %i0
errno = ENOTSUP;
40002b8c: 40 00 25 a0 call 4000c20c <__errno>
<== NOT EXECUTED
40002b90: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40002b94: 82 10 20 86 mov 0x86, %g1
<== NOT EXECUTED
40002b98: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
rv = -1;
}
}
return rv;
}
40002b9c: 81 c7 e0 08 ret
<== NOT EXECUTED
40002ba0: 81 e8 00 00 restore
<== NOT EXECUTED
errno = ENOTSUP;
40002ba4: 40 00 25 9a call 4000c20c <__errno>
40002ba8: b0 10 3f ff mov -1, %i0
40002bac: 82 10 20 86 mov 0x86, %g1
40002bb0: c2 22 00 00 st %g1, [ %o0 ]
40002bb4: 81 c7 e0 08 ret
40002bb8: 81 e8 00 00 restore
errno = ENOMEM;
40002bbc: 40 00 25 94 call 4000c20c <__errno>
40002bc0: b0 10 3f ff mov -1, %i0
40002bc4: 82 10 20 0c mov 0xc, %g1
40002bc8: c2 22 00 00 st %g1, [ %o0 ]
40002bcc: 81 c7 e0 08 ret
40002bd0: 81 e8 00 00 restore
4000d21c <devFS_ops>:
4000d21c: 40 00 9c 60 40 00 9c 6c 40 00 9f fc 40 00 9c 44 @..`@..l@...@..D
4000d22c: 40 00 9b 4c 40 00 2a e0 40 00 9e c0 40 00 9b a4 @..L@.*.@...@...
4000d23c: 40 00 9b 64 40 00 9b 80 40 00 9b c8 40 00 9d cc @..d@...@...@...
4000d24c: 40 00 9f 14 40 00 9b e0 40 00 9f 30 40 00 9e f8 @...@...@..0@...
4000d25c: 40 00 9d f0 40 00 9e a4 40 00 9e dc 2f 00 00 00 @...@...@.../...
4000d26c: 00 00 00 00 25 63 00 00 00 00 00 00 20 25 6c 75 ....%c...... %lu
4000d27c: 20 25 6c 75 0a 00 00 00 00 00 00 00 2f 64 65 76 %lu......../dev
4000d28c: 00 00 00 00 ....