2008-12-25 09:59:02 +01:00
|
|
|
/** @file
|
2007-06-28 16:02:17 +02:00
|
|
|
|
|
|
|
Copyright (c) 2006, Intel Corporation
|
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
2007-07-23 09:06:23 +02:00
|
|
|
**/
|
2007-06-28 16:02:17 +02:00
|
|
|
|
|
|
|
|
2009-01-08 09:48:15 +01:00
|
|
|
#ifndef _EFI_PCI_DRIVER_OVERRRIDE_H_
|
|
|
|
#define _EFI_PCI_DRIVER_OVERRRIDE_H_
|
2007-06-28 16:02:17 +02:00
|
|
|
|
2008-12-16 16:31:57 +01:00
|
|
|
#define DRIVER_OVERRIDE_SIGNATURE SIGNATURE_32 ('d', 'r', 'o', 'v')
|
2007-06-28 16:02:17 +02:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
UINT32 Signature;
|
|
|
|
LIST_ENTRY Link;
|
|
|
|
EFI_HANDLE DriverImageHandle;
|
|
|
|
} PCI_DRIVER_OVERRIDE_LIST;
|
|
|
|
|
|
|
|
|
|
|
|
#define DRIVER_OVERRIDE_FROM_LINK(a) \
|
|
|
|
CR (a, PCI_DRIVER_OVERRIDE_LIST, Link, DRIVER_OVERRIDE_SIGNATURE)
|
|
|
|
|
2008-04-15 10:52:18 +02:00
|
|
|
/**
|
2008-12-25 09:59:02 +01:00
|
|
|
Initializes a PCI Driver Override Instance.
|
2008-04-15 10:52:18 +02:00
|
|
|
|
2008-12-25 09:59:02 +01:00
|
|
|
@param PciIoDevice Device instance.
|
2007-06-28 16:02:17 +02:00
|
|
|
|
2008-12-25 09:59:02 +01:00
|
|
|
@retval EFI_SUCCESS Operation success.
|
2008-04-15 10:52:18 +02:00
|
|
|
**/
|
2007-06-28 16:02:17 +02:00
|
|
|
EFI_STATUS
|
|
|
|
InitializePciDriverOverrideInstance (
|
|
|
|
PCI_IO_DEVICE *PciIoDevice
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-28 16:02:17 +02:00
|
|
|
|
2008-04-15 10:52:18 +02:00
|
|
|
/**
|
2008-12-25 09:59:02 +01:00
|
|
|
Add an overriding driver image.
|
2008-04-15 10:52:18 +02:00
|
|
|
|
2008-12-25 09:59:02 +01:00
|
|
|
@param PciIoDevice Instance of PciIo device.
|
|
|
|
@param DriverImageHandle new added driver image.
|
2008-04-15 10:52:18 +02:00
|
|
|
|
2008-12-25 09:59:02 +01:00
|
|
|
@retval EFI_OUT_OF_RESOURCES no memory resource for new driver instance.
|
|
|
|
@retval EFI_SUCCESS Success add driver.
|
2008-04-15 10:52:18 +02:00
|
|
|
**/
|
2007-06-28 16:02:17 +02:00
|
|
|
EFI_STATUS
|
|
|
|
AddDriver (
|
|
|
|
IN PCI_IO_DEVICE *PciIoDevice,
|
|
|
|
IN EFI_HANDLE DriverImageHandle
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-28 16:02:17 +02:00
|
|
|
|
|
|
|
|
2008-04-15 10:52:18 +02:00
|
|
|
/**
|
2008-12-25 09:59:02 +01:00
|
|
|
Get a overriding driver image.
|
|
|
|
@param This Pointer to instance of EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL.
|
|
|
|
@param DriverImageHandle Override driver image.
|
2008-04-15 10:52:18 +02:00
|
|
|
|
2008-12-25 09:59:02 +01:00
|
|
|
@retval EFI_SUCCESS Success to get driver image handle.
|
|
|
|
@retval EFI_NOT_FOUND can not find override driver image.
|
|
|
|
@retval EFI_INVALID_PARAMETER Invalid parameter.
|
2008-04-14 05:12:57 +02:00
|
|
|
**/
|
2007-06-28 16:02:17 +02:00
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
GetDriver (
|
|
|
|
IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This,
|
|
|
|
IN OUT EFI_HANDLE *DriverImageHandle
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-28 16:02:17 +02:00
|
|
|
|
|
|
|
#endif
|