Hey folks,
I am seeing this issue with machines on which I do I/O ops thru cbios
mode. I noticed some of the reads at high sectors seem to be returning
the wrong data even though the op itself succeds. The output of the
int 13 call returns EFLAGS: 0x246 (CF is 0) and EAX is 0x1, which
indicates success according to ralph brown's int13/02h page.
The I/O code is exactly the same as the one in chain.c, but moved into
io.c (I sent some patches recently so com32 modules can read data from
other disks and partitions).
I put a snippet of the read code here:
http://pastebin.ca/468529
My test involved reading sector 70686, for which the CHS calculated
was: 138, 0, 31. Also count is 1. The target disk is a 256MB USB
flashdrive, which i formated with
mkdiskimage -4 /dev/sdd 4 64 32
(I only wanted a 4MB boot partition, which ended up as sda4).
The target sector was supposed to have data for a file, but the data
it reads in cbios mode is coming out blank. ebios mode however does
get the right data for the same sector location.
My test had some other read cases where they seem to have succeeded:
sector 8450 and 8192. I also looked at what disk info was being
collected for the flash drive. disk info had sectors = 32 and heads 16.
The only code change I have made is to accept a count varialbe to read
multiple sectors at a time. But I tried reverting to original chain.c
code with:
inreg.eax.w[0] = 0x0201; (on line 60 in pastebin link)
without any luck. Still the same blank data output.
Does anyone have experience with cbios intricacies or why this might
be happening? Thanks for any help.
--
Ram