/* ata.h - ATA disk access. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_ATA_HEADER
/* XXX: For now this only works on i386. */
typedef enum
{
#define GRUB_ATA_REG_DATA 0
#define GRUB_ATA_REG2_CONTROL 0
/* ATAPI interrupt reason values (I/O, D/C bits). */
enum grub_ata_commands
{
};
{
};
typedef union
{
struct
{
union
{
};
union
{
};
union
{
};
union
{
};
union
{
};
union
{
};
};
/* ATA pass through parameters and function. */
{
void * buffer;
int write;
void *cmd;
int cmdsize;
int dma;
};
struct grub_ata
{
/* Addressing methods available for accessing this device. If CHS
is only available, use that. Otherwise use LBA, except for the
high sectors. In that case use LBA48. */
/* Sector count. */
/* CHS maximums. */
/* Set to 0 for ATA, set to 1 for ATAPI. */
int atapi;
int dma;
int *present;
void *data;
};
struct grub_ata_dev
{
/* Call HOOK with each device name, until HOOK returns non-zero. */
/* Open the device named NAME, and set up SCSI. */
/* Close the scsi device SCSI. */
/* Read SIZE bytes from the device SCSI into BUF after sending the
command CMD of size CMDSIZE. */
struct grub_disk_ata_pass_through_parms *parms,
int spinup);
/* The next scsi device. */
};
#endif /* ! GRUB_ATA_HEADER */