david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/core/edd.c
Michael Brown 3c35ae2f3b [int13] Add infrastructure to support EDD version 4.0
Support the extensions mandated by EDD 4.0, including:

 o  the ability to specify a flat physical address in a disk address
    packet,

 o  the ability to specify a sector count greater than 127 in a disk
    address packet,

 o  support for all functions within the Fixed Disk Access and EDD
    Support subsets,

 o  the ability to describe a device using EDD Device Path Information.

This implementation is based on draft revision 3 of the EDD 4.0
specification, with reference to the EDD 3.0 specification.  It is
possible that this implementation may need to change in order to
conform to the final published EDD 4.0 specification.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-22 17:09:56 +01:00

57 lines
1.5 KiB
C

/*
* Copyright (C) 2010 Michael Brown <mbrown@fensystems.co.uk>.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
FILE_LICENCE ( GPL2_OR_LATER );
#include <errno.h>
#include <ipxe/interface.h>
#include <ipxe/edd.h>
/** @file
*
* Enhanced Disk Drive specification
*
*/
/**
* Describe a disk device using EDD
*
* @v intf Interface
* @v type EDD interface type
* @v path EDD device path
* @ret rc Return status code
*/
int edd_describe ( struct interface *intf, struct edd_interface_type *type,
union edd_device_path *path ) {
struct interface *dest;
edd_describe_TYPE ( void * ) *op =
intf_get_dest_op ( intf, edd_describe, &dest );
void *object = intf_object ( dest );
int rc;
if ( op ) {
rc = op ( object, type, path );
} else {
/* Default is to not support this operation */
rc = -ENOTSUP;
}
intf_put ( dest );
return rc;
}