RTEMS-6
Annotated Report
libblock
Sun Feb 28 23:28:28 2021
00113db0 <ramdisk_allocate>:
void *area_begin,
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace
)
{
113db0: 55 push %ebp
struct ramdisk *rd = calloc(1, sizeof(*rd));
113db1: b8 10 00 00 00 mov $0x10,%eax
{
113db6: 89 e5 mov %esp,%ebp
113db8: 83 ec 28 sub $0x28,%esp
struct ramdisk *rd = calloc(1, sizeof(*rd));
113dbb: 89 44 24 04 mov %eax,0x4(%esp)
113dbf: c7 04 24 01 00 00 00 movl $0x1,(%esp)
{
113dc6: 89 5d f4 mov %ebx,-0xc(%ebp)
113dc9: 0f b6 5d 14 movzbl 0x14(%ebp),%ebx
113dcd: 89 75 f8 mov %esi,-0x8(%ebp)
113dd0: 8b 75 08 mov 0x8(%ebp),%esi
113dd3: 89 7d fc mov %edi,-0x4(%ebp)
struct ramdisk *rd = calloc(1, sizeof(*rd));
113dd6: e8 05 01 00 00 call 113ee0 <calloc>
if (rd == NULL) {
113ddb: 85 c0 test %eax,%eax
struct ramdisk *rd = calloc(1, sizeof(*rd));
113ddd: 89 c7 mov %eax,%edi
if (rd == NULL) {
113ddf: 74 19 je 113dfa <ramdisk_allocate+0x4a> <== NEVER TAKEN
return NULL;
}
if (area_begin == NULL) {
113de1: 85 f6 test %esi,%esi
113de3: 74 2b je 113e10 <ramdisk_allocate+0x60>
} else {
rd->malloced = false;
}
rd->block_size = media_block_size;
rd->block_num = media_block_count;
rd->area = area_begin;
113de5: 89 77 08 mov %esi,0x8(%edi)
rd->block_size = media_block_size;
113de8: 8b 45 0c mov 0xc(%ebp),%eax
rd->trace = trace;
113deb: 88 5f 0e mov %bl,0xe(%edi)
rd->initialized = true;
113dee: c6 47 0c 01 movb $0x1,0xc(%edi)
rd->block_size = media_block_size;
113df2: 89 07 mov %eax,(%edi)
rd->block_num = media_block_count;
113df4: 8b 45 10 mov 0x10(%ebp),%eax
113df7: 89 47 04 mov %eax,0x4(%edi)
return rd;
}
113dfa: 8b 5d f4 mov -0xc(%ebp),%ebx
113dfd: 89 f8 mov %edi,%eax
113dff: 8b 75 f8 mov -0x8(%ebp),%esi
113e02: 8b 7d fc mov -0x4(%ebp),%edi
113e05: 89 ec mov %ebp,%esp
113e07: 5d pop %ebp
113e08: c3 ret
113e09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
area_begin = calloc(media_block_count, media_block_size);
113e10: 8b 45 0c mov 0xc(%ebp),%eax
113e13: 89 44 24 04 mov %eax,0x4(%esp)
113e17: 8b 45 10 mov 0x10(%ebp),%eax
113e1a: 89 04 24 mov %eax,(%esp)
113e1d: e8 be 00 00 00 call 113ee0 <calloc>
if (area_begin == NULL) {
113e22: 85 c0 test %eax,%eax
area_begin = calloc(media_block_count, media_block_size);
113e24: 89 c6 mov %eax,%esi
if (area_begin == NULL) {
113e26: 74 06 je 113e2e <ramdisk_allocate+0x7e> <== NEVER TAKEN
rd->malloced = true;
113e28: c6 47 0d 01 movb $0x1,0xd(%edi)
113e2c: eb b7 jmp 113de5 <ramdisk_allocate+0x35>
free(rd);
113e2e: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
return NULL;
113e31: 31 ff xor %edi,%edi <== NOT EXECUTED
free(rd);
113e33: e8 a8 e6 fe ff call 1024e0 <free> <== NOT EXECUTED
return NULL;
113e38: eb c0 jmp 113dfa <ramdisk_allocate+0x4a> <== NOT EXECUTED
113e3a: 90 nop
113e3b: 90 nop
113e3c: 90 nop
113e3d: 90 nop
113e3e: 90 nop
113e3f: 90 nop
00102f90 <ramdisk_free>:
return rd;
}
void ramdisk_free(ramdisk *rd)
{
102f90: 55 push %ebp
102f91: 89 e5 mov %esp,%ebp
102f93: 83 ec 18 sub $0x18,%esp
102f96: 89 5d fc mov %ebx,-0x4(%ebp)
102f99: 8b 5d 08 mov 0x8(%ebp),%ebx
if (rd != NULL) {
102f9c: 85 db test %ebx,%ebx
102f9e: 74 40 je 102fe0 <ramdisk_free+0x50> <== NEVER TAKEN
if (rd->malloced) {
102fa0: 80 7b 0d 00 cmpb $0x0,0xd(%ebx)
102fa4: 75 1a jne 102fc0 <ramdisk_free+0x30>
free(rd->area);
}
free(rd);
102fa6: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
102fa9: 8b 5d fc mov -0x4(%ebp),%ebx
102fac: 89 ec mov %ebp,%esp
102fae: 5d pop %ebp
free(rd);
102faf: e9 1c 03 00 00 jmp 1032d0 <free>
102fb4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
102fbb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
102fbf: 90 nop
free(rd->area);
102fc0: 8b 43 08 mov 0x8(%ebx),%eax
102fc3: 89 04 24 mov %eax,(%esp)
102fc6: e8 05 03 00 00 call 1032d0 <free>
free(rd);
102fcb: 89 5d 08 mov %ebx,0x8(%ebp)
}
102fce: 8b 5d fc mov -0x4(%ebp),%ebx
102fd1: 89 ec mov %ebp,%esp
102fd3: 5d pop %ebp
free(rd);
102fd4: e9 f7 02 00 00 jmp 1032d0 <free>
102fd9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
102fe0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
102fe3: 89 ec mov %ebp,%esp <== NOT EXECUTED
102fe5: 5d pop %ebp <== NOT EXECUTED
102fe6: c3 ret <== NOT EXECUTED
102fe7: 90 nop
102fe8: 90 nop
102fe9: 90 nop
102fea: 90 nop
102feb: 90 nop
102fec: 90 nop
102fed: 90 nop
102fee: 90 nop
102fef: 90 nop
00102c10 <ramdisk_initialize>:
rtems_device_driver
ramdisk_initialize(
rtems_device_major_number major RTEMS_UNUSED,
rtems_device_minor_number minor RTEMS_UNUSED,
void *arg RTEMS_UNUSED)
{
102c10: 55 push %ebp
* This is allocating memory for a RAM disk which will persist for
* the life of the system. RTEMS has no "de-initialize" driver call
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
102c11: ba 10 00 00 00 mov $0x10,%edx
{
102c16: 89 e5 mov %esp,%ebp
102c18: 57 push %edi
102c19: 56 push %esi
102c1a: 53 push %ebx
102c1b: 83 ec 4c sub $0x4c,%esp
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
102c1e: 89 54 24 04 mov %edx,0x4(%esp)
102c22: 8b 35 7c 05 13 00 mov 0x13057c,%esi
102c28: 89 34 24 mov %esi,(%esp)
102c2b: e8 30 04 00 00 call 103060 <calloc>
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
102c30: 85 f6 test %esi,%esi
r->trace = false;
102c32: c6 40 0e 00 movb $0x0,0xe(%eax)
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
102c36: 0f 84 e4 00 00 00 je 102d20 <ramdisk_initialize+0x110> <== NEVER TAKEN
102c3c: 89 c3 mov %eax,%ebx
rtems_ramdisk_config *c = rtems_ramdisk_configuration;
102c3e: be 80 05 13 00 mov $0x130580,%esi
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
102c43: 31 d2 xor %edx,%edx
102c45: eb 5b jmp 102ca2 <ramdisk_initialize+0x92>
102c47: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
102c4e: 66 90 xchg %ax,%ax
r->initialized = true;
}
}
else
{
r->malloced = false;
102c50: c6 43 0d 00 movb $0x0,0xd(%ebx) <== NOT EXECUTED
r->initialized = true;
102c54: c6 43 0c 01 movb $0x1,0xc(%ebx) <== NOT EXECUTED
r->area = c->location;
102c58: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
}
rc = rtems_blkdev_create(name, c->block_size, c->block_num,
102c5b: 89 5c 24 10 mov %ebx,0x10(%esp)
102c5f: b8 30 2d 10 00 mov $0x102d30,%eax
102c64: 89 44 24 0c mov %eax,0xc(%esp)
102c68: 8d 45 df lea -0x21(%ebp),%eax
102c6b: 89 4c 24 08 mov %ecx,0x8(%esp)
102c6f: 89 7c 24 04 mov %edi,0x4(%esp)
102c73: 89 04 24 mov %eax,(%esp)
102c76: 89 55 d4 mov %edx,-0x2c(%ebp)
102c79: e8 92 f2 ff ff call 101f10 <rtems_blkdev_create>
ramdisk_ioctl, r);
if (rc != RTEMS_SUCCESSFUL)
102c7e: 8b 55 d4 mov -0x2c(%ebp),%edx
102c81: 85 c0 test %eax,%eax
102c83: 74 0a je 102c8f <ramdisk_initialize+0x7f> <== ALWAYS TAKEN
{
if (r->malloced)
102c85: 80 7b 0d 00 cmpb $0x0,0xd(%ebx) <== NOT EXECUTED
102c89: 75 75 jne 102d00 <ramdisk_initialize+0xf0> <== NOT EXECUTED
{
free(r->area);
}
r->initialized = false;
102c8b: c6 43 0c 00 movb $0x0,0xc(%ebx) <== NOT EXECUTED
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
102c8f: 42 inc %edx
102c90: 83 c6 0c add $0xc,%esi
102c93: 83 c3 10 add $0x10,%ebx
102c96: 39 15 7c 05 13 00 cmp %edx,0x13057c
102c9c: 0f 86 7e 00 00 00 jbe 102d20 <ramdisk_initialize+0x110>
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
102ca2: c7 45 e3 2f 72 64 61 movl $0x6164722f,-0x1d(%ebp)
name [sizeof(RAMDISK_DEVICE_BASE_NAME) - 1] += i;
102ca9: 88 d0 mov %dl,%al
r->block_size = c->block_size;
102cab: 8b 3e mov (%esi),%edi
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
102cad: c7 45 df 2f 64 65 76 movl $0x7665642f,-0x21(%ebp)
name [sizeof(RAMDISK_DEVICE_BASE_NAME) - 1] += i;
102cb4: 04 61 add $0x61,%al
r->block_num = c->block_num;
102cb6: 8b 4e 04 mov 0x4(%esi),%ecx
name [sizeof(RAMDISK_DEVICE_BASE_NAME) - 1] += i;
102cb9: 88 45 e6 mov %al,-0x1a(%ebp)
if (c->location == NULL)
102cbc: 8b 46 08 mov 0x8(%esi),%eax
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
102cbf: c6 45 e7 00 movb $0x0,-0x19(%ebp)
r->block_size = c->block_size;
102cc3: 89 3b mov %edi,(%ebx)
r->block_num = c->block_num;
102cc5: 89 4b 04 mov %ecx,0x4(%ebx)
if (c->location == NULL)
102cc8: 85 c0 test %eax,%eax
102cca: 75 84 jne 102c50 <ramdisk_initialize+0x40>
r->malloced = true;
102ccc: c6 43 0d 01 movb $0x1,0xd(%ebx)
r->area = malloc(r->block_size * r->block_num);
102cd0: 89 f8 mov %edi,%eax
102cd2: 89 55 d0 mov %edx,-0x30(%ebp)
102cd5: 0f af c1 imul %ecx,%eax
102cd8: 89 4d d4 mov %ecx,-0x2c(%ebp)
102cdb: 89 04 24 mov %eax,(%esp)
102cde: e8 2d 0c 00 00 call 103910 <malloc>
if (r->area == NULL) /* No enough memory for this disk */
102ce3: 8b 4d d4 mov -0x2c(%ebp),%ecx
102ce6: 8b 55 d0 mov -0x30(%ebp),%edx
r->area = malloc(r->block_size * r->block_num);
102ce9: 89 43 08 mov %eax,0x8(%ebx)
if (r->area == NULL) /* No enough memory for this disk */
102cec: 85 c0 test %eax,%eax
102cee: 74 9b je 102c8b <ramdisk_initialize+0x7b> <== NEVER TAKEN
r->initialized = true;
102cf0: c6 43 0c 01 movb $0x1,0xc(%ebx)
102cf4: e9 62 ff ff ff jmp 102c5b <ramdisk_initialize+0x4b>
102cf9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
free(r->area);
102d00: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
102d03: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
102d06: e8 c5 05 00 00 call 1032d0 <free> <== NOT EXECUTED
102d0b: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
102d0e: e9 78 ff ff ff jmp 102c8b <ramdisk_initialize+0x7b> <== NOT EXECUTED
102d13: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102d1a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
return RTEMS_SUCCESSFUL;
}
102d20: 83 c4 4c add $0x4c,%esp
102d23: 31 c0 xor %eax,%eax
102d25: 5b pop %ebx
102d26: 5e pop %esi
102d27: 5f pop %edi
102d28: 5d pop %ebp
102d29: c3 ret
102d2a: 90 nop
102d2b: 90 nop
102d2c: 90 nop
102d2d: 90 nop
102d2e: 90 nop
102d2f: 90 nop
00102d30 <ramdisk_ioctl>:
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
102d30: 55 push %ebp
102d31: 89 e5 mov %esp,%ebp
102d33: 57 push %edi
102d34: 56 push %esi
102d35: 53 push %ebx
102d36: 83 ec 3c sub $0x3c,%esp
102d39: 8b 55 08 mov 0x8(%ebp),%edx
102d3c: 8b 45 0c mov 0xc(%ebp),%eax
102d3f: 8b 5d 10 mov 0x10(%ebp),%ebx
static inline void *rtems_disk_get_driver_data(
const rtems_disk_device *dd
)
{
return dd->driver_data;
102d42: 8b 72 3c mov 0x3c(%edx),%esi
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (req)
102d45: 3d 07 42 00 20 cmp $0x20004207,%eax
102d4a: 89 75 e4 mov %esi,-0x1c(%ebp)
102d4d: 0f 84 bd 00 00 00 je 102e10 <ramdisk_ioctl+0xe0>
102d53: 3d 01 42 18 c0 cmp $0xc0184201,%eax
102d58: 0f 85 e2 00 00 00 jne 102e40 <ramdisk_ioctl+0x110>
{
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
switch (r->req)
102d5e: 8b 03 mov (%ebx),%eax
102d60: 85 c0 test %eax,%eax
102d62: 89 c1 mov %eax,%ecx
102d64: 0f 84 f6 00 00 00 je 102e60 <ramdisk_ioctl+0x130>
102d6a: 48 dec %eax
102d6b: 0f 85 ac 00 00 00 jne 102e1d <ramdisk_ioctl+0xed> <== NEVER TAKEN
uint8_t *to = rd->area;
102d71: 8b 45 e4 mov -0x1c(%ebp),%eax
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
102d74: 8b 7b 10 mov 0x10(%ebx),%edi
uint8_t *to = rd->area;
102d77: 8b 40 08 mov 0x8(%eax),%eax
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
102d7a: 85 ff test %edi,%edi
uint8_t *to = rd->area;
102d7c: 89 45 d8 mov %eax,-0x28(%ebp)
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
102d7f: 8d 43 18 lea 0x18(%ebx),%eax
102d82: 0f 84 6a 01 00 00 je 102ef2 <ramdisk_ioctl+0x1c2> <== NEVER TAKEN
102d88: 89 5d dc mov %ebx,-0x24(%ebp)
102d8b: 31 c9 xor %ecx,%ecx
102d8d: 89 4d e0 mov %ecx,-0x20(%ebp)
102d90: eb 25 jmp 102db7 <ramdisk_ioctl+0x87>
102d92: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
102d99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
102da0: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
102da2: 83 c0 10 add $0x10,%eax
102da5: ff 45 e0 incl -0x20(%ebp)
102da8: 8b 75 dc mov -0x24(%ebp),%esi
102dab: 8b 5d e0 mov -0x20(%ebp),%ebx
102dae: 3b 5e 10 cmp 0x10(%esi),%ebx
102db1: 0f 83 39 01 00 00 jae 102ef0 <ramdisk_ioctl+0x1c0>
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
102db7: 8b 4d e4 mov -0x1c(%ebp),%ecx
102dba: 8b 10 mov (%eax),%edx
102dbc: 8b 75 d8 mov -0x28(%ebp),%esi
102dbf: 8b 19 mov (%ecx),%ebx
102dc1: 8b 48 04 mov 0x4(%eax),%ecx
102dc4: 0f af d3 imul %ebx,%edx
102dc7: 01 f2 add %esi,%edx
102dc9: 83 f9 08 cmp $0x8,%ecx
102dcc: 89 d7 mov %edx,%edi
102dce: 8b 50 08 mov 0x8(%eax),%edx
102dd1: 89 d6 mov %edx,%esi
102dd3: 72 cb jb 102da0 <ramdisk_ioctl+0x70>
102dd5: f7 c7 01 00 00 00 test $0x1,%edi
102ddb: 0f 85 8f 01 00 00 jne 102f70 <ramdisk_ioctl+0x240> <== NEVER TAKEN
102de1: f7 c7 02 00 00 00 test $0x2,%edi
102de7: 0f 85 63 01 00 00 jne 102f50 <ramdisk_ioctl+0x220> <== NEVER TAKEN
102ded: f7 c7 04 00 00 00 test $0x4,%edi
102df3: 74 ab je 102da0 <ramdisk_ioctl+0x70> <== NEVER TAKEN
102df5: 8b 16 mov (%esi),%edx
102df7: 83 c7 04 add $0x4,%edi
102dfa: 83 c6 04 add $0x4,%esi
102dfd: 83 e9 04 sub $0x4,%ecx
102e00: 89 57 fc mov %edx,-0x4(%edi)
102e03: eb 9b jmp 102da0 <ramdisk_ioctl+0x70>
102e05: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
102e0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
break;
}
case RTEMS_BLKIO_DELETED:
if (rd->free_at_delete_request) {
102e10: 8b 45 e4 mov -0x1c(%ebp),%eax
102e13: 80 78 0f 00 cmpb $0x0,0xf(%eax)
102e17: 0f 85 c3 00 00 00 jne 102ee0 <ramdisk_ioctl+0x1b0>
default:
return rtems_blkdev_ioctl (dd, req, argp);
break;
}
errno = EINVAL;
102e1d: e8 2e c5 01 00 call 11f350 <__errno>
102e22: c7 00 16 00 00 00 movl $0x16,(%eax)
return -1;
}
102e28: 83 c4 3c add $0x3c,%esp
return -1;
102e2b: b8 ff ff ff ff mov $0xffffffff,%eax
}
102e30: 5b pop %ebx
102e31: 5e pop %esi
102e32: 5f pop %edi
102e33: 5d pop %ebp
102e34: c3 ret
102e35: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
102e3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return rtems_blkdev_ioctl (dd, req, argp);
102e40: 89 5d 10 mov %ebx,0x10(%ebp)
102e43: 89 45 0c mov %eax,0xc(%ebp)
102e46: 89 55 08 mov %edx,0x8(%ebp)
}
102e49: 83 c4 3c add $0x3c,%esp
102e4c: 5b pop %ebx
102e4d: 5e pop %esi
102e4e: 5f pop %edi
102e4f: 5d pop %ebp
return rtems_blkdev_ioctl (dd, req, argp);
102e50: e9 0b d1 00 00 jmp 10ff60 <rtems_blkdev_ioctl>
102e55: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
102e5c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
uint8_t *from = rd->area;
102e60: 8b 45 e4 mov -0x1c(%ebp),%eax
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
102e63: 8b 73 10 mov 0x10(%ebx),%esi
uint8_t *from = rd->area;
102e66: 8b 40 08 mov 0x8(%eax),%eax
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
102e69: 85 f6 test %esi,%esi
uint8_t *from = rd->area;
102e6b: 89 45 d8 mov %eax,-0x28(%ebp)
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
102e6e: 8d 43 18 lea 0x18(%ebx),%eax
102e71: 74 7f je 102ef2 <ramdisk_ioctl+0x1c2> <== NEVER TAKEN
102e73: 89 5d dc mov %ebx,-0x24(%ebp)
102e76: 89 4d e0 mov %ecx,-0x20(%ebp)
102e79: eb 18 jmp 102e93 <ramdisk_ioctl+0x163>
102e7b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
102e7f: 90 nop
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
102e80: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
for (i = 0, sg = req->bufs; i < req->bufnum; i++, sg++)
102e82: 83 c0 10 add $0x10,%eax
102e85: ff 45 e0 incl -0x20(%ebp)
102e88: 8b 75 dc mov -0x24(%ebp),%esi
102e8b: 8b 4d e0 mov -0x20(%ebp),%ecx
102e8e: 3b 4e 10 cmp 0x10(%esi),%ecx
102e91: 73 5d jae 102ef0 <ramdisk_ioctl+0x1c0> <== ALWAYS TAKEN
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
102e93: 8b 4d e4 mov -0x1c(%ebp),%ecx
102e96: 8b 10 mov (%eax),%edx
102e98: 8b 78 08 mov 0x8(%eax),%edi
102e9b: 8b 31 mov (%ecx),%esi
102e9d: 8b 4d d8 mov -0x28(%ebp),%ecx
102ea0: 0f af d6 imul %esi,%edx
102ea3: 01 ca add %ecx,%edx
102ea5: 8b 48 04 mov 0x4(%eax),%ecx
102ea8: 89 d6 mov %edx,%esi
102eaa: 83 f9 08 cmp $0x8,%ecx
102ead: 72 d1 jb 102e80 <ramdisk_ioctl+0x150>
102eaf: f7 c7 01 00 00 00 test $0x1,%edi
102eb5: 75 79 jne 102f30 <ramdisk_ioctl+0x200> <== NEVER TAKEN
102eb7: f7 c7 02 00 00 00 test $0x2,%edi
102ebd: 75 51 jne 102f10 <ramdisk_ioctl+0x1e0> <== NEVER TAKEN
102ebf: f7 c7 04 00 00 00 test $0x4,%edi
102ec5: 74 b9 je 102e80 <ramdisk_ioctl+0x150> <== ALWAYS TAKEN
102ec7: 8b 16 mov (%esi),%edx <== NOT EXECUTED
102ec9: 83 c7 04 add $0x4,%edi <== NOT EXECUTED
102ecc: 83 c6 04 add $0x4,%esi <== NOT EXECUTED
102ecf: 83 e9 04 sub $0x4,%ecx <== NOT EXECUTED
102ed2: 89 57 fc mov %edx,-0x4(%edi) <== NOT EXECUTED
102ed5: eb a9 jmp 102e80 <ramdisk_ioctl+0x150> <== NOT EXECUTED
102ed7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102ede: 66 90 xchg %ax,%ax <== NOT EXECUTED
ramdisk_free(rd);
102ee0: 89 04 24 mov %eax,(%esp)
102ee3: e8 a8 00 00 00 call 102f90 <ramdisk_free>
102ee8: e9 30 ff ff ff jmp 102e1d <ramdisk_ioctl+0xed>
102eed: 8d 76 00 lea 0x0(%esi),%esi
102ef0: 89 f3 mov %esi,%ebx
(*req->done)(req, status);
102ef2: 89 1c 24 mov %ebx,(%esp)
102ef5: 31 c0 xor %eax,%eax
102ef7: 89 44 24 04 mov %eax,0x4(%esp)
102efb: ff 53 04 call *0x4(%ebx)
}
102efe: 83 c4 3c add $0x3c,%esp
return ramdisk_write(rd, r);
102f01: 31 c0 xor %eax,%eax
}
102f03: 5b pop %ebx
102f04: 5e pop %esi
102f05: 5f pop %edi
102f06: 5d pop %ebp
102f07: c3 ret
102f08: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
102f0f: 90 nop
memcpy(sg->buffer, from + (sg->block * rd->block_size), sg->length);
102f10: 0f b7 16 movzwl (%esi),%edx <== NOT EXECUTED
102f13: 83 c7 02 add $0x2,%edi <== NOT EXECUTED
102f16: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
102f19: 83 e9 02 sub $0x2,%ecx <== NOT EXECUTED
102f1c: 66 89 57 fe mov %dx,-0x2(%edi) <== NOT EXECUTED
102f20: eb 9d jmp 102ebf <ramdisk_ioctl+0x18f> <== NOT EXECUTED
102f22: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102f29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102f30: 0f b6 12 movzbl (%edx),%edx <== NOT EXECUTED
102f33: 47 inc %edi <== NOT EXECUTED
102f34: 46 inc %esi <== NOT EXECUTED
102f35: 49 dec %ecx <== NOT EXECUTED
102f36: 88 55 d7 mov %dl,-0x29(%ebp) <== NOT EXECUTED
102f39: 88 57 ff mov %dl,-0x1(%edi) <== NOT EXECUTED
102f3c: e9 76 ff ff ff jmp 102eb7 <ramdisk_ioctl+0x187> <== NOT EXECUTED
102f41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102f48: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102f4f: 90 nop <== NOT EXECUTED
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
102f50: 0f b7 16 movzwl (%esi),%edx <== NOT EXECUTED
102f53: 83 c7 02 add $0x2,%edi <== NOT EXECUTED
102f56: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
102f59: 83 e9 02 sub $0x2,%ecx <== NOT EXECUTED
102f5c: 66 89 57 fe mov %dx,-0x2(%edi) <== NOT EXECUTED
102f60: e9 88 fe ff ff jmp 102ded <ramdisk_ioctl+0xbd> <== NOT EXECUTED
102f65: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102f6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102f70: 0f b6 12 movzbl (%edx),%edx <== NOT EXECUTED
102f73: 47 inc %edi <== NOT EXECUTED
102f74: 46 inc %esi <== NOT EXECUTED
102f75: 49 dec %ecx <== NOT EXECUTED
102f76: 88 55 d7 mov %dl,-0x29(%ebp) <== NOT EXECUTED
102f79: 88 57 ff mov %dl,-0x1(%edi) <== NOT EXECUTED
102f7c: e9 60 fe ff ff jmp 102de1 <ramdisk_ioctl+0xb1> <== NOT EXECUTED
102f81: 90 nop
102f82: 90 nop
102f83: 90 nop
102f84: 90 nop
102f85: 90 nop
102f86: 90 nop
102f87: 90 nop
102f88: 90 nop
102f89: 90 nop
102f8a: 90 nop
102f8b: 90 nop
102f8c: 90 nop
102f8d: 90 nop
102f8e: 90 nop
102f8f: 90 nop
00102190 <ramdisk_register>:
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk
)
{
102190: 55 push %ebp
102191: 89 e5 mov %esp,%ebp
102193: 83 ec 38 sub $0x38,%esp
102196: 89 75 f8 mov %esi,-0x8(%ebp)
rtems_status_code sc = RTEMS_SUCCESSFUL;
ramdisk *rd = NULL;
rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);
102199: 0f b6 45 10 movzbl 0x10(%ebp),%eax
{
10219d: 89 7d fc mov %edi,-0x4(%ebp)
1021a0: 8b 75 08 mov 0x8(%ebp),%esi
rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);
1021a3: c7 04 24 00 00 00 00 movl $0x0,(%esp)
{
1021aa: 8b 7d 0c mov 0xc(%ebp),%edi
1021ad: 89 5d f4 mov %ebx,-0xc(%ebp)
rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);
1021b0: 89 44 24 0c mov %eax,0xc(%esp)
1021b4: 89 74 24 04 mov %esi,0x4(%esp)
1021b8: 89 7c 24 08 mov %edi,0x8(%esp)
1021bc: e8 ef 1b 01 00 call 113db0 <ramdisk_allocate>
if (rd == NULL) {
1021c1: 85 c0 test %eax,%eax
1021c3: 74 3b je 102200 <ramdisk_register+0x70> <== NEVER TAKEN
return RTEMS_UNSATISFIED;
}
sc = rtems_blkdev_create(
1021c5: 89 44 24 10 mov %eax,0x10(%esp)
1021c9: 89 c3 mov %eax,%ebx
1021cb: b8 50 3b 11 00 mov $0x113b50,%eax
1021d0: 89 44 24 0c mov %eax,0xc(%esp)
1021d4: 8b 45 14 mov 0x14(%ebp),%eax
1021d7: 89 7c 24 08 mov %edi,0x8(%esp)
1021db: 89 74 24 04 mov %esi,0x4(%esp)
1021df: 89 04 24 mov %eax,(%esp)
1021e2: e8 39 17 01 00 call 113920 <rtems_blkdev_create>
media_block_size,
media_block_count,
ramdisk_ioctl,
rd
);
if (sc != RTEMS_SUCCESSFUL) {
1021e7: 85 c0 test %eax,%eax
1021e9: 75 35 jne 102220 <ramdisk_register+0x90> <== NEVER TAKEN
return RTEMS_UNSATISFIED;
}
return RTEMS_SUCCESSFUL;
}
1021eb: 8b 5d f4 mov -0xc(%ebp),%ebx
1021ee: 8b 75 f8 mov -0x8(%ebp),%esi
1021f1: 8b 7d fc mov -0x4(%ebp),%edi
1021f4: 89 ec mov %ebp,%esp
1021f6: 5d pop %ebp
1021f7: c3 ret
1021f8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1021ff: 90 nop
102200: 8b 5d f4 mov -0xc(%ebp),%ebx <== NOT EXECUTED
return RTEMS_UNSATISFIED;
102203: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
}
102208: 8b 75 f8 mov -0x8(%ebp),%esi <== NOT EXECUTED
10220b: 8b 7d fc mov -0x4(%ebp),%edi <== NOT EXECUTED
10220e: 89 ec mov %ebp,%esp <== NOT EXECUTED
102210: 5d pop %ebp <== NOT EXECUTED
102211: c3 ret <== NOT EXECUTED
102212: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102219: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
ramdisk_free(rd);
102220: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
102223: e8 18 1c 01 00 call 113e40 <ramdisk_free> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
102228: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
10222d: eb bc jmp 1021eb <ramdisk_register+0x5b> <== NOT EXECUTED
10222f: 90 nop
0010f650 <rtems_bdbuf_get>:
{
10f650: 55 push %ebp
10f651: 89 e5 mov %esp,%ebp
10f653: 56 push %esi
10f654: 53 push %ebx
10f655: 83 ec 10 sub $0x10,%esp
10f658: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10f65f: 8b 5d 08 mov 0x8(%ebp),%ebx
10f662: 8b 75 0c mov 0xc(%ebp),%esi
10f665: e8 66 a7 ff ff call 109dd0 <_Mutex_Acquire>
if (block < dd->block_count)
10f66a: 3b 73 28 cmp 0x28(%ebx),%esi
10f66d: 0f 83 8d 00 00 00 jae 10f700 <rtems_bdbuf_get+0xb0> <== NEVER TAKEN
if (dd->block_to_media_block_shift >= 0)
10f673: 8b 4b 30 mov 0x30(%ebx),%ecx
10f676: 85 c9 test %ecx,%ecx
10f678: 78 46 js 10f6c0 <rtems_bdbuf_get+0x70> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
10f67a: d3 e6 shl %cl,%esi
10f67c: 89 f2 mov %esi,%edx
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
10f67e: 8b 43 18 mov 0x18(%ebx),%eax
10f681: 01 c2 add %eax,%edx
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
10f683: 89 d8 mov %ebx,%eax
10f685: e8 56 fc ff ff call 10f2e0 <rtems_bdbuf_get_buffer_for_access>
10f68a: 89 c3 mov %eax,%ebx
switch (bd->state)
10f68c: 8b 40 20 mov 0x20(%eax),%eax
10f68f: 83 f8 02 cmp $0x2,%eax
10f692: 74 7c je 10f710 <rtems_bdbuf_get+0xc0>
10f694: 83 f8 07 cmp $0x7,%eax
10f697: 75 57 jne 10f6f0 <rtems_bdbuf_get+0xa0>
bd->state = state;
10f699: c7 43 20 04 00 00 00 movl $0x4,0x20(%ebx)
}
10f6a0: 31 f6 xor %esi,%esi
_Mutex_Release( mutex );
10f6a2: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10f6a9: e8 92 a7 ff ff call 109e40 <_Mutex_Release>
*bd_ptr = bd;
10f6ae: 8b 45 10 mov 0x10(%ebp),%eax
10f6b1: 89 18 mov %ebx,(%eax)
}
10f6b3: 83 c4 10 add $0x10,%esp
10f6b6: 89 f0 mov %esi,%eax
10f6b8: 5b pop %ebx
10f6b9: 5e pop %esi
10f6ba: 5d pop %ebp
10f6bb: c3 ret
10f6bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
((((uint64_t) block) * dd->block_size) / dd->media_block_size);
10f6c0: 8b 4b 20 mov 0x20(%ebx),%ecx <== NOT EXECUTED
10f6c3: 89 f0 mov %esi,%eax <== NOT EXECUTED
10f6c5: f7 63 24 mull 0x24(%ebx) <== NOT EXECUTED
10f6c8: 89 4c 24 08 mov %ecx,0x8(%esp) <== NOT EXECUTED
10f6cc: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
10f6ce: 89 4c 24 0c mov %ecx,0xc(%esp) <== NOT EXECUTED
10f6d2: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10f6d5: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
10f6d9: e8 32 eb 00 00 call 11e210 <__udivdi3> <== NOT EXECUTED
10f6de: 89 c2 mov %eax,%edx <== NOT EXECUTED
return (rtems_blkdev_bnum)
10f6e0: eb 9c jmp 10f67e <rtems_bdbuf_get+0x2e> <== NOT EXECUTED
10f6e2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10f6e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
switch (bd->state)
10f6f0: 83 f8 01 cmp $0x1,%eax
10f6f3: 74 2b je 10f720 <rtems_bdbuf_get+0xd0> <== ALWAYS TAKEN
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_2);
10f6f5: ba 0a 00 00 00 mov $0xa,%edx <== NOT EXECUTED
10f6fa: e8 f1 de ff ff call 10d5f0 <rtems_bdbuf_fatal_with_state> <== NOT EXECUTED
10f6ff: 90 nop <== NOT EXECUTED
sc = RTEMS_INVALID_ID;
10f700: be 04 00 00 00 mov $0x4,%esi <== NOT EXECUTED
rtems_bdbuf_buffer *bd = NULL;
10f705: 31 db xor %ebx,%ebx <== NOT EXECUTED
10f707: eb 99 jmp 10f6a2 <rtems_bdbuf_get+0x52> <== NOT EXECUTED
10f709: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
bd->state = state;
10f710: c7 43 20 03 00 00 00 movl $0x3,0x20(%ebx)
}
10f717: 31 f6 xor %esi,%esi
10f719: eb 87 jmp 10f6a2 <rtems_bdbuf_get+0x52>
10f71b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
10f71f: 90 nop
bd->state = state;
10f720: c7 43 20 05 00 00 00 movl $0x5,0x20(%ebx)
}
10f727: 31 f6 xor %esi,%esi
10f729: e9 74 ff ff ff jmp 10f6a2 <rtems_bdbuf_get+0x52>
10f72e: 90 nop
10f72f: 90 nop
0010f730 <rtems_bdbuf_read>:
{
10f730: 55 push %ebp
10f731: 89 e5 mov %esp,%ebp
10f733: 83 ec 28 sub $0x28,%esp
10f736: 89 5d f4 mov %ebx,-0xc(%ebp)
10f739: 8b 5d 08 mov 0x8(%ebp),%ebx
_Mutex_Acquire( mutex );
10f73c: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10f743: 89 75 f8 mov %esi,-0x8(%ebp)
10f746: 89 7d fc mov %edi,-0x4(%ebp)
10f749: e8 82 a6 ff ff call 109dd0 <_Mutex_Acquire>
if (block < dd->block_count)
10f74e: 8b 43 28 mov 0x28(%ebx),%eax
10f751: 39 45 0c cmp %eax,0xc(%ebp)
10f754: 0f 83 b6 00 00 00 jae 10f810 <rtems_bdbuf_read+0xe0> <== NEVER TAKEN
if (dd->block_to_media_block_shift >= 0)
10f75a: 8b 4b 30 mov 0x30(%ebx),%ecx
10f75d: 85 c9 test %ecx,%ecx
10f75f: 78 6f js 10f7d0 <rtems_bdbuf_read+0xa0> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
10f761: 8b 55 0c mov 0xc(%ebp),%edx
10f764: d3 e2 shl %cl,%edx
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
10f766: 8b 73 18 mov 0x18(%ebx),%esi
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
10f769: 89 d8 mov %ebx,%eax
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
10f76b: 01 f2 add %esi,%edx
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
10f76d: e8 6e fb ff ff call 10f2e0 <rtems_bdbuf_get_buffer_for_access>
10f772: 89 c6 mov %eax,%esi
switch (bd->state)
10f774: 8b 40 20 mov 0x20(%eax),%eax
10f777: 83 f8 02 cmp $0x2,%eax
10f77a: 0f 84 10 01 00 00 je 10f890 <rtems_bdbuf_read+0x160>
10f780: 83 f8 07 cmp $0x7,%eax
10f783: 75 7b jne 10f800 <rtems_bdbuf_read+0xd0>
++dd->stats.read_hits;
10f785: ff 43 44 incl 0x44(%ebx)
}
10f788: 31 ff xor %edi,%edi
bd->state = state;
10f78a: c7 46 20 04 00 00 00 movl $0x4,0x20(%esi)
if (bdbuf_cache.read_ahead_task != 0
10f791: a1 7c 4a 13 00 mov 0x134a7c,%eax
10f796: 85 c0 test %eax,%eax
10f798: 74 0c je 10f7a6 <rtems_bdbuf_read+0x76>
&& dd->read_ahead.trigger == block
10f79a: 8b 4b 6c mov 0x6c(%ebx),%ecx
10f79d: 39 4d 0c cmp %ecx,0xc(%ebp)
10f7a0: 0f 84 0a 01 00 00 je 10f8b0 <rtems_bdbuf_read+0x180>
_Mutex_Release( mutex );
10f7a6: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10f7ad: e8 8e a6 ff ff call 109e40 <_Mutex_Release>
*bd_ptr = bd;
10f7b2: 8b 45 10 mov 0x10(%ebp),%eax
}
10f7b5: 8b 5d f4 mov -0xc(%ebp),%ebx
*bd_ptr = bd;
10f7b8: 89 30 mov %esi,(%eax)
}
10f7ba: 8b 75 f8 mov -0x8(%ebp),%esi
10f7bd: 89 f8 mov %edi,%eax
10f7bf: 8b 7d fc mov -0x4(%ebp),%edi
10f7c2: 89 ec mov %ebp,%esp
10f7c4: 5d pop %ebp
10f7c5: c3 ret
10f7c6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10f7cd: 8d 76 00 lea 0x0(%esi),%esi
((((uint64_t) block) * dd->block_size) / dd->media_block_size);
10f7d0: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED
10f7d3: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10f7d6: f7 63 24 mull 0x24(%ebx) <== NOT EXECUTED
10f7d9: 89 7c 24 08 mov %edi,0x8(%esp) <== NOT EXECUTED
10f7dd: 31 ff xor %edi,%edi <== NOT EXECUTED
10f7df: 89 7c 24 0c mov %edi,0xc(%esp) <== NOT EXECUTED
10f7e3: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10f7e6: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
10f7ea: e8 21 ea 00 00 call 11e210 <__udivdi3> <== NOT EXECUTED
10f7ef: 89 c2 mov %eax,%edx <== NOT EXECUTED
return (rtems_blkdev_bnum)
10f7f1: e9 70 ff ff ff jmp 10f766 <rtems_bdbuf_read+0x36> <== NOT EXECUTED
10f7f6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10f7fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
switch (bd->state)
10f800: 83 f8 01 cmp $0x1,%eax
10f803: 74 1b je 10f820 <rtems_bdbuf_read+0xf0> <== ALWAYS TAKEN
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_4);
10f805: ba 0b 00 00 00 mov $0xb,%edx <== NOT EXECUTED
10f80a: e8 e1 dd ff ff call 10d5f0 <rtems_bdbuf_fatal_with_state> <== NOT EXECUTED
10f80f: 90 nop <== NOT EXECUTED
rtems_bdbuf_buffer *bd = NULL;
10f810: 31 f6 xor %esi,%esi <== NOT EXECUTED
sc = RTEMS_INVALID_ID;
10f812: bf 04 00 00 00 mov $0x4,%edi <== NOT EXECUTED
10f817: eb 8d jmp 10f7a6 <rtems_bdbuf_read+0x76> <== NOT EXECUTED
10f819: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
if (dd->read_ahead.trigger != block)
10f820: 8b 43 6c mov 0x6c(%ebx),%eax
++dd->stats.read_misses;
10f823: ff 43 48 incl 0x48(%ebx)
if (dd->read_ahead.trigger != block)
10f826: 39 45 0c cmp %eax,0xc(%ebp)
10f829: 74 26 je 10f851 <rtems_bdbuf_read+0x121>
return node->next == NULL;
10f82b: 8b 43 64 mov 0x64(%ebx),%eax
if (rtems_bdbuf_is_read_ahead_active (dd))
10f82e: 85 c0 test %eax,%eax
10f830: 74 0f je 10f841 <rtems_bdbuf_read+0x111> <== ALWAYS TAKEN
previous = the_node->previous;
10f832: 8b 4b 68 mov 0x68(%ebx),%ecx <== NOT EXECUTED
next->previous = previous;
10f835: 89 48 04 mov %ecx,0x4(%eax) <== NOT EXECUTED
previous->next = next;
10f838: 89 01 mov %eax,(%ecx) <== NOT EXECUTED
node->next = NULL;
10f83a: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) <== NOT EXECUTED
dd->read_ahead.trigger = block + 1;
10f841: 8b 45 0c mov 0xc(%ebp),%eax
10f844: 40 inc %eax
10f845: 89 43 6c mov %eax,0x6c(%ebx)
dd->read_ahead.next = block + 2;
10f848: 8b 45 0c mov 0xc(%ebp),%eax
10f84b: 83 c0 02 add $0x2,%eax
10f84e: 89 43 70 mov %eax,0x70(%ebx)
sc = rtems_bdbuf_execute_read_request (dd, bd, 1);
10f851: b9 01 00 00 00 mov $0x1,%ecx
10f856: 89 f2 mov %esi,%edx
10f858: 89 d8 mov %ebx,%eax
10f85a: e8 e1 f0 ff ff call 10e940 <rtems_bdbuf_execute_read_request>
if (sc == RTEMS_SUCCESSFUL)
10f85f: 85 c0 test %eax,%eax
sc = rtems_bdbuf_execute_read_request (dd, bd, 1);
10f861: 89 c7 mov %eax,%edi
if (sc == RTEMS_SUCCESSFUL)
10f863: 0f 85 87 00 00 00 jne 10f8f0 <rtems_bdbuf_read+0x1c0>
bd->state = state;
10f869: c7 46 20 03 00 00 00 movl $0x3,0x20(%esi)
previous = the_node->previous;
10f870: 8b 46 04 mov 0x4(%esi),%eax
next = the_node->next;
10f873: 8b 0e mov (%esi),%ecx
next->previous = previous;
10f875: 89 41 04 mov %eax,0x4(%ecx)
previous->next = next;
10f878: 89 08 mov %ecx,(%eax)
++bd->group->users;
10f87a: 8b 46 28 mov 0x28(%esi),%eax
10f87d: ff 40 0c incl 0xc(%eax)
}
10f880: e9 0c ff ff ff jmp 10f791 <rtems_bdbuf_read+0x61>
10f885: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10f88c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
++dd->stats.read_hits;
10f890: ff 43 44 incl 0x44(%ebx)
}
10f893: 31 ff xor %edi,%edi
bd->state = state;
10f895: c7 46 20 03 00 00 00 movl $0x3,0x20(%esi)
}
10f89c: e9 f0 fe ff ff jmp 10f791 <rtems_bdbuf_read+0x61>
10f8a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10f8a8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10f8af: 90 nop
&& !rtems_bdbuf_is_read_ahead_active (dd))
10f8b0: 8b 4b 64 mov 0x64(%ebx),%ecx
10f8b3: 85 c9 test %ecx,%ecx
10f8b5: 0f 85 eb fe ff ff jne 10f7a6 <rtems_bdbuf_read+0x76> <== NEVER TAKEN
if (rtems_chain_is_empty (chain))
10f8bb: 81 3d 80 4a 13 00 84 cmpl $0x134a84,0x134a80
10f8c2: 4a 13 00
10f8c5: 74 30 je 10f8f7 <rtems_bdbuf_read+0x1c7> <== ALWAYS TAKEN
old_last = tail->previous;
10f8c7: a1 88 4a 13 00 mov 0x134a88,%eax
rtems_chain_append_unprotected (chain, &dd->read_ahead.node);
10f8cc: 8d 4b 64 lea 0x64(%ebx),%ecx
the_node->next = tail;
10f8cf: c7 43 64 84 4a 13 00 movl $0x134a84,0x64(%ebx)
tail->previous = the_node;
10f8d6: 89 0d 88 4a 13 00 mov %ecx,0x134a88
old_last->next = the_node;
10f8dc: 89 08 mov %ecx,(%eax)
the_node->previous = old_last;
10f8de: 89 43 68 mov %eax,0x68(%ebx)
10f8e1: e9 c0 fe ff ff jmp 10f7a6 <rtems_bdbuf_read+0x76>
10f8e6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10f8ed: 8d 76 00 lea 0x0(%esi),%esi
bd = NULL;
10f8f0: 31 f6 xor %esi,%esi
10f8f2: e9 9a fe ff ff jmp 10f791 <rtems_bdbuf_read+0x61>
sc = rtems_event_send (bdbuf_cache.read_ahead_task,
10f8f7: 89 04 24 mov %eax,(%esp)
10f8fa: ba 02 00 00 00 mov $0x2,%edx
10f8ff: 89 54 24 04 mov %edx,0x4(%esp)
10f903: e8 d8 15 00 00 call 110ee0 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10f908: 85 c0 test %eax,%eax
10f90a: 74 bb je 10f8c7 <rtems_bdbuf_read+0x197> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RA_WAKE_UP);
10f90c: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
10f911: e8 ba dc ff ff call 10d5d0 <rtems_bdbuf_fatal> <== NOT EXECUTED
10f916: 90 nop
10f917: 90 nop
10f918: 90 nop
10f919: 90 nop
10f91a: 90 nop
10f91b: 90 nop
10f91c: 90 nop
10f91d: 90 nop
10f91e: 90 nop
10f91f: 90 nop
0010f920 <rtems_bdbuf_release>:
{
10f920: 55 push %ebp
10f921: 89 e5 mov %esp,%ebp
10f923: 83 ec 18 sub $0x18,%esp
10f926: 89 5d fc mov %ebx,-0x4(%ebp)
10f929: 8b 5d 08 mov 0x8(%ebp),%ebx
if (bd == NULL)
10f92c: 85 db test %ebx,%ebx
10f92e: 0f 84 cc 00 00 00 je 10fa00 <rtems_bdbuf_release+0xe0> <== NEVER TAKEN
_Mutex_Acquire( mutex );
10f934: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10f93b: e8 90 a4 ff ff call 109dd0 <_Mutex_Acquire>
switch (bd->state)
10f940: 8b 43 20 mov 0x20(%ebx),%eax
10f943: 83 f8 04 cmp $0x4,%eax
10f946: 0f 84 84 00 00 00 je 10f9d0 <rtems_bdbuf_release+0xb0>
10f94c: 76 32 jbe 10f980 <rtems_bdbuf_release+0x60>
10f94e: 8d 50 fb lea -0x5(%eax),%edx
10f951: 83 fa 01 cmp $0x1,%edx
10f954: 0f 87 b2 00 00 00 ja 10fa0c <rtems_bdbuf_release+0xec> <== NEVER TAKEN
rtems_bdbuf_discard_buffer_after_access (bd);
10f95a: 89 d8 mov %ebx,%eax
10f95c: e8 df e0 ff ff call 10da40 <rtems_bdbuf_discard_buffer_after_access>
_Mutex_Release( mutex );
10f961: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10f968: e8 d3 a4 ff ff call 109e40 <_Mutex_Release>
}
10f96d: 8b 5d fc mov -0x4(%ebp),%ebx
10f970: 89 ec mov %ebp,%esp
10f972: 5d pop %ebp
return RTEMS_SUCCESSFUL;
10f973: 31 c0 xor %eax,%eax
}
10f975: c3 ret
10f976: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10f97d: 8d 76 00 lea 0x0(%esi),%esi
switch (bd->state)
10f980: 83 f8 03 cmp $0x3,%eax
10f983: 0f 85 83 00 00 00 jne 10fa0c <rtems_bdbuf_release+0xec> <== NEVER TAKEN
--bd->group->users;
10f989: 8b 43 28 mov 0x28(%ebx),%eax
if (bd->waiters)
10f98c: 8b 4b 24 mov 0x24(%ebx),%ecx
--bd->group->users;
10f98f: ff 48 0c decl 0xc(%eax)
old_last = tail->previous;
10f992: a1 08 4a 13 00 mov 0x134a08,%eax
if (bd->waiters)
10f997: 85 c9 test %ecx,%ecx
bd->state = state;
10f999: c7 43 20 02 00 00 00 movl $0x2,0x20(%ebx)
the_node->next = tail;
10f9a0: c7 03 04 4a 13 00 movl $0x134a04,(%ebx)
tail->previous = the_node;
10f9a6: 89 1d 08 4a 13 00 mov %ebx,0x134a08
old_last->next = the_node;
10f9ac: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
10f9ae: 89 43 04 mov %eax,0x4(%ebx)
if (bd->waiters)
10f9b1: 74 2d je 10f9e0 <rtems_bdbuf_release+0xc0>
if (waiters->count > 0)
10f9b3: 8b 15 24 4a 13 00 mov 0x134a24,%edx
10f9b9: 85 d2 test %edx,%edx
10f9bb: 74 a4 je 10f961 <rtems_bdbuf_release+0x41>
_Condition_Broadcast( condition_variable );
10f9bd: c7 04 24 28 4a 13 00 movl $0x134a28,(%esp)
10f9c4: e8 c7 19 00 00 call 111390 <_Condition_Broadcast>
}
10f9c9: eb 96 jmp 10f961 <rtems_bdbuf_release+0x41>
10f9cb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
10f9cf: 90 nop
rtems_bdbuf_add_to_modified_list_after_access (bd);
10f9d0: 89 d8 mov %ebx,%eax
10f9d2: e8 49 fb ff ff call 10f520 <rtems_bdbuf_add_to_modified_list_after_access>
break;
10f9d7: eb 88 jmp 10f961 <rtems_bdbuf_release+0x41>
10f9d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if (waiters->count > 0)
10f9e0: a1 54 4a 13 00 mov 0x134a54,%eax
10f9e5: 85 c0 test %eax,%eax
10f9e7: 0f 84 74 ff ff ff je 10f961 <rtems_bdbuf_release+0x41>
_Condition_Broadcast( condition_variable );
10f9ed: c7 04 24 58 4a 13 00 movl $0x134a58,(%esp)
10f9f4: e8 97 19 00 00 call 111390 <_Condition_Broadcast>
}
10f9f9: e9 63 ff ff ff jmp 10f961 <rtems_bdbuf_release+0x41>
10f9fe: 66 90 xchg %ax,%ax
}
10fa00: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10fa03: 89 ec mov %ebp,%esp <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
10fa05: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
}
10fa0a: 5d pop %ebp <== NOT EXECUTED
10fa0b: c3 ret <== NOT EXECUTED
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_0);
10fa0c: ba 09 00 00 00 mov $0x9,%edx <== NOT EXECUTED
10fa11: e8 da db ff ff call 10d5f0 <rtems_bdbuf_fatal_with_state> <== NOT EXECUTED
10fa16: 90 nop
10fa17: 90 nop
10fa18: 90 nop
10fa19: 90 nop
10fa1a: 90 nop
10fa1b: 90 nop
10fa1c: 90 nop
10fa1d: 90 nop
10fa1e: 90 nop
10fa1f: 90 nop
0010fa20 <rtems_bdbuf_release_modified>:
{
10fa20: 55 push %ebp
10fa21: 89 e5 mov %esp,%ebp
10fa23: 83 ec 18 sub $0x18,%esp
10fa26: 89 5d fc mov %ebx,-0x4(%ebp)
10fa29: 8b 5d 08 mov 0x8(%ebp),%ebx
if (bd == NULL)
10fa2c: 85 db test %ebx,%ebx
10fa2e: 74 60 je 10fa90 <rtems_bdbuf_release_modified+0x70> <== NEVER TAKEN
_Mutex_Acquire( mutex );
10fa30: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10fa37: e8 94 a3 ff ff call 109dd0 <_Mutex_Acquire>
switch (bd->state)
10fa3c: 8b 43 20 mov 0x20(%ebx),%eax
10fa3f: 83 f8 05 cmp $0x5,%eax
10fa42: 76 2c jbe 10fa70 <rtems_bdbuf_release_modified+0x50>
10fa44: 83 f8 06 cmp $0x6,%eax
10fa47: 75 2c jne 10fa75 <rtems_bdbuf_release_modified+0x55> <== NEVER TAKEN
rtems_bdbuf_discard_buffer_after_access (bd);
10fa49: 89 d8 mov %ebx,%eax
10fa4b: e8 f0 df ff ff call 10da40 <rtems_bdbuf_discard_buffer_after_access>
_Mutex_Release( mutex );
10fa50: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10fa57: e8 e4 a3 ff ff call 109e40 <_Mutex_Release>
}
10fa5c: 8b 5d fc mov -0x4(%ebp),%ebx
10fa5f: 89 ec mov %ebp,%esp
10fa61: 5d pop %ebp
return RTEMS_SUCCESSFUL;
10fa62: 31 c0 xor %eax,%eax
}
10fa64: c3 ret
10fa65: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10fa6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
switch (bd->state)
10fa70: 83 f8 02 cmp $0x2,%eax
10fa73: 77 0b ja 10fa80 <rtems_bdbuf_release_modified+0x60> <== ALWAYS TAKEN
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_6);
10fa75: ba 0d 00 00 00 mov $0xd,%edx <== NOT EXECUTED
10fa7a: e8 71 db ff ff call 10d5f0 <rtems_bdbuf_fatal_with_state> <== NOT EXECUTED
10fa7f: 90 nop <== NOT EXECUTED
rtems_bdbuf_add_to_modified_list_after_access (bd);
10fa80: 89 d8 mov %ebx,%eax
10fa82: e8 99 fa ff ff call 10f520 <rtems_bdbuf_add_to_modified_list_after_access>
break;
10fa87: eb c7 jmp 10fa50 <rtems_bdbuf_release_modified+0x30>
10fa89: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
10fa90: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10fa93: 89 ec mov %ebp,%esp <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
10fa95: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
}
10fa9a: 5d pop %ebp <== NOT EXECUTED
10fa9b: c3 ret <== NOT EXECUTED
10fa9c: 90 nop
10fa9d: 90 nop
10fa9e: 90 nop
10fa9f: 90 nop
0010fe90 <rtems_bdbuf_reset_device_stats>:
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
10fe90: 55 push %ebp
10fe91: 89 e5 mov %esp,%ebp
10fe93: 56 push %esi
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
10fe94: 31 f6 xor %esi,%esi
{
10fe96: 53 push %ebx
10fe97: 83 ec 10 sub $0x10,%esp
_Mutex_Acquire( mutex );
10fe9a: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10fea1: 8b 5d 08 mov 0x8(%ebp),%ebx
10fea4: e8 27 9f ff ff call 109dd0 <_Mutex_Acquire>
memset (&dd->stats, 0, sizeof(dd->stats));
10fea9: b9 20 00 00 00 mov $0x20,%ecx
10feae: 8d 43 44 lea 0x44(%ebx),%eax
10feb1: f6 c3 01 test $0x1,%bl
10feb4: 0f 85 86 00 00 00 jne 10ff40 <rtems_bdbuf_reset_device_stats+0xb0> <== NEVER TAKEN
10feba: a8 02 test $0x2,%al
10febc: 75 72 jne 10ff30 <rtems_bdbuf_reset_device_stats+0xa0> <== NEVER TAKEN
10febe: 89 cb mov %ecx,%ebx
10fec0: 31 d2 xor %edx,%edx
10fec2: 83 e3 f8 and $0xfffffff8,%ebx
10fec5: 89 34 10 mov %esi,(%eax,%edx,1)
10fec8: 89 74 10 04 mov %esi,0x4(%eax,%edx,1)
10fecc: 83 c2 08 add $0x8,%edx
10fecf: 39 da cmp %ebx,%edx
10fed1: 72 f2 jb 10fec5 <rtems_bdbuf_reset_device_stats+0x35>
10fed3: 01 d0 add %edx,%eax
10fed5: f6 c1 04 test $0x4,%cl
10fed8: 75 46 jne 10ff20 <rtems_bdbuf_reset_device_stats+0x90> <== NEVER TAKEN
10feda: f6 c1 02 test $0x2,%cl
10fedd: 75 31 jne 10ff10 <rtems_bdbuf_reset_device_stats+0x80> <== NEVER TAKEN
10fedf: f6 c1 01 test $0x1,%cl
10fee2: 75 1c jne 10ff00 <rtems_bdbuf_reset_device_stats+0x70> <== NEVER TAKEN
_Mutex_Release( mutex );
10fee4: c7 45 08 c8 49 13 00 movl $0x1349c8,0x8(%ebp)
rtems_bdbuf_unlock_cache ();
}
10feeb: 83 c4 10 add $0x10,%esp
10feee: 5b pop %ebx
10feef: 5e pop %esi
10fef0: 5d pop %ebp
10fef1: e9 4a 9f ff ff jmp 109e40 <_Mutex_Release>
10fef6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10fefd: 8d 76 00 lea 0x0(%esi),%esi
memset (&dd->stats, 0, sizeof(dd->stats));
10ff00: c6 00 00 movb $0x0,(%eax) <== NOT EXECUTED
10ff03: eb df jmp 10fee4 <rtems_bdbuf_reset_device_stats+0x54> <== NOT EXECUTED
10ff05: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10ff0c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10ff10: 66 c7 00 00 00 movw $0x0,(%eax) <== NOT EXECUTED
10ff15: 83 c0 02 add $0x2,%eax <== NOT EXECUTED
10ff18: f6 c1 01 test $0x1,%cl <== NOT EXECUTED
10ff1b: 74 c7 je 10fee4 <rtems_bdbuf_reset_device_stats+0x54> <== NOT EXECUTED
10ff1d: eb e1 jmp 10ff00 <rtems_bdbuf_reset_device_stats+0x70> <== NOT EXECUTED
10ff1f: 90 nop <== NOT EXECUTED
10ff20: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
10ff26: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
10ff29: f6 c1 02 test $0x2,%cl <== NOT EXECUTED
10ff2c: 74 b1 je 10fedf <rtems_bdbuf_reset_device_stats+0x4f> <== NOT EXECUTED
10ff2e: eb e0 jmp 10ff10 <rtems_bdbuf_reset_device_stats+0x80> <== NOT EXECUTED
10ff30: 66 c7 00 00 00 movw $0x0,(%eax) <== NOT EXECUTED
10ff35: 83 e9 02 sub $0x2,%ecx <== NOT EXECUTED
10ff38: 83 c0 02 add $0x2,%eax <== NOT EXECUTED
10ff3b: eb 81 jmp 10febe <rtems_bdbuf_reset_device_stats+0x2e> <== NOT EXECUTED
10ff3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10ff40: c6 43 44 00 movb $0x0,0x44(%ebx) <== NOT EXECUTED
10ff44: 8d 43 45 lea 0x45(%ebx),%eax <== NOT EXECUTED
10ff47: b9 1f 00 00 00 mov $0x1f,%ecx <== NOT EXECUTED
10ff4c: e9 69 ff ff ff jmp 10feba <rtems_bdbuf_reset_device_stats+0x2a> <== NOT EXECUTED
10ff51: 90 nop
10ff52: 90 nop
10ff53: 90 nop
10ff54: 90 nop
10ff55: 90 nop
10ff56: 90 nop
10ff57: 90 nop
10ff58: 90 nop
10ff59: 90 nop
10ff5a: 90 nop
10ff5b: 90 nop
10ff5c: 90 nop
10ff5d: 90 nop
10ff5e: 90 nop
10ff5f: 90 nop
0010fd40 <rtems_bdbuf_set_block_size>:
{
10fd40: 55 push %ebp
10fd41: 89 e5 mov %esp,%ebp
10fd43: 57 push %edi
10fd44: 56 push %esi
10fd45: 53 push %ebx
10fd46: 83 ec 2c sub $0x2c,%esp
if (sync)
10fd49: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
{
10fd4d: 8b 7d 08 mov 0x8(%ebp),%edi
10fd50: 8b 75 0c mov 0xc(%ebp),%esi
if (sync)
10fd53: 0f 85 d7 00 00 00 jne 10fe30 <rtems_bdbuf_set_block_size+0xf0>
_Mutex_Acquire( mutex );
10fd59: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
sc = RTEMS_INVALID_NUMBER;
10fd60: bb 0a 00 00 00 mov $0xa,%ebx
10fd65: e8 66 a0 ff ff call 109dd0 <_Mutex_Acquire>
if (block_size > 0)
10fd6a: 85 f6 test %esi,%esi
10fd6c: 75 22 jne 10fd90 <rtems_bdbuf_set_block_size+0x50>
_Mutex_Release( mutex );
10fd6e: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10fd75: e8 c6 a0 ff ff call 109e40 <_Mutex_Release>
}
10fd7a: 83 c4 2c add $0x2c,%esp
10fd7d: 89 d8 mov %ebx,%eax
10fd7f: 5b pop %ebx
10fd80: 5e pop %esi
10fd81: 5f pop %edi
10fd82: 5d pop %ebp
10fd83: c3 ret
10fd84: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10fd8b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
10fd8f: 90 nop
if (size > bdbuf_config.buffer_max)
10fd90: 3b 35 e8 aa 12 00 cmp 0x12aae8,%esi
10fd96: 77 d6 ja 10fd6e <rtems_bdbuf_set_block_size+0x2e>
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
10fd98: 31 d2 xor %edx,%edx
for (bds_per_size = 1;
10fd9a: b9 01 00 00 00 mov $0x1,%ecx
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
10fd9f: 8d 46 ff lea -0x1(%esi),%eax
10fda2: f7 35 e4 aa 12 00 divl 0x12aae4
10fda8: 8d 50 01 lea 0x1(%eax),%edx
for (bds_per_size = 1;
10fdab: 85 c0 test %eax,%eax
10fdad: 74 07 je 10fdb6 <rtems_bdbuf_set_block_size+0x76>
10fdaf: 90 nop
bds_per_size <<= 1)
10fdb0: 01 c9 add %ecx,%ecx
for (bds_per_size = 1;
10fdb2: 39 ca cmp %ecx,%edx
10fdb4: 77 fa ja 10fdb0 <rtems_bdbuf_set_block_size+0x70>
return bdbuf_cache.max_bds_per_group / bds_per_size;
10fdb6: 8b 1d c0 49 13 00 mov 0x1349c0,%ebx
10fdbc: 31 d2 xor %edx,%edx
10fdbe: 89 d8 mov %ebx,%eax
10fdc0: f7 f1 div %ecx
if (bds_per_group != 0)
10fdc2: 39 cb cmp %ecx,%ebx
return bdbuf_cache.max_bds_per_group / bds_per_size;
10fdc4: 89 45 e0 mov %eax,-0x20(%ebp)
if (bds_per_group != 0)
10fdc7: 72 77 jb 10fe40 <rtems_bdbuf_set_block_size+0x100> <== NEVER TAKEN
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
10fdc9: 8b 47 20 mov 0x20(%edi),%eax
10fdcc: 31 d2 xor %edx,%edx
int block_to_media_block_shift = 0;
10fdce: 31 c9 xor %ecx,%ecx
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
10fdd0: 89 45 e4 mov %eax,-0x1c(%ebp)
10fdd3: 89 c3 mov %eax,%ebx
10fdd5: 89 f0 mov %esi,%eax
10fdd7: f7 f3 div %ebx
while ((one << block_to_media_block_shift) < media_blocks_per_block)
10fdd9: 83 f8 01 cmp $0x1,%eax
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
10fddc: 89 c3 mov %eax,%ebx
while ((one << block_to_media_block_shift) < media_blocks_per_block)
10fdde: 76 1c jbe 10fdfc <rtems_bdbuf_set_block_size+0xbc>
10fde0: ba 01 00 00 00 mov $0x1,%edx
10fde5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10fdec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
++block_to_media_block_shift;
10fdf0: 41 inc %ecx
while ((one << block_to_media_block_shift) < media_blocks_per_block)
10fdf1: 89 d0 mov %edx,%eax
10fdf3: d3 e0 shl %cl,%eax
10fdf5: 39 d8 cmp %ebx,%eax
10fdf7: 72 f7 jb 10fdf0 <rtems_bdbuf_set_block_size+0xb0>
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
10fdf9: d3 65 e4 shll %cl,-0x1c(%ebp)
10fdfc: 3b 75 e4 cmp -0x1c(%ebp),%esi
10fdff: 74 05 je 10fe06 <rtems_bdbuf_set_block_size+0xc6> <== ALWAYS TAKEN
block_to_media_block_shift = -1;
10fe01: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
dd->media_blocks_per_block = media_blocks_per_block;
10fe06: 89 5f 2c mov %ebx,0x2c(%edi)
dd->block_count = dd->size / media_blocks_per_block;
10fe09: 8b 47 1c mov 0x1c(%edi),%eax
10fe0c: 31 d2 xor %edx,%edx
dd->block_size = block_size;
10fe0e: 89 77 24 mov %esi,0x24(%edi)
dd->block_to_media_block_shift = block_to_media_block_shift;
10fe11: 89 4f 30 mov %ecx,0x30(%edi)
dd->block_count = dd->size / media_blocks_per_block;
10fe14: f7 f3 div %ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
10fe16: 31 db xor %ebx,%ebx
dd->block_count = dd->size / media_blocks_per_block;
10fe18: 89 47 28 mov %eax,0x28(%edi)
dd->bds_per_group = bds_per_group;
10fe1b: 8b 45 e0 mov -0x20(%ebp),%eax
10fe1e: 89 47 34 mov %eax,0x34(%edi)
rtems_bdbuf_do_purge_dev (dd);
10fe21: 89 f8 mov %edi,%eax
10fe23: e8 b8 dc ff ff call 10dae0 <rtems_bdbuf_do_purge_dev>
10fe28: e9 41 ff ff ff jmp 10fd6e <rtems_bdbuf_set_block_size+0x2e>
10fe2d: 8d 76 00 lea 0x0(%esi),%esi
rtems_bdbuf_syncdev (dd);
10fe30: 89 3c 24 mov %edi,(%esp)
10fe33: e8 18 fe ff ff call 10fc50 <rtems_bdbuf_syncdev>
10fe38: e9 1c ff ff ff jmp 10fd59 <rtems_bdbuf_set_block_size+0x19>
10fe3d: 8d 76 00 lea 0x0(%esi),%esi
sc = RTEMS_INVALID_NUMBER;
10fe40: bb 0a 00 00 00 mov $0xa,%ebx <== NOT EXECUTED
10fe45: e9 24 ff ff ff jmp 10fd6e <rtems_bdbuf_set_block_size+0x2e> <== NOT EXECUTED
10fe4a: 90 nop
10fe4b: 90 nop
10fe4c: 90 nop
10fe4d: 90 nop
10fe4e: 90 nop
10fe4f: 90 nop
0010faa0 <rtems_bdbuf_sync>:
{
10faa0: 55 push %ebp
10faa1: 89 e5 mov %esp,%ebp
10faa3: 83 ec 18 sub $0x18,%esp
10faa6: 89 5d fc mov %ebx,-0x4(%ebp)
10faa9: 8b 5d 08 mov 0x8(%ebp),%ebx
if (bd == NULL)
10faac: 85 db test %ebx,%ebx
10faae: 0f 84 3c 01 00 00 je 10fbf0 <rtems_bdbuf_sync+0x150> <== NEVER TAKEN
_Mutex_Acquire( mutex );
10fab4: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10fabb: e8 10 a3 ff ff call 109dd0 <_Mutex_Acquire>
switch (bd->state)
10fac0: 8b 43 20 mov 0x20(%ebx),%eax
10fac3: 83 f8 05 cmp $0x5,%eax
10fac6: 76 28 jbe 10faf0 <rtems_bdbuf_sync+0x50>
10fac8: 83 f8 06 cmp $0x6,%eax
10facb: 75 28 jne 10faf5 <rtems_bdbuf_sync+0x55> <== NEVER TAKEN
rtems_bdbuf_discard_buffer_after_access (bd);
10facd: 89 d8 mov %ebx,%eax
10facf: e8 6c df ff ff call 10da40 <rtems_bdbuf_discard_buffer_after_access>
_Mutex_Release( mutex );
10fad4: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10fadb: e8 60 a3 ff ff call 109e40 <_Mutex_Release>
}
10fae0: 8b 5d fc mov -0x4(%ebp),%ebx
10fae3: 89 ec mov %ebp,%esp
10fae5: 5d pop %ebp
return RTEMS_SUCCESSFUL;
10fae6: 31 c0 xor %eax,%eax
}
10fae8: c3 ret
10fae9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
switch (bd->state)
10faf0: 83 f8 02 cmp $0x2,%eax
10faf3: 77 0b ja 10fb00 <rtems_bdbuf_sync+0x60> <== ALWAYS TAKEN
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_5);
10faf5: ba 0c 00 00 00 mov $0xc,%edx <== NOT EXECUTED
10fafa: e8 f1 da ff ff call 10d5f0 <rtems_bdbuf_fatal_with_state> <== NOT EXECUTED
10faff: 90 nop <== NOT EXECUTED
bd->state = state;
10fb00: c7 43 20 08 00 00 00 movl $0x8,0x20(%ebx)
old_last = tail->previous;
10fb07: a1 20 4a 13 00 mov 0x134a20,%eax
the_node->next = tail;
10fb0c: c7 03 1c 4a 13 00 movl $0x134a1c,(%ebx)
tail->previous = the_node;
10fb12: 89 1d 20 4a 13 00 mov %ebx,0x134a20
old_last->next = the_node;
10fb18: 89 18 mov %ebx,(%eax)
the_node->previous = old_last;
10fb1a: 89 43 04 mov %eax,0x4(%ebx)
if (bd->waiters)
10fb1d: 8b 43 24 mov 0x24(%ebx),%eax
10fb20: 85 c0 test %eax,%eax
10fb22: 74 0d je 10fb31 <rtems_bdbuf_sync+0x91>
if (waiters->count > 0)
10fb24: a1 24 4a 13 00 mov 0x134a24,%eax
10fb29: 85 c0 test %eax,%eax
10fb2b: 0f 85 9f 00 00 00 jne 10fbd0 <rtems_bdbuf_sync+0x130>
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
10fb31: a1 a0 49 13 00 mov 0x1349a0,%eax
10fb36: b9 04 00 00 00 mov $0x4,%ecx
10fb3b: 89 4c 24 04 mov %ecx,0x4(%esp)
10fb3f: 89 04 24 mov %eax,(%esp)
10fb42: e8 99 13 00 00 call 110ee0 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10fb47: 85 c0 test %eax,%eax
10fb49: 0f 85 e3 00 00 00 jne 10fc32 <rtems_bdbuf_sync+0x192> <== NEVER TAKEN
switch (bd->state)
10fb4f: 8b 43 20 mov 0x20(%ebx),%eax
10fb52: 83 f8 07 cmp $0x7,%eax
10fb55: 77 19 ja 10fb70 <rtems_bdbuf_sync+0xd0>
10fb57: 85 c0 test %eax,%eax
10fb59: 75 35 jne 10fb90 <rtems_bdbuf_sync+0xf0> <== ALWAYS TAKEN
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_9);
10fb5b: ba 10 00 00 00 mov $0x10,%edx <== NOT EXECUTED
10fb60: e8 8b da ff ff call 10d5f0 <rtems_bdbuf_fatal_with_state> <== NOT EXECUTED
10fb65: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10fb6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
switch (bd->state)
10fb70: 8d 50 f8 lea -0x8(%eax),%edx
10fb73: 83 fa 02 cmp $0x2,%edx
10fb76: 77 e3 ja 10fb5b <rtems_bdbuf_sync+0xbb> <== NEVER TAKEN
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
10fb78: ba 3c 4a 13 00 mov $0x134a3c,%edx
10fb7d: 89 d8 mov %ebx,%eax
10fb7f: e8 6c de ff ff call 10d9f0 <rtems_bdbuf_wait>
break;
10fb84: eb c9 jmp 10fb4f <rtems_bdbuf_sync+0xaf>
10fb86: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10fb8d: 8d 76 00 lea 0x0(%esi),%esi
if (bd->waiters == 0
10fb90: 8b 53 24 mov 0x24(%ebx),%edx
10fb93: 85 d2 test %edx,%edx
10fb95: 0f 85 39 ff ff ff jne 10fad4 <rtems_bdbuf_sync+0x34>
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
10fb9b: 8d 50 ff lea -0x1(%eax),%edx
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
10fb9e: 83 fa 01 cmp $0x1,%edx
10fba1: 0f 87 2d ff ff ff ja 10fad4 <rtems_bdbuf_sync+0x34> <== NEVER TAKEN
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
10fba7: 48 dec %eax
10fba8: 74 56 je 10fc00 <rtems_bdbuf_sync+0x160>
if (waiters->count > 0)
10fbaa: a1 54 4a 13 00 mov 0x134a54,%eax
10fbaf: 85 c0 test %eax,%eax
10fbb1: 0f 84 1d ff ff ff je 10fad4 <rtems_bdbuf_sync+0x34>
_Condition_Broadcast( condition_variable );
10fbb7: c7 04 24 58 4a 13 00 movl $0x134a58,(%esp)
10fbbe: e8 cd 17 00 00 call 111390 <_Condition_Broadcast>
}
10fbc3: e9 0c ff ff ff jmp 10fad4 <rtems_bdbuf_sync+0x34>
10fbc8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10fbcf: 90 nop
_Condition_Broadcast( condition_variable );
10fbd0: c7 04 24 28 4a 13 00 movl $0x134a28,(%esp)
10fbd7: e8 b4 17 00 00 call 111390 <_Condition_Broadcast>
}
10fbdc: e9 50 ff ff ff jmp 10fb31 <rtems_bdbuf_sync+0x91>
10fbe1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10fbe8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10fbef: 90 nop
}
10fbf0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10fbf3: 89 ec mov %ebp,%esp <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
10fbf5: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
}
10fbfa: 5d pop %ebp <== NOT EXECUTED
10fbfb: c3 ret <== NOT EXECUTED
10fbfc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
10fc00: 8b 53 18 mov 0x18(%ebx),%edx
10fc03: 8b 43 14 mov 0x14(%ebx),%eax
10fc06: e8 15 da ff ff call 10d620 <rtems_bdbuf_avl_remove.constprop.0.isra.0>
10fc0b: 85 c0 test %eax,%eax
10fc0d: 75 2d jne 10fc3c <rtems_bdbuf_sync+0x19c> <== NEVER TAKEN
bd->state = state;
10fc0f: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
before_node = after_node->next;
10fc16: a1 00 4a 13 00 mov 0x134a00,%eax
the_node->previous = after_node;
10fc1b: c7 43 04 00 4a 13 00 movl $0x134a00,0x4(%ebx)
after_node->next = the_node;
10fc22: 89 1d 00 4a 13 00 mov %ebx,0x134a00
the_node->next = before_node;
10fc28: 89 03 mov %eax,(%ebx)
before_node->previous = the_node;
10fc2a: 89 58 04 mov %ebx,0x4(%eax)
}
10fc2d: e9 78 ff ff ff jmp 10fbaa <rtems_bdbuf_sync+0x10a>
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_1);
10fc32: b8 07 00 00 00 mov $0x7,%eax <== NOT EXECUTED
10fc37: e8 94 d9 ff ff call 10d5d0 <rtems_bdbuf_fatal> <== NOT EXECUTED
10fc3c: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
10fc3f: e8 9c dd ff ff call 10d9e0 <rtems_bdbuf_remove_from_tree.part.0.isra.0><== NOT EXECUTED
10fc44: 90 nop
10fc45: 90 nop
10fc46: 90 nop
10fc47: 90 nop
10fc48: 90 nop
10fc49: 90 nop
10fc4a: 90 nop
10fc4b: 90 nop
10fc4c: 90 nop
10fc4d: 90 nop
10fc4e: 90 nop
10fc4f: 90 nop
0010fc50 <rtems_bdbuf_syncdev>:
{
10fc50: 55 push %ebp
10fc51: 89 e5 mov %esp,%ebp
10fc53: 83 ec 28 sub $0x28,%esp
_Mutex_Acquire( mutex );
10fc56: c7 04 24 dc 49 13 00 movl $0x1349dc,(%esp)
10fc5d: e8 6e a1 ff ff call 109dd0 <_Mutex_Acquire>
10fc62: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10fc69: e8 62 a1 ff ff call 109dd0 <_Mutex_Acquire>
bdbuf_cache.sync_active = true;
10fc6e: b1 01 mov $0x1,%cl
10fc70: 88 0d f0 49 13 00 mov %cl,0x1349f0
bdbuf_cache.sync_requester = rtems_task_self ();
10fc76: e8 e5 15 00 00 call 111260 <rtems_task_self>
10fc7b: a3 f4 49 13 00 mov %eax,0x1349f4
bdbuf_cache.sync_device = dd;
10fc80: 8b 45 08 mov 0x8(%ebp),%eax
10fc83: a3 f8 49 13 00 mov %eax,0x1349f8
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
10fc88: b8 04 00 00 00 mov $0x4,%eax
10fc8d: 89 44 24 04 mov %eax,0x4(%esp)
10fc91: a1 a0 49 13 00 mov 0x1349a0,%eax
10fc96: 89 04 24 mov %eax,(%esp)
10fc99: e8 42 12 00 00 call 110ee0 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10fc9e: 85 c0 test %eax,%eax
10fca0: 75 41 jne 10fce3 <rtems_bdbuf_syncdev+0x93> <== NEVER TAKEN
_Mutex_Release( mutex );
10fca2: c7 04 24 c8 49 13 00 movl $0x1349c8,(%esp)
10fca9: e8 92 a1 ff ff call 109e40 <_Mutex_Release>
return rtems_event_system_receive(
10fcae: 8d 45 f4 lea -0xc(%ebp),%eax
10fcb1: 31 d2 xor %edx,%edx
10fcb3: 89 44 24 0c mov %eax,0xc(%esp)
10fcb7: 31 c0 xor %eax,%eax
10fcb9: 89 44 24 08 mov %eax,0x8(%esp)
10fcbd: 89 54 24 04 mov %edx,0x4(%esp)
10fcc1: c7 04 24 00 00 00 80 movl $0x80000000,(%esp)
10fcc8: e8 53 13 00 00 call 111020 <rtems_event_system_receive>
if (sc != RTEMS_SUCCESSFUL)
10fccd: 85 c0 test %eax,%eax
10fccf: 75 1c jne 10fced <rtems_bdbuf_syncdev+0x9d> <== NEVER TAKEN
10fcd1: c7 04 24 dc 49 13 00 movl $0x1349dc,(%esp)
10fcd8: e8 63 a1 ff ff call 109e40 <_Mutex_Release>
}
10fcdd: 89 ec mov %ebp,%esp
10fcdf: 31 c0 xor %eax,%eax
10fce1: 5d pop %ebp
10fce2: c3 ret
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_1);
10fce3: b8 07 00 00 00 mov $0x7,%eax <== NOT EXECUTED
10fce8: e8 e3 d8 ff ff call 10d5d0 <rtems_bdbuf_fatal> <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_TRANS_EVNT);
10fced: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
10fcf2: e8 d9 d8 ff ff call 10d5d0 <rtems_bdbuf_fatal> <== NOT EXECUTED
10fcf7: 90 nop
10fcf8: 90 nop
10fcf9: 90 nop
10fcfa: 90 nop
10fcfb: 90 nop
10fcfc: 90 nop
10fcfd: 90 nop
10fcfe: 90 nop
10fcff: 90 nop
001008a0 <rtems_bdpart_create>:
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
1008a0: 55 push %ebp
1008a1: 89 e5 mov %esp,%ebp
1008a3: 57 push %edi
1008a4: 56 push %esi
1008a5: 53 push %ebx
1008a6: 83 ec 4c sub $0x4c,%esp
1008a9: 8b 7d 0c mov 0xc(%ebp),%edi
1008ac: 8b 75 18 mov 0x18(%ebp),%esi
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
1008af: 85 ff test %edi,%edi
1008b1: 74 0a je 1008bd <rtems_bdpart_create+0x1d> <== NEVER TAKEN
&& format->type == RTEMS_BDPART_FORMAT_MBR
1008b3: 8b 07 mov (%edi),%eax
1008b5: 85 c0 test %eax,%eax
1008b7: 0f 84 63 01 00 00 je 100a20 <rtems_bdpart_create+0x180> <== ALWAYS TAKEN
&& format->mbr.dos_compatibility;
1008bd: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum overhead = 0;
rtems_blkdev_bnum free_space = 0;
size_t i = 0;
/* Check if we have something to do */
if (count == 0) {
1008c4: 85 f6 test %esi,%esi <== NOT EXECUTED
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
1008c6: c7 45 d4 01 00 00 00 movl $0x1,-0x2c(%ebp) <== NOT EXECUTED
1008cd: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
if (count == 0) {
1008d4: 0f 84 6e 01 00 00 je 100a48 <rtems_bdpart_create+0x1a8> <== NOT EXECUTED
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
1008da: 8b 45 10 mov 0x10(%ebp),%eax
1008dd: 85 c0 test %eax,%eax
1008df: 8b 45 14 mov 0x14(%ebp),%eax
1008e2: 0f 94 c2 sete %dl
1008e5: 85 c0 test %eax,%eax
1008e7: 0f 94 c0 sete %al
1008ea: 08 c2 or %al,%dl
1008ec: 0f 85 6e 01 00 00 jne 100a60 <rtems_bdpart_create+0x1c0> <== NEVER TAKEN
1008f2: 85 ff test %edi,%edi
1008f4: 0f 84 66 01 00 00 je 100a60 <rtems_bdpart_create+0x1c0> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, NULL, NULL, &disk_end);
1008fa: 8d 45 e4 lea -0x1c(%ebp),%eax
1008fd: 89 44 24 0c mov %eax,0xc(%esp)
100901: 31 c0 xor %eax,%eax
100903: 89 44 24 08 mov %eax,0x8(%esp)
100907: 31 c0 xor %eax,%eax
100909: 89 44 24 04 mov %eax,0x4(%esp)
10090d: 8b 45 08 mov 0x8(%ebp),%eax
100910: 89 04 24 mov %eax,(%esp)
100913: e8 d8 05 00 00 call 100ef0 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
100918: 85 c0 test %eax,%eax
sc = rtems_bdpart_get_disk_data( disk_name, NULL, NULL, &disk_end);
10091a: 89 c2 mov %eax,%edx
if (sc != RTEMS_SUCCESSFUL) {
10091c: 0f 85 43 01 00 00 jne 100a65 <rtems_bdpart_create+0x1c5> <== NEVER TAKEN
100922: 89 75 18 mov %esi,0x18(%ebp)
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
100925: 31 c9 xor %ecx,%ecx
100927: 8b 75 14 mov 0x14(%ebp),%esi
10092a: 89 7d 0c mov %edi,0xc(%ebp)
10092d: eb 03 jmp 100932 <rtems_bdpart_create+0x92>
10092f: 90 nop
100930: 89 d9 mov %ebx,%ecx
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
100932: 8b 04 8e mov (%esi,%ecx,4),%eax
100935: 89 d7 mov %edx,%edi
100937: 31 db xor %ebx,%ebx
100939: 01 c7 add %eax,%edi
10093b: 0f 82 8f 01 00 00 jb 100ad0 <rtems_bdpart_create+0x230> <== NEVER TAKEN
if (dist_sum < prev_sum) {
return RTEMS_INVALID_NUMBER;
}
if (dist [i] == 0) {
100941: 85 c0 test %eax,%eax
dist_sum += dist [i];
100943: 89 fa mov %edi,%edx
if (dist [i] == 0) {
100945: 0f 84 c4 00 00 00 je 100a0f <rtems_bdpart_create+0x16f> <== NEVER TAKEN
10094b: 85 db test %ebx,%ebx
10094d: 0f 85 bc 00 00 00 jne 100a0f <rtems_bdpart_create+0x16f> <== NEVER TAKEN
for (i = 0; i < count; ++i) {
100953: 8d 59 01 lea 0x1(%ecx),%ebx
100956: 39 5d 18 cmp %ebx,0x18(%ebp)
100959: 75 d5 jne 100930 <rtems_bdpart_create+0x90>
return RTEMS_INVALID_NUMBER;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
10095b: 89 7d cc mov %edi,-0x34(%ebp)
10095e: 8b 7d 0c mov 0xc(%ebp),%edi
100961: 8b 37 mov (%edi),%esi
100963: 85 f6 test %esi,%esi
100965: 0f 85 25 01 00 00 jne 100a90 <rtems_bdpart_create+0x1f0> <== NEVER TAKEN
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
10096b: 8b 55 d0 mov -0x30(%ebp),%edx
disk_end -= (disk_end % record_space);
10096e: 8b 45 e4 mov -0x1c(%ebp),%eax
if (dos_compatibility) {
100971: 85 d2 test %edx,%edx
disk_end -= (disk_end % record_space);
100973: 89 45 c0 mov %eax,-0x40(%ebp)
100976: 89 c7 mov %eax,%edi
if (dos_compatibility) {
100978: 0f 85 f2 00 00 00 jne 100a70 <rtems_bdpart_create+0x1d0> <== ALWAYS TAKEN
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
10097e: 83 fb 04 cmp $0x4,%ebx <== NOT EXECUTED
100981: 0f 87 27 01 00 00 ja 100aae <rtems_bdpart_create+0x20e> <== NOT EXECUTED
overhead += record_space;
100987: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
if (dos_compatibility) {
overhead += (count - 1) * record_space;
}
/* Check disk space */
if ((overhead + count) > disk_end) {
10098a: 8b 75 c0 mov -0x40(%ebp),%esi
10098d: 8d 14 18 lea (%eax,%ebx,1),%edx
100990: 39 f2 cmp %esi,%edx
100992: 0f 87 31 01 00 00 ja 100ac9 <rtems_bdpart_create+0x229> <== NEVER TAKEN
/* Begin of first primary partition */
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
100998: 89 5d c8 mov %ebx,-0x38(%ebp)
10099b: 29 c6 sub %eax,%esi
pos = record_space;
10099d: 8b 45 d4 mov -0x2c(%ebp),%eax
free_space = disk_end - overhead;
1009a0: 89 75 d0 mov %esi,-0x30(%ebp)
for (i = 0; i < count; ++i) {
1009a3: 31 ff xor %edi,%edi
1009a5: 8b 75 10 mov 0x10(%ebp),%esi
1009a8: 89 4d c4 mov %ecx,-0x3c(%ebp)
1009ab: 89 c3 mov %eax,%ebx
1009ad: eb 48 jmp 1009f7 <rtems_bdpart_create+0x157>
1009af: 90 nop
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
/* Ensure that the partition is not empty */
if (s == 0) {
1009b0: 8b 55 cc mov -0x34(%ebp),%edx
s = 1;
1009b3: b9 01 00 00 00 mov $0x1,%ecx
if (s == 0) {
1009b8: 39 d0 cmp %edx,%eax
1009ba: 72 08 jb 1009c4 <rtems_bdpart_create+0x124> <== NEVER TAKEN
s /= dist_sum;
1009bc: 89 d1 mov %edx,%ecx
1009be: 31 d2 xor %edx,%edx
1009c0: f7 f1 div %ecx
1009c2: 89 c1 mov %eax,%ecx
}
/* Align partition upwards */
s += record_space - (s % record_space);
1009c4: 89 c8 mov %ecx,%eax
1009c6: 31 d2 xor %edx,%edx
1009c8: f7 75 d4 divl -0x2c(%ebp)
1009cb: 8b 45 d4 mov -0x2c(%ebp),%eax
1009ce: 01 c1 add %eax,%ecx
1009d0: 29 d1 sub %edx,%ecx
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
1009d2: 83 7d c8 04 cmpl $0x4,-0x38(%ebp)
1009d6: 76 07 jbe 1009df <rtems_bdpart_create+0x13f> <== NEVER TAKEN
1009d8: 83 ff 02 cmp $0x2,%edi
1009db: 76 02 jbe 1009df <rtems_bdpart_create+0x13f>
pos += record_space;
1009dd: 01 c3 add %eax,%ebx
}
/* Partition begin and end */
p->begin = pos;
1009df: 89 1e mov %ebx,(%esi)
pos += s;
1009e1: 01 cb add %ecx,%ebx
for (i = 0; i < count; ++i) {
1009e3: 83 c6 30 add $0x30,%esi
p->end = pos;
1009e6: 89 5e d4 mov %ebx,-0x2c(%esi)
for (i = 0; i < count; ++i) {
1009e9: 8d 47 01 lea 0x1(%edi),%eax
1009ec: 39 7d c4 cmp %edi,-0x3c(%ebp)
1009ef: 0f 84 a2 00 00 00 je 100a97 <rtems_bdpart_create+0x1f7>
1009f5: 89 c7 mov %eax,%edi
rtems_blkdev_bnum s = free_space * dist [i];
1009f7: 8b 45 14 mov 0x14(%ebp),%eax
1009fa: 8b 4d d0 mov -0x30(%ebp),%ecx
1009fd: 8b 14 b8 mov (%eax,%edi,4),%edx
100a00: 89 c8 mov %ecx,%eax
100a02: 0f af c2 imul %edx,%eax
if (s < free_space || s < dist [i]) {
100a05: 39 ca cmp %ecx,%edx
100a07: 73 02 jae 100a0b <rtems_bdpart_create+0x16b> <== NEVER TAKEN
100a09: 89 ca mov %ecx,%edx
100a0b: 39 d0 cmp %edx,%eax
100a0d: 73 a1 jae 1009b0 <rtems_bdpart_create+0x110> <== ALWAYS TAKEN
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
return RTEMS_SUCCESSFUL;
}
100a0f: 83 c4 4c add $0x4c,%esp <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
100a12: ba 0a 00 00 00 mov $0xa,%edx <== NOT EXECUTED
}
100a17: 5b pop %ebx <== NOT EXECUTED
100a18: 89 d0 mov %edx,%eax <== NOT EXECUTED
100a1a: 5e pop %esi <== NOT EXECUTED
100a1b: 5f pop %edi <== NOT EXECUTED
100a1c: 5d pop %ebp <== NOT EXECUTED
100a1d: c3 ret <== NOT EXECUTED
100a1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
&& format->mbr.dos_compatibility;
100a20: 80 7f 08 01 cmpb $0x1,0x8(%edi)
100a24: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
100a2b: 19 c0 sbb %eax,%eax
100a2d: 40 inc %eax
100a2e: 80 7f 08 01 cmpb $0x1,0x8(%edi)
100a32: 89 45 d0 mov %eax,-0x30(%ebp)
100a35: 19 c0 sbb %eax,%eax
100a37: 83 e0 c2 and $0xffffffc2,%eax
100a3a: 83 c0 3f add $0x3f,%eax
if (count == 0) {
100a3d: 85 f6 test %esi,%esi
&& format->mbr.dos_compatibility;
100a3f: 89 45 d4 mov %eax,-0x2c(%ebp)
if (count == 0) {
100a42: 0f 85 92 fe ff ff jne 1008da <rtems_bdpart_create+0x3a> <== ALWAYS TAKEN
}
100a48: 83 c4 4c add $0x4c,%esp <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
100a4b: 31 d2 xor %edx,%edx <== NOT EXECUTED
}
100a4d: 5b pop %ebx <== NOT EXECUTED
100a4e: 89 d0 mov %edx,%eax <== NOT EXECUTED
100a50: 5e pop %esi <== NOT EXECUTED
100a51: 5f pop %edi <== NOT EXECUTED
100a52: 5d pop %ebp <== NOT EXECUTED
100a53: c3 ret <== NOT EXECUTED
100a54: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100a5b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100a5f: 90 nop <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
100a60: ba 09 00 00 00 mov $0x9,%edx <== NOT EXECUTED
}
100a65: 83 c4 4c add $0x4c,%esp
100a68: 89 d0 mov %edx,%eax
100a6a: 5b pop %ebx
100a6b: 5e pop %esi
100a6c: 5f pop %edi
100a6d: 5d pop %ebp
100a6e: c3 ret
100a6f: 90 nop
disk_end -= (disk_end % record_space);
100a70: 8b 75 d4 mov -0x2c(%ebp),%esi
100a73: 31 d2 xor %edx,%edx
100a75: f7 f6 div %esi
100a77: 29 d7 sub %edx,%edi
if (count > 4) {
100a79: 83 fb 04 cmp $0x4,%ebx
disk_end -= (disk_end % record_space);
100a7c: 89 7d c0 mov %edi,-0x40(%ebp)
if (count > 4) {
100a7f: 77 3b ja 100abc <rtems_bdpart_create+0x21c> <== ALWAYS TAKEN
overhead += record_space;
100a81: 89 f2 mov %esi,%edx <== NOT EXECUTED
overhead += (count - 1) * record_space;
100a83: 8b 45 d4 mov -0x2c(%ebp),%eax
100a86: 0f af c1 imul %ecx,%eax
100a89: 01 d0 add %edx,%eax
100a8b: e9 fa fe ff ff jmp 10098a <rtems_bdpart_create+0xea>
return RTEMS_NOT_IMPLEMENTED;
100a90: ba 18 00 00 00 mov $0x18,%edx <== NOT EXECUTED
100a95: eb ce jmp 100a65 <rtems_bdpart_create+0x1c5> <== NOT EXECUTED
pt [count - 1].end = disk_end;
100a97: 8b 5d c8 mov -0x38(%ebp),%ebx
return RTEMS_SUCCESSFUL;
100a9a: 31 d2 xor %edx,%edx
pt [count - 1].end = disk_end;
100a9c: 8b 75 10 mov 0x10(%ebp),%esi
100a9f: 8d 04 5b lea (%ebx,%ebx,2),%eax
100aa2: 8b 5d c0 mov -0x40(%ebp),%ebx
100aa5: c1 e0 04 shl $0x4,%eax
100aa8: 89 5c 06 d4 mov %ebx,-0x2c(%esi,%eax,1)
return RTEMS_SUCCESSFUL;
100aac: eb b7 jmp 100a65 <rtems_bdpart_create+0x1c5>
overhead += (count - 3) * record_space;
100aae: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
100ab1: 8d 41 ff lea -0x1(%ecx),%eax <== NOT EXECUTED
100ab4: 0f af c2 imul %edx,%eax <== NOT EXECUTED
if (dos_compatibility) {
100ab7: e9 ce fe ff ff jmp 10098a <rtems_bdpart_create+0xea> <== NOT EXECUTED
overhead += (count - 3) * record_space;
100abc: 8b 75 d4 mov -0x2c(%ebp),%esi
100abf: 8d 41 ff lea -0x1(%ecx),%eax
100ac2: 0f af c6 imul %esi,%eax
100ac5: 89 c2 mov %eax,%edx
if (dos_compatibility) {
100ac7: eb ba jmp 100a83 <rtems_bdpart_create+0x1e3>
return RTEMS_IO_ERROR;
100ac9: ba 1b 00 00 00 mov $0x1b,%edx <== NOT EXECUTED
100ace: eb 95 jmp 100a65 <rtems_bdpart_create+0x1c5> <== NOT EXECUTED
100ad0: bb 01 00 00 00 mov $0x1,%ebx <== NOT EXECUTED
100ad5: e9 67 fe ff ff jmp 100941 <rtems_bdpart_create+0xa1> <== NOT EXECUTED
100ada: 90 nop
100adb: 90 nop
100adc: 90 nop
100add: 90 nop
100ade: 90 nop
100adf: 90 nop
00100ae0 <rtems_bdpart_dump>:
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
100ae0: 55 push %ebp
100ae1: 89 e5 mov %esp,%ebp
100ae3: 57 push %edi
100ae4: 56 push %esi
100ae5: 53 push %ebx
100ae6: 83 ec 6c sub $0x6c,%esp
size_t i = 0;
printf(
100ae9: c7 04 24 88 ad 12 00 movl $0x12ad88,(%esp)
{
100af0: 8b 45 0c mov 0xc(%ebp),%eax
100af3: 8b 75 08 mov 0x8(%ebp),%esi
100af6: 89 45 a4 mov %eax,-0x5c(%ebp)
100af9: 89 c7 mov %eax,%edi
printf(
100afb: e8 80 fd ff ff call 100880 <__wrap_puts>
"------------+------------+-----------------------------------------------------\n"
" BEGIN | LAST | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
100b00: 85 ff test %edi,%edi
100b02: 0f 84 a4 00 00 00 je 100bac <rtems_bdpart_dump+0xcc> <== NEVER TAKEN
100b08: 83 c6 08 add $0x8,%esi
100b0b: 31 db xor %ebx,%ebx
100b0d: 8d 7d b3 lea -0x4d(%ebp),%edi
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
100b10: 89 7c 24 04 mov %edi,0x4(%esp)
100b14: 89 34 24 mov %esi,(%esp)
uint8_t type_mbr = 0;
100b17: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
100b1b: e8 90 03 00 00 call 100eb0 <rtems_bdpart_to_mbr_partition_type>
100b20: 84 c0 test %al,%al
100b22: 0f 84 d8 00 00 00 je 100c00 <rtems_bdpart_dump+0x120> <== NEVER TAKEN
switch (type_mbr) {
100b28: 0f b6 45 b3 movzbl -0x4d(%ebp),%eax
100b2c: 3c 0e cmp $0xe,%al
100b2e: 77 20 ja 100b50 <rtems_bdpart_dump+0x70> <== NEVER TAKEN
100b30: 84 c0 test %al,%al
100b32: 0f 84 e8 00 00 00 je 100c20 <rtems_bdpart_dump+0x140> <== NEVER TAKEN
100b38: 3c 0e cmp $0xe,%al
100b3a: 77 1d ja 100b59 <rtems_bdpart_dump+0x79> <== NEVER TAKEN
100b3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
100b40: ff 24 85 c8 ae 12 00 jmp *0x12aec8(,%eax,4)
100b47: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
100b4e: 66 90 xchg %ax,%ax
100b50: 3c da cmp $0xda,%al <== NOT EXECUTED
break;
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
100b52: b9 63 ad 12 00 mov $0x12ad63,%ecx <== NOT EXECUTED
switch (type_mbr) {
100b57: 74 27 je 100b80 <rtems_bdpart_dump+0xa0> <== NOT EXECUTED
100b59: 89 44 24 0c mov %eax,0xc(%esp) <== NOT EXECUTED
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
100b5d: b8 68 ad 12 00 mov $0x12ad68,%eax <== NOT EXECUTED
100b62: ba 34 00 00 00 mov $0x34,%edx <== NOT EXECUTED
100b67: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
100b6b: 8d 45 b4 lea -0x4c(%ebp),%eax <== NOT EXECUTED
100b6e: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
100b72: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
100b75: e8 96 ef 01 00 call 11fb10 <snprintf> <== NOT EXECUTED
type = type_buffer;
100b7a: 8d 4d b4 lea -0x4c(%ebp),%ecx <== NOT EXECUTED
100b7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
100b80: 89 4c 24 0c mov %ecx,0xc(%esp)
for (i = 0; i < count; ++i) {
100b84: 43 inc %ebx
100b85: 83 c6 30 add $0x30,%esi
printf(
100b88: 8b 46 cc mov -0x34(%esi),%eax
100b8b: 48 dec %eax
100b8c: 89 44 24 08 mov %eax,0x8(%esp)
100b90: 8b 46 c8 mov -0x38(%esi),%eax
100b93: c7 04 24 71 ad 12 00 movl $0x12ad71,(%esp)
100b9a: 89 44 24 04 mov %eax,0x4(%esp)
100b9e: e8 ad fc ff ff call 100850 <__wrap_printf>
for (i = 0; i < count; ++i) {
100ba3: 39 5d a4 cmp %ebx,-0x5c(%ebp)
100ba6: 0f 85 64 ff ff ff jne 100b10 <rtems_bdpart_dump+0x30>
p->end - 1U,
type
);
}
puts( "------------+------------+-----------------------------------------------------");
100bac: c7 45 08 78 ae 12 00 movl $0x12ae78,0x8(%ebp)
}
100bb3: 83 c4 6c add $0x6c,%esp
100bb6: 5b pop %ebx
100bb7: 5e pop %esi
100bb8: 5f pop %edi
100bb9: 5d pop %ebp
puts( "------------+------------+-----------------------------------------------------");
100bba: e9 c1 fc ff ff jmp 100880 <__wrap_puts>
100bbf: 90 nop
type = "FAT 16 LBA";
100bc0: b9 3f ad 12 00 mov $0x12ad3f,%ecx <== NOT EXECUTED
break;
100bc5: eb b9 jmp 100b80 <rtems_bdpart_dump+0xa0> <== NOT EXECUTED
100bc7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100bce: 66 90 xchg %ax,%ax <== NOT EXECUTED
type = "FAT 32 LBA";
100bd0: b9 51 ad 12 00 mov $0x12ad51,%ecx <== NOT EXECUTED
break;
100bd5: eb a9 jmp 100b80 <rtems_bdpart_dump+0xa0> <== NOT EXECUTED
100bd7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100bde: 66 90 xchg %ax,%ax <== NOT EXECUTED
type = "FAT 32";
100be0: b9 5c ad 12 00 mov $0x12ad5c,%ecx
break;
100be5: eb 99 jmp 100b80 <rtems_bdpart_dump+0xa0>
100be7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
100bee: 66 90 xchg %ax,%ax
type = "FAT 12";
100bf0: b9 38 ad 12 00 mov $0x12ad38,%ecx <== NOT EXECUTED
100bf5: eb 89 jmp 100b80 <rtems_bdpart_dump+0xa0> <== NOT EXECUTED
100bf7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100bfe: 66 90 xchg %ax,%ax <== NOT EXECUTED
uuid_unparse_lower( type, str);
100c00: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
100c03: 8d 45 b4 lea -0x4c(%ebp),%eax <== NOT EXECUTED
100c06: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
100c0a: e8 71 72 00 00 call 107e80 <uuid_unparse_lower> <== NOT EXECUTED
type = type_buffer;
100c0f: 8d 4d b4 lea -0x4c(%ebp),%ecx <== NOT EXECUTED
100c12: e9 69 ff ff ff jmp 100b80 <rtems_bdpart_dump+0xa0> <== NOT EXECUTED
100c17: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100c1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
100c20: 31 c0 xor %eax,%eax <== NOT EXECUTED
100c22: e9 32 ff ff ff jmp 100b59 <rtems_bdpart_dump+0x79> <== NOT EXECUTED
100c27: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100c2e: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch (type_mbr) {
100c30: b9 4a ad 12 00 mov $0x12ad4a,%ecx <== NOT EXECUTED
100c35: e9 46 ff ff ff jmp 100b80 <rtems_bdpart_dump+0xa0> <== NOT EXECUTED
100c3a: 90 nop
100c3b: 90 nop
100c3c: 90 nop
100c3d: 90 nop
100c3e: 90 nop
100c3f: 90 nop
00100ef0 <rtems_bdpart_get_disk_data>:
{
100ef0: 55 push %ebp
fd = open( disk_name, O_RDWR);
100ef1: b8 02 00 00 00 mov $0x2,%eax
{
100ef6: 89 e5 mov %esp,%ebp
100ef8: 56 push %esi
100ef9: 53 push %ebx
100efa: 83 ec 20 sub $0x20,%esp
fd = open( disk_name, O_RDWR);
100efd: 89 44 24 04 mov %eax,0x4(%esp)
100f01: 8b 45 08 mov 0x8(%ebp),%eax
rtems_disk_device *dd = NULL;
100f04: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
fd = open( disk_name, O_RDWR);
100f0b: 89 04 24 mov %eax,(%esp)
100f0e: e8 1d 34 00 00 call 104330 <open>
if (fd < 0) {
100f13: 85 c0 test %eax,%eax
100f15: 0f 88 85 00 00 00 js 100fa0 <rtems_bdpart_get_disk_data+0xb0> <== NEVER TAKEN
100f1b: 89 c3 mov %eax,%ebx
100f1d: be 09 42 04 40 mov $0x40044209,%esi
100f22: 89 74 24 04 mov %esi,0x4(%esp)
100f26: 8d 45 f4 lea -0xc(%ebp),%eax
100f29: 89 44 24 08 mov %eax,0x8(%esp)
100f2d: 89 1c 24 mov %ebx,(%esp)
100f30: e8 2b 26 00 00 call 103560 <ioctl>
if (rv != 0) {
100f35: 85 c0 test %eax,%eax
100f37: 75 47 jne 100f80 <rtems_bdpart_get_disk_data+0x90> <== NEVER TAKEN
disk_begin = dd->start;
100f39: 8b 45 f4 mov -0xc(%ebp),%eax
*disk_end = dd->size;
100f3c: 8b 55 14 mov 0x14(%ebp),%edx
100f3f: 8b 48 1c mov 0x1c(%eax),%ecx
disk_begin = dd->start;
100f42: 8b 70 18 mov 0x18(%eax),%esi
*disk_end = dd->size;
100f45: 89 0a mov %ecx,(%edx)
if (disk_begin != 0) {
100f47: 81 78 24 ff 01 00 00 cmpl $0x1ff,0x24(%eax)
100f4e: 76 60 jbe 100fb0 <rtems_bdpart_get_disk_data+0xc0> <== NEVER TAKEN
100f50: 85 f6 test %esi,%esi
100f52: 75 5c jne 100fb0 <rtems_bdpart_get_disk_data+0xc0> <== NEVER TAKEN
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
100f54: 8b 4d 0c mov 0xc(%ebp),%ecx
100f57: 85 c9 test %ecx,%ecx
100f59: 74 65 je 100fc0 <rtems_bdpart_get_disk_data+0xd0>
100f5b: 8b 55 10 mov 0x10(%ebp),%edx
100f5e: 85 d2 test %edx,%edx
100f60: 74 5e je 100fc0 <rtems_bdpart_get_disk_data+0xd0> <== NEVER TAKEN
*fd_ptr = fd;
100f62: 8b 55 0c mov 0xc(%ebp),%edx
*dd_ptr = dd;
100f65: 8b 4d 10 mov 0x10(%ebp),%ecx
*fd_ptr = fd;
100f68: 89 1a mov %ebx,(%edx)
*dd_ptr = dd;
100f6a: 89 01 mov %eax,(%ecx)
}
100f6c: 83 c4 20 add $0x20,%esp
100f6f: 89 f0 mov %esi,%eax
100f71: 5b pop %ebx
100f72: 5e pop %esi
100f73: 5d pop %ebp
100f74: c3 ret
100f75: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
100f7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
sc = RTEMS_INVALID_NAME;
100f80: be 03 00 00 00 mov $0x3,%esi <== NOT EXECUTED
close( fd);
100f85: 89 1c 24 mov %ebx,(%esp)
100f88: e8 a3 21 00 00 call 103130 <close>
}
100f8d: 83 c4 20 add $0x20,%esp
100f90: 89 f0 mov %esi,%eax
100f92: 5b pop %ebx
100f93: 5e pop %esi
100f94: 5d pop %ebp
100f95: c3 ret
100f96: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
100f9d: 8d 76 00 lea 0x0(%esi),%esi
100fa0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
sc = RTEMS_INVALID_NAME;
100fa3: be 03 00 00 00 mov $0x3,%esi <== NOT EXECUTED
}
100fa8: 5b pop %ebx <== NOT EXECUTED
100fa9: 89 f0 mov %esi,%eax <== NOT EXECUTED
100fab: 5e pop %esi <== NOT EXECUTED
100fac: 5d pop %ebp <== NOT EXECUTED
100fad: c3 ret <== NOT EXECUTED
100fae: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = RTEMS_IO_ERROR;
100fb0: be 1b 00 00 00 mov $0x1b,%esi <== NOT EXECUTED
100fb5: eb ce jmp 100f85 <rtems_bdpart_get_disk_data+0x95> <== NOT EXECUTED
100fb7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100fbe: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
100fc0: 31 f6 xor %esi,%esi
100fc2: eb c1 jmp 100f85 <rtems_bdpart_get_disk_data+0x95>
100fc4: 90 nop
100fc5: 90 nop
100fc6: 90 nop
100fc7: 90 nop
100fc8: 90 nop
100fc9: 90 nop
100fca: 90 nop
100fcb: 90 nop
100fcc: 90 nop
100fcd: 90 nop
100fce: 90 nop
100fcf: 90 nop
00100fd0 <rtems_bdpart_read>:
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
100fd0: 55 push %ebp
100fd1: 89 e5 mov %esp,%ebp
100fd3: 57 push %edi
100fd4: 56 push %esi
100fd5: 53 push %ebx
100fd6: 83 ec 4c sub $0x4c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
100fd9: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
rtems_bdpart_partition *p = pt - 1;
100fe0: 8b 45 10 mov 0x10(%ebp),%eax
100fe3: 83 e8 30 sub $0x30,%eax
100fe6: 89 45 d4 mov %eax,-0x2c(%ebp)
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
100fe9: 8b 45 14 mov 0x14(%ebp),%eax
100fec: 85 c0 test %eax,%eax
100fee: 0f 84 ac 00 00 00 je 1010a0 <rtems_bdpart_read+0xd0> <== NEVER TAKEN
rtems_blkdev_bnum ep_begin = 0; /* Extended partition begin */
100ff4: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp)
const uint8_t *data = NULL;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
100ffb: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_blkdev_bnum disk_end = 0;
100ffe: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
101005: 8b 45 14 mov 0x14(%ebp),%eax
int fd = -1;
101008: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
rtems_disk_device *dd = NULL;
10100f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (format == NULL || pt == NULL || count == NULL) {
101016: 85 ff test %edi,%edi
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
101018: 8b 18 mov (%eax),%ebx
if (format == NULL || pt == NULL || count == NULL) {
10101a: 0f 84 80 00 00 00 je 1010a0 <rtems_bdpart_read+0xd0> <== NEVER TAKEN
101020: 8b 75 10 mov 0x10(%ebp),%esi
101023: 85 f6 test %esi,%esi
101025: 74 79 je 1010a0 <rtems_bdpart_read+0xd0> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Set count to a save value */
*count = 0;
101027: c7 00 00 00 00 00 movl $0x0,(%eax)
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
10102d: 8d 45 dc lea -0x24(%ebp),%eax
101030: 89 44 24 0c mov %eax,0xc(%esp)
101034: 8d 45 e4 lea -0x1c(%ebp),%eax
101037: 89 44 24 08 mov %eax,0x8(%esp)
10103b: 8d 45 e0 lea -0x20(%ebp),%eax
10103e: 89 44 24 04 mov %eax,0x4(%esp)
101042: 8b 45 08 mov 0x8(%ebp),%eax
101045: 89 04 24 mov %eax,(%esp)
101048: e8 a3 fe ff ff call 100ef0 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
10104d: 85 c0 test %eax,%eax
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
10104f: 89 c6 mov %eax,%esi
if (sc != RTEMS_SUCCESSFUL) {
101051: 74 0d je 101060 <rtems_bdpart_read+0x90> <== ALWAYS TAKEN
if (block != NULL) {
rtems_bdbuf_release( block);
}
return esc;
}
101053: 83 c4 4c add $0x4c,%esp <== NOT EXECUTED
101056: 89 f0 mov %esi,%eax <== NOT EXECUTED
101058: 5b pop %ebx <== NOT EXECUTED
101059: 5e pop %esi <== NOT EXECUTED
10105a: 5f pop %edi <== NOT EXECUTED
10105b: 5d pop %ebp <== NOT EXECUTED
10105c: c3 ret <== NOT EXECUTED
10105d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
sc = rtems_bdpart_read_record( dd, 0, &block);
101060: 8b 45 e4 mov -0x1c(%ebp),%eax
101063: 8d 4d d0 lea -0x30(%ebp),%ecx
101066: 31 d2 xor %edx,%edx
101068: e8 73 fd ff ff call 100de0 <rtems_bdpart_read_record>
if (sc != RTEMS_SUCCESSFUL) {
10106d: 85 c0 test %eax,%eax
sc = rtems_bdpart_read_record( dd, 0, &block);
10106f: 89 c6 mov %eax,%esi
if (sc != RTEMS_SUCCESSFUL) {
101071: 74 3d je 1010b0 <rtems_bdpart_read+0xe0> <== ALWAYS TAKEN
if (fd >= 0) {
101073: 8b 45 e0 mov -0x20(%ebp),%eax
101076: 85 c0 test %eax,%eax
101078: 0f 89 b2 01 00 00 jns 101230 <rtems_bdpart_read+0x260> <== ALWAYS TAKEN
if (block != NULL) {
10107e: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
101081: 85 c0 test %eax,%eax <== NOT EXECUTED
101083: 89 c7 mov %eax,%edi <== NOT EXECUTED
101085: 74 cc je 101053 <rtems_bdpart_read+0x83> <== NOT EXECUTED
rtems_bdbuf_release( block);
101087: 89 3c 24 mov %edi,(%esp)
10108a: e8 91 e8 00 00 call 10f920 <rtems_bdbuf_release>
}
10108f: 83 c4 4c add $0x4c,%esp
101092: 89 f0 mov %esi,%eax
101094: 5b pop %ebx
101095: 5e pop %esi
101096: 5f pop %edi
101097: 5d pop %ebp
101098: c3 ret
101099: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1010a0: 83 c4 4c add $0x4c,%esp <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
1010a3: be 09 00 00 00 mov $0x9,%esi <== NOT EXECUTED
}
1010a8: 5b pop %ebx <== NOT EXECUTED
1010a9: 89 f0 mov %esi,%eax <== NOT EXECUTED
1010ab: 5e pop %esi <== NOT EXECUTED
1010ac: 5f pop %edi <== NOT EXECUTED
1010ad: 5d pop %ebp <== NOT EXECUTED
1010ae: c3 ret <== NOT EXECUTED
1010af: 90 nop <== NOT EXECUTED
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
1010b0: 8b 4d 10 mov 0x10(%ebp),%ecx
1010b3: 8d 04 5b lea (%ebx,%ebx,2),%eax
1010b6: c1 e0 04 shl $0x4,%eax
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
1010b9: 8d 7d d8 lea -0x28(%ebp),%edi
1010bc: 8d 55 d4 lea -0x2c(%ebp),%edx
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
1010bf: 01 c8 add %ecx,%eax
1010c1: 89 45 c4 mov %eax,-0x3c(%ebp)
1010c4: 89 c1 mov %eax,%ecx
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
1010c6: 8b 45 d0 mov -0x30(%ebp),%eax
1010c9: 8b 40 1c mov 0x1c(%eax),%eax
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
1010cc: 89 3c 24 mov %edi,(%esp)
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
1010cf: 89 45 c0 mov %eax,-0x40(%ebp)
1010d2: 8d 98 be 01 00 00 lea 0x1be(%eax),%ebx
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
1010d8: 89 d8 mov %ebx,%eax
1010da: e8 61 fb ff ff call 100c40 <rtems_bdpart_read_mbr_partition>
if (sc != RTEMS_SUCCESSFUL) {
1010df: 85 c0 test %eax,%eax
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
1010e1: 89 c6 mov %eax,%esi
if (sc != RTEMS_SUCCESSFUL) {
1010e3: 75 8e jne 101073 <rtems_bdpart_read+0xa3> <== NEVER TAKEN
static inline uint8_t rtems_bdpart_mbr_partition_type(
const uuid_t type
)
{
return type [0];
1010e5: 8b 45 d4 mov -0x2c(%ebp),%eax
if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {
1010e8: 80 78 08 ee cmpb $0xee,0x8(%eax)
1010ec: 0f 84 73 01 00 00 je 101265 <rtems_bdpart_read+0x295> <== NEVER TAKEN
format->type = RTEMS_BDPART_FORMAT_MBR;
1010f2: 8b 45 0c mov 0xc(%ebp),%eax
1010f5: ba 03 00 00 00 mov $0x3,%edx
1010fa: c7 00 00 00 00 00 movl $0x0,(%eax)
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
101100: 8b 45 d0 mov -0x30(%ebp),%eax
101103: 8b 48 1c mov 0x1c(%eax),%ecx
value = (value << 8) + data [i];
101106: 0f b6 84 11 b8 01 00 movzbl 0x1b8(%ecx,%edx,1),%eax
10110d: 00
10110e: c1 e6 08 shl $0x8,%esi
101111: 01 c6 add %eax,%esi
for (i = 3; i >= 0; --i) {
101113: 83 ea 01 sub $0x1,%edx
101116: 73 ee jae 101106 <rtems_bdpart_read+0x136>
format->mbr.disk_id = rtems_uint32_from_little_endian(
101118: 8b 45 0c mov 0xc(%ebp),%eax
10111b: 89 70 04 mov %esi,0x4(%eax)
format->mbr.dos_compatibility = true;
10111e: 8b 75 c4 mov -0x3c(%ebp),%esi
101121: c6 40 08 01 movb $0x1,0x8(%eax)
for (i = 1; i < 4; ++i) {
101125: 8b 45 c0 mov -0x40(%ebp),%eax
101128: 05 ee 01 00 00 add $0x1ee,%eax
10112d: 89 45 c0 mov %eax,-0x40(%ebp)
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
101130: 89 3c 24 mov %edi,(%esp)
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
101133: 83 c3 10 add $0x10,%ebx
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
101136: 89 f1 mov %esi,%ecx
101138: 8d 55 d4 lea -0x2c(%ebp),%edx
10113b: 89 d8 mov %ebx,%eax
10113d: e8 fe fa ff ff call 100c40 <rtems_bdpart_read_mbr_partition>
if (sc != RTEMS_SUCCESSFUL) {
101142: 85 c0 test %eax,%eax
101144: 0f 85 06 01 00 00 jne 101250 <rtems_bdpart_read+0x280> <== NEVER TAKEN
for (i = 1; i < 4; ++i) {
10114a: 3b 5d c0 cmp -0x40(%ebp),%ebx
10114d: 75 e1 jne 101130 <rtems_bdpart_read+0x160>
ebr = ep_begin;
10114f: 8b 5d d8 mov -0x28(%ebp),%ebx
101152: 89 c6 mov %eax,%esi
while (ebr != 0) {
101154: 85 db test %ebx,%ebx
101156: 0f 84 13 01 00 00 je 10126f <rtems_bdpart_read+0x29f> <== NEVER TAKEN
10115c: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
10115f: 90 nop <== NOT EXECUTED
sc = rtems_bdpart_read_record( dd, ebr, &block);
101160: 8b 45 e4 mov -0x1c(%ebp),%eax
101163: 8d 4d d0 lea -0x30(%ebp),%ecx
101166: 89 da mov %ebx,%edx
101168: e8 73 fc ff ff call 100de0 <rtems_bdpart_read_record>
if (sc != RTEMS_SUCCESSFUL) {
10116d: 85 c0 test %eax,%eax
10116f: 0f 85 db 00 00 00 jne 101250 <rtems_bdpart_read+0x280> <== NEVER TAKEN
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
101175: 8b 45 d0 mov -0x30(%ebp),%eax
sc = rtems_bdpart_read_mbr_partition(
101178: 8d 55 d4 lea -0x2c(%ebp),%edx
10117b: 8b 4d c4 mov -0x3c(%ebp),%ecx
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
10117e: 8b 40 1c mov 0x1c(%eax),%eax
sc = rtems_bdpart_read_mbr_partition(
101181: c7 04 24 00 00 00 00 movl $0x0,(%esp)
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
101188: 05 be 01 00 00 add $0x1be,%eax
sc = rtems_bdpart_read_mbr_partition(
10118d: e8 ae fa ff ff call 100c40 <rtems_bdpart_read_mbr_partition>
if (sc != RTEMS_SUCCESSFUL) {
101192: 85 c0 test %eax,%eax
101194: 0f 85 b6 00 00 00 jne 101250 <rtems_bdpart_read+0x280> <== NEVER TAKEN
tmp = p->begin + ebr;
10119a: 8b 4d d4 mov -0x2c(%ebp),%ecx
10119d: 8b 11 mov (%ecx),%edx
10119f: 8d 34 1a lea (%edx,%ebx,1),%esi
if (tmp > p->begin) {
1011a2: 39 f2 cmp %esi,%edx
1011a4: 0f 83 ad 00 00 00 jae 101257 <rtems_bdpart_read+0x287> <== NEVER TAKEN
p->begin = tmp;
1011aa: 89 31 mov %esi,(%ecx)
tmp = p->end + ebr;
1011ac: 8b 51 04 mov 0x4(%ecx),%edx
1011af: 01 d3 add %edx,%ebx
if (tmp > p->end) {
1011b1: 39 da cmp %ebx,%edx
1011b3: 0f 83 9e 00 00 00 jae 101257 <rtems_bdpart_read+0x287> <== NEVER TAKEN
p->end = tmp;
1011b9: 89 59 04 mov %ebx,0x4(%ecx)
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
1011bc: 8b 75 d0 mov -0x30(%ebp),%esi
1011bf: ba 03 00 00 00 mov $0x3,%edx
1011c4: 8b 5e 1c mov 0x1c(%esi),%ebx
value = (value << 8) + data [i];
1011c7: 0f b6 bc 13 d6 01 00 movzbl 0x1d6(%ebx,%edx,1),%edi
1011ce: 00
1011cf: c1 e0 08 shl $0x8,%eax
1011d2: 01 f8 add %edi,%eax
for (i = 3; i >= 0; --i) {
1011d4: 83 ea 01 sub $0x1,%edx
1011d7: 73 ee jae 1011c7 <rtems_bdpart_read+0x1f7>
if (ebr != 0) {
1011d9: 80 bb d2 01 00 00 05 cmpb $0x5,0x1d2(%ebx)
1011e0: 75 04 jne 1011e6 <rtems_bdpart_read+0x216>
1011e2: 85 c0 test %eax,%eax
1011e4: 75 2a jne 101210 <rtems_bdpart_read+0x240> <== ALWAYS TAKEN
1011e6: 8b 75 c0 mov -0x40(%ebp),%esi
*count = (size_t) (p - pt + 1);
1011e9: 8b 55 10 mov 0x10(%ebp),%edx
1011ec: 89 c8 mov %ecx,%eax
1011ee: 8b 7d 14 mov 0x14(%ebp),%edi
1011f1: 29 d0 sub %edx,%eax
1011f3: c1 f8 04 sar $0x4,%eax
1011f6: 69 c0 ab aa aa aa imul $0xaaaaaaab,%eax,%eax
1011fc: 40 inc %eax
1011fd: 89 07 mov %eax,(%edi)
1011ff: e9 6f fe ff ff jmp 101073 <rtems_bdpart_read+0xa3>
101204: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10120b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
10120f: 90 nop
tmp = ebr + ep_begin;
101210: 8b 5d d8 mov -0x28(%ebp),%ebx
101213: 01 c3 add %eax,%ebx
if (tmp > ebr) {
101215: 39 c3 cmp %eax,%ebx
101217: 0f 87 43 ff ff ff ja 101160 <rtems_bdpart_read+0x190> <== ALWAYS TAKEN
if (fd >= 0) {
10121d: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
101220: 89 f7 mov %esi,%edi <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
101222: be 1b 00 00 00 mov $0x1b,%esi <== NOT EXECUTED
if (fd >= 0) {
101227: 85 c0 test %eax,%eax <== NOT EXECUTED
101229: 0f 88 58 fe ff ff js 101087 <rtems_bdpart_read+0xb7> <== NOT EXECUTED
10122f: 90 nop <== NOT EXECUTED
close( fd);
101230: 89 04 24 mov %eax,(%esp)
101233: e8 f8 1e 00 00 call 103130 <close>
if (block != NULL) {
101238: 8b 45 d0 mov -0x30(%ebp),%eax
10123b: 85 c0 test %eax,%eax
10123d: 89 c7 mov %eax,%edi
10123f: 0f 85 42 fe ff ff jne 101087 <rtems_bdpart_read+0xb7> <== ALWAYS TAKEN
101245: e9 09 fe ff ff jmp 101053 <rtems_bdpart_read+0x83> <== NOT EXECUTED
10124a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi <== NOT EXECUTED
101250: 89 c6 mov %eax,%esi <== NOT EXECUTED
101252: e9 1c fe ff ff jmp 101073 <rtems_bdpart_read+0xa3> <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
101257: be 1b 00 00 00 mov $0x1b,%esi <== NOT EXECUTED
10125c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
101260: e9 0e fe ff ff jmp 101073 <rtems_bdpart_read+0xa3> <== NOT EXECUTED
esc = RTEMS_NOT_IMPLEMENTED;
101265: be 18 00 00 00 mov $0x18,%esi <== NOT EXECUTED
10126a: e9 04 fe ff ff jmp 101073 <rtems_bdpart_read+0xa3> <== NOT EXECUTED
*count = (size_t) (p - pt + 1);
10126f: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
101272: e9 72 ff ff ff jmp 1011e9 <rtems_bdpart_read+0x219> <== NOT EXECUTED
101277: 90 nop
101278: 90 nop
101279: 90 nop
10127a: 90 nop
10127b: 90 nop
10127c: 90 nop
10127d: 90 nop
10127e: 90 nop
10127f: 90 nop
00101280 <rtems_bdpart_register>:
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
101280: 55 push %ebp
101281: 89 e5 mov %esp,%ebp
101283: 57 push %edi
101284: 56 push %esi
101285: 53 push %ebx
size_t i = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
101286: 8d 45 dc lea -0x24(%ebp),%eax
{
101289: 83 ec 3c sub $0x3c,%esp
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
10128c: 89 44 24 0c mov %eax,0xc(%esp)
101290: 8d 45 e4 lea -0x1c(%ebp),%eax
101293: 89 44 24 08 mov %eax,0x8(%esp)
101297: 8d 45 e0 lea -0x20(%ebp),%eax
10129a: 89 44 24 04 mov %eax,0x4(%esp)
10129e: 8b 45 08 mov 0x8(%ebp),%eax
rtems_blkdev_bnum disk_end = 0;
1012a1: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
int fd = -1;
1012a8: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
rtems_disk_device *dd = NULL;
1012af: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
1012b6: 89 04 24 mov %eax,(%esp)
1012b9: e8 32 fc ff ff call 100ef0 <rtems_bdpart_get_disk_data>
1012be: 89 45 d0 mov %eax,-0x30(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
1012c1: 85 c0 test %eax,%eax
1012c3: 74 0b je 1012d0 <rtems_bdpart_register+0x50> <== ALWAYS TAKEN
free( logical_disk_name);
close( fd);
return esc;
}
1012c5: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
1012c8: 83 c4 3c add $0x3c,%esp <== NOT EXECUTED
1012cb: 5b pop %ebx <== NOT EXECUTED
1012cc: 5e pop %esi <== NOT EXECUTED
1012cd: 5f pop %edi <== NOT EXECUTED
1012ce: 5d pop %ebp <== NOT EXECUTED
1012cf: c3 ret <== NOT EXECUTED
size_t disk_name_size = strlen( disk_name);
1012d0: 8b 45 08 mov 0x8(%ebp),%eax
1012d3: 89 04 24 mov %eax,(%esp)
1012d6: e8 c5 ec 01 00 call 11ffa0 <strlen>
1012db: 89 c3 mov %eax,%ebx
char *logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
1012dd: 8d 40 04 lea 0x4(%eax),%eax
1012e0: 89 04 24 mov %eax,(%esp)
1012e3: e8 28 26 00 00 call 103910 <malloc>
1012e8: 89 45 d4 mov %eax,-0x2c(%ebp)
if (logical_disk_name != NULL) {
1012eb: 85 c0 test %eax,%eax
1012ed: 74 79 je 101368 <rtems_bdpart_register+0xe8> <== NEVER TAKEN
memcpy( logical_disk_name, disk_name, disk_name_size);
1012ef: 83 fb 08 cmp $0x8,%ebx
1012f2: 8b 75 08 mov 0x8(%ebp),%esi
1012f5: 89 d9 mov %ebx,%ecx
1012f7: 89 c7 mov %eax,%edi
1012f9: 0f 83 91 00 00 00 jae 101390 <rtems_bdpart_register+0x110> <== ALWAYS TAKEN
1012ff: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
for (i = 0; i < count; ++i) {
101301: 31 f6 xor %esi,%esi
*marker = logical_disk_name + disk_name_size;
101303: 8b 4d d4 mov -0x2c(%ebp),%ecx
101306: 8b 7d 0c mov 0xc(%ebp),%edi
101309: 01 cb add %ecx,%ebx
if (logical_disk_name == NULL) {
10130b: eb 2b jmp 101338 <rtems_bdpart_register+0xb8>
10130d: 8d 76 00 lea 0x0(%esi),%esi
p->end - p->begin
101310: 8b 0f mov (%edi),%ecx
if (sc != RTEMS_SUCCESSFUL) {
101312: 83 c7 30 add $0x30,%edi
sc = rtems_blkdev_create_partition(
101315: 8b 47 d4 mov -0x2c(%edi),%eax
101318: 89 4c 24 08 mov %ecx,0x8(%esp)
10131c: 29 c8 sub %ecx,%eax
10131e: 89 44 24 0c mov %eax,0xc(%esp)
101322: 8b 45 08 mov 0x8(%ebp),%eax
101325: 89 44 24 04 mov %eax,0x4(%esp)
101329: 8b 45 d4 mov -0x2c(%ebp),%eax
10132c: 89 04 24 mov %eax,(%esp)
10132f: e8 ac 0c 00 00 call 101fe0 <rtems_blkdev_create_partition>
if (sc != RTEMS_SUCCESSFUL) {
101334: 85 c0 test %eax,%eax
101336: 75 78 jne 1013b0 <rtems_bdpart_register+0x130> <== NEVER TAKEN
for (i = 0; i < count; ++i) {
101338: 3b 75 10 cmp 0x10(%ebp),%esi
10133b: 74 2b je 101368 <rtems_bdpart_register+0xe8>
rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
10133d: 46 inc %esi
10133e: b8 14 af 12 00 mov $0x12af14,%eax
101343: 89 74 24 0c mov %esi,0xc(%esp)
101347: ba 04 00 00 00 mov $0x4,%edx
10134c: 89 44 24 08 mov %eax,0x8(%esp)
101350: 89 54 24 04 mov %edx,0x4(%esp)
101354: 89 1c 24 mov %ebx,(%esp)
101357: e8 b4 e7 01 00 call 11fb10 <snprintf>
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
10135c: 83 f8 03 cmp $0x3,%eax
10135f: 7e af jle 101310 <rtems_bdpart_register+0x90> <== ALWAYS TAKEN
sc = RTEMS_INVALID_NAME;
101361: c7 45 d0 03 00 00 00 movl $0x3,-0x30(%ebp) <== NOT EXECUTED
free( logical_disk_name);
101368: 8b 45 d4 mov -0x2c(%ebp),%eax
10136b: 89 04 24 mov %eax,(%esp)
10136e: e8 5d 1f 00 00 call 1032d0 <free>
close( fd);
101373: 8b 45 e0 mov -0x20(%ebp),%eax
101376: 89 04 24 mov %eax,(%esp)
101379: e8 b2 1d 00 00 call 103130 <close>
}
10137e: 8b 45 d0 mov -0x30(%ebp),%eax
101381: 83 c4 3c add $0x3c,%esp
101384: 5b pop %ebx
101385: 5e pop %esi
101386: 5f pop %edi
101387: 5d pop %ebp
101388: c3 ret
101389: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
memcpy( logical_disk_name, disk_name, disk_name_size);
101390: a8 04 test $0x4,%al
101392: 0f 84 67 ff ff ff je 1012ff <rtems_bdpart_register+0x7f> <== NEVER TAKEN
101398: 8b 06 mov (%esi),%eax
10139a: 8d 7f 04 lea 0x4(%edi),%edi
10139d: 8d 4b fc lea -0x4(%ebx),%ecx
1013a0: 89 47 fc mov %eax,-0x4(%edi)
1013a3: 8b 45 08 mov 0x8(%ebp),%eax
1013a6: 8d 70 04 lea 0x4(%eax),%esi
1013a9: e9 51 ff ff ff jmp 1012ff <rtems_bdpart_register+0x7f>
1013ae: 66 90 xchg %ax,%ax
1013b0: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
1013b3: eb b3 jmp 101368 <rtems_bdpart_register+0xe8> <== NOT EXECUTED
1013b5: 90 nop
1013b6: 90 nop
1013b7: 90 nop
1013b8: 90 nop
1013b9: 90 nop
1013ba: 90 nop
1013bb: 90 nop
1013bc: 90 nop
1013bd: 90 nop
1013be: 90 nop
1013bf: 90 nop
001013c0 <rtems_bdpart_register_from_disk>:
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
1013c0: 55 push %ebp <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
1013c1: b8 10 00 00 00 mov $0x10,%eax <== NOT EXECUTED
{
1013c6: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1013c8: 81 ec 38 03 00 00 sub $0x338,%esp <== NOT EXECUTED
1013ce: 89 5d f8 mov %ebx,-0x8(%ebp) <== NOT EXECUTED
1013d1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
1013d4: 89 85 e0 fc ff ff mov %eax,-0x320(%ebp) <== NOT EXECUTED
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
1013da: 8d 85 e0 fc ff ff lea -0x320(%ebp),%eax <== NOT EXECUTED
{
1013e0: 89 75 fc mov %esi,-0x4(%ebp) <== NOT EXECUTED
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
1013e3: 8d b5 f8 fc ff ff lea -0x308(%ebp),%esi <== NOT EXECUTED
1013e9: 89 44 24 0c mov %eax,0xc(%esp) <== NOT EXECUTED
1013ed: 8d 85 e4 fc ff ff lea -0x31c(%ebp),%eax <== NOT EXECUTED
1013f3: 89 74 24 08 mov %esi,0x8(%esp) <== NOT EXECUTED
1013f7: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
1013fb: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
1013fe: e8 cd fb ff ff call 100fd0 <rtems_bdpart_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
101403: 85 c0 test %eax,%eax
101405: 75 16 jne 10141d <rtems_bdpart_register_from_disk+0x5d> <== NEVER TAKEN
return sc;
}
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
101407: 89 74 24 04 mov %esi,0x4(%esp)
10140b: 8b 85 e0 fc ff ff mov -0x320(%ebp),%eax
101411: 89 1c 24 mov %ebx,(%esp)
101414: 89 44 24 08 mov %eax,0x8(%esp)
101418: e8 63 fe ff ff call 101280 <rtems_bdpart_register>
}
10141d: 8b 5d f8 mov -0x8(%ebp),%ebx
101420: 8b 75 fc mov -0x4(%ebp),%esi
101423: 89 ec mov %ebp,%esp
101425: 5d pop %ebp
101426: c3 ret
101427: 90 nop
101428: 90 nop
101429: 90 nop
10142a: 90 nop
10142b: 90 nop
10142c: 90 nop
10142d: 90 nop
10142e: 90 nop
10142f: 90 nop
00101430 <rtems_bdpart_unregister>:
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt RTEMS_UNUSED,
size_t count
)
{
101430: 55 push %ebp
101431: 89 e5 mov %esp,%ebp
101433: 57 push %edi
101434: 56 push %esi
101435: 53 push %ebx
size_t i = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
101436: 8d 45 dc lea -0x24(%ebp),%eax
{
101439: 83 ec 3c sub $0x3c,%esp
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
10143c: 89 44 24 0c mov %eax,0xc(%esp)
{
101440: 8b 75 08 mov 0x8(%ebp),%esi
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
101443: 8d 45 e4 lea -0x1c(%ebp),%eax
101446: 89 44 24 08 mov %eax,0x8(%esp)
10144a: 8d 45 e0 lea -0x20(%ebp),%eax
10144d: 89 44 24 04 mov %eax,0x4(%esp)
rtems_blkdev_bnum disk_end = 0;
101451: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
101458: 89 34 24 mov %esi,(%esp)
int fd = -1;
10145b: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
rtems_disk_device *dd = NULL;
101462: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
101469: e8 82 fa ff ff call 100ef0 <rtems_bdpart_get_disk_data>
10146e: 89 45 d4 mov %eax,-0x2c(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
101471: 85 c0 test %eax,%eax
101473: 74 0b je 101480 <rtems_bdpart_unregister+0x50> <== ALWAYS TAKEN
free( logical_disk_name);
close( fd);
return esc;
}
101475: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
101478: 83 c4 3c add $0x3c,%esp <== NOT EXECUTED
10147b: 5b pop %ebx <== NOT EXECUTED
10147c: 5e pop %esi <== NOT EXECUTED
10147d: 5f pop %edi <== NOT EXECUTED
10147e: 5d pop %ebp <== NOT EXECUTED
10147f: c3 ret <== NOT EXECUTED
size_t disk_name_size = strlen( disk_name);
101480: 89 34 24 mov %esi,(%esp)
101483: e8 18 eb 01 00 call 11ffa0 <strlen>
101488: 89 c2 mov %eax,%edx
char *logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
10148a: 89 55 d0 mov %edx,-0x30(%ebp)
10148d: 8d 40 04 lea 0x4(%eax),%eax
101490: 89 04 24 mov %eax,(%esp)
101493: e8 78 24 00 00 call 103910 <malloc>
if (logical_disk_name != NULL) {
101498: 85 c0 test %eax,%eax
char *logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
10149a: 89 c3 mov %eax,%ebx
if (logical_disk_name != NULL) {
10149c: 74 5e je 1014fc <rtems_bdpart_unregister+0xcc> <== NEVER TAKEN
memcpy( logical_disk_name, disk_name, disk_name_size);
10149e: 8b 55 d0 mov -0x30(%ebp),%edx
1014a1: 89 c7 mov %eax,%edi
1014a3: 83 fa 08 cmp $0x8,%edx
1014a6: 89 d1 mov %edx,%ecx
1014a8: 73 76 jae 101520 <rtems_bdpart_unregister+0xf0> <== ALWAYS TAKEN
1014aa: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
*marker = logical_disk_name + disk_name_size;
1014ac: 8d 3c 13 lea (%ebx,%edx,1),%edi
for (i = 0; i < count; ++i) {
1014af: 31 f6 xor %esi,%esi
1014b1: eb 19 jmp 1014cc <rtems_bdpart_unregister+0x9c>
1014b3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1014ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
rv = unlink( logical_disk_name);
1014c0: 89 1c 24 mov %ebx,(%esp)
1014c3: e8 d8 43 00 00 call 1058a0 <unlink>
if (rv != 0) {
1014c8: 85 c0 test %eax,%eax
1014ca: 75 30 jne 1014fc <rtems_bdpart_unregister+0xcc> <== NEVER TAKEN
for (i = 0; i < count; ++i) {
1014cc: 3b 75 10 cmp 0x10(%ebp),%esi
1014cf: 74 2b je 1014fc <rtems_bdpart_unregister+0xcc>
rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
1014d1: 46 inc %esi <== NOT EXECUTED
1014d2: b8 14 af 12 00 mov $0x12af14,%eax <== NOT EXECUTED
1014d7: 89 74 24 0c mov %esi,0xc(%esp) <== NOT EXECUTED
1014db: ba 04 00 00 00 mov $0x4,%edx <== NOT EXECUTED
1014e0: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
1014e4: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
1014e8: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
1014eb: e8 20 e6 01 00 call 11fb10 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
1014f0: 83 f8 03 cmp $0x3,%eax
1014f3: 7e cb jle 1014c0 <rtems_bdpart_unregister+0x90> <== ALWAYS TAKEN
sc = RTEMS_INVALID_NAME;
1014f5: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp) <== NOT EXECUTED
free( logical_disk_name);
1014fc: 89 1c 24 mov %ebx,(%esp)
1014ff: e8 cc 1d 00 00 call 1032d0 <free>
close( fd);
101504: 8b 45 e0 mov -0x20(%ebp),%eax
101507: 89 04 24 mov %eax,(%esp)
10150a: e8 21 1c 00 00 call 103130 <close>
}
10150f: 8b 45 d4 mov -0x2c(%ebp),%eax
101512: 83 c4 3c add $0x3c,%esp
101515: 5b pop %ebx
101516: 5e pop %esi
101517: 5f pop %edi
101518: 5d pop %ebp
101519: c3 ret
10151a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
memcpy( logical_disk_name, disk_name, disk_name_size);
101520: a8 04 test $0x4,%al
101522: 74 86 je 1014aa <rtems_bdpart_unregister+0x7a> <== NEVER TAKEN
101524: 8b 06 mov (%esi),%eax
101526: 8d 7b 04 lea 0x4(%ebx),%edi
101529: 83 c6 04 add $0x4,%esi
10152c: 8d 4a fc lea -0x4(%edx),%ecx
10152f: 89 03 mov %eax,(%ebx)
101531: e9 74 ff ff ff jmp 1014aa <rtems_bdpart_unregister+0x7a>
101536: 90 nop
101537: 90 nop
101538: 90 nop
101539: 90 nop
10153a: 90 nop
10153b: 90 nop
10153c: 90 nop
10153d: 90 nop
10153e: 90 nop
10153f: 90 nop
00101650 <rtems_bdpart_write>:
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
101650: 55 push %ebp
101651: 89 e5 mov %esp,%ebp
101653: 57 push %edi
101654: 56 push %esi
101655: 53 push %ebx
101656: 83 ec 5c sub $0x5c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
101659: 8b 4d 0c mov 0xc(%ebp),%ecx
{
10165c: 8b 5d 14 mov 0x14(%ebp),%ebx
&& format->mbr.dos_compatibility;
10165f: 85 c9 test %ecx,%ecx
101661: 74 0d je 101670 <rtems_bdpart_write+0x20> <== NEVER TAKEN
&& format->type == RTEMS_BDPART_FORMAT_MBR
101663: 8b 45 0c mov 0xc(%ebp),%eax
101666: 8b 10 mov (%eax),%edx
101668: 85 d2 test %edx,%edx
10166a: 0f 84 40 01 00 00 je 1017b0 <rtems_bdpart_write+0x160> <== ALWAYS TAKEN
rtems_bdbuf_buffer *block = NULL;
101670: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
101677: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
&& format->mbr.dos_compatibility;
10167e: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum record_space =
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
101685: c7 45 c0 01 00 00 00 movl $0x1,-0x40(%ebp) <== NOT EXECUTED
size_t ppc = 0; /* Primary partition count */
size_t i = 0;
uint8_t *data = NULL;
int fd = -1;
10168c: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
rtems_disk_device *dd = NULL;
/* Check if we have something to do */
if (count == 0) {
101693: 85 db test %ebx,%ebx
rtems_disk_device *dd = NULL;
101695: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (count == 0) {
10169c: 0f 84 4e 01 00 00 je 1017f0 <rtems_bdpart_write+0x1a0> <== NEVER TAKEN
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
1016a2: 8b 45 0c mov 0xc(%ebp),%eax
1016a5: 85 c0 test %eax,%eax
1016a7: 0f 84 33 01 00 00 je 1017e0 <rtems_bdpart_write+0x190> <== NEVER TAKEN
1016ad: 8b 45 10 mov 0x10(%ebp),%eax
1016b0: 85 c0 test %eax,%eax
1016b2: 0f 84 28 01 00 00 je 1017e0 <rtems_bdpart_write+0x190> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
1016b8: 8d 45 dc lea -0x24(%ebp),%eax
1016bb: 89 44 24 0c mov %eax,0xc(%esp)
1016bf: 8d 45 e4 lea -0x1c(%ebp),%eax
1016c2: 89 44 24 08 mov %eax,0x8(%esp)
1016c6: 8d 45 e0 lea -0x20(%ebp),%eax
1016c9: 89 44 24 04 mov %eax,0x4(%esp)
1016cd: 8b 45 08 mov 0x8(%ebp),%eax
1016d0: 89 04 24 mov %eax,(%esp)
1016d3: e8 18 f8 ff ff call 100ef0 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
1016d8: 85 c0 test %eax,%eax
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
1016da: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL) {
1016dc: 0f 85 03 01 00 00 jne 1017e5 <rtems_bdpart_write+0x195> <== NEVER TAKEN
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
1016e2: 8b 45 c4 mov -0x3c(%ebp),%eax
disk_end -= (disk_end % record_space);
1016e5: 8b 4d dc mov -0x24(%ebp),%ecx
if (dos_compatibility) {
1016e8: 85 c0 test %eax,%eax
1016ea: 0f 85 10 01 00 00 jne 101800 <rtems_bdpart_write+0x1b0> <== ALWAYS TAKEN
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
1016f0: 8b 45 10 mov 0x10(%ebp),%eax
1016f3: eb 0d jmp 101702 <rtems_bdpart_write+0xb2>
1016f5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1016fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
101700: 89 f7 mov %esi,%edi
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Check that begin and end are proper within the disk */
if (p->begin >= disk_end || p->end > disk_end) {
101702: 8b 10 mov (%eax),%edx
101704: 39 ca cmp %ecx,%edx
101706: 73 78 jae 101780 <rtems_bdpart_write+0x130> <== NEVER TAKEN
101708: 8b 70 04 mov 0x4(%eax),%esi
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
10170b: 39 f2 cmp %esi,%edx
10170d: 73 71 jae 101780 <rtems_bdpart_write+0x130> <== NEVER TAKEN
10170f: 39 ce cmp %ecx,%esi
101711: 77 6d ja 101780 <rtems_bdpart_write+0x130> <== NEVER TAKEN
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that partitions do not overlap */
if (i > 0 && pt [i - 1].end > p->begin) {
101713: 85 ff test %edi,%edi
101715: 74 05 je 10171c <rtems_bdpart_write+0xcc>
101717: 3b 50 d4 cmp -0x2c(%eax),%edx
10171a: 72 64 jb 101780 <rtems_bdpart_write+0x130> <== NEVER TAKEN
for (i = 0; i < count; ++i) {
10171c: 8d 77 01 lea 0x1(%edi),%esi
10171f: 83 c0 30 add $0x30,%eax
101722: 39 f3 cmp %esi,%ebx
101724: 75 da jne 101700 <rtems_bdpart_write+0xb0>
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
101726: 8b 45 0c mov 0xc(%ebp),%eax
101729: 8b 00 mov (%eax),%eax
10172b: 85 c0 test %eax,%eax
10172d: 0f 85 02 01 00 00 jne 101835 <rtems_bdpart_write+0x1e5> <== NEVER TAKEN
* Set primary partition count. If we have more than four partitions we need
* an extended partition which will contain the partitions of number four and
* above as logical partitions. If we have four or less partitions we can
* use the primary partition table.
*/
ppc = count <= 4 ? count : 3;
101733: 83 fb 04 cmp $0x4,%ebx
101736: 0f 86 03 01 00 00 jbe 10183f <rtems_bdpart_write+0x1ef> <== NEVER TAKEN
/*
* Check that the first primary partition starts at head one and sector one
* under the virtual one head and 63 sectors geometry if necessary.
*/
if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {
10173c: 8b 4d c4 mov -0x3c(%ebp),%ecx
10173f: 85 c9 test %ecx,%ecx
101741: 0f 85 48 03 00 00 jne 101a8f <rtems_bdpart_write+0x43f> <== ALWAYS TAKEN
101747: 8b 45 10 mov 0x10(%ebp),%eax
10174a: 8d 0c 76 lea (%esi,%esi,2),%ecx
10174d: 8b 55 10 mov 0x10(%ebp),%edx
101750: c1 e1 04 shl $0x4,%ecx
101753: 8b 5d c0 mov -0x40(%ebp),%ebx
101756: 05 90 00 00 00 add $0x90,%eax
10175b: 01 d1 add %edx,%ecx
10175d: eb 0c jmp 10176b <rtems_bdpart_write+0x11b>
10175f: 90 nop
* Each logical partition is described via one EBR preceding the partition.
* The space for the EBR and maybe some space which is needed for DOS
* compatibility resides between the partitions. So there have to be gaps of
* the appropriate size between the partitions.
*/
for (i = ppc; i < count; ++i) {
101760: 83 c0 30 add $0x30,%eax
101763: 39 c8 cmp %ecx,%eax
101765: 0f 84 07 03 00 00 je 101a72 <rtems_bdpart_write+0x422>
if ((pt [i].begin - pt [i - 1].end) < record_space) {
10176b: 8b 10 mov (%eax),%edx
10176d: 2b 50 d4 sub -0x2c(%eax),%edx
101770: 39 da cmp %ebx,%edx
101772: 73 ec jae 101760 <rtems_bdpart_write+0x110> <== ALWAYS TAKEN
101774: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10177b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
10177f: 90 nop
esc = RTEMS_INVALID_NUMBER;
101780: bf 0a 00 00 00 mov $0xa,%edi <== NOT EXECUTED
}
}
cleanup:
if (fd >= 0) {
101785: 8b 45 e0 mov -0x20(%ebp),%eax
101788: 85 c0 test %eax,%eax
10178a: 0f 89 90 00 00 00 jns 101820 <rtems_bdpart_write+0x1d0> <== ALWAYS TAKEN
close( fd);
}
if (block != NULL) {
101790: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
101793: 85 c0 test %eax,%eax <== NOT EXECUTED
101795: 74 4e je 1017e5 <rtems_bdpart_write+0x195> <== NOT EXECUTED
rtems_bdbuf_sync( block);
101797: 89 04 24 mov %eax,(%esp)
10179a: e8 01 e3 00 00 call 10faa0 <rtems_bdbuf_sync>
}
return esc;
}
10179f: 83 c4 5c add $0x5c,%esp
1017a2: 89 f8 mov %edi,%eax
1017a4: 5b pop %ebx
1017a5: 5e pop %esi
1017a6: 5f pop %edi
1017a7: 5d pop %ebp
1017a8: c3 ret
1017a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
&& format->mbr.dos_compatibility;
1017b0: 80 78 08 00 cmpb $0x0,0x8(%eax)
1017b4: 0f 84 b6 fe ff ff je 101670 <rtems_bdpart_write+0x20> <== NEVER TAKEN
rtems_bdbuf_buffer *block = NULL;
1017ba: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%ebp)
rtems_blkdev_bnum disk_end = 0;
1017c1: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
&& format->mbr.dos_compatibility;
1017c8: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
1017cf: c7 45 c0 3f 00 00 00 movl $0x3f,-0x40(%ebp)
1017d6: e9 b1 fe ff ff jmp 10168c <rtems_bdpart_write+0x3c>
1017db: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1017df: 90 nop
return RTEMS_INVALID_ADDRESS;
1017e0: bf 09 00 00 00 mov $0x9,%edi <== NOT EXECUTED
}
1017e5: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
1017e8: 89 f8 mov %edi,%eax <== NOT EXECUTED
1017ea: 5b pop %ebx <== NOT EXECUTED
1017eb: 5e pop %esi <== NOT EXECUTED
1017ec: 5f pop %edi <== NOT EXECUTED
1017ed: 5d pop %ebp <== NOT EXECUTED
1017ee: c3 ret <== NOT EXECUTED
1017ef: 90 nop <== NOT EXECUTED
1017f0: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
1017f3: 31 ff xor %edi,%edi <== NOT EXECUTED
}
1017f5: 5b pop %ebx <== NOT EXECUTED
1017f6: 89 f8 mov %edi,%eax <== NOT EXECUTED
1017f8: 5e pop %esi <== NOT EXECUTED
1017f9: 5f pop %edi <== NOT EXECUTED
1017fa: 5d pop %ebp <== NOT EXECUTED
1017fb: c3 ret <== NOT EXECUTED
1017fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
disk_end -= (disk_end % record_space);
101800: 89 c8 mov %ecx,%eax
101802: 31 d2 xor %edx,%edx
101804: f7 75 c0 divl -0x40(%ebp)
101807: 29 d1 sub %edx,%ecx
101809: 89 4d dc mov %ecx,-0x24(%ebp)
10180c: e9 df fe ff ff jmp 1016f0 <rtems_bdpart_write+0xa0>
101811: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
101818: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10181f: 90 nop
close( fd);
101820: 89 04 24 mov %eax,(%esp)
101823: e8 08 19 00 00 call 103130 <close>
if (block != NULL) {
101828: 8b 45 d8 mov -0x28(%ebp),%eax
10182b: 85 c0 test %eax,%eax
10182d: 0f 85 64 ff ff ff jne 101797 <rtems_bdpart_write+0x147> <== ALWAYS TAKEN
101833: eb b0 jmp 1017e5 <rtems_bdpart_write+0x195> <== NOT EXECUTED
esc = RTEMS_NOT_IMPLEMENTED;
101835: bf 18 00 00 00 mov $0x18,%edi <== NOT EXECUTED
10183a: e9 46 ff ff ff jmp 101785 <rtems_bdpart_write+0x135> <== NOT EXECUTED
if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {
10183f: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
101842: 85 c0 test %eax,%eax <== NOT EXECUTED
101844: 74 0c je 101852 <rtems_bdpart_write+0x202> <== NOT EXECUTED
101846: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
101849: 83 38 3f cmpl $0x3f,(%eax) <== NOT EXECUTED
10184c: 0f 85 2e ff ff ff jne 101780 <rtems_bdpart_write+0x130> <== NOT EXECUTED
101852: 89 75 bc mov %esi,-0x44(%ebp) <== NOT EXECUTED
if (p->flags > 0xffU) {
101855: 89 75 c4 mov %esi,-0x3c(%ebp)
101858: 8b 45 10 mov 0x10(%ebp),%eax
10185b: 8b 4d 10 mov 0x10(%ebp),%ecx
10185e: 8d 58 08 lea 0x8(%eax),%ebx
101861: 8d 04 76 lea (%esi,%esi,2),%eax
101864: 89 de mov %ebx,%esi
101866: c1 e0 04 shl $0x4,%eax
101869: 8d 44 01 08 lea 0x8(%ecx,%eax,1),%eax
10186d: 89 c3 mov %eax,%ebx
10186f: 90 nop
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
101870: 89 34 24 mov %esi,(%esp)
101873: 8d 45 d7 lea -0x29(%ebp),%eax
101876: 89 44 24 04 mov %eax,0x4(%esp)
uint8_t type = 0;
10187a: c6 45 d7 00 movb $0x0,-0x29(%ebp)
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
10187e: e8 2d f6 ff ff call 100eb0 <rtems_bdpart_to_mbr_partition_type>
101883: 84 c0 test %al,%al
101885: 0f 84 f3 01 00 00 je 101a7e <rtems_bdpart_write+0x42e> <== NEVER TAKEN
if (p->flags > 0xffU) {
10188b: b8 ff 00 00 00 mov $0xff,%eax
101890: 3b 46 20 cmp 0x20(%esi),%eax
101893: b8 00 00 00 00 mov $0x0,%eax
101898: 1b 46 24 sbb 0x24(%esi),%eax
10189b: 0f 82 dd 01 00 00 jb 101a7e <rtems_bdpart_write+0x42e> <== NEVER TAKEN
for (i = 0; i < count; ++i) {
1018a1: 83 c6 30 add $0x30,%esi
1018a4: 39 de cmp %ebx,%esi
1018a6: 75 c8 jne 101870 <rtems_bdpart_write+0x220>
sc = rtems_bdpart_new_record( dd, 0, &block);
1018a8: 8b 45 e4 mov -0x1c(%ebp),%eax
1018ab: 8d 4d d8 lea -0x28(%ebp),%ecx
1018ae: 31 d2 xor %edx,%edx
1018b0: 8b 75 c4 mov -0x3c(%ebp),%esi
1018b3: e8 88 fc ff ff call 101540 <rtems_bdpart_new_record>
if (sc != RTEMS_SUCCESSFUL) {
1018b8: 85 c0 test %eax,%eax
1018ba: 0f 85 ab 01 00 00 jne 101a6b <rtems_bdpart_write+0x41b> <== NEVER TAKEN
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
1018c0: 89 75 b4 mov %esi,-0x4c(%ebp)
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
1018c3: 8b 45 d8 mov -0x28(%ebp),%eax
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
1018c6: 89 7d b0 mov %edi,-0x50(%ebp)
1018c9: 8b 5d 0c mov 0xc(%ebp),%ebx
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
1018cc: 8b 50 1c mov 0x1c(%eax),%edx
1018cf: 8b 4b 04 mov 0x4(%ebx),%ecx
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
1018d2: 8b 5d 10 mov 0x10(%ebp),%ebx
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
int i;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
1018d5: 89 8a b8 01 00 00 mov %ecx,0x1b8(%edx)
1018db: 8b 55 bc mov -0x44(%ebp),%edx
1018de: 8b 40 1c mov 0x1c(%eax),%eax
1018e1: 89 df mov %ebx,%edi
1018e3: c1 e2 04 shl $0x4,%edx
1018e6: 8d 88 be 01 00 00 lea 0x1be(%eax),%ecx
for (i = 0; i < ppc; ++i) {
1018ec: 8d 84 10 be 01 00 00 lea 0x1be(%eax,%edx,1),%eax
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
1018f3: 89 ce mov %ecx,%esi
1018f5: 89 45 b8 mov %eax,-0x48(%ebp)
1018f8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1018ff: 90 nop
101900: 0f b6 47 08 movzbl 0x8(%edi),%eax
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
101904: 83 c6 10 add $0x10,%esi
for (i = 0; i < ppc; ++i) {
101907: 83 c7 30 add $0x30,%edi
p->end - p->begin,
10190a: 8b 57 d0 mov -0x30(%edi),%edx
(uint8_t) p->flags
10190d: 8b 5f f8 mov -0x8(%edi),%ebx
101910: 88 45 c4 mov %al,-0x3c(%ebp)
rtems_bdpart_write_mbr_partition(
101913: 8b 47 d4 mov -0x2c(%edi),%eax
101916: 88 56 f8 mov %dl,-0x8(%esi)
value >>= 8;
101919: 89 d1 mov %edx,%ecx
data [i] = (uint8_t) value;
10191b: 88 76 f9 mov %dh,-0x7(%esi)
value >>= 8;
10191e: c1 e9 10 shr $0x10,%ecx
data [i] = (uint8_t) value;
101921: 88 4e fa mov %cl,-0x6(%esi)
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
101924: 88 5e f0 mov %bl,-0x10(%esi)
rtems_bdpart_write_mbr_partition(
101927: 29 d0 sub %edx,%eax
101929: 88 46 fc mov %al,-0x4(%esi)
value >>= 8;
10192c: c1 ea 18 shr $0x18,%edx
data [i] = (uint8_t) value;
10192f: 88 56 fb mov %dl,-0x5(%esi)
value >>= 8;
101932: 89 c2 mov %eax,%edx
data [i] = (uint8_t) value;
101934: 88 66 fd mov %ah,-0x3(%esi)
value >>= 8;
101937: c1 e8 18 shr $0x18,%eax
data [i] = (uint8_t) value;
10193a: 88 46 ff mov %al,-0x1(%esi)
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
10193d: 0f b6 45 c4 movzbl -0x3c(%ebp),%eax
value >>= 8;
101941: c1 ea 10 shr $0x10,%edx
data [i] = (uint8_t) value;
101944: 88 56 fe mov %dl,-0x2(%esi)
101947: 88 46 f4 mov %al,-0xc(%esi)
for (i = 0; i < ppc; ++i) {
10194a: 3b 75 b8 cmp -0x48(%ebp),%esi
10194d: 75 b1 jne 101900 <rtems_bdpart_write+0x2b0>
if (ppc != count) {
10194f: 89 f1 mov %esi,%ecx
101951: 8b 75 b4 mov -0x4c(%ebp),%esi
101954: 39 75 bc cmp %esi,-0x44(%ebp)
101957: 8b 7d b0 mov -0x50(%ebp),%edi
10195a: 0f 84 28 01 00 00 je 101a88 <rtems_bdpart_write+0x438> <== NEVER TAKEN
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
101960: 8b 45 bc mov -0x44(%ebp),%eax
101963: 8b 5d 10 mov 0x10(%ebp),%ebx
101966: 8d 04 40 lea (%eax,%eax,2),%eax
101969: c1 e0 04 shl $0x4,%eax
10196c: 89 45 c4 mov %eax,-0x3c(%ebp)
10196f: 01 c3 add %eax,%ebx
rtems_bdpart_write_mbr_partition(
101971: 8b 45 dc mov -0x24(%ebp),%eax
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
101974: 8b 13 mov (%ebx),%edx
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
101976: c6 41 04 05 movb $0x5,0x4(%ecx)
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
10197a: c6 01 00 movb $0x0,(%ecx)
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
10197d: 89 55 ac mov %edx,-0x54(%ebp)
rtems_bdpart_write_mbr_partition(
101980: 8b 55 c0 mov -0x40(%ebp),%edx
101983: 01 c2 add %eax,%edx
101985: 89 d0 mov %edx,%eax
101987: 8b 55 ac mov -0x54(%ebp),%edx
10198a: 29 d0 sub %edx,%eax
10198c: 89 41 0c mov %eax,0xc(%ecx)
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
10198f: 8b 45 c0 mov -0x40(%ebp),%eax
101992: 29 c2 sub %eax,%edx
for (i = ppc; i < count; ++i) {
101994: 39 75 bc cmp %esi,-0x44(%ebp)
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
101997: 89 51 08 mov %edx,0x8(%ecx)
for (i = ppc; i < count; ++i) {
10199a: 0f 83 e8 00 00 00 jae 101a88 <rtems_bdpart_write+0x438> <== NEVER TAKEN
if (i > ppc) {
1019a0: 8b 45 10 mov 0x10(%ebp),%eax
1019a3: 8b 55 c4 mov -0x3c(%ebp),%edx
1019a6: 89 5d b8 mov %ebx,-0x48(%ebp)
ebr = p->begin - record_space;
1019a9: 8b 0b mov (%ebx),%ecx
1019ab: 89 7d b0 mov %edi,-0x50(%ebp)
1019ae: 8b 75 bc mov -0x44(%ebp),%esi
1019b1: 8d 44 10 30 lea 0x30(%eax,%edx,1),%eax
1019b5: 89 45 b4 mov %eax,-0x4c(%ebp)
1019b8: e9 94 00 00 00 jmp 101a51 <rtems_bdpart_write+0x401>
(uint8_t) p->flags
1019bd: 8b 4d b8 mov -0x48(%ebp),%ecx
1019c0: 8b 41 28 mov 0x28(%ecx),%eax
1019c3: 89 45 c4 mov %eax,-0x3c(%ebp)
1019c6: 89 c8 mov %ecx,%eax
1019c8: 0f b6 49 08 movzbl 0x8(%ecx),%ecx
rtems_bdpart_write_mbr_partition(
1019cc: 8b 38 mov (%eax),%edi
1019ce: 8b 50 04 mov 0x4(%eax),%edx
1019d1: 29 fa sub %edi,%edx
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
1019d3: 8b 7d d8 mov -0x28(%ebp),%edi
1019d6: 8b 47 1c mov 0x1c(%edi),%eax
1019d9: 88 98 c6 01 00 00 mov %bl,0x1c6(%eax)
1019df: 31 db xor %ebx,%ebx
1019e1: 66 89 98 c7 01 00 00 mov %bx,0x1c7(%eax)
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
1019e8: 0f b6 5d c4 movzbl -0x3c(%ebp),%ebx
for (i = ppc; i < count; ++i) {
1019ec: 3b 75 b0 cmp -0x50(%ebp),%esi
1019ef: c6 80 c9 01 00 00 00 movb $0x0,0x1c9(%eax)
1019f6: 89 90 ca 01 00 00 mov %edx,0x1ca(%eax)
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
1019fc: 88 88 c2 01 00 00 mov %cl,0x1c2(%eax)
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
101a02: 88 98 be 01 00 00 mov %bl,0x1be(%eax)
for (i = ppc; i < count; ++i) {
101a08: 8d 46 01 lea 0x1(%esi),%eax
101a0b: 74 7b je 101a88 <rtems_bdpart_write+0x438>
rtems_blkdev_bnum begin = p->begin - record_space;
101a0d: 8b 5d b4 mov -0x4c(%ebp),%ebx
101a10: 83 45 b8 30 addl $0x30,-0x48(%ebp)
if (i > ppc) {
101a14: 39 45 bc cmp %eax,-0x44(%ebp)
rtems_blkdev_bnum begin = p->begin - record_space;
101a17: 8b 0b mov (%ebx),%ecx
if (i > ppc) {
101a19: 73 30 jae 101a4b <rtems_bdpart_write+0x3fb> <== NEVER TAKEN
rtems_bdpart_write_mbr_partition(
101a1b: 8b 75 dc mov -0x24(%ebp),%esi
101a1e: 8b 55 c0 mov -0x40(%ebp),%edx
101a21: 01 f2 add %esi,%edx
101a23: 29 ca sub %ecx,%edx
101a25: 89 d6 mov %edx,%esi
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1,
101a27: 8b 57 1c mov 0x1c(%edi),%edx
rtems_bdpart_write_mbr_partition(
101a2a: 8b 7d ac mov -0x54(%ebp),%edi
101a2d: 89 b2 da 01 00 00 mov %esi,0x1da(%edx)
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
101a33: c6 82 d2 01 00 00 05 movb $0x5,0x1d2(%edx)
rtems_bdpart_write_mbr_partition(
101a3a: 29 f9 sub %edi,%ecx
101a3c: 89 8a d6 01 00 00 mov %ecx,0x1d6(%edx)
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
101a42: c6 82 ce 01 00 00 00 movb $0x0,0x1ce(%edx)
ebr = p->begin - record_space;
101a49: 8b 0b mov (%ebx),%ecx
101a4b: 83 45 b4 30 addl $0x30,-0x4c(%ebp)
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
101a4f: 89 c6 mov %eax,%esi
ebr = p->begin - record_space;
101a51: 8b 5d c0 mov -0x40(%ebp),%ebx
sc = rtems_bdpart_new_record( dd, ebr, &block);
101a54: 8b 45 e4 mov -0x1c(%ebp),%eax
ebr = p->begin - record_space;
101a57: 29 d9 sub %ebx,%ecx
101a59: 89 ca mov %ecx,%edx
sc = rtems_bdpart_new_record( dd, ebr, &block);
101a5b: 8d 4d d8 lea -0x28(%ebp),%ecx
101a5e: e8 dd fa ff ff call 101540 <rtems_bdpart_new_record>
if (sc != RTEMS_SUCCESSFUL) {
101a63: 85 c0 test %eax,%eax
101a65: 0f 84 52 ff ff ff je 1019bd <rtems_bdpart_write+0x36d> <== ALWAYS TAKEN
101a6b: 89 c7 mov %eax,%edi <== NOT EXECUTED
101a6d: e9 13 fd ff ff jmp 101785 <rtems_bdpart_write+0x135> <== NOT EXECUTED
101a72: c7 45 bc 03 00 00 00 movl $0x3,-0x44(%ebp)
101a79: e9 d7 fd ff ff jmp 101855 <rtems_bdpart_write+0x205>
goto cleanup;
101a7e: bf 04 00 00 00 mov $0x4,%edi <== NOT EXECUTED
101a83: e9 fd fc ff ff jmp 101785 <rtems_bdpart_write+0x135> <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
101a88: 31 ff xor %edi,%edi
101a8a: e9 f6 fc ff ff jmp 101785 <rtems_bdpart_write+0x135>
if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {
101a8f: 8b 45 10 mov 0x10(%ebp),%eax
101a92: 83 38 3f cmpl $0x3f,(%eax)
101a95: 0f 84 ac fc ff ff je 101747 <rtems_bdpart_write+0xf7> <== ALWAYS TAKEN
101a9b: e9 e0 fc ff ff jmp 101780 <rtems_bdpart_write+0x130> <== NOT EXECUTED
00101f10 <rtems_blkdev_create>:
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
rtems_block_device_ioctl handler,
void *driver_data
)
{
101f10: 55 push %ebp
101f11: 89 e5 mov %esp,%ebp
101f13: 56 push %esi
101f14: 53 push %ebx
101f15: 83 ec 20 sub $0x20,%esp
rtems_status_code sc;
rtems_blkdev_imfs_context *ctx;
sc = rtems_bdbuf_init();
101f18: e8 03 d7 00 00 call 10f620 <rtems_bdbuf_init>
if (sc != RTEMS_SUCCESSFUL) {
101f1d: 85 c0 test %eax,%eax
101f1f: 0f 85 9b 00 00 00 jne 101fc0 <rtems_blkdev_create+0xb0> <== NEVER TAKEN
return RTEMS_INCORRECT_STATE;
}
ctx = malloc(sizeof(*ctx));
101f25: c7 04 24 78 00 00 00 movl $0x78,(%esp)
101f2c: e8 df 19 00 00 call 103910 <malloc>
if (ctx != NULL) {
101f31: 85 c0 test %eax,%eax
ctx = malloc(sizeof(*ctx));
101f33: 89 c3 mov %eax,%ebx
if (ctx != NULL) {
101f35: 0f 84 93 00 00 00 je 101fce <rtems_blkdev_create+0xbe>
sc = rtems_disk_init_phys(
101f3b: 89 1c 24 mov %ebx,(%esp)
101f3e: 8b 45 18 mov 0x18(%ebp),%eax
101f41: 89 44 24 10 mov %eax,0x10(%esp)
101f45: 8b 45 14 mov 0x14(%ebp),%eax
101f48: 89 44 24 0c mov %eax,0xc(%esp)
101f4c: 8b 45 10 mov 0x10(%ebp),%eax
101f4f: 89 44 24 08 mov %eax,0x8(%esp)
101f53: 8b 45 0c mov 0xc(%ebp),%eax
101f56: 89 44 24 04 mov %eax,0x4(%esp)
101f5a: e8 d1 01 00 00 call 102130 <rtems_disk_init_phys>
media_block_count,
handler,
driver_data
);
ctx->fd = -1;
101f5f: c7 43 74 ff ff ff ff movl $0xffffffff,0x74(%ebx)
if (sc == RTEMS_SUCCESSFUL) {
101f66: 85 c0 test %eax,%eax
sc = rtems_disk_init_phys(
101f68: 89 c6 mov %eax,%esi
if (sc == RTEMS_SUCCESSFUL) {
101f6a: 74 14 je 101f80 <rtems_blkdev_create+0x70>
if (rv != 0) {
free(ctx);
sc = RTEMS_UNSATISFIED;
}
} else {
free(ctx);
101f6c: 89 1c 24 mov %ebx,(%esp)
101f6f: e8 5c 13 00 00 call 1032d0 <free>
} else {
sc = RTEMS_NO_MEMORY;
}
return sc;
}
101f74: 83 c4 20 add $0x20,%esp
101f77: 89 f0 mov %esi,%eax
101f79: 5b pop %ebx
101f7a: 5e pop %esi
101f7b: 5d pop %ebp
101f7c: c3 ret
101f7d: 8d 76 00 lea 0x0(%esi),%esi
int rv = IMFS_make_generic_node(
101f80: 89 5c 24 0c mov %ebx,0xc(%esp)
101f84: b8 18 af 12 00 mov $0x12af18,%eax
101f89: ba ff 61 00 00 mov $0x61ff,%edx
101f8e: 89 44 24 08 mov %eax,0x8(%esp)
101f92: 8b 45 08 mov 0x8(%ebp),%eax
101f95: 89 54 24 04 mov %edx,0x4(%esp)
101f99: 89 04 24 mov %eax,(%esp)
101f9c: e8 cf 49 00 00 call 106970 <IMFS_make_generic_node>
if (rv != 0) {
101fa1: 85 c0 test %eax,%eax
101fa3: 74 cf je 101f74 <rtems_blkdev_create+0x64>
free(ctx);
101fa5: 89 1c 24 mov %ebx,(%esp)
sc = RTEMS_UNSATISFIED;
101fa8: be 0d 00 00 00 mov $0xd,%esi
free(ctx);
101fad: e8 1e 13 00 00 call 1032d0 <free>
sc = RTEMS_UNSATISFIED;
101fb2: eb c0 jmp 101f74 <rtems_blkdev_create+0x64>
101fb4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
101fbb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
101fbf: 90 nop
}
101fc0: 83 c4 20 add $0x20,%esp
return RTEMS_INCORRECT_STATE;
101fc3: be 0e 00 00 00 mov $0xe,%esi
}
101fc8: 5b pop %ebx
101fc9: 89 f0 mov %esi,%eax
101fcb: 5e pop %esi
101fcc: 5d pop %ebp
101fcd: c3 ret
sc = RTEMS_NO_MEMORY;
101fce: be 1a 00 00 00 mov $0x1a,%esi
101fd3: eb 9f jmp 101f74 <rtems_blkdev_create+0x64>
101fd5: 90 nop
101fd6: 90 nop
101fd7: 90 nop
101fd8: 90 nop
101fd9: 90 nop
101fda: 90 nop
101fdb: 90 nop
101fdc: 90 nop
101fdd: 90 nop
101fde: 90 nop
101fdf: 90 nop
00101fe0 <rtems_blkdev_create_partition>:
const char *partition,
const char *parent_block_device,
rtems_blkdev_bnum media_block_begin,
rtems_blkdev_bnum media_block_count
)
{
101fe0: 55 push %ebp
101fe1: 89 e5 mov %esp,%ebp
101fe3: 81 ec 88 00 00 00 sub $0x88,%esp
101fe9: 89 5d f4 mov %ebx,-0xc(%ebp)
rtems_status_code sc = RTEMS_SUCCESSFUL;
int fd = open(parent_block_device, O_RDWR);
101fec: 8b 45 0c mov 0xc(%ebp),%eax
101fef: bb 02 00 00 00 mov $0x2,%ebx
101ff4: 89 5c 24 04 mov %ebx,0x4(%esp)
{
101ff8: 89 75 f8 mov %esi,-0x8(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
close(fd);
}
} else {
sc = RTEMS_INVALID_ID;
101ffb: be 04 00 00 00 mov $0x4,%esi
{
102000: 89 7d fc mov %edi,-0x4(%ebp)
int fd = open(parent_block_device, O_RDWR);
102003: 89 04 24 mov %eax,(%esp)
102006: e8 25 23 00 00 call 104330 <open>
if (fd >= 0) {
10200b: 85 c0 test %eax,%eax
10200d: 78 31 js 102040 <rtems_blkdev_create_partition+0x60>
10200f: 89 c3 mov %eax,%ebx
rv = fstat(fd, &st);
102011: 89 1c 24 mov %ebx,(%esp)
102014: 8d 45 90 lea -0x70(%ebp),%eax
102017: 89 44 24 04 mov %eax,0x4(%esp)
10201b: e8 70 13 00 00 call 103390 <fstat>
if (rv == 0 && S_ISBLK(st.st_mode)) {
102020: 85 c0 test %eax,%eax
102022: 75 2c jne 102050 <rtems_blkdev_create_partition+0x70> <== NEVER TAKEN
102024: 8b 45 a0 mov -0x60(%ebp),%eax
sc = RTEMS_INVALID_NODE;
102027: be 15 00 00 00 mov $0x15,%esi
if (rv == 0 && S_ISBLK(st.st_mode)) {
10202c: 25 00 f0 00 00 and $0xf000,%eax
102031: 3d 00 60 00 00 cmp $0x6000,%eax
102036: 74 28 je 102060 <rtems_blkdev_create_partition+0x80>
close(fd);
102038: 89 1c 24 mov %ebx,(%esp)
10203b: e8 f0 10 00 00 call 103130 <close>
}
return sc;
}
102040: 8b 5d f4 mov -0xc(%ebp),%ebx
102043: 89 f0 mov %esi,%eax
102045: 8b 75 f8 mov -0x8(%ebp),%esi
102048: 8b 7d fc mov -0x4(%ebp),%edi
10204b: 89 ec mov %ebp,%esp
10204d: 5d pop %ebp
10204e: c3 ret
10204f: 90 nop
sc = RTEMS_INVALID_NODE;
102050: be 15 00 00 00 mov $0x15,%esi <== NOT EXECUTED
102055: eb e1 jmp 102038 <rtems_blkdev_create_partition+0x58> <== NOT EXECUTED
102057: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10205e: 66 90 xchg %ax,%ax <== NOT EXECUTED
102060: 89 1c 24 mov %ebx,(%esp)
102063: 8d 45 8c lea -0x74(%ebp),%eax
102066: b9 09 42 04 40 mov $0x40044209,%ecx
10206b: 89 44 24 08 mov %eax,0x8(%esp)
10206f: 89 4c 24 04 mov %ecx,0x4(%esp)
102073: e8 e8 14 00 00 call 103560 <ioctl>
if (rv == 0) {
102078: 85 c0 test %eax,%eax
10207a: 74 14 je 102090 <rtems_blkdev_create_partition+0xb0>
sc = RTEMS_NOT_IMPLEMENTED;
10207c: be 18 00 00 00 mov $0x18,%esi
102081: eb b5 jmp 102038 <rtems_blkdev_create_partition+0x58>
102083: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10208a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx));
102090: c7 04 24 78 00 00 00 movl $0x78,(%esp)
102097: e8 74 18 00 00 call 103910 <malloc>
if (ctx != NULL) {
10209c: 85 c0 test %eax,%eax
rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx));
10209e: 89 c7 mov %eax,%edi
if (ctx != NULL) {
1020a0: 74 7b je 10211d <rtems_blkdev_create_partition+0x13d>
sc = rtems_disk_init_log(
1020a2: 89 3c 24 mov %edi,(%esp)
1020a5: 8b 45 14 mov 0x14(%ebp),%eax
1020a8: 89 44 24 0c mov %eax,0xc(%esp)
1020ac: 8b 45 10 mov 0x10(%ebp),%eax
1020af: 89 44 24 08 mov %eax,0x8(%esp)
1020b3: 8b 45 8c mov -0x74(%ebp),%eax
1020b6: 89 44 24 04 mov %eax,0x4(%esp)
1020ba: e8 d1 01 00 00 call 102290 <rtems_disk_init_log>
if (sc == RTEMS_SUCCESSFUL) {
1020bf: 85 c0 test %eax,%eax
sc = rtems_disk_init_log(
1020c1: 89 c6 mov %eax,%esi
if (sc == RTEMS_SUCCESSFUL) {
1020c3: 75 4b jne 102110 <rtems_blkdev_create_partition+0x130>
rv = IMFS_make_generic_node(
1020c5: 89 7c 24 0c mov %edi,0xc(%esp)
1020c9: b8 18 af 12 00 mov $0x12af18,%eax
1020ce: ba ff 61 00 00 mov $0x61ff,%edx
1020d3: 89 44 24 08 mov %eax,0x8(%esp)
1020d7: 8b 45 08 mov 0x8(%ebp),%eax
1020da: 89 54 24 04 mov %edx,0x4(%esp)
ctx->fd = fd;
1020de: 89 5f 74 mov %ebx,0x74(%edi)
rv = IMFS_make_generic_node(
1020e1: 89 04 24 mov %eax,(%esp)
1020e4: e8 87 48 00 00 call 106970 <IMFS_make_generic_node>
if (rv != 0) {
1020e9: 85 c0 test %eax,%eax
1020eb: 0f 84 4f ff ff ff je 102040 <rtems_blkdev_create_partition+0x60>
free(ctx);
1020f1: 89 3c 24 mov %edi,(%esp)
sc = RTEMS_UNSATISFIED;
1020f4: be 0d 00 00 00 mov $0xd,%esi
free(ctx);
1020f9: e8 d2 11 00 00 call 1032d0 <free>
if (sc != RTEMS_SUCCESSFUL) {
1020fe: e9 35 ff ff ff jmp 102038 <rtems_blkdev_create_partition+0x58>
102103: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10210a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
free(ctx);
102110: 89 3c 24 mov %edi,(%esp)
102113: e8 b8 11 00 00 call 1032d0 <free>
if (sc != RTEMS_SUCCESSFUL) {
102118: e9 1b ff ff ff jmp 102038 <rtems_blkdev_create_partition+0x58>
sc = RTEMS_NO_MEMORY;
10211d: be 1a 00 00 00 mov $0x1a,%esi
102122: e9 11 ff ff ff jmp 102038 <rtems_blkdev_create_partition+0x58>
102127: 90 nop
102128: 90 nop
102129: 90 nop
10212a: 90 nop
10212b: 90 nop
10212c: 90 nop
10212d: 90 nop
10212e: 90 nop
10212f: 90 nop
00101190 <rtems_blkdev_generic_ioctl>:
rtems_device_driver
rtems_blkdev_generic_ioctl(
rtems_device_major_number major RTEMS_UNUSED,
rtems_device_minor_number minor RTEMS_UNUSED,
void * arg)
{
101190: 55 push %ebp
101191: 89 e5 mov %esp,%ebp
101193: 83 ec 18 sub $0x18,%esp
101196: 89 5d fc mov %ebx,-0x4(%ebp)
101199: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
if (args->command != RTEMS_BLKIO_REQUEST)
10119c: 8b 43 04 mov 0x4(%ebx),%eax
10119f: 3d 01 42 18 c0 cmp $0xc0184201,%eax
1011a4: 74 2a je 1011d0 <rtems_blkdev_generic_ioctl+0x40> <== NEVER TAKEN
rtems_disk_device *dd = iop->data1;
1011a6: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
{
args->ioctl_return = dd->ioctl(dd,
1011a8: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED
rtems_disk_device *dd = iop->data1;
1011ab: 8b 52 28 mov 0x28(%edx),%edx <== NOT EXECUTED
args->ioctl_return = dd->ioctl(dd,
1011ae: 89 4c 24 08 mov %ecx,0x8(%esp) <== NOT EXECUTED
1011b2: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
1011b6: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
1011b9: ff 52 38 call *0x38(%edx) <== NOT EXECUTED
1011bc: 89 43 0c mov %eax,0xc(%ebx)
*/
args->ioctl_return = -1;
}
return RTEMS_SUCCESSFUL;
}
1011bf: 8b 5d fc mov -0x4(%ebp),%ebx
1011c2: 89 ec mov %ebp,%esp
1011c4: 5d pop %ebp
1011c5: 31 c0 xor %eax,%eax
1011c7: c3 ret
1011c8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1011cf: 90 nop
args->ioctl_return = -1;
1011d0: c7 43 0c ff ff ff ff movl $0xffffffff,0xc(%ebx) <== NOT EXECUTED
}
1011d7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1011da: 89 ec mov %ebp,%esp <== NOT EXECUTED
1011dc: 5d pop %ebp <== NOT EXECUTED
1011dd: 31 c0 xor %eax,%eax <== NOT EXECUTED
1011df: c3 ret <== NOT EXECUTED
00100e30 <rtems_blkdev_generic_read>:
rtems_device_driver
rtems_blkdev_generic_read(
rtems_device_major_number major RTEMS_UNUSED,
rtems_device_minor_number minor RTEMS_UNUSED,
void * arg)
{
100e30: 55 push %ebp <== NOT EXECUTED
100e31: 89 e5 mov %esp,%ebp <== NOT EXECUTED
100e33: 57 push %edi <== NOT EXECUTED
100e34: 56 push %esi <== NOT EXECUTED
100e35: 53 push %ebx <== NOT EXECUTED
100e36: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
100e39: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
100e3c: 8b 00 mov (%eax),%eax <== NOT EXECUTED
100e3e: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
100e41: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
uint32_t block_size = dd->block_size;
100e44: 8b 48 24 mov 0x24(%eax),%ecx <== NOT EXECUTED
char *buf = args->buffer;
100e47: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
uint32_t block_size = dd->block_size;
100e4a: 89 4d bc mov %ecx,-0x44(%ebp) <== NOT EXECUTED
char *buf = args->buffer;
100e4d: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
100e50: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
uint32_t count = args->count;
100e53: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
100e56: 8b 78 10 mov 0x10(%eax),%edi <== NOT EXECUTED
100e59: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED
100e5c: 89 44 24 10 mov %eax,0x10(%esp) <== NOT EXECUTED
100e60: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
100e63: 89 4c 24 08 mov %ecx,0x8(%esp) <== NOT EXECUTED
100e67: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
100e69: 89 4c 24 0c mov %ecx,0xc(%esp) <== NOT EXECUTED
100e6d: 89 7d c4 mov %edi,-0x3c(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
100e70: 8b 50 08 mov 0x8(%eax),%edx <== NOT EXECUTED
100e73: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED
100e76: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
100e7a: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
100e7d: e8 ce b8 01 00 call 11c750 <__divmoddi4> <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
args->bytes_moved = 0;
while (count > 0)
100e82: 85 ff test %edi,%edi <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
100e84: 8b 75 d0 mov -0x30(%ebp),%esi <== NOT EXECUTED
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
100e87: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
args->bytes_moved = 0;
100e8a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
100e8d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) <== NOT EXECUTED
while (count > 0)
100e94: 75 32 jne 100ec8 <rtems_blkdev_generic_read+0x98> <== NOT EXECUTED
100e96: e9 95 00 00 00 jmp 100f30 <rtems_blkdev_generic_read+0x100> <== NOT EXECUTED
100e9b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100e9f: 90 nop <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
100ea0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
rc = rtems_bdbuf_release(diskbuf);
100ea2: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
100ea5: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
100ea8: e8 c3 d0 00 00 call 10df70 <rtems_bdbuf_release> <== NOT EXECUTED
100ead: 89 c6 mov %eax,%esi <== NOT EXECUTED
args->bytes_moved += copy;
100eaf: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
100eb2: 01 58 18 add %ebx,0x18(%eax) <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
100eb5: 85 f6 test %esi,%esi <== NOT EXECUTED
100eb7: 0f 85 c3 00 00 00 jne 100f80 <rtems_blkdev_generic_read+0x150> <== NOT EXECUTED
break;
count -= copy;
buf += copy;
100ebd: 01 5d cc add %ebx,-0x34(%ebp) <== NOT EXECUTED
blkofs = 0;
block++;
100ec0: ff 45 c8 incl -0x38(%ebp) <== NOT EXECUTED
while (count > 0)
100ec3: 29 5d c4 sub %ebx,-0x3c(%ebp) <== NOT EXECUTED
100ec6: 74 68 je 100f30 <rtems_blkdev_generic_read+0x100> <== NOT EXECUTED
rc = rtems_bdbuf_read(dd, block, &diskbuf);
100ec8: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
100ecb: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
100ecf: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
100ed2: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
100ed6: 8b 45 c0 mov -0x40(%ebp),%eax <== NOT EXECUTED
100ed9: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
100edc: e8 9f ce 00 00 call 10dd80 <rtems_bdbuf_read> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
100ee1: 85 c0 test %eax,%eax <== NOT EXECUTED
100ee3: 75 4d jne 100f32 <rtems_blkdev_generic_read+0x102> <== NOT EXECUTED
if (copy > count)
100ee5: 8b 5d bc mov -0x44(%ebp),%ebx <== NOT EXECUTED
100ee8: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
100eeb: 29 f3 sub %esi,%ebx <== NOT EXECUTED
100eed: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
100eef: 76 02 jbe 100ef3 <rtems_blkdev_generic_read+0xc3> <== NOT EXECUTED
100ef1: 89 c3 mov %eax,%ebx <== NOT EXECUTED
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
100ef3: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
100ef6: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
100ef8: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
100efb: 01 d6 add %edx,%esi <== NOT EXECUTED
100efd: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
100f00: 83 fb 08 cmp $0x8,%ebx <== NOT EXECUTED
100f03: 89 d7 mov %edx,%edi <== NOT EXECUTED
100f05: 72 99 jb 100ea0 <rtems_blkdev_generic_read+0x70> <== NOT EXECUTED
100f07: f6 c2 01 test $0x1,%dl <== NOT EXECUTED
100f0a: 75 54 jne 100f60 <rtems_blkdev_generic_read+0x130> <== NOT EXECUTED
100f0c: f7 c7 02 00 00 00 test $0x2,%edi <== NOT EXECUTED
100f12: 75 2c jne 100f40 <rtems_blkdev_generic_read+0x110> <== NOT EXECUTED
100f14: f7 c7 04 00 00 00 test $0x4,%edi <== NOT EXECUTED
100f1a: 74 84 je 100ea0 <rtems_blkdev_generic_read+0x70> <== NOT EXECUTED
100f1c: 8b 06 mov (%esi),%eax <== NOT EXECUTED
100f1e: 83 c7 04 add $0x4,%edi <== NOT EXECUTED
100f21: 83 c6 04 add $0x4,%esi <== NOT EXECUTED
100f24: 83 e9 04 sub $0x4,%ecx <== NOT EXECUTED
100f27: 89 47 fc mov %eax,-0x4(%edi) <== NOT EXECUTED
100f2a: e9 71 ff ff ff jmp 100ea0 <rtems_blkdev_generic_read+0x70> <== NOT EXECUTED
100f2f: 90 nop <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
100f30: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return rc;
}
100f32: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
100f35: 5b pop %ebx <== NOT EXECUTED
100f36: 5e pop %esi <== NOT EXECUTED
100f37: 5f pop %edi <== NOT EXECUTED
100f38: 5d pop %ebp <== NOT EXECUTED
100f39: c3 ret <== NOT EXECUTED
100f3a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi <== NOT EXECUTED
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
100f40: 0f b7 06 movzwl (%esi),%eax <== NOT EXECUTED
100f43: 83 c7 02 add $0x2,%edi <== NOT EXECUTED
100f46: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
100f49: 83 e9 02 sub $0x2,%ecx <== NOT EXECUTED
100f4c: 66 89 47 fe mov %ax,-0x2(%edi) <== NOT EXECUTED
100f50: eb c2 jmp 100f14 <rtems_blkdev_generic_read+0xe4> <== NOT EXECUTED
100f52: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100f59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100f60: 0f b6 06 movzbl (%esi),%eax <== NOT EXECUTED
100f63: 8d 7a 01 lea 0x1(%edx),%edi <== NOT EXECUTED
100f66: 46 inc %esi <== NOT EXECUTED
100f67: 8d 4b ff lea -0x1(%ebx),%ecx <== NOT EXECUTED
100f6a: 88 45 bb mov %al,-0x45(%ebp) <== NOT EXECUTED
100f6d: 88 02 mov %al,(%edx) <== NOT EXECUTED
100f6f: eb 9b jmp 100f0c <rtems_blkdev_generic_read+0xdc> <== NOT EXECUTED
100f71: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100f78: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100f7f: 90 nop <== NOT EXECUTED
}
100f80: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
100f83: 89 f0 mov %esi,%eax <== NOT EXECUTED
}
100f85: 5b pop %ebx <== NOT EXECUTED
100f86: 5e pop %esi <== NOT EXECUTED
100f87: 5f pop %edi <== NOT EXECUTED
100f88: 5d pop %ebp <== NOT EXECUTED
100f89: c3 ret <== NOT EXECUTED
100f8a: 90 nop
100f8b: 90 nop
100f8c: 90 nop
100f8d: 90 nop
100f8e: 90 nop
100f8f: 90 nop
00100f90 <rtems_blkdev_generic_write>:
rtems_device_driver
rtems_blkdev_generic_write(
rtems_device_major_number major RTEMS_UNUSED,
rtems_device_minor_number minor RTEMS_UNUSED,
void * arg)
{
100f90: 55 push %ebp <== NOT EXECUTED
100f91: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
100f93: 89 e5 mov %esp,%ebp <== NOT EXECUTED
100f95: 57 push %edi <== NOT EXECUTED
100f96: 56 push %esi <== NOT EXECUTED
100f97: 53 push %ebx <== NOT EXECUTED
100f98: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
rtems_status_code rc = RTEMS_SUCCESSFUL;
rtems_libio_rw_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
100f9b: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
100f9e: 8b 00 mov (%eax),%eax <== NOT EXECUTED
100fa0: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
100fa3: 89 45 bc mov %eax,-0x44(%ebp) <== NOT EXECUTED
uint32_t block_size = dd->block_size;
100fa6: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED
char *buf = args->buffer;
100fa9: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
uint32_t block_size = dd->block_size;
100fac: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED
char *buf = args->buffer;
100faf: 8b 40 0c mov 0xc(%eax),%eax <== NOT EXECUTED
100fb2: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED
uint32_t count = args->count;
100fb5: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
100fb8: 8b 78 10 mov 0x10(%eax),%edi <== NOT EXECUTED
100fbb: 8d 45 d0 lea -0x30(%ebp),%eax <== NOT EXECUTED
100fbe: 89 44 24 10 mov %eax,0x10(%esp) <== NOT EXECUTED
100fc2: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
100fc5: 89 54 24 08 mov %edx,0x8(%esp) <== NOT EXECUTED
100fc9: 89 4c 24 0c mov %ecx,0xc(%esp) <== NOT EXECUTED
100fcd: 89 7d cc mov %edi,-0x34(%ebp) <== NOT EXECUTED
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
100fd0: 8b 50 08 mov 0x8(%eax),%edx <== NOT EXECUTED
100fd3: 8b 40 04 mov 0x4(%eax),%eax <== NOT EXECUTED
100fd6: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
100fda: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
100fdd: e8 6e b7 01 00 call 11c750 <__divmoddi4> <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
args->bytes_moved = 0;
while (count > 0)
100fe2: 85 ff test %edi,%edi <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
100fe4: 8b 75 d0 mov -0x30(%ebp),%esi <== NOT EXECUTED
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
100fe7: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
args->bytes_moved = 0;
100fea: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
100fed: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) <== NOT EXECUTED
while (count > 0)
100ff4: 75 36 jne 10102c <rtems_blkdev_generic_write+0x9c> <== NOT EXECUTED
100ff6: e9 25 01 00 00 jmp 101120 <rtems_blkdev_generic_write+0x190> <== NOT EXECUTED
100ffb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
100fff: 90 nop <== NOT EXECUTED
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
101000: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
args->bytes_moved += copy;
101002: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
101005: 01 58 18 add %ebx,0x18(%eax) <== NOT EXECUTED
rc = rtems_bdbuf_release_modified(diskbuf);
101008: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
10100b: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10100e: e8 5d d0 00 00 call 10e070 <rtems_bdbuf_release_modified> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
101013: 85 c0 test %eax,%eax <== NOT EXECUTED
rc = rtems_bdbuf_release_modified(diskbuf);
101015: 89 c6 mov %eax,%esi <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
101017: 0f 85 ad 00 00 00 jne 1010ca <rtems_blkdev_generic_write+0x13a> <== NOT EXECUTED
break;
count -= copy;
buf += copy;
10101d: 01 5d c8 add %ebx,-0x38(%ebp) <== NOT EXECUTED
blkofs = 0;
block++;
101020: ff 45 c4 incl -0x3c(%ebp) <== NOT EXECUTED
while (count > 0)
101023: 29 5d cc sub %ebx,-0x34(%ebp) <== NOT EXECUTED
101026: 0f 84 f4 00 00 00 je 101120 <rtems_blkdev_generic_write+0x190> <== NOT EXECUTED
rc = rtems_bdbuf_get(dd, block, &diskbuf);
10102c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
if ((blkofs == 0) && (count >= block_size))
10102f: 85 f6 test %esi,%esi <== NOT EXECUTED
101031: 75 7d jne 1010b0 <rtems_blkdev_generic_write+0x120> <== NOT EXECUTED
101033: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
101036: 39 55 c0 cmp %edx,-0x40(%ebp) <== NOT EXECUTED
101039: 77 75 ja 1010b0 <rtems_blkdev_generic_write+0x120> <== NOT EXECUTED
rc = rtems_bdbuf_get(dd, block, &diskbuf);
10103b: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
10103f: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
101042: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
101046: 8b 45 bc mov -0x44(%ebp),%eax <== NOT EXECUTED
101049: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10104c: e8 4f cc 00 00 call 10dca0 <rtems_bdbuf_get> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
101051: 85 c0 test %eax,%eax <== NOT EXECUTED
101053: 75 75 jne 1010ca <rtems_blkdev_generic_write+0x13a> <== NOT EXECUTED
if (copy > count)
101055: 8b 5d c0 mov -0x40(%ebp),%ebx <== NOT EXECUTED
101058: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
10105b: 29 f3 sub %esi,%ebx <== NOT EXECUTED
10105d: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
10105f: 76 02 jbe 101063 <rtems_blkdev_generic_write+0xd3> <== NOT EXECUTED
101061: 89 c3 mov %eax,%ebx <== NOT EXECUTED
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
101063: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
101066: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
101068: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
10106b: 01 d6 add %edx,%esi <== NOT EXECUTED
10106d: 83 fb 08 cmp $0x8,%ebx <== NOT EXECUTED
101070: 89 f0 mov %esi,%eax <== NOT EXECUTED
101072: 89 f7 mov %esi,%edi <== NOT EXECUTED
101074: 8b 75 c8 mov -0x38(%ebp),%esi <== NOT EXECUTED
101077: 72 87 jb 101000 <rtems_blkdev_generic_write+0x70> <== NOT EXECUTED
101079: a8 01 test $0x1,%al <== NOT EXECUTED
10107b: 0f 85 7f 00 00 00 jne 101100 <rtems_blkdev_generic_write+0x170> <== NOT EXECUTED
101081: f7 c7 02 00 00 00 test $0x2,%edi <== NOT EXECUTED
101087: 75 57 jne 1010e0 <rtems_blkdev_generic_write+0x150> <== NOT EXECUTED
101089: f7 c7 04 00 00 00 test $0x4,%edi <== NOT EXECUTED
10108f: 0f 84 6b ff ff ff je 101000 <rtems_blkdev_generic_write+0x70> <== NOT EXECUTED
101095: 8b 06 mov (%esi),%eax <== NOT EXECUTED
101097: 83 c7 04 add $0x4,%edi <== NOT EXECUTED
10109a: 83 c6 04 add $0x4,%esi <== NOT EXECUTED
10109d: 83 e9 04 sub $0x4,%ecx <== NOT EXECUTED
1010a0: 89 47 fc mov %eax,-0x4(%edi) <== NOT EXECUTED
1010a3: e9 58 ff ff ff jmp 101000 <rtems_blkdev_generic_write+0x70> <== NOT EXECUTED
1010a8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1010af: 90 nop <== NOT EXECUTED
rc = rtems_bdbuf_read(dd, block, &diskbuf);
1010b0: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
1010b4: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
1010b7: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
1010bb: 8b 45 bc mov -0x44(%ebp),%eax <== NOT EXECUTED
1010be: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1010c1: e8 ba cc 00 00 call 10dd80 <rtems_bdbuf_read> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
1010c6: 85 c0 test %eax,%eax <== NOT EXECUTED
1010c8: 74 8b je 101055 <rtems_blkdev_generic_write+0xc5> <== NOT EXECUTED
}
return rc;
}
1010ca: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
1010cd: 5b pop %ebx <== NOT EXECUTED
1010ce: 5e pop %esi <== NOT EXECUTED
1010cf: 5f pop %edi <== NOT EXECUTED
1010d0: 5d pop %ebp <== NOT EXECUTED
1010d1: c3 ret <== NOT EXECUTED
1010d2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1010d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
1010e0: 0f b7 06 movzwl (%esi),%eax <== NOT EXECUTED
1010e3: 83 c7 02 add $0x2,%edi <== NOT EXECUTED
1010e6: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
1010e9: 83 e9 02 sub $0x2,%ecx <== NOT EXECUTED
1010ec: 66 89 47 fe mov %ax,-0x2(%edi) <== NOT EXECUTED
1010f0: eb 97 jmp 101089 <rtems_blkdev_generic_write+0xf9> <== NOT EXECUTED
1010f2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1010f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
101100: 0f b6 16 movzbl (%esi),%edx <== NOT EXECUTED
101103: 8d 4b ff lea -0x1(%ebx),%ecx <== NOT EXECUTED
101106: 47 inc %edi <== NOT EXECUTED
101107: 8d 76 01 lea 0x1(%esi),%esi <== NOT EXECUTED
10110a: 88 55 bb mov %dl,-0x45(%ebp) <== NOT EXECUTED
10110d: 88 10 mov %dl,(%eax) <== NOT EXECUTED
10110f: e9 6d ff ff ff jmp 101081 <rtems_blkdev_generic_write+0xf1> <== NOT EXECUTED
101114: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10111b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10111f: 90 nop <== NOT EXECUTED
}
101120: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
101123: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
101125: 5b pop %ebx <== NOT EXECUTED
101126: 5e pop %esi <== NOT EXECUTED
101127: 5f pop %edi <== NOT EXECUTED
101128: 5d pop %ebp <== NOT EXECUTED
101129: c3 ret <== NOT EXECUTED
10112a: 90 nop
10112b: 90 nop
10112c: 90 nop
10112d: 90 nop
10112e: 90 nop
10112f: 90 nop
0010ff60 <rtems_blkdev_ioctl>:
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
10ff60: 55 push %ebp
10ff61: 89 e5 mov %esp,%ebp
10ff63: 83 ec 18 sub $0x18,%esp
10ff66: 8b 45 0c mov 0xc(%ebp),%eax
rtems_status_code sc;
int rc = 0;
switch (req)
10ff69: 3d 0b 42 04 40 cmp $0x4004420b,%eax
10ff6e: 77 20 ja 10ff90 <rtems_blkdev_ioctl+0x30>
10ff70: 3d 01 42 04 40 cmp $0x40044201,%eax
10ff75: 76 49 jbe 10ffc0 <rtems_blkdev_ioctl+0x60>
10ff77: 2d 02 42 04 40 sub $0x40044202,%eax
10ff7c: 83 f8 09 cmp $0x9,%eax
10ff7f: 0f 87 8b 00 00 00 ja 110010 <rtems_blkdev_ioctl+0xb0> <== NEVER TAKEN
10ff85: ff 24 85 94 b9 12 00 jmp *0x12b994(,%eax,4)
10ff8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
10ff90: 3d 04 42 04 80 cmp $0x80044204,%eax
10ff95: 75 79 jne 110010 <rtems_blkdev_ioctl+0xb0> <== NEVER TAKEN
case RTEMS_BLKIO_GETBLKSIZE:
*(uint32_t *) argp = dd->block_size;
break;
case RTEMS_BLKIO_SETBLKSIZE:
sc = rtems_bdbuf_set_block_size(dd, *(uint32_t *) argp, true);
10ff97: b8 01 00 00 00 mov $0x1,%eax
10ff9c: 89 44 24 08 mov %eax,0x8(%esp)
10ffa0: 8b 45 10 mov 0x10(%ebp),%eax
10ffa3: 8b 00 mov (%eax),%eax
10ffa5: 89 44 24 04 mov %eax,0x4(%esp)
10ffa9: 8b 45 08 mov 0x8(%ebp),%eax
10ffac: 89 04 24 mov %eax,(%esp)
10ffaf: e8 8c fd ff ff call 10fd40 <rtems_bdbuf_set_block_size>
if (sc != RTEMS_SUCCESSFUL) {
10ffb4: 85 c0 test %eax,%eax
10ffb6: 75 41 jne 10fff9 <rtems_blkdev_ioctl+0x99> <== NEVER TAKEN
int rc = 0;
10ffb8: 31 c0 xor %eax,%eax
rc = -1;
break;
}
return rc;
}
10ffba: 89 ec mov %ebp,%esp
10ffbc: 5d pop %ebp
10ffbd: c3 ret
10ffbe: 66 90 xchg %ax,%ax
switch (req)
10ffc0: 3d 0a 42 00 20 cmp $0x2000420a,%eax
10ffc5: 0f 84 f5 00 00 00 je 1100c0 <rtems_blkdev_ioctl+0x160>
10ffcb: 3d 0c 42 00 20 cmp $0x2000420c,%eax
10ffd0: 75 11 jne 10ffe3 <rtems_blkdev_ioctl+0x83>
rtems_bdbuf_reset_device_stats(dd);
10ffd2: 8b 45 08 mov 0x8(%ebp),%eax
10ffd5: 89 04 24 mov %eax,(%esp)
10ffd8: e8 b3 fe ff ff call 10fe90 <rtems_bdbuf_reset_device_stats>
}
10ffdd: 89 ec mov %ebp,%esp
int rc = 0;
10ffdf: 31 c0 xor %eax,%eax
}
10ffe1: 5d pop %ebp
10ffe2: c3 ret
switch (req)
10ffe3: 3d 06 42 00 20 cmp $0x20004206,%eax
10ffe8: 75 26 jne 110010 <rtems_blkdev_ioctl+0xb0>
sc = rtems_bdbuf_syncdev(dd);
10ffea: 8b 45 08 mov 0x8(%ebp),%eax
10ffed: 89 04 24 mov %eax,(%esp)
10fff0: e8 5b fc ff ff call 10fc50 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL) {
10fff5: 85 c0 test %eax,%eax
10fff7: 74 bf je 10ffb8 <rtems_blkdev_ioctl+0x58> <== ALWAYS TAKEN
errno = EIO;
10fff9: e8 52 f3 00 00 call 11f350 <__errno> <== NOT EXECUTED
10fffe: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
rc = -1;
110004: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
110009: eb af jmp 10ffba <rtems_blkdev_ioctl+0x5a> <== NOT EXECUTED
11000b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
11000f: 90 nop <== NOT EXECUTED
errno = EINVAL;
110010: e8 3b f3 00 00 call 11f350 <__errno>
110015: c7 00 16 00 00 00 movl $0x16,(%eax)
}
11001b: 89 ec mov %ebp,%esp
rc = -1;
11001d: b8 ff ff ff ff mov $0xffffffff,%eax
}
110022: 5d pop %ebp
110023: c3 ret
110024: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
11002b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
11002f: 90 nop
*(uint32_t *) argp = dd->media_block_size;
110030: 8b 45 08 mov 0x8(%ebp),%eax
110033: 8b 55 10 mov 0x10(%ebp),%edx
110036: 8b 40 20 mov 0x20(%eax),%eax
110039: 89 02 mov %eax,(%edx)
}
11003b: 89 ec mov %ebp,%esp
int rc = 0;
11003d: 31 c0 xor %eax,%eax
}
11003f: 5d pop %ebp
110040: c3 ret
110041: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
110048: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
11004f: 90 nop
*(uint32_t *) argp = dd->block_size;
110050: 8b 45 08 mov 0x8(%ebp),%eax
110053: 8b 4d 10 mov 0x10(%ebp),%ecx
110056: 8b 40 24 mov 0x24(%eax),%eax
110059: 89 01 mov %eax,(%ecx)
}
11005b: 89 ec mov %ebp,%esp
int rc = 0;
11005d: 31 c0 xor %eax,%eax
}
11005f: 5d pop %ebp
110060: c3 ret
110061: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
110068: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
11006f: 90 nop
*(rtems_blkdev_bnum *) argp = dd->size;
110070: 8b 45 08 mov 0x8(%ebp),%eax
110073: 8b 55 10 mov 0x10(%ebp),%edx
110076: 8b 40 1c mov 0x1c(%eax),%eax
110079: 89 02 mov %eax,(%edx)
}
11007b: 89 ec mov %ebp,%esp
int rc = 0;
11007d: 31 c0 xor %eax,%eax
}
11007f: 5d pop %ebp
110080: c3 ret
110081: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
110088: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
11008f: 90 nop
*(rtems_disk_device **) argp = dd;
110090: 8b 45 10 mov 0x10(%ebp),%eax
110093: 8b 4d 08 mov 0x8(%ebp),%ecx
110096: 89 08 mov %ecx,(%eax)
}
110098: 89 ec mov %ebp,%esp
int rc = 0;
11009a: 31 c0 xor %eax,%eax
}
11009c: 5d pop %ebp
11009d: c3 ret
11009e: 66 90 xchg %ax,%ax
rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);
1100a0: 8b 45 10 mov 0x10(%ebp),%eax
1100a3: 89 44 24 04 mov %eax,0x4(%esp)
1100a7: 8b 45 08 mov 0x8(%ebp),%eax
1100aa: 89 04 24 mov %eax,(%esp)
1100ad: e8 9e fd ff ff call 10fe50 <rtems_bdbuf_get_device_stats>
int rc = 0;
1100b2: 31 c0 xor %eax,%eax
1100b4: e9 01 ff ff ff jmp 10ffba <rtems_blkdev_ioctl+0x5a>
1100b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
rtems_bdbuf_purge_dev(dd);
1100c0: 8b 45 08 mov 0x8(%ebp),%eax
1100c3: 89 04 24 mov %eax,(%esp)
1100c6: e8 35 fc ff ff call 10fd00 <rtems_bdbuf_purge_dev>
}
1100cb: 89 ec mov %ebp,%esp
int rc = 0;
1100cd: 31 c0 xor %eax,%eax
}
1100cf: 5d pop %ebp
1100d0: c3 ret
1100d1: 90 nop
1100d2: 90 nop
1100d3: 90 nop
1100d4: 90 nop
1100d5: 90 nop
1100d6: 90 nop
1100d7: 90 nop
1100d8: 90 nop
1100d9: 90 nop
1100da: 90 nop
1100db: 90 nop
1100dc: 90 nop
1100dd: 90 nop
1100de: 90 nop
1100df: 90 nop
00137870 <rtems_blkstats>:
#include <unistd.h>
#include <errno.h>
#include <string.h>
void rtems_blkstats(const rtems_printer* printer, const char *device, bool reset)
{
137870: 55 push %ebp <== NOT EXECUTED
int fd = open(device, O_RDONLY);
137871: 31 c0 xor %eax,%eax <== NOT EXECUTED
{
137873: 89 e5 mov %esp,%ebp <== NOT EXECUTED
137875: 81 ec c8 00 00 00 sub $0xc8,%esp <== NOT EXECUTED
int fd = open(device, O_RDONLY);
13787b: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
13787f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
{
137882: 89 5d f4 mov %ebx,-0xc(%ebp) <== NOT EXECUTED
137885: 0f b6 5d 10 movzbl 0x10(%ebp),%ebx <== NOT EXECUTED
137889: 89 7d fc mov %edi,-0x4(%ebp) <== NOT EXECUTED
13788c: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
13788f: 89 75 f8 mov %esi,-0x8(%ebp) <== NOT EXECUTED
int fd = open(device, O_RDONLY);
137892: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
137895: e8 f6 10 fd ff call 108990 <open> <== NOT EXECUTED
if (fd >= 0) {
13789a: 85 c0 test %eax,%eax <== NOT EXECUTED
13789c: 0f 88 ee 00 00 00 js 137990 <rtems_blkstats+0x120> <== NOT EXECUTED
1378a2: 89 c6 mov %eax,%esi <== NOT EXECUTED
struct stat st;
int rv;
rv = fstat(fd, &st);
1378a4: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
1378a7: 8d 45 90 lea -0x70(%ebp),%eax <== NOT EXECUTED
1378aa: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
1378ae: e8 0d 01 fd ff call 1079c0 <fstat> <== NOT EXECUTED
if (rv == 0) {
1378b3: 85 c0 test %eax,%eax <== NOT EXECUTED
1378b5: 0f 85 05 01 00 00 jne 1379c0 <rtems_blkstats+0x150> <== NOT EXECUTED
if (S_ISBLK(st.st_mode)) {
1378bb: 8b 45 a0 mov -0x60(%ebp),%eax <== NOT EXECUTED
1378be: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED
1378c3: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED
1378c8: 0f 85 b2 01 00 00 jne 137a80 <rtems_blkstats+0x210> <== NOT EXECUTED
if (reset) {
1378ce: 84 db test %bl,%bl <== NOT EXECUTED
1378d0: 0f 85 2a 01 00 00 jne 137a00 <rtems_blkstats+0x190> <== NOT EXECUTED
return ioctl(fd, RTEMS_BLKIO_GETMEDIABLKSIZE, media_block_size);
1378d6: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
static inline int rtems_disk_fd_get_device_stats(
int fd,
rtems_blkdev_stats *stats
)
{
return ioctl(fd, RTEMS_BLKIO_GETDEVSTATS, stats);
1378d9: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx <== NOT EXECUTED
rv = rtems_disk_fd_reset_device_stats(fd);
if (rv != 0) {
rtems_printf(printer, "error: reset stats: %s\n", strerror(errno));
}
} else {
uint32_t media_block_size = 0;
1378df: 31 c0 xor %eax,%eax <== NOT EXECUTED
1378e1: 89 85 64 ff ff ff mov %eax,-0x9c(%ebp) <== NOT EXECUTED
uint32_t media_block_count = 0;
1378e7: 31 c0 xor %eax,%eax <== NOT EXECUTED
1378e9: 89 85 68 ff ff ff mov %eax,-0x98(%ebp) <== NOT EXECUTED
uint32_t block_size = 0;
1378ef: 31 c0 xor %eax,%eax <== NOT EXECUTED
1378f1: 89 85 6c ff ff ff mov %eax,-0x94(%ebp) <== NOT EXECUTED
return ioctl(fd, RTEMS_BLKIO_GETMEDIABLKSIZE, media_block_size);
1378f7: 8d 85 64 ff ff ff lea -0x9c(%ebp),%eax <== NOT EXECUTED
1378fd: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
137901: b8 02 42 04 40 mov $0x40044202,%eax <== NOT EXECUTED
137906: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
13790a: e8 81 02 fd ff call 107b90 <ioctl> <== NOT EXECUTED
return ioctl(fd, RTEMS_BLKIO_GETSIZE, block_count);
13790f: 8d 85 68 ff ff ff lea -0x98(%ebp),%eax <== NOT EXECUTED
137915: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
137919: b8 05 42 04 40 mov $0x40044205,%eax <== NOT EXECUTED
13791e: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
137922: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
137925: e8 66 02 fd ff call 107b90 <ioctl> <== NOT EXECUTED
return ioctl(fd, RTEMS_BLKIO_GETBLKSIZE, block_size);
13792a: 8d 85 6c ff ff ff lea -0x94(%ebp),%eax <== NOT EXECUTED
137930: ba 03 42 04 40 mov $0x40044203,%edx <== NOT EXECUTED
137935: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
137939: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
13793d: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
137940: e8 4b 02 fd ff call 107b90 <ioctl> <== NOT EXECUTED
return ioctl(fd, RTEMS_BLKIO_GETDEVSTATS, stats);
137945: b9 0b 42 04 40 mov $0x4004420b,%ecx <== NOT EXECUTED
13794a: 89 5c 24 08 mov %ebx,0x8(%esp) <== NOT EXECUTED
13794e: 89 4c 24 04 mov %ecx,0x4(%esp) <== NOT EXECUTED
137952: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
137955: e8 36 02 fd ff call 107b90 <ioctl> <== NOT EXECUTED
rtems_disk_fd_get_media_block_size(fd, &media_block_size);
rtems_disk_fd_get_block_count(fd, &media_block_count);
rtems_disk_fd_get_block_size(fd, &block_size);
rv = rtems_disk_fd_get_device_stats(fd, &stats);
if (rv == 0) {
13795a: 85 c0 test %eax,%eax <== NOT EXECUTED
13795c: 0f 85 3e 01 00 00 jne 137aa0 <rtems_blkstats+0x230> <== NOT EXECUTED
rtems_blkdev_print_stats(
137962: 89 7c 24 10 mov %edi,0x10(%esp) <== NOT EXECUTED
137966: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax <== NOT EXECUTED
13796c: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
13796f: 89 44 24 0c mov %eax,0xc(%esp) <== NOT EXECUTED
137973: 8b 85 68 ff ff ff mov -0x98(%ebp),%eax <== NOT EXECUTED
137979: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
13797d: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax <== NOT EXECUTED
137983: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
137987: e8 c4 02 00 00 call 137c50 <rtems_blkdev_print_stats> <== NOT EXECUTED
13798c: eb 56 jmp 1379e4 <rtems_blkstats+0x174> <== NOT EXECUTED
13798e: 66 90 xchg %ax,%ax <== NOT EXECUTED
rv = close(fd);
if (rv != 0) {
rtems_printf(printer, "error: close device: %s\n", strerror(errno));
}
} else {
rtems_printf(printer, "error: open device: %s\n", strerror(errno));
137990: e8 4b 92 03 00 call 170be0 <__errno> <== NOT EXECUTED
137995: 8b 00 mov (%eax),%eax <== NOT EXECUTED
137997: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
13799a: e8 91 02 04 00 call 177c30 <strerror> <== NOT EXECUTED
}
}
13799f: 8b 5d f4 mov -0xc(%ebp),%ebx <== NOT EXECUTED
rtems_printf(printer, "error: open device: %s\n", strerror(errno));
1379a2: 89 7d 08 mov %edi,0x8(%ebp) <== NOT EXECUTED
}
1379a5: 8b 75 f8 mov -0x8(%ebp),%esi <== NOT EXECUTED
rtems_printf(printer, "error: open device: %s\n", strerror(errno));
1379a8: c7 45 0c 11 47 19 00 movl $0x194711,0xc(%ebp) <== NOT EXECUTED
}
1379af: 8b 7d fc mov -0x4(%ebp),%edi <== NOT EXECUTED
rtems_printf(printer, "error: open device: %s\n", strerror(errno));
1379b2: 89 45 10 mov %eax,0x10(%ebp) <== NOT EXECUTED
}
1379b5: 89 ec mov %ebp,%esp <== NOT EXECUTED
1379b7: 5d pop %ebp <== NOT EXECUTED
rtems_printf(printer, "error: open device: %s\n", strerror(errno));
1379b8: e9 c3 16 00 00 jmp 139080 <rtems_printf> <== NOT EXECUTED
1379bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_printf(printer, "error: get file stats: %s\n", strerror(errno));
1379c0: e8 1b 92 03 00 call 170be0 <__errno> <== NOT EXECUTED
1379c5: 8b 00 mov (%eax),%eax <== NOT EXECUTED
1379c7: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1379ca: e8 61 02 04 00 call 177c30 <strerror> <== NOT EXECUTED
1379cf: ba dd 46 19 00 mov $0x1946dd,%edx <== NOT EXECUTED
1379d4: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
1379d8: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
1379db: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
1379df: e8 9c 16 00 00 call 139080 <rtems_printf> <== NOT EXECUTED
rv = close(fd);
1379e4: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
1379e7: e8 c4 fc fc ff call 1076b0 <close> <== NOT EXECUTED
if (rv != 0) {
1379ec: 85 c0 test %eax,%eax <== NOT EXECUTED
1379ee: 75 50 jne 137a40 <rtems_blkstats+0x1d0> <== NOT EXECUTED
}
1379f0: 8b 5d f4 mov -0xc(%ebp),%ebx <== NOT EXECUTED
1379f3: 8b 75 f8 mov -0x8(%ebp),%esi <== NOT EXECUTED
1379f6: 8b 7d fc mov -0x4(%ebp),%edi <== NOT EXECUTED
1379f9: 89 ec mov %ebp,%esp <== NOT EXECUTED
1379fb: 5d pop %ebp <== NOT EXECUTED
1379fc: c3 ret <== NOT EXECUTED
1379fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
static inline int rtems_disk_fd_reset_device_stats(int fd)
{
return ioctl(fd, RTEMS_BLKIO_RESETDEVSTATS);
137a00: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
137a03: b8 0c 42 00 20 mov $0x2000420c,%eax <== NOT EXECUTED
137a08: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
137a0c: e8 7f 01 fd ff call 107b90 <ioctl> <== NOT EXECUTED
if (rv != 0) {
137a11: 85 c0 test %eax,%eax <== NOT EXECUTED
137a13: 74 cf je 1379e4 <rtems_blkstats+0x174> <== NOT EXECUTED
rtems_printf(printer, "error: reset stats: %s\n", strerror(errno));
137a15: e8 c6 91 03 00 call 170be0 <__errno> <== NOT EXECUTED
137a1a: bb 94 46 19 00 mov $0x194694,%ebx <== NOT EXECUTED
137a1f: 8b 00 mov (%eax),%eax <== NOT EXECUTED
137a21: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
137a24: e8 07 02 04 00 call 177c30 <strerror> <== NOT EXECUTED
137a29: 89 5c 24 04 mov %ebx,0x4(%esp) <== NOT EXECUTED
137a2d: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
137a30: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
137a34: e8 47 16 00 00 call 139080 <rtems_printf> <== NOT EXECUTED
137a39: eb a9 jmp 1379e4 <rtems_blkstats+0x174> <== NOT EXECUTED
137a3b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
137a3f: 90 nop <== NOT EXECUTED
rtems_printf(printer, "error: close device: %s\n", strerror(errno));
137a40: e8 9b 91 03 00 call 170be0 <__errno> <== NOT EXECUTED
137a45: 8b 00 mov (%eax),%eax <== NOT EXECUTED
137a47: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
137a4a: e8 e1 01 04 00 call 177c30 <strerror> <== NOT EXECUTED
137a4f: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
137a52: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
137a56: b8 f8 46 19 00 mov $0x1946f8,%eax <== NOT EXECUTED
137a5b: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
137a5f: e8 1c 16 00 00 call 139080 <rtems_printf> <== NOT EXECUTED
}
137a64: 8b 5d f4 mov -0xc(%ebp),%ebx <== NOT EXECUTED
137a67: 8b 75 f8 mov -0x8(%ebp),%esi <== NOT EXECUTED
137a6a: 8b 7d fc mov -0x4(%ebp),%edi <== NOT EXECUTED
137a6d: 89 ec mov %ebp,%esp <== NOT EXECUTED
137a6f: 5d pop %ebp <== NOT EXECUTED
137a70: c3 ret <== NOT EXECUTED
137a71: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
137a78: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
137a7f: 90 nop <== NOT EXECUTED
rtems_printf(printer, "error: not a block device\n");
137a80: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
137a83: b9 c2 46 19 00 mov $0x1946c2,%ecx <== NOT EXECUTED
137a88: 89 4c 24 04 mov %ecx,0x4(%esp) <== NOT EXECUTED
137a8c: e8 ef 15 00 00 call 139080 <rtems_printf> <== NOT EXECUTED
137a91: e9 4e ff ff ff jmp 1379e4 <rtems_blkstats+0x174> <== NOT EXECUTED
137a96: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
137a9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_printf(printer, "error: get stats: %s\n", strerror(errno));
137aa0: e8 3b 91 03 00 call 170be0 <__errno> <== NOT EXECUTED
137aa5: bb ac 46 19 00 mov $0x1946ac,%ebx <== NOT EXECUTED
137aaa: 8b 00 mov (%eax),%eax <== NOT EXECUTED
137aac: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
137aaf: e8 7c 01 04 00 call 177c30 <strerror> <== NOT EXECUTED
137ab4: 89 5c 24 04 mov %ebx,0x4(%esp) <== NOT EXECUTED
137ab8: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
137abb: 89 44 24 08 mov %eax,0x8(%esp) <== NOT EXECUTED
137abf: e8 bc 15 00 00 call 139080 <rtems_printf> <== NOT EXECUTED
137ac4: e9 1b ff ff ff jmp 1379e4 <rtems_blkstats+0x174> <== NOT EXECUTED
137ac9: 90 nop
137aca: 90 nop
137acb: 90 nop
137acc: 90 nop
137acd: 90 nop
137ace: 90 nop
137acf: 90 nop
001017e0 <rtems_disk_create_log>:
{
1017e0: 55 push %ebp
1017e1: 89 e5 mov %esp,%ebp
1017e3: 57 push %edi
1017e4: 56 push %esi
1017e5: 53 push %ebx
1017e6: 83 ec 3c sub $0x3c,%esp
_Mutex_Acquire( mutex );
1017e9: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp)
1017f0: 8b 45 10 mov 0x10(%ebp),%eax
1017f3: 8b 55 14 mov 0x14(%ebp),%edx
rtems_disk_device *dd = NULL;
1017f6: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
{
1017fd: 8b 75 08 mov 0x8(%ebp),%esi
char *alloc_name = NULL;
101800: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
{
101807: 8b 7d 0c mov 0xc(%ebp),%edi
10180a: 89 45 d0 mov %eax,-0x30(%ebp)
10180d: 89 55 d4 mov %edx,-0x2c(%ebp)
101810: e8 3b 6f 00 00 call 108750 <_Mutex_Acquire>
phys_dd = get_disk_entry(phys, true);
101815: 8b 45 d0 mov -0x30(%ebp),%eax
diskdevs_protected = true;
101818: b1 01 mov $0x1,%cl
10181a: 88 0d 24 cf 12 00 mov %cl,0x12cf24
phys_dd = get_disk_entry(phys, true);
101820: 8b 55 d4 mov -0x2c(%ebp),%edx
101823: b9 01 00 00 00 mov $0x1,%ecx
101828: e8 b3 f9 ff ff call 1011e0 <get_disk_entry>
10182d: 89 45 d0 mov %eax,-0x30(%ebp)
if (phys_dd == NULL) {
101830: 85 c0 test %eax,%eax
101832: 0f 84 a8 00 00 00 je 1018e0 <rtems_disk_create_log+0x100>
sc = create_disk(dev, name, &dd, &alloc_name);
101838: 8b 4d 20 mov 0x20(%ebp),%ecx
10183b: 8d 45 e4 lea -0x1c(%ebp),%eax
10183e: 89 fa mov %edi,%edx
101840: 89 44 24 04 mov %eax,0x4(%esp)
101844: 8d 45 e0 lea -0x20(%ebp),%eax
101847: 89 04 24 mov %eax,(%esp)
10184a: 89 f0 mov %esi,%eax
10184c: e8 0f fa ff ff call 101260 <create_disk>
if (sc != RTEMS_SUCCESSFUL) {
101851: 85 c0 test %eax,%eax
sc = create_disk(dev, name, &dd, &alloc_name);
101853: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL) {
101855: 75 3a jne 101891 <rtems_disk_create_log+0xb1>
sc = rtems_disk_init_log(
101857: 8b 45 1c mov 0x1c(%ebp),%eax
10185a: 89 44 24 0c mov %eax,0xc(%esp)
10185e: 8b 45 18 mov 0x18(%ebp),%eax
101861: 89 44 24 08 mov %eax,0x8(%esp)
101865: 8b 45 d0 mov -0x30(%ebp),%eax
101868: 89 44 24 04 mov %eax,0x4(%esp)
10186c: 8b 45 e0 mov -0x20(%ebp),%eax
10186f: 89 04 24 mov %eax,(%esp)
101872: e8 69 04 00 00 call 101ce0 <rtems_disk_init_log>
dd->name = alloc_name;
101877: 8b 55 e4 mov -0x1c(%ebp),%edx
sc = rtems_disk_init_log(
10187a: 89 c3 mov %eax,%ebx
dd->dev = dev;
10187c: 8b 45 e0 mov -0x20(%ebp),%eax
dd->name = alloc_name;
10187f: 89 50 10 mov %edx,0x10(%eax)
++phys_dd->uses;
101882: 8b 55 d0 mov -0x30(%ebp),%edx
dd->dev = dev;
101885: 89 30 mov %esi,(%eax)
101887: 89 78 04 mov %edi,0x4(%eax)
++phys_dd->uses;
10188a: ff 42 14 incl 0x14(%edx)
if (sc != RTEMS_SUCCESSFUL) {
10188d: 85 db test %ebx,%ebx
10188f: 75 1f jne 1018b0 <rtems_disk_create_log+0xd0>
_Mutex_Release( mutex );
101891: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp)
diskdevs_protected = false;
101898: 31 c0 xor %eax,%eax
10189a: a2 24 cf 12 00 mov %al,0x12cf24
10189f: e8 1c 6f 00 00 call 1087c0 <_Mutex_Release>
}
1018a4: 83 c4 3c add $0x3c,%esp
1018a7: 89 d8 mov %ebx,%eax
1018a9: 5b pop %ebx
1018aa: 5e pop %esi
1018ab: 5f pop %edi
1018ac: 5d pop %ebp
1018ad: c3 ret
1018ae: 66 90 xchg %ax,%ax
dd->ioctl = null_handler;
1018b0: c7 40 38 50 12 10 00 movl $0x101250,0x38(%eax)
dd = get_disk_entry(dev, true);
1018b7: b9 01 00 00 00 mov $0x1,%ecx
1018bc: 89 f0 mov %esi,%eax
1018be: 89 fa mov %edi,%edx
1018c0: e8 1b f9 ff ff call 1011e0 <get_disk_entry>
if (dd == NULL) {
1018c5: 85 c0 test %eax,%eax
1018c7: 74 c8 je 101891 <rtems_disk_create_log+0xb1> <== NEVER TAKEN
dd->deleted = true;
1018c9: c6 40 40 01 movb $0x1,0x40(%eax)
rtems_disk_cleanup(dd);
1018cd: e8 9e fc ff ff call 101570 <rtems_disk_cleanup.constprop.0>
return RTEMS_SUCCESSFUL;
1018d2: eb bd jmp 101891 <rtems_disk_create_log+0xb1>
1018d4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1018db: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1018df: 90 nop
1018e0: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp)
diskdevs_protected = false;
1018e7: 31 d2 xor %edx,%edx
return RTEMS_INVALID_ID;
1018e9: bb 04 00 00 00 mov $0x4,%ebx
diskdevs_protected = false;
1018ee: 88 15 24 cf 12 00 mov %dl,0x12cf24
1018f4: e8 c7 6e 00 00 call 1087c0 <_Mutex_Release>
}
1018f9: 83 c4 3c add $0x3c,%esp
1018fc: 89 d8 mov %ebx,%eax
1018fe: 5b pop %ebx
1018ff: 5e pop %esi
101900: 5f pop %edi
101901: 5d pop %ebp
101902: c3 ret
101903: 90 nop
101904: 90 nop
101905: 90 nop
101906: 90 nop
101907: 90 nop
101908: 90 nop
101909: 90 nop
10190a: 90 nop
10190b: 90 nop
10190c: 90 nop
10190d: 90 nop
10190e: 90 nop
10190f: 90 nop
001016d0 <rtems_disk_create_phys>:
{
1016d0: 55 push %ebp
1016d1: 89 e5 mov %esp,%ebp
1016d3: 83 ec 48 sub $0x48,%esp
1016d6: 89 75 f8 mov %esi,-0x8(%ebp)
if (handler == NULL) {
1016d9: 8b 4d 18 mov 0x18(%ebp),%ecx
{
1016dc: 89 7d fc mov %edi,-0x4(%ebp)
1016df: 8b 75 08 mov 0x8(%ebp),%esi
1016e2: 89 5d f4 mov %ebx,-0xc(%ebp)
1016e5: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_disk_device *dd = NULL;
1016e8: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
char *alloc_name = NULL;
1016ef: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (handler == NULL) {
1016f6: 85 c9 test %ecx,%ecx
1016f8: 0f 84 c2 00 00 00 je 1017c0 <rtems_disk_create_phys+0xf0>
mutex->_Queue._name = name;
}
static __inline void rtems_mutex_lock( rtems_mutex *mutex )
{
_Mutex_Acquire( mutex );
1016fe: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp)
101705: e8 46 70 00 00 call 108750 <_Mutex_Acquire>
sc = create_disk(dev, name, &dd, &alloc_name);
10170a: 8b 4d 20 mov 0x20(%ebp),%ecx
10170d: 8d 45 e4 lea -0x1c(%ebp),%eax
101710: 89 44 24 04 mov %eax,0x4(%esp)
101714: 8d 45 e0 lea -0x20(%ebp),%eax
diskdevs_protected = true;
101717: b2 01 mov $0x1,%dl
101719: 88 15 24 cf 12 00 mov %dl,0x12cf24
sc = create_disk(dev, name, &dd, &alloc_name);
10171f: 89 fa mov %edi,%edx
101721: 89 04 24 mov %eax,(%esp)
101724: 89 f0 mov %esi,%eax
101726: e8 35 fb ff ff call 101260 <create_disk>
if (sc != RTEMS_SUCCESSFUL) {
10172b: 85 c0 test %eax,%eax
sc = create_disk(dev, name, &dd, &alloc_name);
10172d: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL) {
10172f: 75 3b jne 10176c <rtems_disk_create_phys+0x9c>
sc = rtems_disk_init_phys(
101731: 8b 45 1c mov 0x1c(%ebp),%eax
101734: 89 44 24 10 mov %eax,0x10(%esp)
101738: 8b 45 18 mov 0x18(%ebp),%eax
10173b: 89 44 24 0c mov %eax,0xc(%esp)
10173f: 8b 45 14 mov 0x14(%ebp),%eax
101742: 89 44 24 08 mov %eax,0x8(%esp)
101746: 8b 45 10 mov 0x10(%ebp),%eax
101749: 89 44 24 04 mov %eax,0x4(%esp)
10174d: 8b 45 e0 mov -0x20(%ebp),%eax
101750: 89 04 24 mov %eax,(%esp)
101753: e8 28 04 00 00 call 101b80 <rtems_disk_init_phys>
dd->name = alloc_name;
101758: 8b 55 e4 mov -0x1c(%ebp),%edx
sc = rtems_disk_init_phys(
10175b: 89 c3 mov %eax,%ebx
dd->dev = dev;
10175d: 8b 45 e0 mov -0x20(%ebp),%eax
if (sc != RTEMS_SUCCESSFUL) {
101760: 85 db test %ebx,%ebx
dd->dev = dev;
101762: 89 30 mov %esi,(%eax)
101764: 89 78 04 mov %edi,0x4(%eax)
dd->name = alloc_name;
101767: 89 50 10 mov %edx,0x10(%eax)
if (sc != RTEMS_SUCCESSFUL) {
10176a: 75 24 jne 101790 <rtems_disk_create_phys+0xc0>
}
static __inline void rtems_mutex_unlock( rtems_mutex *mutex )
{
_Mutex_Release( mutex );
10176c: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp)
diskdevs_protected = false;
101773: 31 c0 xor %eax,%eax
101775: a2 24 cf 12 00 mov %al,0x12cf24
10177a: e8 41 70 00 00 call 1087c0 <_Mutex_Release>
}
10177f: 8b 75 f8 mov -0x8(%ebp),%esi
101782: 89 d8 mov %ebx,%eax
101784: 8b 7d fc mov -0x4(%ebp),%edi
101787: 8b 5d f4 mov -0xc(%ebp),%ebx
10178a: 89 ec mov %ebp,%esp
10178c: 5d pop %ebp
10178d: c3 ret
10178e: 66 90 xchg %ax,%ax
dd->ioctl = null_handler;
101790: c7 40 38 50 12 10 00 movl $0x101250,0x38(%eax)
static rtems_status_code
disk_delete_locked(dev_t dev)
{
rtems_disk_device *dd = NULL;
dd = get_disk_entry(dev, true);
101797: b9 01 00 00 00 mov $0x1,%ecx
10179c: 89 f0 mov %esi,%eax
10179e: 89 fa mov %edi,%edx
1017a0: e8 3b fa ff ff call 1011e0 <get_disk_entry>
if (dd == NULL) {
1017a5: 85 c0 test %eax,%eax
1017a7: 74 c3 je 10176c <rtems_disk_create_phys+0x9c> <== NEVER TAKEN
return RTEMS_INVALID_ID;
}
dd->deleted = true;
1017a9: c6 40 40 01 movb $0x1,0x40(%eax)
rtems_disk_cleanup(dd);
1017ad: e8 be fd ff ff call 101570 <rtems_disk_cleanup.constprop.0>
return RTEMS_SUCCESSFUL;
1017b2: eb b8 jmp 10176c <rtems_disk_create_phys+0x9c>
1017b4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1017bb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1017bf: 90 nop
return RTEMS_INVALID_ADDRESS;
1017c0: bb 09 00 00 00 mov $0x9,%ebx
}
1017c5: 8b 75 f8 mov -0x8(%ebp),%esi
1017c8: 8b 7d fc mov -0x4(%ebp),%edi
1017cb: 89 d8 mov %ebx,%eax
1017cd: 8b 5d f4 mov -0xc(%ebp),%ebx
1017d0: 89 ec mov %ebp,%esp
1017d2: 5d pop %ebp
1017d3: c3 ret
1017d4: 90 nop
1017d5: 90 nop
1017d6: 90 nop
1017d7: 90 nop
1017d8: 90 nop
1017d9: 90 nop
1017da: 90 nop
1017db: 90 nop
1017dc: 90 nop
1017dd: 90 nop
1017de: 90 nop
1017df: 90 nop
00101910 <rtems_disk_delete>:
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
101910: 55 push %ebp
101911: 89 e5 mov %esp,%ebp
101913: 56 push %esi
101914: 53 push %ebx
101915: 83 ec 10 sub $0x10,%esp
_Mutex_Acquire( mutex );
101918: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp)
10191f: 8b 5d 08 mov 0x8(%ebp),%ebx
101922: 8b 75 0c mov 0xc(%ebp),%esi
101925: e8 26 6e 00 00 call 108750 <_Mutex_Acquire>
diskdevs_protected = true;
10192a: b2 01 mov $0x1,%dl
dd = get_disk_entry(dev, true);
10192c: b9 01 00 00 00 mov $0x1,%ecx
diskdevs_protected = true;
101931: 88 15 24 cf 12 00 mov %dl,0x12cf24
dd = get_disk_entry(dev, true);
101937: 89 d8 mov %ebx,%eax
101939: 89 f2 mov %esi,%edx
10193b: e8 a0 f8 ff ff call 1011e0 <get_disk_entry>
if (dd == NULL) {
101940: 85 c0 test %eax,%eax
101942: 74 2c je 101970 <rtems_disk_delete+0x60> <== NEVER TAKEN
dd->deleted = true;
101944: c6 40 40 01 movb $0x1,0x40(%eax)
return RTEMS_SUCCESSFUL;
101948: 31 db xor %ebx,%ebx
rtems_disk_cleanup(dd);
10194a: e8 21 fc ff ff call 101570 <rtems_disk_cleanup.constprop.0>
_Mutex_Release( mutex );
10194f: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp)
diskdevs_protected = false;
101956: 31 c0 xor %eax,%eax
101958: a2 24 cf 12 00 mov %al,0x12cf24
10195d: e8 5e 6e 00 00 call 1087c0 <_Mutex_Release>
disk_lock();
sc = disk_delete_locked(dev);
disk_unlock();
return sc;
}
101962: 83 c4 10 add $0x10,%esp
101965: 89 d8 mov %ebx,%eax
101967: 5b pop %ebx
101968: 5e pop %esi
101969: 5d pop %ebp
10196a: c3 ret
10196b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
10196f: 90 nop
return RTEMS_INVALID_ID;
101970: bb 04 00 00 00 mov $0x4,%ebx <== NOT EXECUTED
101975: eb d8 jmp 10194f <rtems_disk_delete+0x3f> <== NOT EXECUTED
101977: 90 nop
101978: 90 nop
101979: 90 nop
10197a: 90 nop
10197b: 90 nop
10197c: 90 nop
10197d: 90 nop
10197e: 90 nop
10197f: 90 nop
00102290 <rtems_disk_init_log>:
rtems_disk_device *dd,
rtems_disk_device *phys_dd,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count
)
{
102290: 55 push %ebp
102291: 89 e5 mov %esp,%ebp
102293: 57 push %edi
102294: bf 74 00 00 00 mov $0x74,%edi
102299: 56 push %esi
10229a: 53 push %ebx
rtems_status_code sc;
dd = memset(dd, 0, sizeof(*dd));
10229b: 31 db xor %ebx,%ebx
{
10229d: 83 ec 1c sub $0x1c,%esp
1022a0: 8b 45 10 mov 0x10(%ebp),%eax
1022a3: 8b 4d 08 mov 0x8(%ebp),%ecx
1022a6: 8b 75 0c mov 0xc(%ebp),%esi
1022a9: 89 45 e0 mov %eax,-0x20(%ebp)
1022ac: 8b 45 14 mov 0x14(%ebp),%eax
dd = memset(dd, 0, sizeof(*dd));
1022af: f6 c1 01 test $0x1,%cl
1022b2: 89 ca mov %ecx,%edx
{
1022b4: 89 45 dc mov %eax,-0x24(%ebp)
dd = memset(dd, 0, sizeof(*dd));
1022b7: 0f 85 23 01 00 00 jne 1023e0 <rtems_disk_init_log+0x150> <== NEVER TAKEN
1022bd: f6 c2 02 test $0x2,%dl
1022c0: 0f 85 3a 01 00 00 jne 102400 <rtems_disk_init_log+0x170> <== NEVER TAKEN
1022c6: 89 f8 mov %edi,%eax
1022c8: 83 e0 f8 and $0xfffffff8,%eax
1022cb: 89 45 e4 mov %eax,-0x1c(%ebp)
1022ce: 31 c0 xor %eax,%eax
1022d0: 89 1c 02 mov %ebx,(%edx,%eax,1)
1022d3: 89 5c 02 04 mov %ebx,0x4(%edx,%eax,1)
1022d7: 83 c0 08 add $0x8,%eax
1022da: 3b 45 e4 cmp -0x1c(%ebp),%eax
1022dd: 72 f1 jb 1022d0 <rtems_disk_init_log+0x40>
1022df: 01 c2 add %eax,%edx
1022e1: f7 c7 04 00 00 00 test $0x4,%edi
1022e7: 0f 85 c3 00 00 00 jne 1023b0 <rtems_disk_init_log+0x120> <== ALWAYS TAKEN
1022ed: f7 c7 02 00 00 00 test $0x2,%edi <== NOT EXECUTED
1022f3: 0f 85 97 00 00 00 jne 102390 <rtems_disk_init_log+0x100> <== NOT EXECUTED
1022f9: 83 e7 01 and $0x1,%edi
1022fc: 0f 85 7e 00 00 00 jne 102380 <rtems_disk_init_log+0xf0> <== NEVER TAKEN
dd->phys_dev = phys_dd;
dd->start = block_begin;
dd->size = block_count;
dd->media_block_size = phys_dd->media_block_size;
102302: 8b 46 20 mov 0x20(%esi),%eax
dd->phys_dev = phys_dd;
102305: 89 71 08 mov %esi,0x8(%ecx)
dd->start = block_begin;
102308: 8b 5d e0 mov -0x20(%ebp),%ebx
dd->size = block_count;
10230b: 8b 7d dc mov -0x24(%ebp),%edi
dd->ioctl = phys_dd->ioctl;
dd->driver_data = phys_dd->driver_data;
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
if (phys_dd->phys_dev == phys_dd) {
10230e: 39 76 08 cmp %esi,0x8(%esi)
dd->media_block_size = phys_dd->media_block_size;
102311: 89 41 20 mov %eax,0x20(%ecx)
dd->ioctl = phys_dd->ioctl;
102314: 8b 46 38 mov 0x38(%esi),%eax
dd->start = block_begin;
102317: 89 59 18 mov %ebx,0x18(%ecx)
dd->size = block_count;
10231a: 89 79 1c mov %edi,0x1c(%ecx)
dd->ioctl = phys_dd->ioctl;
10231d: 89 41 38 mov %eax,0x38(%ecx)
dd->driver_data = phys_dd->driver_data;
102320: 8b 46 3c mov 0x3c(%esi),%eax
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
102323: c7 41 6c ff ff ff ff movl $0xffffffff,0x6c(%ecx)
dd->driver_data = phys_dd->driver_data;
10232a: 89 41 3c mov %eax,0x3c(%ecx)
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size, false);
} else {
sc = RTEMS_INVALID_NUMBER;
}
} else {
sc = RTEMS_INVALID_ID;
10232d: b8 04 00 00 00 mov $0x4,%eax
if (phys_dd->phys_dev == phys_dd) {
102332: 74 0c je 102340 <rtems_disk_init_log+0xb0>
}
return sc;
}
102334: 83 c4 1c add $0x1c,%esp
102337: 5b pop %ebx
102338: 5e pop %esi
102339: 5f pop %edi
10233a: 5d pop %ebp
10233b: c3 ret
10233c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
rtems_blkdev_bnum phys_block_count = phys_dd->size;
102340: 8b 46 1c mov 0x1c(%esi),%eax
if (
102343: 39 c3 cmp %eax,%ebx
102345: 0f 83 85 00 00 00 jae 1023d0 <rtems_disk_init_log+0x140>
10234b: 85 ff test %edi,%edi
10234d: 0f 84 7d 00 00 00 je 1023d0 <rtems_disk_init_log+0x140>
&& block_count <= phys_block_count - block_begin
102353: 29 d8 sub %ebx,%eax
102355: 89 c2 mov %eax,%edx
sc = RTEMS_INVALID_NUMBER;
102357: b8 0a 00 00 00 mov $0xa,%eax
&& block_count <= phys_block_count - block_begin
10235c: 39 fa cmp %edi,%edx
10235e: 72 d4 jb 102334 <rtems_disk_init_log+0xa4>
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size, false);
102360: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
102367: 8b 46 20 mov 0x20(%esi),%eax
10236a: 89 4d 08 mov %ecx,0x8(%ebp)
10236d: 89 45 0c mov %eax,0xc(%ebp)
}
102370: 83 c4 1c add $0x1c,%esp
102373: 5b pop %ebx
102374: 5e pop %esi
102375: 5f pop %edi
102376: 5d pop %ebp
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size, false);
102377: e9 c4 d9 00 00 jmp 10fd40 <rtems_bdbuf_set_block_size>
10237c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
dd = memset(dd, 0, sizeof(*dd));
102380: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED
102383: e9 7a ff ff ff jmp 102302 <rtems_disk_init_log+0x72> <== NOT EXECUTED
102388: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10238f: 90 nop <== NOT EXECUTED
102390: 66 c7 02 00 00 movw $0x0,(%edx) <== NOT EXECUTED
102395: 83 c2 02 add $0x2,%edx <== NOT EXECUTED
102398: 83 e7 01 and $0x1,%edi <== NOT EXECUTED
10239b: 0f 84 61 ff ff ff je 102302 <rtems_disk_init_log+0x72> <== NOT EXECUTED
1023a1: eb dd jmp 102380 <rtems_disk_init_log+0xf0> <== NOT EXECUTED
1023a3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1023aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1023b0: c7 02 00 00 00 00 movl $0x0,(%edx)
1023b6: 83 c2 04 add $0x4,%edx
1023b9: f7 c7 02 00 00 00 test $0x2,%edi
1023bf: 0f 84 34 ff ff ff je 1022f9 <rtems_disk_init_log+0x69> <== ALWAYS TAKEN
1023c5: eb c9 jmp 102390 <rtems_disk_init_log+0x100> <== NOT EXECUTED
1023c7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1023ce: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
1023d0: 83 c4 1c add $0x1c,%esp
sc = RTEMS_INVALID_NUMBER;
1023d3: b8 0a 00 00 00 mov $0xa,%eax
}
1023d8: 5b pop %ebx
1023d9: 5e pop %esi
1023da: 5f pop %edi
1023db: 5d pop %ebp
1023dc: c3 ret
1023dd: 8d 76 00 lea 0x0(%esi),%esi
dd = memset(dd, 0, sizeof(*dd));
1023e0: c6 01 00 movb $0x0,(%ecx) <== NOT EXECUTED
1023e3: 8d 51 01 lea 0x1(%ecx),%edx <== NOT EXECUTED
1023e6: bf 73 00 00 00 mov $0x73,%edi <== NOT EXECUTED
1023eb: f6 c2 02 test $0x2,%dl <== NOT EXECUTED
1023ee: 0f 84 d2 fe ff ff je 1022c6 <rtems_disk_init_log+0x36> <== NOT EXECUTED
1023f4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1023fb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1023ff: 90 nop <== NOT EXECUTED
102400: 66 c7 02 00 00 movw $0x0,(%edx) <== NOT EXECUTED
102405: 83 ef 02 sub $0x2,%edi <== NOT EXECUTED
102408: 83 c2 02 add $0x2,%edx <== NOT EXECUTED
10240b: e9 b6 fe ff ff jmp 1022c6 <rtems_disk_init_log+0x36> <== NOT EXECUTED
00102130 <rtems_disk_init_phys>:
uint32_t block_size,
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data
)
{
102130: 55 push %ebp
rtems_status_code sc;
dd = memset(dd, 0, sizeof(*dd));
102131: 31 c9 xor %ecx,%ecx
{
102133: 89 e5 mov %esp,%ebp
102135: 57 push %edi
102136: 56 push %esi
102137: be 74 00 00 00 mov $0x74,%esi
10213c: 53 push %ebx
10213d: 83 ec 2c sub $0x2c,%esp
102140: 8b 45 10 mov 0x10(%ebp),%eax
102143: 8b 5d 08 mov 0x8(%ebp),%ebx
102146: 8b 7d 0c mov 0xc(%ebp),%edi
102149: 89 45 e0 mov %eax,-0x20(%ebp)
10214c: 8b 45 14 mov 0x14(%ebp),%eax
dd = memset(dd, 0, sizeof(*dd));
10214f: f6 c3 01 test $0x1,%bl
102152: 89 da mov %ebx,%edx
{
102154: 89 45 dc mov %eax,-0x24(%ebp)
102157: 8b 45 18 mov 0x18(%ebp),%eax
10215a: 89 45 d8 mov %eax,-0x28(%ebp)
dd = memset(dd, 0, sizeof(*dd));
10215d: 0f 85 fd 00 00 00 jne 102260 <rtems_disk_init_phys+0x130> <== NEVER TAKEN
102163: f6 c2 02 test $0x2,%dl
102166: 0f 85 14 01 00 00 jne 102280 <rtems_disk_init_phys+0x150> <== NEVER TAKEN
10216c: 89 f0 mov %esi,%eax
10216e: 83 e0 f8 and $0xfffffff8,%eax
102171: 89 45 e4 mov %eax,-0x1c(%ebp)
102174: 31 c0 xor %eax,%eax
102176: 89 0c 02 mov %ecx,(%edx,%eax,1)
102179: 89 4c 02 04 mov %ecx,0x4(%edx,%eax,1)
10217d: 83 c0 08 add $0x8,%eax
102180: 3b 45 e4 cmp -0x1c(%ebp),%eax
102183: 72 f1 jb 102176 <rtems_disk_init_phys+0x46>
102185: 01 c2 add %eax,%edx
102187: f7 c6 04 00 00 00 test $0x4,%esi
10218d: 0f 85 ad 00 00 00 jne 102240 <rtems_disk_init_phys+0x110> <== ALWAYS TAKEN
102193: f7 c6 02 00 00 00 test $0x2,%esi <== NOT EXECUTED
102199: 0f 85 81 00 00 00 jne 102220 <rtems_disk_init_phys+0xf0> <== NOT EXECUTED
10219f: 83 e6 01 and $0x1,%esi
1021a2: 75 6c jne 102210 <rtems_disk_init_phys+0xe0> <== NEVER TAKEN
dd->phys_dev = dd;
dd->size = block_count;
1021a4: 8b 45 e0 mov -0x20(%ebp),%eax
dd->phys_dev = dd;
1021a7: 89 5b 08 mov %ebx,0x8(%ebx)
dd->media_block_size = block_size;
dd->ioctl = handler;
1021aa: 8b 4d dc mov -0x24(%ebp),%ecx
dd->media_block_size = block_size;
1021ad: 89 7b 20 mov %edi,0x20(%ebx)
dd->driver_data = driver_data;
1021b0: 8b 75 d8 mov -0x28(%ebp),%esi
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
1021b3: c7 43 6c ff ff ff ff movl $0xffffffff,0x6c(%ebx)
dd->size = block_count;
1021ba: 89 43 1c mov %eax,0x1c(%ebx)
if (block_count > 0) {
1021bd: 85 c0 test %eax,%eax
dd->ioctl = handler;
1021bf: 89 4b 38 mov %ecx,0x38(%ebx)
dd->driver_data = driver_data;
1021c2: 89 73 3c mov %esi,0x3c(%ebx)
if (block_count > 0) {
1021c5: 74 39 je 102200 <rtems_disk_init_phys+0xd0>
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) != 0) {
1021c7: 89 1c 24 mov %ebx,(%esp)
1021ca: 8d 43 0c lea 0xc(%ebx),%eax
1021cd: 89 44 24 08 mov %eax,0x8(%esp)
1021d1: b8 08 42 00 20 mov $0x20004208,%eax
1021d6: 89 44 24 04 mov %eax,0x4(%esp)
1021da: ff d1 call *%ecx
1021dc: 85 c0 test %eax,%eax
1021de: 74 07 je 1021e7 <rtems_disk_init_phys+0xb7>
dd->capabilities = 0;
1021e0: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
}
sc = rtems_bdbuf_set_block_size(dd, block_size, false);
1021e7: 89 7d 0c mov %edi,0xc(%ebp)
1021ea: 89 5d 08 mov %ebx,0x8(%ebp)
1021ed: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
1021f4: 83 c4 2c add $0x2c,%esp
1021f7: 5b pop %ebx
1021f8: 5e pop %esi
1021f9: 5f pop %edi
1021fa: 5d pop %ebp
sc = rtems_bdbuf_set_block_size(dd, block_size, false);
1021fb: e9 40 db 00 00 jmp 10fd40 <rtems_bdbuf_set_block_size>
}
102200: 83 c4 2c add $0x2c,%esp
102203: b8 0a 00 00 00 mov $0xa,%eax
102208: 5b pop %ebx
102209: 5e pop %esi
10220a: 5f pop %edi
10220b: 5d pop %ebp
10220c: c3 ret
10220d: 8d 76 00 lea 0x0(%esi),%esi
dd = memset(dd, 0, sizeof(*dd));
102210: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED
102213: eb 8f jmp 1021a4 <rtems_disk_init_phys+0x74> <== NOT EXECUTED
102215: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10221c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102220: 66 c7 02 00 00 movw $0x0,(%edx) <== NOT EXECUTED
102225: 83 c2 02 add $0x2,%edx <== NOT EXECUTED
102228: 83 e6 01 and $0x1,%esi <== NOT EXECUTED
10222b: 0f 84 73 ff ff ff je 1021a4 <rtems_disk_init_phys+0x74> <== NOT EXECUTED
102231: eb dd jmp 102210 <rtems_disk_init_phys+0xe0> <== NOT EXECUTED
102233: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10223a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi <== NOT EXECUTED
102240: c7 02 00 00 00 00 movl $0x0,(%edx)
102246: 83 c2 04 add $0x4,%edx
102249: f7 c6 02 00 00 00 test $0x2,%esi
10224f: 0f 84 4a ff ff ff je 10219f <rtems_disk_init_phys+0x6f> <== ALWAYS TAKEN
102255: eb c9 jmp 102220 <rtems_disk_init_phys+0xf0> <== NOT EXECUTED
102257: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10225e: 66 90 xchg %ax,%ax <== NOT EXECUTED
102260: c6 03 00 movb $0x0,(%ebx) <== NOT EXECUTED
102263: 8d 53 01 lea 0x1(%ebx),%edx <== NOT EXECUTED
102266: be 73 00 00 00 mov $0x73,%esi <== NOT EXECUTED
10226b: f6 c2 02 test $0x2,%dl <== NOT EXECUTED
10226e: 0f 84 f8 fe ff ff je 10216c <rtems_disk_init_phys+0x3c> <== NOT EXECUTED
102274: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10227b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10227f: 90 nop <== NOT EXECUTED
102280: 66 c7 02 00 00 movw $0x0,(%edx) <== NOT EXECUTED
102285: 83 ee 02 sub $0x2,%esi <== NOT EXECUTED
102288: 83 c2 02 add $0x2,%edx <== NOT EXECUTED
10228b: e9 dc fe ff ff jmp 10216c <rtems_disk_init_phys+0x3c> <== NOT EXECUTED
00101b00 <rtems_disk_io_done>:
rtems_status_code
rtems_disk_io_done(void)
{
101b00: 55 push %ebp
101b01: 89 e5 mov %esp,%ebp
101b03: 57 push %edi
101b04: 56 push %esi
101b05: 53 push %ebx
101b06: 83 ec 1c sub $0x1c,%esp
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
101b09: 8b 35 28 cf 12 00 mov 0x12cf28,%esi
rtems_disk_device_table *dtab = disktab + major;
101b0f: 8b 1d 2c cf 12 00 mov 0x12cf2c,%ebx
for (major = 0; major < disktab_size; ++major) {
101b15: 85 f6 test %esi,%esi
101b17: 74 42 je 101b5b <rtems_disk_io_done+0x5b> <== NEVER TAKEN
101b19: 31 f6 xor %esi,%esi
101b1b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
101b1f: 90 nop
rtems_disk_device_table *dtab = disktab + major;
101b20: 8d 3c f3 lea (%ebx,%esi,8),%edi
for (minor = 0; minor < dtab->size; ++minor) {
101b23: 8b 4f 04 mov 0x4(%edi),%ecx
rtems_disk_device *dd = dtab->minor [minor];
101b26: 8b 17 mov (%edi),%edx
for (minor = 0; minor < dtab->size; ++minor) {
101b28: 85 c9 test %ecx,%ecx
101b2a: 74 1e je 101b4a <rtems_disk_io_done+0x4a>
101b2c: 31 db xor %ebx,%ebx
101b2e: 66 90 xchg %ax,%ax
rtems_disk_device *dd = dtab->minor [minor];
101b30: 8b 04 9a mov (%edx,%ebx,4),%eax
if (dd != NULL) {
101b33: 85 c0 test %eax,%eax
101b35: 74 07 je 101b3e <rtems_disk_io_done+0x3e> <== ALWAYS TAKEN
free_disk_device(dd);
101b37: e8 d4 f9 ff ff call 101510 <free_disk_device> <== NOT EXECUTED
}
}
free(dtab->minor);
101b3c: 8b 17 mov (%edi),%edx <== NOT EXECUTED
for (minor = 0; minor < dtab->size; ++minor) {
101b3e: 43 inc %ebx
101b3f: 39 5f 04 cmp %ebx,0x4(%edi)
101b42: 77 ec ja 101b30 <rtems_disk_io_done+0x30>
}
free(disktab);
101b44: 8b 1d 2c cf 12 00 mov 0x12cf2c,%ebx
free(dtab->minor);
101b4a: 89 14 24 mov %edx,(%esp)
for (major = 0; major < disktab_size; ++major) {
101b4d: 46 inc %esi
free(dtab->minor);
101b4e: e8 2d 09 00 00 call 102480 <free>
for (major = 0; major < disktab_size; ++major) {
101b53: 39 35 28 cf 12 00 cmp %esi,0x12cf28
101b59: 77 c5 ja 101b20 <rtems_disk_io_done+0x20>
free(disktab);
101b5b: 89 1c 24 mov %ebx,(%esp)
101b5e: e8 1d 09 00 00 call 102480 <free>
disktab = NULL;
101b63: 31 c0 xor %eax,%eax
disktab_size = 0;
101b65: 31 d2 xor %edx,%edx
disktab = NULL;
101b67: a3 2c cf 12 00 mov %eax,0x12cf2c
return RTEMS_SUCCESSFUL;
}
101b6c: 31 c0 xor %eax,%eax
disktab_size = 0;
101b6e: 89 15 28 cf 12 00 mov %edx,0x12cf28
}
101b74: 83 c4 1c add $0x1c,%esp
101b77: 5b pop %ebx
101b78: 5e pop %esi
101b79: 5f pop %edi
101b7a: 5d pop %ebp
101b7b: c3 ret
101b7c: 90 nop
101b7d: 90 nop
101b7e: 90 nop
101b7f: 90 nop
00101a90 <rtems_disk_io_initialize>:
rtems_disk_io_initialize(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
101a90: 8b 15 28 cf 12 00 mov 0x12cf28,%edx
return RTEMS_SUCCESSFUL;
101a96: 31 c0 xor %eax,%eax
if (disktab_size > 0) {
101a98: 85 d2 test %edx,%edx
101a9a: 74 04 je 101aa0 <rtems_disk_io_initialize+0x10> <== ALWAYS TAKEN
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
101a9c: c3 ret <== NOT EXECUTED
101a9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
101aa0: 55 push %ebp
disktab = calloc(size, sizeof(rtems_disk_device_table));
101aa1: b9 08 00 00 00 mov $0x8,%ecx
{
101aa6: 89 e5 mov %esp,%ebp
101aa8: 83 ec 18 sub $0x18,%esp
disktab = calloc(size, sizeof(rtems_disk_device_table));
101aab: 89 4c 24 04 mov %ecx,0x4(%esp)
101aaf: c7 04 24 08 00 00 00 movl $0x8,(%esp)
101ab6: e8 65 07 00 00 call 102220 <calloc>
101abb: a3 2c cf 12 00 mov %eax,0x12cf2c
if (disktab == NULL) {
101ac0: 85 c0 test %eax,%eax
101ac2: 74 30 je 101af4 <rtems_disk_io_initialize+0x64> <== NEVER TAKEN
sc = rtems_bdbuf_init();
101ac4: e8 a7 c1 00 00 call 10dc70 <rtems_bdbuf_init>
if (sc != RTEMS_SUCCESSFUL) {
101ac9: 85 c0 test %eax,%eax
101acb: 75 13 jne 101ae0 <rtems_disk_io_initialize+0x50> <== NEVER TAKEN
disktab_size = size;
101acd: ba 08 00 00 00 mov $0x8,%edx
101ad2: 89 15 28 cf 12 00 mov %edx,0x12cf28
}
101ad8: 89 ec mov %ebp,%esp
101ada: 5d pop %ebp
101adb: c3 ret
101adc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
free(disktab);
101ae0: a1 2c cf 12 00 mov 0x12cf2c,%eax <== NOT EXECUTED
101ae5: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
101ae8: e8 93 09 00 00 call 102480 <free> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
101aed: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
101af2: eb e4 jmp 101ad8 <rtems_disk_io_initialize+0x48> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
101af4: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
101af9: eb dd jmp 101ad8 <rtems_disk_io_initialize+0x48> <== NOT EXECUTED
101afb: 90 nop
101afc: 90 nop
101afd: 90 nop
101afe: 90 nop
101aff: 90 nop
00101980 <rtems_disk_obtain>:
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
101980: 55 push %ebp
101981: 89 e5 mov %esp,%ebp
101983: 83 ec 28 sub $0x28,%esp
101986: 89 5d fc mov %ebx,-0x4(%ebp)
101989: 8b 45 08 mov 0x8(%ebp),%eax
10198c: 8b 55 0c mov 0xc(%ebp),%edx
rtems_disk_device *dd = NULL;
rtems_interrupt_lock_context lock_context;
rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context);
10198f: 9c pushf
101990: fa cli
101991: 5b pop %ebx
if (!diskdevs_protected) {
101992: 0f b6 0d 24 cf 12 00 movzbl 0x12cf24,%ecx
101999: 84 c9 test %cl,%cl
10199b: 75 13 jne 1019b0 <rtems_disk_obtain+0x30> <== NEVER TAKEN
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
10199d: 31 c9 xor %ecx,%ecx
10199f: e8 3c f8 ff ff call 1011e0 <get_disk_entry>
rtems_interrupt_lock_release(&diskdevs_lock, &lock_context);
1019a4: 53 push %ebx
1019a5: 9d popf
dd = get_disk_entry(dev, false);
disk_unlock();
}
return dd;
}
1019a6: 8b 5d fc mov -0x4(%ebp),%ebx
1019a9: 89 ec mov %ebp,%esp
1019ab: 5d pop %ebp
1019ac: c3 ret
1019ad: 8d 76 00 lea 0x0(%esi),%esi
1019b0: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
1019b3: 89 55 f4 mov %edx,-0xc(%ebp) <== NOT EXECUTED
rtems_interrupt_lock_release(&diskdevs_lock, &lock_context);
1019b6: 53 push %ebx <== NOT EXECUTED
1019b7: 9d popf <== NOT EXECUTED
_Mutex_Acquire( mutex );
1019b8: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp) <== NOT EXECUTED
1019bf: e8 8c 6d 00 00 call 108750 <_Mutex_Acquire> <== NOT EXECUTED
diskdevs_protected = true;
1019c4: b0 01 mov $0x1,%al <== NOT EXECUTED
dd = get_disk_entry(dev, false);
1019c6: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED
diskdevs_protected = true;
1019c9: a2 24 cf 12 00 mov %al,0x12cf24 <== NOT EXECUTED
dd = get_disk_entry(dev, false);
1019ce: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
1019d1: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
1019d3: e8 08 f8 ff ff call 1011e0 <get_disk_entry> <== NOT EXECUTED
diskdevs_protected = false;
1019d8: 31 d2 xor %edx,%edx <== NOT EXECUTED
_Mutex_Release( mutex );
1019da: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp) <== NOT EXECUTED
1019e1: 88 15 24 cf 12 00 mov %dl,0x12cf24 <== NOT EXECUTED
dd = get_disk_entry(dev, false);
1019e7: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
1019ea: e8 d1 6d 00 00 call 1087c0 <_Mutex_Release> <== NOT EXECUTED
1019ef: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
}
1019f2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1019f5: 89 ec mov %ebp,%esp <== NOT EXECUTED
1019f7: 5d pop %ebp <== NOT EXECUTED
1019f8: c3 ret <== NOT EXECUTED
1019f9: 90 nop
1019fa: 90 nop
1019fb: 90 nop
1019fc: 90 nop
1019fd: 90 nop
1019fe: 90 nop
1019ff: 90 nop
00101a00 <rtems_disk_release>:
rtems_status_code
rtems_disk_release(rtems_disk_device *dd)
{
101a00: 55 push %ebp
101a01: 89 e5 mov %esp,%ebp
101a03: 57 push %edi
101a04: 56 push %esi
101a05: 83 ec 10 sub $0x10,%esp
101a08: 8b 45 08 mov 0x8(%ebp),%eax
rtems_interrupt_lock_context lock_context;
dev_t dev = dd->dev;
101a0b: 8b 30 mov (%eax),%esi
101a0d: 8b 78 04 mov 0x4(%eax),%edi
unsigned uses = 0;
bool deleted = false;
rtems_interrupt_lock_acquire(&diskdevs_lock, &lock_context);
101a10: 9c pushf
101a11: fa cli
101a12: 59 pop %ecx
uses = --dd->uses;
101a13: 8b 50 14 mov 0x14(%eax),%edx
101a16: 4a dec %edx
101a17: 89 50 14 mov %edx,0x14(%eax)
deleted = dd->deleted;
101a1a: 0f b6 40 40 movzbl 0x40(%eax),%eax
rtems_interrupt_lock_release(&diskdevs_lock, &lock_context);
101a1e: 51 push %ecx
101a1f: 9d popf
if (uses == 0 && deleted) {
101a20: 85 d2 test %edx,%edx
101a22: 75 04 jne 101a28 <rtems_disk_release+0x28>
101a24: 84 c0 test %al,%al
101a26: 75 18 jne 101a40 <rtems_disk_release+0x40>
rtems_disk_delete(dev);
}
return RTEMS_SUCCESSFUL;
}
101a28: 83 c4 10 add $0x10,%esp
101a2b: 31 c0 xor %eax,%eax
101a2d: 5e pop %esi
101a2e: 5f pop %edi
101a2f: 5d pop %ebp
101a30: c3 ret
101a31: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
101a38: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
101a3f: 90 nop
_Mutex_Acquire( mutex );
101a40: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp)
101a47: e8 04 6d 00 00 call 108750 <_Mutex_Acquire>
diskdevs_protected = true;
101a4c: b2 01 mov $0x1,%dl
dd = get_disk_entry(dev, true);
101a4e: b9 01 00 00 00 mov $0x1,%ecx
diskdevs_protected = true;
101a53: 88 15 24 cf 12 00 mov %dl,0x12cf24
dd = get_disk_entry(dev, true);
101a59: 89 f0 mov %esi,%eax
101a5b: 89 fa mov %edi,%edx
101a5d: e8 7e f7 ff ff call 1011e0 <get_disk_entry>
if (dd == NULL) {
101a62: 85 c0 test %eax,%eax
101a64: 74 09 je 101a6f <rtems_disk_release+0x6f> <== NEVER TAKEN
dd->deleted = true;
101a66: c6 40 40 01 movb $0x1,0x40(%eax)
rtems_disk_cleanup(dd);
101a6a: e8 01 fb ff ff call 101570 <rtems_disk_cleanup.constprop.0>
_Mutex_Release( mutex );
101a6f: c7 04 24 bc 91 12 00 movl $0x1291bc,(%esp)
diskdevs_protected = false;
101a76: 31 c0 xor %eax,%eax
101a78: a2 24 cf 12 00 mov %al,0x12cf24
101a7d: e8 3e 6d 00 00 call 1087c0 <_Mutex_Release>
}
101a82: 83 c4 10 add $0x10,%esp
101a85: 31 c0 xor %eax,%eax
101a87: 5e pop %esi
101a88: 5f pop %edi
101a89: 5d pop %ebp
101a8a: c3 ret
101a8b: 90 nop
101a8c: 90 nop
101a8d: 90 nop
101a8e: 90 nop
101a8f: 90 nop
00104320 <rtems_fdisk_initialize>:
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
rtems_device_minor_number minor,
void* arg RTEMS_UNUSED)
{
104320: 55 push %ebp
104321: 89 e5 mov %esp,%ebp
104323: 57 push %edi
104324: 56 push %esi
104325: 53 push %ebx
104326: 83 ec 6c sub $0x6c,%esp
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
104329: c7 04 24 00 02 00 00 movl $0x200,(%esp)
104330: e8 1b 0f 00 00 call 105250 <malloc>
104335: a3 00 5f 15 00 mov %eax,0x155f00
if (!rtems_fdisk_crc16_factor)
10433a: 85 c0 test %eax,%eax
10433c: 0f 84 75 04 00 00 je 1047b7 <rtems_fdisk_initialize+0x497> <== NEVER TAKEN
104342: 89 c1 mov %eax,%ecx
for (b = 0; b < 256; b++)
104344: 31 d2 xor %edx,%edx
104346: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10434d: 8d 76 00 lea 0x0(%esi),%esi
uint16_t v = b;
104350: 0f b7 c2 movzwl %dx,%eax
for (b = 0; b < 256; b++)
104353: bb 08 00 00 00 mov $0x8,%ebx
104358: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10435f: 90 nop
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
104360: 89 c6 mov %eax,%esi
104362: d1 e8 shr %eax
104364: 83 e6 01 and $0x1,%esi
104367: 85 f6 test %esi,%esi
104369: 74 08 je 104373 <rtems_fdisk_initialize+0x53>
10436b: 35 08 84 ff ff xor $0xffff8408,%eax
104370: 0f b7 c0 movzwl %ax,%eax
for (i = 8; i--;)
104373: 4b dec %ebx
104374: 75 ea jne 104360 <rtems_fdisk_initialize+0x40>
rtems_fdisk_crc16_factor[b] = v & 0xffff;
104376: 66 89 04 51 mov %ax,(%ecx,%edx,2)
for (b = 0; b < 256; b++)
10437a: 42 inc %edx
10437b: 81 fa 00 01 00 00 cmp $0x100,%edx
104381: 75 cd jne 104350 <rtems_fdisk_initialize+0x30>
sc = rtems_fdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
fd = calloc (rtems_flashdisk_configuration_size, sizeof (*fd));
104383: 89 5d b4 mov %ebx,-0x4c(%ebp)
104386: 8b 1d dc 1d 14 00 mov 0x141ddc,%ebx
10438c: b8 84 00 00 00 mov $0x84,%eax
104391: 89 44 24 04 mov %eax,0x4(%esp)
104395: 89 1c 24 mov %ebx,(%esp)
104398: e8 13 05 00 00 call 1048b0 <calloc>
10439d: 89 45 c0 mov %eax,-0x40(%ebp)
if (!fd)
1043a0: 85 c0 test %eax,%eax
1043a2: 0f 84 0f 04 00 00 je 1047b7 <rtems_fdisk_initialize+0x497> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++, fd++)
1043a8: 85 db test %ebx,%ebx
1043aa: 0f 84 b4 02 00 00 je 104664 <rtems_fdisk_initialize+0x344> <== NEVER TAKEN
1043b0: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp)
const rtems_flashdisk_config* c = rtems_flashdisk_configuration;
1043b7: c7 45 bc 00 89 13 00 movl $0x138900,-0x44(%ebp)
uint32_t blocks = 0;
int ret;
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
fd->major = major;
1043be: 8b 4d c0 mov -0x40(%ebp),%ecx
char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
1043c1: 66 c7 45 e6 61 00 movw $0x61,-0x1a(%ebp)
fd->minor = minor;
fd->flags = c->flags;
1043c7: 8b 5d bc mov -0x44(%ebp),%ebx
char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
1043ca: c7 45 de 2f 64 65 76 movl $0x7665642f,-0x22(%ebp)
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
1043d1: 8b 45 b8 mov -0x48(%ebp),%eax
char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
1043d4: c7 45 e2 2f 66 64 64 movl $0x6464662f,-0x1e(%ebp)
fd->major = major;
1043db: 8b 7d 08 mov 0x8(%ebp),%edi
fd->compact_segs = c->compact_segs;
fd->avail_compact_segs = c->avail_compact_segs;
fd->block_size = c->block_size;
fd->unavail_blocks = c->unavail_blocks;
1043de: 8b 73 10 mov 0x10(%ebx),%esi
fd->minor = minor;
1043e1: 89 41 04 mov %eax,0x4(%ecx)
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
1043e4: 88 45 e7 mov %al,-0x19(%ebp)
fd->flags = c->flags;
1043e7: 8b 43 0c mov 0xc(%ebx),%eax
fd->major = major;
1043ea: 89 39 mov %edi,(%ecx)
fd->block_size = c->block_size;
1043ec: 8b 3b mov (%ebx),%edi
fd->unavail_blocks = c->unavail_blocks;
1043ee: 89 71 20 mov %esi,0x20(%ecx)
1043f1: 89 75 c4 mov %esi,-0x3c(%ebp)
fd->flags = c->flags;
1043f4: 89 41 08 mov %eax,0x8(%ecx)
fd->compact_segs = c->compact_segs;
1043f7: 8b 43 14 mov 0x14(%ebx),%eax
fd->block_size = c->block_size;
1043fa: 89 79 14 mov %edi,0x14(%ecx)
fd->compact_segs = c->compact_segs;
1043fd: 89 41 0c mov %eax,0xc(%ecx)
fd->avail_compact_segs = c->avail_compact_segs;
104400: 8b 43 18 mov 0x18(%ebx),%eax
104403: 89 41 10 mov %eax,0x10(%ecx)
fd->info_level = c->info_level;
104406: 8b 43 1c mov 0x1c(%ebx),%eax
104409: 89 41 7c mov %eax,0x7c(%ecx)
for (device = 0; device < c->device_count; device++)
10440c: 8b 4b 04 mov 0x4(%ebx),%ecx
10440f: 89 4d b0 mov %ecx,-0x50(%ebp)
104412: 85 c9 test %ecx,%ecx
104414: 0f 84 b6 02 00 00 je 1046d0 <rtems_fdisk_initialize+0x3b0> <== NEVER TAKEN
uint32_t blocks = 0;
10441a: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
104421: 8b 73 08 mov 0x8(%ebx),%esi
104424: 8d 04 49 lea (%ecx,%ecx,2),%eax
104427: 89 75 d0 mov %esi,-0x30(%ebp)
10442a: 8d 04 86 lea (%esi,%eax,4),%eax
10442d: 89 45 c8 mov %eax,-0x38(%ebp)
for (s = 0; s < dd->segment_count; s++)
104430: 8b 4d d0 mov -0x30(%ebp),%ecx
104433: 8b 01 mov (%ecx),%eax
104435: 85 c0 test %eax,%eax
104437: 74 42 je 10447b <rtems_fdisk_initialize+0x15b> <== NEVER TAKEN
104439: 8b 59 04 mov 0x4(%ecx),%ebx
10443c: 8d 04 40 lea (%eax,%eax,2),%eax
uint32_t count = 0;
10443f: 31 f6 xor %esi,%esi
104441: 8d 04 83 lea (%ebx,%eax,4),%eax
104444: 89 45 d4 mov %eax,-0x2c(%ebp)
104447: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10444e: 66 90 xchg %ax,%ax
return sd->size / page_size;
104450: 8b 43 08 mov 0x8(%ebx),%eax
104453: 31 d2 xor %edx,%edx
for (s = 0; s < dd->segment_count; s++)
104455: 83 c3 0c add $0xc,%ebx
return sd->size / page_size;
104458: f7 f7 div %edi
return ((bytes - 1) / page_size) + 1;
10445a: 31 d2 xor %edx,%edx
(rtems_fdisk_pages_in_segment (sd, page_size) -
10445c: 8d 48 ff lea -0x1(%eax),%ecx
return ((bytes - 1) / page_size) + 1;
10445f: 8d 04 c5 ff ff ff ff lea -0x1(,%eax,8),%eax
104466: f7 f7 div %edi
(rtems_fdisk_pages_in_segment (sd, page_size) -
104468: 29 c1 sub %eax,%ecx
rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count;
10446a: 0f b7 43 f4 movzwl -0xc(%ebx),%eax
10446e: 0f af c8 imul %eax,%ecx
count +=
104471: 01 ce add %ecx,%esi
for (s = 0; s < dd->segment_count; s++)
104473: 39 5d d4 cmp %ebx,-0x2c(%ebp)
104476: 75 d8 jne 104450 <rtems_fdisk_initialize+0x130> <== NEVER TAKEN
blocks += rtems_fdisk_blocks_in_device (&c->devices[device],
104478: 01 75 cc add %esi,-0x34(%ebp)
for (device = 0; device < c->device_count; device++)
10447b: 83 45 d0 0c addl $0xc,-0x30(%ebp)
10447f: 8b 45 d0 mov -0x30(%ebp),%eax
104482: 3b 45 c8 cmp -0x38(%ebp),%eax
104485: 75 a9 jne 104430 <rtems_fdisk_initialize+0x110> <== NEVER TAKEN
c->block_size);
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
104487: 89 3c 24 mov %edi,(%esp)
10448a: e8 c1 0d 00 00 call 105250 <malloc>
10448f: 8b 75 c0 mov -0x40(%ebp),%esi
104492: 89 46 78 mov %eax,0x78(%esi)
if (!fd->copy_buffer)
104495: 85 c0 test %eax,%eax
104497: 0f 84 26 03 00 00 je 1047c3 <rtems_fdisk_initialize+0x4a3> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
10449d: 8b 5d cc mov -0x34(%ebp),%ebx
1044a0: b8 08 00 00 00 mov $0x8,%eax
1044a5: 89 44 24 04 mov %eax,0x4(%esp)
1044a9: 89 1c 24 mov %ebx,(%esp)
1044ac: e8 ff 03 00 00 call 1048b0 <calloc>
1044b1: 89 46 18 mov %eax,0x18(%esi)
if (!fd->blocks)
1044b4: 85 c0 test %eax,%eax
1044b6: 0f 84 07 03 00 00 je 1047c3 <rtems_fdisk_initialize+0x4a3> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
fd->block_count = blocks;
1044bc: 89 5e 1c mov %ebx,0x1c(%esi)
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
1044bf: b8 0c 00 00 00 mov $0xc,%eax
1044c4: 89 44 24 04 mov %eax,0x4(%esp)
1044c8: 8b 45 b0 mov -0x50(%ebp),%eax
1044cb: 89 04 24 mov %eax,(%esp)
1044ce: e8 dd 03 00 00 call 1048b0 <calloc>
1044d3: 89 46 2c mov %eax,0x2c(%esi)
if (!fd->devices)
1044d6: 85 c0 test %eax,%eax
1044d8: 0f 84 e5 02 00 00 je 1047c3 <rtems_fdisk_initialize+0x4a3> <== NEVER TAKEN
static __inline void
_Mutex_Initialize_named(struct _Mutex_Control *_mutex, const char *_name)
{
struct _Mutex_Control _init = _MUTEX_NAMED_INITIALIZER(_name);
*_mutex = _init;
1044de: c7 46 64 00 00 00 00 movl $0x0,0x64(%esi)
return RTEMS_NO_MEMORY;
rtems_mutex_init (&fd->lock, "Flash Disk");
sc = rtems_blkdev_create(name, c->block_size, blocks - fd->unavail_blocks,
1044e5: 89 d8 mov %ebx,%eax
1044e7: 8b 5d c4 mov -0x3c(%ebp),%ebx
1044ea: c7 46 68 00 00 00 00 movl $0x0,0x68(%esi)
1044f1: b9 20 30 10 00 mov $0x103020,%ecx
1044f6: c7 46 6c 00 00 00 00 movl $0x0,0x6c(%esi)
1044fd: c7 46 70 00 00 00 00 movl $0x0,0x70(%esi)
104504: c7 46 74 c8 97 13 00 movl $0x1397c8,0x74(%esi)
10450b: 29 d8 sub %ebx,%eax
10450d: 89 44 24 08 mov %eax,0x8(%esp)
104511: 8d 45 de lea -0x22(%ebp),%eax
104514: 89 74 24 10 mov %esi,0x10(%esp)
104518: 89 4c 24 0c mov %ecx,0xc(%esp)
10451c: 89 7c 24 04 mov %edi,0x4(%esp)
104520: 89 04 24 mov %eax,(%esp)
104523: e8 58 e2 00 00 call 112780 <rtems_blkdev_create>
rtems_fdisk_ioctl, fd);
if (sc != RTEMS_SUCCESSFUL)
104528: 85 c0 test %eax,%eax
sc = rtems_blkdev_create(name, c->block_size, blocks - fd->unavail_blocks,
10452a: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL)
10452c: 0f 85 aa 01 00 00 jne 1046dc <rtems_fdisk_initialize+0x3bc> <== NEVER TAKEN
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
}
for (device = 0; device < c->device_count; device++)
104532: 8b 45 bc mov -0x44(%ebp),%eax
104535: 8b 40 04 mov 0x4(%eax),%eax
104538: 89 45 c4 mov %eax,-0x3c(%ebp)
10453b: 85 c0 test %eax,%eax
10453d: 0f 84 da 00 00 00 je 10461d <rtems_fdisk_initialize+0x2fd> <== NEVER TAKEN
104543: 8b 45 bc mov -0x44(%ebp),%eax
104546: 31 f6 xor %esi,%esi
104548: 8b 40 08 mov 0x8(%eax),%eax
10454b: 89 45 c8 mov %eax,-0x38(%ebp)
10454e: 8b 45 c0 mov -0x40(%ebp),%eax
104551: 8b 40 2c mov 0x2c(%eax),%eax
104554: 89 45 cc mov %eax,-0x34(%ebp)
104557: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
10455e: 66 90 xchg %ax,%ax
for (segment = 0; segment < dd->segment_count; segment++)
104560: 8b 7d c8 mov -0x38(%ebp),%edi
104563: 8b 07 mov (%edi),%eax
104565: 89 45 d0 mov %eax,-0x30(%ebp)
104568: 85 c0 test %eax,%eax
10456a: 0f 84 ff 00 00 00 je 10466f <rtems_fdisk_initialize+0x34f> <== NEVER TAKEN
104570: 8b 5f 04 mov 0x4(%edi),%ebx
104573: 8d 04 40 lea (%eax,%eax,2),%eax
uint32_t count = 0;
104576: 31 d2 xor %edx,%edx
104578: 8d 04 83 lea (%ebx,%eax,4),%eax
10457b: 89 45 d4 mov %eax,-0x2c(%ebp)
10457e: 89 c7 mov %eax,%edi
count += dd->segments[segment].count;
104580: 89 d8 mov %ebx,%eax
104582: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
104589: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
104590: 0f b7 08 movzwl (%eax),%ecx
for (segment = 0; segment < dd->segment_count; segment++)
104593: 83 c0 0c add $0xc,%eax
count += dd->segments[segment].count;
104596: 01 ca add %ecx,%edx
for (segment = 0; segment < dd->segment_count; segment++)
104598: 39 c7 cmp %eax,%edi
10459a: 75 f4 jne 104590 <rtems_fdisk_initialize+0x270> <== NEVER TAKEN
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
fd->devices[device].segments = calloc (segment_count,
10459c: 89 14 24 mov %edx,(%esp)
10459f: b8 30 00 00 00 mov $0x30,%eax
1045a4: 89 44 24 04 mov %eax,0x4(%esp)
1045a8: 89 55 d0 mov %edx,-0x30(%ebp)
1045ab: e8 00 03 00 00 call 1048b0 <calloc>
1045b0: 89 c7 mov %eax,%edi
1045b2: 8b 45 cc mov -0x34(%ebp),%eax
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
1045b5: 85 ff test %edi,%edi
fd->devices[device].segments = calloc (segment_count,
1045b7: 89 38 mov %edi,(%eax)
if (!fd->devices[device].segments)
1045b9: 0f 84 d2 00 00 00 je 104691 <rtems_fdisk_initialize+0x371> <== NEVER TAKEN
1045bf: 90 nop
const rtems_fdisk_segment_desc* sd;
uint32_t seg_segment;
sd = &c->devices[device].segments[segment];
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
1045c0: 0f b7 0b movzwl (%ebx),%ecx
1045c3: 85 c9 test %ecx,%ecx
1045c5: 74 29 je 1045f0 <rtems_fdisk_initialize+0x2d0> <== NEVER TAKEN
1045c7: 31 d2 xor %edx,%edx
1045c9: 89 f8 mov %edi,%eax
1045cb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1045cf: 90 nop
{
sc->descriptor = sd;
sc->device = device;
sc->segment = seg_segment;
1045d0: 89 50 0c mov %edx,0xc(%eax)
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
1045d3: 42 inc %edx
1045d4: 83 c0 30 add $0x30,%eax
sc->descriptor = sd;
1045d7: 89 58 d4 mov %ebx,-0x2c(%eax)
sc->device = device;
1045da: 89 70 d8 mov %esi,-0x28(%eax)
sc->erased = 0;
1045dd: c7 40 fc 00 00 00 00 movl $0x0,-0x4(%eax)
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
1045e4: 39 ca cmp %ecx,%edx
1045e6: 75 e8 jne 1045d0 <rtems_fdisk_initialize+0x2b0>
1045e8: 8d 04 52 lea (%edx,%edx,2),%eax
1045eb: c1 e0 04 shl $0x4,%eax
1045ee: 01 c7 add %eax,%edi
for (segment = 0; segment < c->devices[device].segment_count; segment++)
1045f0: 83 c3 0c add $0xc,%ebx
1045f3: 39 5d d4 cmp %ebx,-0x2c(%ebp)
1045f6: 75 c8 jne 1045c0 <rtems_fdisk_initialize+0x2a0> <== NEVER TAKEN
}
}
fd->devices[device].segment_count = segment_count;
1045f8: 8b 45 cc mov -0x34(%ebp),%eax
for (device = 0; device < c->device_count; device++)
1045fb: 46 inc %esi
fd->devices[device].segment_count = segment_count;
1045fc: 8b 7d d0 mov -0x30(%ebp),%edi
for (device = 0; device < c->device_count; device++)
1045ff: 83 c0 0c add $0xc,%eax
fd->devices[device].segment_count = segment_count;
104602: 89 78 f8 mov %edi,-0x8(%eax)
fd->devices[device].descriptor = &c->devices[device];
104605: 8b 7d c8 mov -0x38(%ebp),%edi
104608: 89 78 fc mov %edi,-0x4(%eax)
for (device = 0; device < c->device_count; device++)
10460b: 83 c7 0c add $0xc,%edi
10460e: 3b 75 c4 cmp -0x3c(%ebp),%esi
104611: 89 7d c8 mov %edi,-0x38(%ebp)
104614: 89 45 cc mov %eax,-0x34(%ebp)
104617: 0f 85 43 ff ff ff jne 104560 <rtems_fdisk_initialize+0x240> <== NEVER TAKEN
}
fd->device_count = c->device_count;
10461d: 8b 45 c0 mov -0x40(%ebp),%eax
104620: 8b 7d c4 mov -0x3c(%ebp),%edi
104623: 89 78 30 mov %edi,0x30(%eax)
ret = rtems_fdisk_recover_block_mappings (fd);
104626: e8 45 e5 ff ff call 102b70 <rtems_fdisk_recover_block_mappings>
if (ret)
10462b: 85 c0 test %eax,%eax
ret = rtems_fdisk_recover_block_mappings (fd);
10462d: 89 c3 mov %eax,%ebx
if (ret)
10462f: 0f 85 e5 00 00 00 jne 10471a <rtems_fdisk_initialize+0x3fa> <== NEVER TAKEN
rtems_fdisk_error ("recovery of disk failed: %s (%d)",
strerror (ret), ret);
return ret;
}
ret = rtems_fdisk_compact (fd);
104635: 8b 45 c0 mov -0x40(%ebp),%eax
104638: e8 93 e2 ff ff call 1028d0 <rtems_fdisk_compact>
if (ret)
10463d: 85 c0 test %eax,%eax
ret = rtems_fdisk_compact (fd);
10463f: 89 c3 mov %eax,%ebx
if (ret)
104641: 0f 85 20 01 00 00 jne 104767 <rtems_fdisk_initialize+0x447> <== NEVER TAKEN
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++, fd++)
104647: ff 45 b8 incl -0x48(%ebp)
10464a: 83 45 bc 20 addl $0x20,-0x44(%ebp)
10464e: 81 45 c0 84 00 00 00 addl $0x84,-0x40(%ebp)
104655: 8b 45 b8 mov -0x48(%ebp),%eax
104658: 39 05 dc 1d 14 00 cmp %eax,0x141ddc
10465e: 0f 87 5a fd ff ff ja 1043be <rtems_fdisk_initialize+0x9e> <== NEVER TAKEN
return ret;
}
}
return RTEMS_SUCCESSFUL;
}
104664: 8b 45 b4 mov -0x4c(%ebp),%eax
104667: 83 c4 6c add $0x6c,%esp
10466a: 5b pop %ebx
10466b: 5e pop %esi
10466c: 5f pop %edi
10466d: 5d pop %ebp
10466e: c3 ret
fd->devices[device].segments = calloc (segment_count,
10466f: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
104676: ba 30 00 00 00 mov $0x30,%edx <== NOT EXECUTED
10467b: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
10467f: e8 2c 02 00 00 call 1048b0 <calloc> <== NOT EXECUTED
104684: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED
104687: 89 07 mov %eax,(%edi) <== NOT EXECUTED
if (!fd->devices[device].segments)
104689: 85 c0 test %eax,%eax <== NOT EXECUTED
10468b: 0f 85 67 ff ff ff jne 1045f8 <rtems_fdisk_initialize+0x2d8> <== NOT EXECUTED
unlink (name);
104691: 8d 45 de lea -0x22(%ebp),%eax <== NOT EXECUTED
return RTEMS_NO_MEMORY;
104694: bb 1a 00 00 00 mov $0x1a,%ebx <== NOT EXECUTED
unlink (name);
104699: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10469c: e8 3f 2c 00 00 call 1072e0 <unlink> <== NOT EXECUTED
free (fd->copy_buffer);
1046a1: 8b 7d c0 mov -0x40(%ebp),%edi <== NOT EXECUTED
1046a4: 8b 47 78 mov 0x78(%edi),%eax <== NOT EXECUTED
1046a7: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1046aa: e8 61 05 00 00 call 104c10 <free> <== NOT EXECUTED
free (fd->blocks);
1046af: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED
1046b2: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1046b5: e8 56 05 00 00 call 104c10 <free> <== NOT EXECUTED
free (fd->devices);
1046ba: 8b 47 2c mov 0x2c(%edi),%eax <== NOT EXECUTED
1046bd: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1046c0: e8 4b 05 00 00 call 104c10 <free> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
1046c5: eb 45 jmp 10470c <rtems_fdisk_initialize+0x3ec> <== NOT EXECUTED
1046c7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1046ce: 66 90 xchg %ax,%ax <== NOT EXECUTED
uint32_t blocks = 0;
1046d0: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED
1046d7: e9 ab fd ff ff jmp 104487 <rtems_fdisk_initialize+0x167> <== NOT EXECUTED
free (fd->copy_buffer);
1046dc: 8b 7d c0 mov -0x40(%ebp),%edi <== NOT EXECUTED
1046df: 8b 47 78 mov 0x78(%edi),%eax <== NOT EXECUTED
1046e2: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1046e5: e8 26 05 00 00 call 104c10 <free> <== NOT EXECUTED
free (fd->blocks);
1046ea: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED
1046ed: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1046f0: e8 1b 05 00 00 call 104c10 <free> <== NOT EXECUTED
free (fd->devices);
1046f5: 8b 47 2c mov 0x2c(%edi),%eax <== NOT EXECUTED
1046f8: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1046fb: e8 10 05 00 00 call 104c10 <free> <== NOT EXECUTED
rtems_fdisk_error ("disk create phy failed");
104700: c7 04 24 d3 97 13 00 movl $0x1397d3,(%esp) <== NOT EXECUTED
104707: e8 d4 d5 ff ff call 101ce0 <rtems_fdisk_error> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
10470c: 89 5d b4 mov %ebx,-0x4c(%ebp) <== NOT EXECUTED
}
10470f: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
104712: 83 c4 6c add $0x6c,%esp <== NOT EXECUTED
104715: 5b pop %ebx <== NOT EXECUTED
104716: 5e pop %esi <== NOT EXECUTED
104717: 5f pop %edi <== NOT EXECUTED
104718: 5d pop %ebp <== NOT EXECUTED
104719: c3 ret <== NOT EXECUTED
unlink (name);
10471a: 8d 45 de lea -0x22(%ebp),%eax <== NOT EXECUTED
10471d: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
104720: e8 bb 2b 00 00 call 1072e0 <unlink> <== NOT EXECUTED
free (fd->copy_buffer);
104725: 8b 7d c0 mov -0x40(%ebp),%edi <== NOT EXECUTED
104728: 8b 47 78 mov 0x78(%edi),%eax <== NOT EXECUTED
10472b: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10472e: e8 dd 04 00 00 call 104c10 <free> <== NOT EXECUTED
free (fd->blocks);
104733: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED
104736: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
104739: e8 d2 04 00 00 call 104c10 <free> <== NOT EXECUTED
free (fd->devices);
10473e: 8b 47 2c mov 0x2c(%edi),%eax <== NOT EXECUTED
104741: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
104744: e8 c7 04 00 00 call 104c10 <free> <== NOT EXECUTED
rtems_fdisk_error ("recovery of disk failed: %s (%d)",
104749: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10474c: e8 1f 99 02 00 call 12e070 <strerror> <== NOT EXECUTED
104751: 89 5c 24 08 mov %ebx,0x8(%esp) <== NOT EXECUTED
104755: c7 04 24 ec 97 13 00 movl $0x1397ec,(%esp) <== NOT EXECUTED
10475c: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
104760: e8 7b d5 ff ff call 101ce0 <rtems_fdisk_error> <== NOT EXECUTED
return ret;
104765: eb a5 jmp 10470c <rtems_fdisk_initialize+0x3ec> <== NOT EXECUTED
unlink (name);
104767: 8d 45 de lea -0x22(%ebp),%eax <== NOT EXECUTED
10476a: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10476d: e8 6e 2b 00 00 call 1072e0 <unlink> <== NOT EXECUTED
free (fd->copy_buffer);
104772: 8b 7d c0 mov -0x40(%ebp),%edi <== NOT EXECUTED
104775: 8b 47 78 mov 0x78(%edi),%eax <== NOT EXECUTED
104778: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10477b: e8 90 04 00 00 call 104c10 <free> <== NOT EXECUTED
free (fd->blocks);
104780: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED
104783: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
104786: e8 85 04 00 00 call 104c10 <free> <== NOT EXECUTED
free (fd->devices);
10478b: 8b 47 2c mov 0x2c(%edi),%eax <== NOT EXECUTED
10478e: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
104791: e8 7a 04 00 00 call 104c10 <free> <== NOT EXECUTED
rtems_fdisk_error ("compacting of disk failed: %s (%d)",
104796: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
104799: e8 d2 98 02 00 call 12e070 <strerror> <== NOT EXECUTED
10479e: 89 5c 24 08 mov %ebx,0x8(%esp) <== NOT EXECUTED
1047a2: c7 04 24 10 98 13 00 movl $0x139810,(%esp) <== NOT EXECUTED
1047a9: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
1047ad: e8 2e d5 ff ff call 101ce0 <rtems_fdisk_error> <== NOT EXECUTED
return ret;
1047b2: e9 55 ff ff ff jmp 10470c <rtems_fdisk_initialize+0x3ec> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
1047b7: c7 45 b4 1a 00 00 00 movl $0x1a,-0x4c(%ebp) <== NOT EXECUTED
1047be: e9 a1 fe ff ff jmp 104664 <rtems_fdisk_initialize+0x344> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
1047c3: bb 1a 00 00 00 mov $0x1a,%ebx <== NOT EXECUTED
1047c8: e9 3f ff ff ff jmp 10470c <rtems_fdisk_initialize+0x3ec> <== NOT EXECUTED
1047cd: 90 nop
1047ce: 90 nop
1047cf: 90 nop
00102ae0 <rtems_ide_part_table_initialize>:
* RTEMS_NO_MEMOTY if cannot have not enough memory,
* RTEMS_INTERNAL_ERROR if other error occurs.
*/
rtems_status_code
rtems_ide_part_table_initialize(const char *dev_name)
{
102ae0: 55 push %ebp
rtems_part_desc_t *part_desc;
/* logical device name /dev/hdxyy */
char name[RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX];
disk_desc = (rtems_disk_desc_t *) calloc(1, sizeof(rtems_disk_desc_t));
102ae1: b8 1c 01 00 00 mov $0x11c,%eax
{
102ae6: 89 e5 mov %esp,%ebp
102ae8: 57 push %edi
102ae9: 56 push %esi
102aea: 53 push %ebx
102aeb: 83 ec 3c sub $0x3c,%esp
disk_desc = (rtems_disk_desc_t *) calloc(1, sizeof(rtems_disk_desc_t));
102aee: 89 44 24 04 mov %eax,0x4(%esp)
102af2: c7 04 24 01 00 00 00 movl $0x1,(%esp)
102af9: e8 62 05 00 00 call 103060 <calloc>
if (disk_desc == NULL)
102afe: 85 c0 test %eax,%eax
102b00: 0f 84 f9 00 00 00 je 102bff <rtems_ide_part_table_initialize+0x11f> <== NEVER TAKEN
{
return RTEMS_NO_MEMORY;
}
/* get partition table */
rc = partition_table_get(dev_name, disk_desc);
102b06: 89 c2 mov %eax,%edx
102b08: 89 c3 mov %eax,%ebx
102b0a: 8b 45 08 mov 0x8(%ebp),%eax
102b0d: e8 0e fb ff ff call 102620 <partition_table_get>
102b12: 89 45 d0 mov %eax,-0x30(%ebp)
if (rc != RTEMS_SUCCESSFUL)
102b15: 85 c0 test %eax,%eax
102b17: 0f 85 cf 00 00 00 jne 102bec <rtems_ide_part_table_initialize+0x10c> <== NEVER TAKEN
free(disk_desc);
return rc;
}
/* create logical disks on the physical one */
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
102b1d: 8b 43 1c mov 0x1c(%ebx),%eax
102b20: 8d 7d d8 lea -0x28(%ebp),%edi
102b23: 31 f6 xor %esi,%esi
102b25: 85 c0 test %eax,%eax
102b27: 7f 0c jg 102b35 <rtems_ide_part_table_initialize+0x55> <== ALWAYS TAKEN
102b29: e9 82 00 00 00 jmp 102bb0 <rtems_ide_part_table_initialize+0xd0> <== NOT EXECUTED
102b2e: 66 90 xchg %ax,%ax <== NOT EXECUTED
102b30: 3b 73 1c cmp 0x1c(%ebx),%esi
102b33: 7d 7b jge 102bb0 <rtems_ide_part_table_initialize+0xd0>
{
sprintf(name, "%s%d", dev_name, part_num + 1);
102b35: 8b 45 08 mov 0x8(%ebp),%eax
102b38: 46 inc %esi
102b39: b9 80 af 12 00 mov $0x12af80,%ecx
102b3e: 89 74 24 0c mov %esi,0xc(%esp)
102b42: 89 4c 24 04 mov %ecx,0x4(%esp)
102b46: 89 3c 24 mov %edi,(%esp)
102b49: 89 44 24 08 mov %eax,0x8(%esp)
102b4d: e8 ae d0 01 00 call 11fc00 <sprintf>
part_desc = disk_desc->partitions[part_num];
102b52: 8b 44 b3 1c mov 0x1c(%ebx,%esi,4),%eax
if (part_desc == NULL)
102b56: 85 c0 test %eax,%eax
102b58: 74 d6 je 102b30 <rtems_ide_part_table_initialize+0x50>
{
continue;
}
rc = rtems_blkdev_create_partition(name, dev_name, part_desc->start,
102b5a: 8b 48 08 mov 0x8(%eax),%ecx
102b5d: 89 4c 24 0c mov %ecx,0xc(%esp)
102b61: 8b 40 04 mov 0x4(%eax),%eax
102b64: 89 3c 24 mov %edi,(%esp)
102b67: 89 44 24 08 mov %eax,0x8(%esp)
102b6b: 8b 45 08 mov 0x8(%ebp),%eax
102b6e: 89 44 24 04 mov %eax,0x4(%esp)
102b72: e8 69 f4 ff ff call 101fe0 <rtems_blkdev_create_partition>
part_desc->size);
if (rc != RTEMS_SUCCESSFUL)
102b77: 85 c0 test %eax,%eax
102b79: 74 b5 je 102b30 <rtems_ide_part_table_initialize+0x50> <== ALWAYS TAKEN
102b7b: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
{
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
102b7e: e8 dd db ff ff call 100760 <__getreent> <== NOT EXECUTED
102b83: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
102b86: ba 88 af 12 00 mov $0x12af88,%edx <== NOT EXECUTED
102b8b: 89 7c 24 08 mov %edi,0x8(%esp) <== NOT EXECUTED
102b8f: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
102b93: 89 4c 24 0c mov %ecx,0xc(%esp) <== NOT EXECUTED
102b97: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
102b9a: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
102b9d: e8 5e cb 01 00 call 11f700 <fprintf> <== NOT EXECUTED
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
102ba2: 3b 73 1c cmp 0x1c(%ebx),%esi <== NOT EXECUTED
102ba5: 7c 8e jl 102b35 <rtems_ide_part_table_initialize+0x55> <== NOT EXECUTED
102ba7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
102bae: 66 90 xchg %ax,%ax <== NOT EXECUTED
for (part_num = 0;
102bb0: 89 5d d4 mov %ebx,-0x2c(%ebp)
102bb3: 31 f6 xor %esi,%esi
partition_free(disk_desc->partitions[part_num]);
102bb5: 8b 45 d4 mov -0x2c(%ebp),%eax
102bb8: 8b 5c b0 20 mov 0x20(%eax,%esi,4),%ebx
if (part_desc == NULL)
102bbc: 85 db test %ebx,%ebx
102bbe: 74 23 je 102be3 <rtems_ide_part_table_initialize+0x103>
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
102bc0: 0f b6 43 01 movzbl 0x1(%ebx),%eax
102bc4: 24 7f and $0x7f,%al
if (is_extended(part_desc->sys_type))
102bc6: 3c 05 cmp $0x5,%al
102bc8: 75 11 jne 102bdb <rtems_ide_part_table_initialize+0xfb> <== ALWAYS TAKEN
for (part_num = 0;
102bca: 31 ff xor %edi,%edi <== NOT EXECUTED
partition_free(part_desc->sub_part[part_num]);
102bcc: 8b 44 bb 18 mov 0x18(%ebx,%edi,4),%eax <== NOT EXECUTED
part_num++)
102bd0: 47 inc %edi <== NOT EXECUTED
partition_free(part_desc->sub_part[part_num]);
102bd1: e8 ba fc ff ff call 102890 <partition_free> <== NOT EXECUTED
for (part_num = 0;
102bd6: 83 ff 04 cmp $0x4,%edi <== NOT EXECUTED
102bd9: 75 f1 jne 102bcc <rtems_ide_part_table_initialize+0xec> <== NOT EXECUTED
free(part_desc);
102bdb: 89 1c 24 mov %ebx,(%esp)
102bde: e8 ed 06 00 00 call 1032d0 <free>
part_num++)
102be3: 46 inc %esi
for (part_num = 0;
102be4: 83 fe 04 cmp $0x4,%esi
102be7: 75 cc jne 102bb5 <rtems_ide_part_table_initialize+0xd5>
free(disk_desc);
102be9: 8b 5d d4 mov -0x2c(%ebp),%ebx
102bec: 89 1c 24 mov %ebx,(%esp)
102bef: e8 dc 06 00 00 call 1032d0 <free>
}
partition_table_free(disk_desc);
return RTEMS_SUCCESSFUL;
}
102bf4: 8b 45 d0 mov -0x30(%ebp),%eax
102bf7: 83 c4 3c add $0x3c,%esp
102bfa: 5b pop %ebx
102bfb: 5e pop %esi
102bfc: 5f pop %edi
102bfd: 5d pop %ebp
102bfe: c3 ret
return RTEMS_NO_MEMORY;
102bff: c7 45 d0 1a 00 00 00 movl $0x1a,-0x30(%ebp) <== NOT EXECUTED
102c06: eb ec jmp 102bf4 <rtems_ide_part_table_initialize+0x114> <== NOT EXECUTED
102c08: 90 nop
102c09: 90 nop
102c0a: 90 nop
102c0b: 90 nop
102c0c: 90 nop
102c0d: 90 nop
102c0e: 90 nop
102c0f: 90 nop
00105c50 <rtems_nvdisk_initialize>:
*/
rtems_device_driver
rtems_nvdisk_initialize (rtems_device_major_number major RTEMS_UNUSED,
rtems_device_minor_number minor RTEMS_UNUSED,
void* arg RTEMS_UNUSED)
{
105c50: 55 push %ebp <== NOT EXECUTED
105c51: 89 e5 mov %esp,%ebp <== NOT EXECUTED
105c53: 57 push %edi <== NOT EXECUTED
105c54: 56 push %esi <== NOT EXECUTED
105c55: 53 push %ebx <== NOT EXECUTED
105c56: 83 ec 5c sub $0x5c,%esp <== NOT EXECUTED
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
105c59: c7 04 24 00 02 00 00 movl $0x200,(%esp) <== NOT EXECUTED
105c60: e8 4b 22 00 00 call 107eb0 <malloc> <== NOT EXECUTED
105c65: a3 f8 c0 1a 00 mov %eax,0x1ac0f8 <== NOT EXECUTED
if (!rtems_nvdisk_crc16_factor)
105c6a: 85 c0 test %eax,%eax <== NOT EXECUTED
105c6c: 0f 84 ce 01 00 00 je 105e40 <rtems_nvdisk_initialize+0x1f0> <== NOT EXECUTED
105c72: 89 c6 mov %eax,%esi <== NOT EXECUTED
for (b = 0; b < 256; b++)
105c74: 31 db xor %ebx,%ebx <== NOT EXECUTED
105c76: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
105c7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uint16_t v = b;
105c80: 0f b7 c3 movzwl %bx,%eax <== NOT EXECUTED
for (b = 0; b < 256; b++)
105c83: ba 08 00 00 00 mov $0x8,%edx <== NOT EXECUTED
105c88: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
105c8f: 90 nop <== NOT EXECUTED
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
105c90: 89 c1 mov %eax,%ecx <== NOT EXECUTED
105c92: d1 e8 shr %eax <== NOT EXECUTED
105c94: 83 e1 01 and $0x1,%ecx <== NOT EXECUTED
105c97: 85 c9 test %ecx,%ecx <== NOT EXECUTED
105c99: 74 08 je 105ca3 <rtems_nvdisk_initialize+0x53> <== NOT EXECUTED
105c9b: 35 08 84 ff ff xor $0xffff8408,%eax <== NOT EXECUTED
105ca0: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED
for (i = 8; i--;)
105ca3: 4a dec %edx <== NOT EXECUTED
105ca4: 75 ea jne 105c90 <rtems_nvdisk_initialize+0x40> <== NOT EXECUTED
rtems_nvdisk_crc16_factor[b] = v & 0xffff;
105ca6: 66 89 04 5e mov %ax,(%esi,%ebx,2) <== NOT EXECUTED
for (b = 0; b < 256; b++)
105caa: 43 inc %ebx <== NOT EXECUTED
105cab: 81 fb 00 01 00 00 cmp $0x100,%ebx <== NOT EXECUTED
105cb1: 75 cd jne 105c80 <rtems_nvdisk_initialize+0x30> <== NOT EXECUTED
sc = rtems_nvdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
nvd = calloc (rtems_nvdisk_configuration_size, sizeof (*nvd));
105cb3: 8b 1d 00 1d 1a 00 mov 0x1a1d00,%ebx <== NOT EXECUTED
105cb9: be 30 00 00 00 mov $0x30,%esi <== NOT EXECUTED
105cbe: 89 74 24 04 mov %esi,0x4(%esp) <== NOT EXECUTED
105cc2: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
105cc5: e8 c6 18 00 00 call 107590 <calloc> <== NOT EXECUTED
105cca: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
if (!nvd)
105ccd: 85 c0 test %eax,%eax <== NOT EXECUTED
105ccf: 0f 84 6b 01 00 00 je 105e40 <rtems_nvdisk_initialize+0x1f0> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (i = 0; i < rtems_nvdisk_configuration_size; i++, c++, nvd++)
105cd5: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) <== NOT EXECUTED
105cdc: 85 db test %ebx,%ebx <== NOT EXECUTED
const rtems_nvdisk_config* c = rtems_nvdisk_configuration;
105cde: c7 45 c0 60 e1 18 00 movl $0x18e160,-0x40(%ebp) <== NOT EXECUTED
for (i = 0; i < rtems_nvdisk_configuration_size; i++, c++, nvd++)
105ce5: 0f 84 27 01 00 00 je 105e12 <rtems_nvdisk_initialize+0x1c2> <== NOT EXECUTED
uint32_t device;
uint32_t blocks = 0;
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += i;
nvd->flags = c->flags;
105ceb: 8b 75 c0 mov -0x40(%ebp),%esi <== NOT EXECUTED
nvd->block_size = c->block_size;
nvd->info_level = c->info_level;
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
105cee: b9 14 00 00 00 mov $0x14,%ecx <== NOT EXECUTED
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
105cf3: 66 c7 45 e6 61 00 movw $0x61,-0x1a(%ebp) <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += i;
105cf9: 0f b6 45 c8 movzbl -0x38(%ebp),%eax <== NOT EXECUTED
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
105cfd: c7 45 de 2f 64 65 76 movl $0x7665642f,-0x22(%ebp) <== NOT EXECUTED
nvd->flags = c->flags;
105d04: 8b 7d c4 mov -0x3c(%ebp),%edi <== NOT EXECUTED
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
105d07: c7 45 e2 2f 6e 76 64 movl $0x64766e2f,-0x1e(%ebp) <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += i;
105d0e: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED
nvd->flags = c->flags;
105d11: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
105d14: 89 07 mov %eax,(%edi) <== NOT EXECUTED
nvd->block_size = c->block_size;
105d16: 8b 06 mov (%esi),%eax <== NOT EXECUTED
105d18: 89 47 04 mov %eax,0x4(%edi) <== NOT EXECUTED
105d1b: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
nvd->info_level = c->info_level;
105d1e: 8b 46 10 mov 0x10(%esi),%eax <== NOT EXECUTED
105d21: 89 47 2c mov %eax,0x2c(%edi) <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
105d24: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
105d27: 89 4c 24 04 mov %ecx,0x4(%esp) <== NOT EXECUTED
105d2b: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
105d2e: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
105d31: e8 5a 18 00 00 call 107590 <calloc> <== NOT EXECUTED
105d36: 89 47 0c mov %eax,0xc(%edi) <== NOT EXECUTED
if (!nvd->devices)
105d39: 85 c0 test %eax,%eax <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
105d3b: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (!nvd->devices)
105d3d: 0f 84 fd 00 00 00 je 105e40 <rtems_nvdisk_initialize+0x1f0> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
105d43: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
105d46: 85 d2 test %edx,%edx <== NOT EXECUTED
105d48: 0f 84 d0 00 00 00 je 105e1e <rtems_nvdisk_initialize+0x1ce> <== NOT EXECUTED
uint32_t blocks = 0;
105d4e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
105d55: 8b 7e 08 mov 0x8(%esi),%edi <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
105d58: 31 f6 xor %esi,%esi <== NOT EXECUTED
105d5a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
105d60: 89 33 mov %esi,(%ebx) <== NOT EXECUTED
return dd->size / nvd->block_size;
105d62: 31 d2 xor %edx,%edx <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
105d64: 46 inc %esi <== NOT EXECUTED
return dd->size / nvd->block_size;
105d65: 8b 47 08 mov 0x8(%edi),%eax <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
105d68: 83 c3 14 add $0x14,%ebx <== NOT EXECUTED
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
dc->block_base = blocks;
blocks += dc->pages - dc->pages_desc;
dc->descriptor = &c->devices[device];
105d6b: 89 7b fc mov %edi,-0x4(%ebx) <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
105d6e: 83 c7 10 add $0x10,%edi <== NOT EXECUTED
return dd->size / nvd->block_size;
105d71: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
return ((bytes - 1) / nvd->block_size) + 1;
105d74: 31 d2 xor %edx,%edx <== NOT EXECUTED
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
105d76: 89 43 f0 mov %eax,-0x10(%ebx) <== NOT EXECUTED
return dd->size / nvd->block_size;
105d79: 89 c1 mov %eax,%ecx <== NOT EXECUTED
return ((bytes - 1) / nvd->block_size) + 1;
105d7b: 8d 44 00 ff lea -0x1(%eax,%eax,1),%eax <== NOT EXECUTED
105d7f: f7 75 d4 divl -0x2c(%ebp) <== NOT EXECUTED
dc->block_base = blocks;
105d82: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED
105d85: 89 53 f8 mov %edx,-0x8(%ebx) <== NOT EXECUTED
return ((bytes - 1) / nvd->block_size) + 1;
105d88: 40 inc %eax <== NOT EXECUTED
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
105d89: 89 43 f4 mov %eax,-0xc(%ebx) <== NOT EXECUTED
blocks += dc->pages - dc->pages_desc;
105d8c: 29 c1 sub %eax,%ecx <== NOT EXECUTED
105d8e: 01 ca add %ecx,%edx <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
105d90: 39 75 cc cmp %esi,-0x34(%ebp) <== NOT EXECUTED
blocks += dc->pages - dc->pages_desc;
105d93: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
105d96: 75 c8 jne 105d60 <rtems_nvdisk_initialize+0x110> <== NOT EXECUTED
}
nvd->block_count = blocks;
105d98: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
105d9b: 8b 75 d0 mov -0x30(%ebp),%esi <== NOT EXECUTED
nvd->device_count = c->device_count;
105d9e: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED
nvd->block_count = blocks;
105da1: 89 70 08 mov %esi,0x8(%eax) <== NOT EXECUTED
nvd->device_count = c->device_count;
105da4: 89 78 10 mov %edi,0x10(%eax) <== NOT EXECUTED
sc = rtems_blkdev_create(name, c->block_size, blocks,
105da7: 89 44 24 10 mov %eax,0x10(%esp) <== NOT EXECUTED
105dab: b8 b0 56 10 00 mov $0x1056b0,%eax <== NOT EXECUTED
105db0: 89 44 24 0c mov %eax,0xc(%esp) <== NOT EXECUTED
105db4: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
105db7: 89 74 24 08 mov %esi,0x8(%esp) <== NOT EXECUTED
105dbb: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
105dbf: 8d 45 de lea -0x22(%ebp),%eax <== NOT EXECUTED
105dc2: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
105dc5: e8 e6 f2 ff ff call 1050b0 <rtems_blkdev_create> <== NOT EXECUTED
rtems_nvdisk_ioctl, nvd);
if (sc != RTEMS_SUCCESSFUL)
105dca: 85 c0 test %eax,%eax <== NOT EXECUTED
sc = rtems_blkdev_create(name, c->block_size, blocks,
105dcc: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
105dce: 75 5a jne 105e2a <rtems_nvdisk_initialize+0x1da> <== NOT EXECUTED
static __inline void
_Mutex_Initialize_named(struct _Mutex_Control *_mutex, const char *_name)
{
struct _Mutex_Control _init = _MUTEX_NAMED_INITIALIZER(_name);
*_mutex = _init;
105dd0: 8b 7d c4 mov -0x3c(%ebp),%edi <== NOT EXECUTED
for (i = 0; i < rtems_nvdisk_configuration_size; i++, c++, nvd++)
105dd3: ff 45 c8 incl -0x38(%ebp) <== NOT EXECUTED
105dd6: 83 45 c0 14 addl $0x14,-0x40(%ebp) <== NOT EXECUTED
105dda: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) <== NOT EXECUTED
105de1: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
105de4: 83 c7 30 add $0x30,%edi <== NOT EXECUTED
105de7: c7 47 ec 00 00 00 00 movl $0x0,-0x14(%edi) <== NOT EXECUTED
105dee: c7 47 f0 00 00 00 00 movl $0x0,-0x10(%edi) <== NOT EXECUTED
105df5: c7 47 f4 00 00 00 00 movl $0x0,-0xc(%edi) <== NOT EXECUTED
105dfc: c7 47 f8 ba e5 18 00 movl $0x18e5ba,-0x8(%edi) <== NOT EXECUTED
105e03: 39 05 00 1d 1a 00 cmp %eax,0x1a1d00 <== NOT EXECUTED
105e09: 89 7d c4 mov %edi,-0x3c(%ebp) <== NOT EXECUTED
105e0c: 0f 87 d9 fe ff ff ja 105ceb <rtems_nvdisk_initialize+0x9b> <== NOT EXECUTED
}
rtems_mutex_init (&nvd->lock, "NV Disk");
}
return RTEMS_SUCCESSFUL;
105e12: 31 db xor %ebx,%ebx <== NOT EXECUTED
}
105e14: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
105e17: 89 d8 mov %ebx,%eax <== NOT EXECUTED
105e19: 5b pop %ebx <== NOT EXECUTED
105e1a: 5e pop %esi <== NOT EXECUTED
105e1b: 5f pop %edi <== NOT EXECUTED
105e1c: 5d pop %ebp <== NOT EXECUTED
105e1d: c3 ret <== NOT EXECUTED
uint32_t blocks = 0;
105e1e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
105e25: e9 6e ff ff ff jmp 105d98 <rtems_nvdisk_initialize+0x148> <== NOT EXECUTED
rtems_nvdisk_error ("disk create phy failed");
105e2a: c7 04 24 a3 e5 18 00 movl $0x18e5a3,(%esp) <== NOT EXECUTED
105e31: e8 7a f7 ff ff call 1055b0 <rtems_nvdisk_error> <== NOT EXECUTED
}
105e36: 83 c4 5c add $0x5c,%esp <== NOT EXECUTED
105e39: 89 d8 mov %ebx,%eax <== NOT EXECUTED
105e3b: 5b pop %ebx <== NOT EXECUTED
105e3c: 5e pop %esi <== NOT EXECUTED
105e3d: 5f pop %edi <== NOT EXECUTED
105e3e: 5d pop %ebp <== NOT EXECUTED
105e3f: c3 ret <== NOT EXECUTED
return RTEMS_NO_MEMORY;
105e40: bb 1a 00 00 00 mov $0x1a,%ebx <== NOT EXECUTED
105e45: eb cd jmp 105e14 <rtems_nvdisk_initialize+0x1c4> <== NOT EXECUTED
105e47: 90 nop
105e48: 90 nop
105e49: 90 nop
105e4a: 90 nop
105e4b: 90 nop
105e4c: 90 nop
105e4d: 90 nop
105e4e: 90 nop
105e4f: 90 nop
001019d0 <rtems_sparse_disk_create_and_register>:
{
1019d0: 55 push %ebp
1019d1: 89 e5 mov %esp,%ebp
1019d3: 83 ec 38 sub $0x38,%esp
1019d6: 89 75 f8 mov %esi,-0x8(%ebp)
1019d9: 8b 75 0c mov 0xc(%ebp),%esi
1019dc: 89 7d fc mov %edi,-0x4(%ebp)
1019df: 8b 7d 10 mov 0x10(%ebp),%edi
1019e2: 89 5d f4 mov %ebx,-0xc(%ebp)
1019e5: 0f b6 5d 18 movzbl 0x18(%ebp),%ebx
+ key_table_size + data_size;
1019e9: 8d 46 08 lea 0x8(%esi),%eax
1019ec: 0f af c7 imul %edi,%eax
size_t const alloc_size = sizeof( rtems_sparse_disk )
1019ef: 83 c0 2c add $0x2c,%eax
rtems_sparse_disk *const sd = (rtems_sparse_disk *) malloc(
1019f2: 89 04 24 mov %eax,(%esp)
1019f5: e8 26 07 00 00 call 102120 <malloc>
if ( sparse_disk != NULL ) {
1019fa: 85 c0 test %eax,%eax
1019fc: 74 38 je 101a36 <rtems_sparse_disk_create_and_register+0x66><== NEVER TAKEN
sc = rtems_sparse_disk_register(
1019fe: 89 44 24 04 mov %eax,0x4(%esp)
101a02: ba 90 13 10 00 mov $0x101390,%edx
101a07: 8b 45 08 mov 0x8(%ebp),%eax
101a0a: 89 54 24 18 mov %edx,0x18(%esp)
101a0e: 8b 55 14 mov 0x14(%ebp),%edx
101a11: 89 5c 24 14 mov %ebx,0x14(%esp)
101a15: 89 7c 24 0c mov %edi,0xc(%esp)
101a19: 89 74 24 08 mov %esi,0x8(%esp)
101a1d: 89 54 24 10 mov %edx,0x10(%esp)
101a21: 89 04 24 mov %eax,(%esp)
101a24: e8 57 fd ff ff call 101780 <rtems_sparse_disk_register>
}
101a29: 8b 5d f4 mov -0xc(%ebp),%ebx
101a2c: 8b 75 f8 mov -0x8(%ebp),%esi
101a2f: 8b 7d fc mov -0x4(%ebp),%edi
101a32: 89 ec mov %ebp,%esp
101a34: 5d pop %ebp
101a35: c3 ret
sc = RTEMS_NO_MEMORY;
101a36: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
return sc;
101a3b: eb ec jmp 101a29 <rtems_sparse_disk_create_and_register+0x59><== NOT EXECUTED
101a3d: 90 nop
101a3e: 90 nop
101a3f: 90 nop
00101780 <rtems_sparse_disk_register>:
uint32_t media_block_size,
rtems_blkdev_bnum blocks_with_buffer,
rtems_blkdev_bnum media_block_count,
uint8_t fill_pattern,
rtems_sparse_disk_delete_handler sparse_disk_delete )
{
101780: 55 push %ebp
101781: 89 e5 mov %esp,%ebp
101783: 57 push %edi
101784: 56 push %esi
101785: 53 push %ebx
101786: 83 ec 2c sub $0x2c,%esp
101789: 8b 45 08 mov 0x8(%ebp),%eax
10178c: 8b 7d 14 mov 0x14(%ebp),%edi
10178f: 8b 55 18 mov 0x18(%ebp),%edx
101792: 0f b6 4d 1c movzbl 0x1c(%ebp),%ecx
101796: 89 45 dc mov %eax,-0x24(%ebp)
101799: 8b 45 20 mov 0x20(%ebp),%eax
10179c: 89 7d e0 mov %edi,-0x20(%ebp)
10179f: 8b 5d 0c mov 0xc(%ebp),%ebx
1017a2: 89 55 d8 mov %edx,-0x28(%ebp)
rtems_status_code sc;
if ( blocks_with_buffer <= media_block_count ) {
1017a5: 39 d7 cmp %edx,%edi
{
1017a7: 8b 75 10 mov 0x10(%ebp),%esi
1017aa: 88 4d e4 mov %cl,-0x1c(%ebp)
1017ad: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( blocks_with_buffer <= media_block_count ) {
1017b0: b8 0a 00 00 00 mov $0xa,%eax
1017b5: 76 09 jbe 1017c0 <rtems_sparse_disk_register+0x40> <== ALWAYS TAKEN
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
1017b7: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
1017ba: 5b pop %ebx <== NOT EXECUTED
1017bb: 5e pop %esi <== NOT EXECUTED
1017bc: 5f pop %edi <== NOT EXECUTED
1017bd: 5d pop %ebp <== NOT EXECUTED
1017be: c3 ret <== NOT EXECUTED
1017bf: 90 nop <== NOT EXECUTED
sc = sparse_disk_initialize(
1017c0: 0f b6 c1 movzbl %cl,%eax
if ( NULL == sd )
1017c3: 85 db test %ebx,%ebx
sc = sparse_disk_initialize(
1017c5: 89 45 d0 mov %eax,-0x30(%ebp)
if ( NULL == sd )
1017c8: 0f 84 a2 01 00 00 je 101970 <rtems_sparse_disk_register+0x1f0> <== NEVER TAKEN
size_t const key_table_size = blocks_with_buffer
1017ce: 8d 04 fd 00 00 00 00 lea 0x0(,%edi,8),%eax
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
1017d5: 89 df mov %ebx,%edi
size_t const key_table_size = blocks_with_buffer
1017d7: 89 45 c8 mov %eax,-0x38(%ebp)
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
1017da: 83 c0 2c add $0x2c,%eax
1017dd: 89 45 cc mov %eax,-0x34(%ebp)
1017e0: 83 f8 08 cmp $0x8,%eax
1017e3: 89 c2 mov %eax,%edx
1017e5: 0f 83 25 01 00 00 jae 101910 <rtems_sparse_disk_register+0x190> <== ALWAYS TAKEN
1017eb: f6 c2 04 test $0x4,%dl
1017ee: 0f 85 fc 00 00 00 jne 1018f0 <rtems_sparse_disk_register+0x170> <== NEVER TAKEN
1017f4: f6 c2 02 test $0x2,%dl
1017f7: 0f 85 d3 00 00 00 jne 1018d0 <rtems_sparse_disk_register+0x150> <== NEVER TAKEN
1017fd: f6 c2 01 test $0x1,%dl
101800: 0f 85 ba 00 00 00 jne 1018c0 <rtems_sparse_disk_register+0x140> <== NEVER TAKEN
sd->fill_pattern = fill_pattern;
101806: 0f b6 45 e4 movzbl -0x1c(%ebp),%eax
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
10180a: 8b 55 cc mov -0x34(%ebp),%edx
sd->fill_pattern = fill_pattern;
10180d: 88 43 24 mov %al,0x24(%ebx)
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
101810: 8b 45 e0 mov -0x20(%ebp),%eax
101813: 01 da add %ebx,%edx
101815: 89 d7 mov %edx,%edi
101817: 0f af c6 imul %esi,%eax
10181a: 89 45 e4 mov %eax,-0x1c(%ebp)
10181d: 83 f8 08 cmp $0x8,%eax
101820: 0f 83 1a 01 00 00 jae 101940 <rtems_sparse_disk_register+0x1c0> <== ALWAYS TAKEN
101826: 83 65 e4 07 andl $0x7,-0x1c(%ebp)
10182a: 74 0e je 10183a <rtems_sparse_disk_register+0xba> <== ALWAYS TAKEN
10182c: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
10182f: 31 c0 xor %eax,%eax <== NOT EXECUTED
101831: 88 0c 07 mov %cl,(%edi,%eax,1) <== NOT EXECUTED
101834: 40 inc %eax <== NOT EXECUTED
101835: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED
101838: 72 f7 jb 101831 <rtems_sparse_disk_register+0xb1> <== NOT EXECUTED
static __inline void
_Mutex_Initialize_named(struct _Mutex_Control *_mutex, const char *_name)
{
struct _Mutex_Control _init = _MUTEX_NAMED_INITIALIZER(_name);
*_mutex = _init;
10183a: c7 03 00 00 00 00 movl $0x0,(%ebx)
sd->delete_handler = sparse_disk_delete;
101840: 8b 45 d4 mov -0x2c(%ebp),%eax
101843: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
sd->blocks_with_buffer = blocks_with_buffer;
10184a: 8b 4d e0 mov -0x20(%ebp),%ecx
10184d: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
101854: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
sd->delete_handler = sparse_disk_delete;
10185b: 89 43 20 mov %eax,0x20(%ebx)
data += sizeof( rtems_sparse_disk );
10185e: 8d 43 2c lea 0x2c(%ebx),%eax
101861: c7 43 10 24 2b 13 00 movl $0x132b24,0x10(%ebx)
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
101868: 85 c9 test %ecx,%ecx
sd->blocks_with_buffer = blocks_with_buffer;
10186a: 89 4b 14 mov %ecx,0x14(%ebx)
data += sizeof( rtems_sparse_disk );
10186d: 89 43 28 mov %eax,0x28(%ebx)
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
101870: 74 19 je 10188b <rtems_sparse_disk_register+0x10b> <== NEVER TAKEN
101872: 8b 4d c8 mov -0x38(%ebp),%ecx
101875: 8d 43 30 lea 0x30(%ebx),%eax
101878: 8d 4c 0b 30 lea 0x30(%ebx,%ecx,1),%ecx
10187c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
sd->key_table[i].data = data;
101880: 89 10 mov %edx,(%eax)
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
101882: 83 c0 08 add $0x8,%eax
101885: 01 f2 add %esi,%edx
101887: 39 c1 cmp %eax,%ecx
101889: 75 f5 jne 101880 <rtems_sparse_disk_register+0x100>
sd->media_block_size = media_block_size;
10188b: 89 73 1c mov %esi,0x1c(%ebx)
sc = rtems_blkdev_create(
10188e: 8b 45 d8 mov -0x28(%ebp),%eax
101891: 89 5d 18 mov %ebx,0x18(%ebp)
101894: 89 75 0c mov %esi,0xc(%ebp)
101897: c7 45 14 a0 13 10 00 movl $0x1013a0,0x14(%ebp)
10189e: 89 45 10 mov %eax,0x10(%ebp)
1018a1: 8b 45 dc mov -0x24(%ebp),%eax
1018a4: 89 45 08 mov %eax,0x8(%ebp)
}
1018a7: 83 c4 2c add $0x2c,%esp
1018aa: 5b pop %ebx
1018ab: 5e pop %esi
1018ac: 5f pop %edi
1018ad: 5d pop %ebp
sc = rtems_blkdev_create(
1018ae: e9 5d bb 00 00 jmp 10d410 <rtems_blkdev_create>
1018b3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1018ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
1018c0: c6 07 00 movb $0x0,(%edi) <== NOT EXECUTED
1018c3: e9 3e ff ff ff jmp 101806 <rtems_sparse_disk_register+0x86> <== NOT EXECUTED
1018c8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1018cf: 90 nop <== NOT EXECUTED
1018d0: 66 c7 07 00 00 movw $0x0,(%edi) <== NOT EXECUTED
1018d5: 83 c7 02 add $0x2,%edi <== NOT EXECUTED
1018d8: f6 c2 01 test $0x1,%dl <== NOT EXECUTED
1018db: 0f 84 25 ff ff ff je 101806 <rtems_sparse_disk_register+0x86> <== NOT EXECUTED
1018e1: eb dd jmp 1018c0 <rtems_sparse_disk_register+0x140> <== NOT EXECUTED
1018e3: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
1018ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1018f0: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED
1018f6: 83 c7 04 add $0x4,%edi <== NOT EXECUTED
1018f9: f6 c2 02 test $0x2,%dl <== NOT EXECUTED
1018fc: 0f 84 fb fe ff ff je 1017fd <rtems_sparse_disk_register+0x7d> <== NOT EXECUTED
101902: eb cc jmp 1018d0 <rtems_sparse_disk_register+0x150> <== NOT EXECUTED
101904: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10190b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED
10190f: 90 nop <== NOT EXECUTED
101910: f6 c3 01 test $0x1,%bl
101913: 75 65 jne 10197a <rtems_sparse_disk_register+0x1fa> <== NEVER TAKEN
101915: f7 c7 02 00 00 00 test $0x2,%edi
10191b: 0f 85 99 00 00 00 jne 1019ba <rtems_sparse_disk_register+0x23a> <== NEVER TAKEN
101921: f7 c7 04 00 00 00 test $0x4,%edi
101927: 0f 85 7c 00 00 00 jne 1019a9 <rtems_sparse_disk_register+0x229>
10192d: 89 d1 mov %edx,%ecx
10192f: 31 c0 xor %eax,%eax
101931: c1 e9 02 shr $0x2,%ecx
101934: 83 e2 03 and $0x3,%edx
101937: f3 ab rep stos %eax,%es:(%edi)
101939: e9 ad fe ff ff jmp 1017eb <rtems_sparse_disk_register+0x6b>
10193e: 66 90 xchg %ax,%ax
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
101940: 69 45 d0 01 01 01 01 imul $0x1010101,-0x30(%ebp),%eax
101947: f6 c2 01 test $0x1,%dl
10194a: 75 53 jne 10199f <rtems_sparse_disk_register+0x21f> <== NEVER TAKEN
10194c: f7 c7 02 00 00 00 test $0x2,%edi
101952: 75 3f jne 101993 <rtems_sparse_disk_register+0x213> <== NEVER TAKEN
101954: f7 c7 04 00 00 00 test $0x4,%edi
10195a: 75 2c jne 101988 <rtems_sparse_disk_register+0x208>
10195c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10195f: c1 e9 02 shr $0x2,%ecx
101962: f3 ab rep stos %eax,%es:(%edi)
101964: 83 65 e4 03 andl $0x3,-0x1c(%ebp)
101968: e9 b9 fe ff ff jmp 101826 <rtems_sparse_disk_register+0xa6>
10196d: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
101970: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
return sc;
101975: e9 3d fe ff ff jmp 1017b7 <rtems_sparse_disk_register+0x37> <== NOT EXECUTED
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
10197a: c6 03 00 movb $0x0,(%ebx) <== NOT EXECUTED
10197d: 8d 7b 01 lea 0x1(%ebx),%edi <== NOT EXECUTED
101980: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
101983: 8d 50 2b lea 0x2b(%eax),%edx <== NOT EXECUTED
101986: eb 8d jmp 101915 <rtems_sparse_disk_register+0x195> <== NOT EXECUTED
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
101988: 89 07 mov %eax,(%edi)
10198a: 83 c7 04 add $0x4,%edi
10198d: 83 6d e4 04 subl $0x4,-0x1c(%ebp)
101991: eb c9 jmp 10195c <rtems_sparse_disk_register+0x1dc>
101993: 66 89 07 mov %ax,(%edi) <== NOT EXECUTED
101996: 83 c7 02 add $0x2,%edi <== NOT EXECUTED
101999: 83 6d e4 02 subl $0x2,-0x1c(%ebp) <== NOT EXECUTED
10199d: eb b5 jmp 101954 <rtems_sparse_disk_register+0x1d4> <== NOT EXECUTED
10199f: 88 02 mov %al,(%edx) <== NOT EXECUTED
1019a1: 8d 7a 01 lea 0x1(%edx),%edi <== NOT EXECUTED
1019a4: ff 4d e4 decl -0x1c(%ebp) <== NOT EXECUTED
1019a7: eb a3 jmp 10194c <rtems_sparse_disk_register+0x1cc> <== NOT EXECUTED
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
1019a9: c7 07 00 00 00 00 movl $0x0,(%edi)
1019af: 83 ea 04 sub $0x4,%edx
1019b2: 83 c7 04 add $0x4,%edi
1019b5: e9 73 ff ff ff jmp 10192d <rtems_sparse_disk_register+0x1ad>
1019ba: 66 c7 07 00 00 movw $0x0,(%edi) <== NOT EXECUTED
1019bf: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED
1019c2: 83 c7 02 add $0x2,%edi <== NOT EXECUTED
1019c5: e9 57 ff ff ff jmp 101921 <rtems_sparse_disk_register+0x1a1> <== NOT EXECUTED
1019ca: 90 nop
1019cb: 90 nop
1019cc: 90 nop
1019cd: 90 nop
1019ce: 90 nop
1019cf: 90 nop