MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / ide_get_sector

Function ide_get_sector

tinyemu/ide.c:337–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337static int64_t ide_get_sector(IDEState *s)
338{
339 int64_t sector_num;
340 if (s->select & 0x40) {
341 /* lba */
342 sector_num = ((s->select & 0x0f) << 24) | (s->hcyl << 16) |
343 (s->lcyl << 8) | s->sector;
344 } else {
345 sector_num = ((s->hcyl << 8) | s->lcyl) *
346 s->heads * s->sectors +
347 (s->select & 0x0f) * s->sectors + (s->sector - 1);
348 }
349 return sector_num;
350}
351
352static void ide_set_sector(IDEState *s, int64_t sector_num)
353{

Callers 4

ide_sector_readFunction · 0.85
ide_sector_read_cbFunction · 0.85
ide_sector_write_cb1Function · 0.85
ide_sector_write_cb2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected