** This is the quasi-official and semi-temporary T13 email list server. **


----- Original Message ----- 
From: "Andre Hedrick" <[EMAIL PROTECTED]>
> ...
> 
> Do I need to wait for status of or something here?
> Something is not switching the registers and with outer lba it fills the
> non-hob registers with zeros and this is not cool!
> ...

I'm not sure what "outer lba" means. Some sort of typo, maybe???

Since you didn't specify exactly what LBA you were trying to
access or what each byte of your structures contain, it's
basically impossible to know for certain what your code is
trying to do. But based on context I'm going to guess that 
you've misinterpreted how to write the 48-bit LBA in the same
way that several other people previously misinterpreted what
the spec says. In other words, I'm going to assume that you
overlaid 48-bit LBA into the obsolete CHS members of your
taskfile and hobfile structures in the sort of the same way
28-bit LBAs are overlaid. If you somehow meant you were
attempting to do some sort of weird 48-bit CHS access (or
the taskfile and hobfile structures don't represent what
I assume they represent) then I'm totally confused and don't
have a clue what your code is all about.

There's no such thing as "switching the registers" to fill the
high-order bytes of the LBA. And, the HOB bit of the Device
Control register is not normally set when loading the 48-bit
LBA into the command block registers prior to starting a 48-bit
Address command. And, there's no such thing as a high-order
byte for the Device register.

In order to load the full 48-bit LBA, you need to do two 8-bit
writes in a row to each register. The device implicitly knows that
the value "most recently written" to a LBA High/Mid/Low register
becomes the High/Mid/Low part of the low-order 24 bits of the LBA
and the value "previously written" becomes the High/Mid/Low part of
the high-order 24 bits of the LBA. A device that supports the
48-bit address feature *always* remembers both the most recently
written and previously written values for the overlaid registers.

For example to specify the single sector at LBA 0x123456789abc, you
would do something like this:

    outb(LBA_SECTOR_CNT, 0x00);
    outb(LBA_SECTOR_CNT, 0x01);

    outb(LBA_HIGH_REG, 0x12);
    outb(LBA_MID_REG, 0x34);
    outb(LBA_LOW_REG, 0x56);
    outb(LBA_HIGH_REG, 0x78);
    outb(LBA_MID_REG, 0x9a);
    outb(LBA_LOW_REG, 0xbc);

If you issue a 48-bit command then you get the full 48-bit
address. 

I can't say for certain, but I think given the same 48-bit LBA as
input, your code *probably* specifies 256 sectors at LBA 0x789abc123456.


--
  If you have any questions or wish to unsubscribe send a 
  message to Hale Landis, [EMAIL PROTECTED] To post to
  this list server send your message to [EMAIL PROTECTED]
  
  For questions concerning Thistle Grove Industries or TGI's
  list services please send email to [EMAIL PROTECTED]



Reply via email to