Lines Matching refs:inreg

50 int disk_int13_retry(const com32sys_t * inreg, com32sys_t * outreg)  in disk_int13_retry()  argument
59 __intcall(0x13, inreg, outreg); in disk_int13_retry()
76 static com32sys_t inreg, outreg; in disk_get_params() local
85 memset(&inreg, 0, sizeof inreg); in disk_get_params()
86 inreg.eax.b[1] = 0x41; in disk_get_params()
87 inreg.ebx.w[0] = 0x55aa; in disk_get_params()
88 inreg.edx.b[0] = disk; in disk_get_params()
89 inreg.eflags.b[0] = 0x3; /* CF set */ in disk_get_params()
91 __intcall(0x13, &inreg, &outreg); in disk_get_params()
104 memset(&inreg, 0, sizeof inreg); in disk_get_params()
105 inreg.eax.b[1] = 0x48; in disk_get_params()
106 inreg.edx.b[0] = disk; in disk_get_params()
107 inreg.esi.w[0] = OFFS(eparam); in disk_get_params()
108 inreg.ds = SEG(eparam); in disk_get_params()
113 __intcall(0x13, &inreg, &outreg); in disk_get_params()
130 memset(&inreg, 0, sizeof inreg); in disk_get_params()
131 inreg.eax.b[1] = 0x08; in disk_get_params()
132 inreg.edx.b[0] = disk; in disk_get_params()
134 __intcall(0x13, &inreg, &outreg); in disk_get_params()
171 static void *ebios_setup(const struct disk_info *const diskinfo, com32sys_t *inreg, in ebios_setup() argument
193 inreg->eax.b[1] = op_code; in ebios_setup()
194 inreg->esi.w[0] = OFFS(dapa); in ebios_setup()
195 inreg->ds = SEG(dapa); in ebios_setup()
196 inreg->edx.b[0] = diskinfo->disk; in ebios_setup()
211 static void *chs_setup(const struct disk_info *const diskinfo, com32sys_t *inreg, in chs_setup() argument
232 memset(inreg, 0, sizeof *inreg); in chs_setup()
233 inreg->eax.b[0] = count; in chs_setup()
234 inreg->eax.b[1] = op_code; in chs_setup()
235 inreg->ecx.b[1] = c; in chs_setup()
236 inreg->ecx.b[0] = ((c & 0x300) >> 2) | (s+1); in chs_setup()
237 inreg->edx.b[1] = h; in chs_setup()
238 inreg->edx.b[0] = diskinfo->disk; in chs_setup()
239 inreg->ebx.w[0] = OFFS(buf); in chs_setup()
240 inreg->es = SEG(buf); in chs_setup()
259 com32sys_t inreg; in disk_read_sectors() local
269 memset(&inreg, 0, sizeof inreg); in disk_read_sectors()
272 buf = ebios_setup(diskinfo, &inreg, lba, count, EBIOS_READ_CODE); in disk_read_sectors()
274 buf = chs_setup(diskinfo, &inreg, lba, count, CHS_READ_CODE); in disk_read_sectors()
279 if (disk_int13_retry(&inreg, NULL)) in disk_read_sectors()
305 com32sys_t inreg; in disk_write_sectors() local
315 memset(&inreg, 0, sizeof inreg); in disk_write_sectors()
318 buf = ebios_setup(diskinfo, &inreg, lba, count, EBIOS_WRITE_CODE); in disk_write_sectors()
320 buf = chs_setup(diskinfo, &inreg, lba, count, CHS_WRITE_CODE); in disk_write_sectors()
327 if (disk_int13_retry(&inreg, NULL)) in disk_write_sectors()