EPIA success and problem

Adam Sulmicki adam at cfar.umd.edu
Tue May 6 13:54:00 CEST 2003


grumbe. This code should correct initalization as per ATA-3 specs.

what hard disk is this?

I have tested the code with IBM TravelStar laptop hdd's and with SAMSUNG's
hdd's.

On Wed, 7 May 2003, SONE Takeshi wrote:

> On Tue, May 06, 2003 at 12:13:09PM -0400, Adam Sulmicki wrote:
> > > It now boots into GRUB in less than 2 seconds. :)
> > > (It's too fast for IDE drive to spin up, so I have to hit reset
> > > button after cold start.)
> >
> > hmm, in rombios.c, can you try increasing ATA_WAIT_COUNT by magnitude or
> > two and see if it helps?
>
> Tried it but no success.
> I increased that value to 0xFFFFFFFF (it should be infinite :)
> but nothing changed.
>
> Also, I put some debug statement like this:
>
>         // If we found something
>         sc = inb(iobase1+ATA_CB_SC);
>         sn = inb(iobase1+ATA_CB_SN);
>
>     printf("A\n");
>         if ( (sc == 0x55) && (sn == 0xaa) ) {
>     printf("B\n");
>           write_byte(ebda_seg,&EbdaData->ata.devices[device].type,ATA_TYPE_UNKNOWN);
>
>           // reset the channel
>           ata_reset (device);
>     printf("C\n");
>
>           // check for ATA or ATAPI
>           outb(iobase1+ATA_CB_DH, slave ? ATA_CB_DH_DEV1 : ATA_CB_DH_DEV0);
>           sc = inb(iobase1+ATA_CB_SC);
>           sn = inb(iobase1+ATA_CB_SN);
>           if ( (sc==0x01) && (sn==0x01) ) {
>     printf("D\n");
>             cl = inb(iobase1+ATA_CB_CL);
>
> And the output is this:
>
>     Bochs BIOS, 1 cpu, $Revision: 1.1 $ $Date: 2002/11/25 02:07:53 $
>     [BOCHS BIOS VER:1.79]
>     [COMPILE DATE:May  7 2003 TIME:03:04:48]
>
>     DEVICE:0
>     A
>
>     int13_harddisk: function 02, unmapped device for DL=80
>     Boot from Hard Disk 0 failed
>     FATAL: Could not read the boot disk
>
> Then tried this:
>         // If we found something
>         sc = inb(iobase1+ATA_CB_SC);
>         sn = inb(iobase1+ATA_CB_SN);
>
>     printf("sc=%x sn=%x\n", sc, sn);
>         if ( (sc == 0x55) && (sn == 0xaa) ) {
>           write_byte(ebda_seg,&EbdaData->ata.devices[device].type,ATA_TYPE_UNKNOWN);
>
>
> And the result:
>
>     [COMPILE DATE:May  7 2003 TIME:03:17:52]
>
>     DEVICE:0
>     sc=0080 sn=0080
>
>     int13_harddisk: function 02, unmapped device for DL=80
>
>
> Hope this helps.
>
> --
> Takeshi
>


-- 
Adam Sulmicki
http://www.eax.com 	The Supreme Headquarters of the 32 bit registers




More information about the coreboot mailing list