OvmfPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the OvmfPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Andrew Fish <afish@apple.com>
This commit is contained in:
committed by
mergify[bot]
parent
d1050b9dff
commit
ac0a286f4d
@@ -14,7 +14,7 @@
|
||||
///
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||
EFI_COMPONENT_NAME_PROTOCOL gXenBusDxeComponentName = {
|
||||
(EFI_COMPONENT_NAME_GET_DRIVER_NAME) XenBusDxeComponentNameGetDriverName,
|
||||
(EFI_COMPONENT_NAME_GET_DRIVER_NAME)XenBusDxeComponentNameGetDriverName,
|
||||
(EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)XenBusDxeComponentNameGetControllerName,
|
||||
"eng"
|
||||
};
|
||||
@@ -33,18 +33,18 @@ EFI_COMPONENT_NAME2_PROTOCOL gXenBusDxeComponentName2 = {
|
||||
/// Table of driver names
|
||||
///
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||
EFI_UNICODE_STRING_TABLE mXenBusDxeDriverNameTable[] = {
|
||||
EFI_UNICODE_STRING_TABLE mXenBusDxeDriverNameTable[] = {
|
||||
{ "eng;en", (CHAR16 *)L"XenBus Bus Driver" },
|
||||
{ NULL, NULL }
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
///
|
||||
/// Table of controller names
|
||||
///
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||
EFI_UNICODE_STRING_TABLE mXenBusDxeControllerNameTable[] = {
|
||||
EFI_UNICODE_STRING_TABLE mXenBusDxeControllerNameTable[] = {
|
||||
{ "eng;en", (CHAR16 *)L"XenBus Controller" },
|
||||
{ NULL, NULL }
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -15,14 +15,14 @@
|
||||
|
||||
UINT32
|
||||
XenEventChannelNotify (
|
||||
IN XENBUS_DEVICE *Dev,
|
||||
IN evtchn_port_t Port
|
||||
IN XENBUS_DEVICE *Dev,
|
||||
IN evtchn_port_t Port
|
||||
)
|
||||
{
|
||||
INTN ReturnCode;
|
||||
evtchn_send_t Send;
|
||||
INTN ReturnCode;
|
||||
evtchn_send_t Send;
|
||||
|
||||
Send.port = Port;
|
||||
Send.port = Port;
|
||||
ReturnCode = XenHypercallEventChannelOp (EVTCHNOP_send, &Send);
|
||||
return (UINT32)ReturnCode;
|
||||
}
|
||||
@@ -30,23 +30,25 @@ XenEventChannelNotify (
|
||||
UINT32
|
||||
EFIAPI
|
||||
XenBusEventChannelAllocate (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN domid_t DomainId,
|
||||
OUT evtchn_port_t *Port
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN domid_t DomainId,
|
||||
OUT evtchn_port_t *Port
|
||||
)
|
||||
{
|
||||
evtchn_alloc_unbound_t Parameter;
|
||||
UINT32 ReturnCode;
|
||||
evtchn_alloc_unbound_t Parameter;
|
||||
UINT32 ReturnCode;
|
||||
|
||||
Parameter.dom = DOMID_SELF;
|
||||
Parameter.dom = DOMID_SELF;
|
||||
Parameter.remote_dom = DomainId;
|
||||
ReturnCode = (UINT32)XenHypercallEventChannelOp (
|
||||
ReturnCode = (UINT32)XenHypercallEventChannelOp (
|
||||
EVTCHNOP_alloc_unbound,
|
||||
&Parameter);
|
||||
&Parameter
|
||||
);
|
||||
if (ReturnCode != 0) {
|
||||
DEBUG ((DEBUG_ERROR, "ERROR: alloc_unbound failed with rc=%d", ReturnCode));
|
||||
return ReturnCode;
|
||||
}
|
||||
|
||||
*Port = Parameter.port;
|
||||
return ReturnCode;
|
||||
}
|
||||
@@ -54,24 +56,24 @@ XenBusEventChannelAllocate (
|
||||
UINT32
|
||||
EFIAPI
|
||||
XenBusEventChannelNotify (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN evtchn_port_t Port
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN evtchn_port_t Port
|
||||
)
|
||||
{
|
||||
XENBUS_PRIVATE_DATA *Private;
|
||||
XENBUS_PRIVATE_DATA *Private;
|
||||
|
||||
Private = XENBUS_PRIVATE_DATA_FROM_THIS(This);
|
||||
Private = XENBUS_PRIVATE_DATA_FROM_THIS (This);
|
||||
return XenEventChannelNotify (Private->Dev, Port);
|
||||
}
|
||||
|
||||
UINT32
|
||||
EFIAPI
|
||||
XenBusEventChannelClose (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN evtchn_port_t Port
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN evtchn_port_t Port
|
||||
)
|
||||
{
|
||||
evtchn_close_t Close;
|
||||
evtchn_close_t Close;
|
||||
|
||||
Close.port = Port;
|
||||
return (UINT32)XenHypercallEventChannelOp (EVTCHNOP_close, &Close);
|
||||
|
@@ -6,6 +6,7 @@
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __XENBUS_EVENT_CHANNEL_H
|
||||
#define __XENBUS_EVENT_CHANNEL_H
|
||||
|
||||
@@ -23,8 +24,8 @@
|
||||
**/
|
||||
UINT32
|
||||
XenEventChannelNotify (
|
||||
IN XENBUS_DEVICE *Dev,
|
||||
IN evtchn_port_t Port
|
||||
IN XENBUS_DEVICE *Dev,
|
||||
IN evtchn_port_t Port
|
||||
);
|
||||
|
||||
/*
|
||||
@@ -44,9 +45,9 @@ XenEventChannelNotify (
|
||||
UINT32
|
||||
EFIAPI
|
||||
XenBusEventChannelAllocate (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN domid_t DomainId,
|
||||
OUT evtchn_port_t *Port
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN domid_t DomainId,
|
||||
OUT evtchn_port_t *Port
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -60,8 +61,8 @@ XenBusEventChannelAllocate (
|
||||
UINT32
|
||||
EFIAPI
|
||||
XenBusEventChannelNotify (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN evtchn_port_t Port
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN evtchn_port_t Port
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -75,8 +76,8 @@ XenBusEventChannelNotify (
|
||||
UINT32
|
||||
EFIAPI
|
||||
XenBusEventChannelClose (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN evtchn_port_t Port
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN evtchn_port_t Port
|
||||
);
|
||||
|
||||
#endif
|
||||
|
@@ -20,31 +20,31 @@
|
||||
|
||||
#include "GrantTable.h"
|
||||
|
||||
#define NR_RESERVED_ENTRIES 8
|
||||
#define NR_RESERVED_ENTRIES 8
|
||||
|
||||
#define NR_GRANT_FRAMES (FixedPcdGet32 (PcdXenGrantFrames))
|
||||
#define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * EFI_PAGE_SIZE / sizeof(grant_entry_v1_t))
|
||||
#define NR_GRANT_FRAMES (FixedPcdGet32 (PcdXenGrantFrames))
|
||||
#define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * EFI_PAGE_SIZE / sizeof(grant_entry_v1_t))
|
||||
|
||||
STATIC grant_entry_v1_t *GrantTable = NULL;
|
||||
STATIC grant_ref_t GrantList[NR_GRANT_ENTRIES];
|
||||
STATIC EFI_LOCK mGrantListLock;
|
||||
STATIC grant_entry_v1_t *GrantTable = NULL;
|
||||
STATIC grant_ref_t GrantList[NR_GRANT_ENTRIES];
|
||||
STATIC EFI_LOCK mGrantListLock;
|
||||
#ifdef GNT_DEBUG
|
||||
STATIC BOOLEAN GrantInUseList[NR_GRANT_ENTRIES];
|
||||
STATIC BOOLEAN GrantInUseList[NR_GRANT_ENTRIES];
|
||||
#endif
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
XenGrantTablePutFreeEntry (
|
||||
grant_ref_t Ref
|
||||
grant_ref_t Ref
|
||||
)
|
||||
{
|
||||
EfiAcquireLock (&mGrantListLock);
|
||||
#ifdef GNT_DEBUG
|
||||
#ifdef GNT_DEBUG
|
||||
ASSERT (GrantInUseList[Ref]);
|
||||
GrantInUseList[Ref] = FALSE;
|
||||
#endif
|
||||
#endif
|
||||
GrantList[Ref] = GrantList[0];
|
||||
GrantList[0] = Ref;
|
||||
GrantList[0] = Ref;
|
||||
EfiReleaseLock (&mGrantListLock);
|
||||
}
|
||||
|
||||
@@ -54,16 +54,16 @@ XenGrantTableGetFreeEntry (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
grant_ref_t Ref;
|
||||
grant_ref_t Ref;
|
||||
|
||||
EfiAcquireLock (&mGrantListLock);
|
||||
Ref = GrantList[0];
|
||||
ASSERT (Ref >= NR_RESERVED_ENTRIES && Ref < NR_GRANT_ENTRIES);
|
||||
GrantList[0] = GrantList[Ref];
|
||||
#ifdef GNT_DEBUG
|
||||
#ifdef GNT_DEBUG
|
||||
ASSERT (!GrantInUseList[Ref]);
|
||||
GrantInUseList[Ref] = TRUE;
|
||||
#endif
|
||||
#endif
|
||||
EfiReleaseLock (&mGrantListLock);
|
||||
return Ref;
|
||||
}
|
||||
@@ -76,11 +76,11 @@ XenGrantTableGrantAccess (
|
||||
IN BOOLEAN ReadOnly
|
||||
)
|
||||
{
|
||||
grant_ref_t Ref;
|
||||
UINT16 Flags;
|
||||
grant_ref_t Ref;
|
||||
UINT16 Flags;
|
||||
|
||||
ASSERT (GrantTable != NULL);
|
||||
Ref = XenGrantTableGetFreeEntry ();
|
||||
Ref = XenGrantTableGetFreeEntry ();
|
||||
GrantTable[Ref].frame = (UINT32)Frame;
|
||||
GrantTable[Ref].domid = DomainId;
|
||||
MemoryFence ();
|
||||
@@ -88,6 +88,7 @@ XenGrantTableGrantAccess (
|
||||
if (ReadOnly) {
|
||||
Flags |= GTF_readonly;
|
||||
}
|
||||
|
||||
GrantTable[Ref].flags = Flags;
|
||||
|
||||
return Ref;
|
||||
@@ -96,10 +97,10 @@ XenGrantTableGrantAccess (
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
XenGrantTableEndAccess (
|
||||
grant_ref_t Ref
|
||||
grant_ref_t Ref
|
||||
)
|
||||
{
|
||||
UINT16 Flags, OldFlags;
|
||||
UINT16 Flags, OldFlags;
|
||||
|
||||
ASSERT (GrantTable != NULL);
|
||||
ASSERT (Ref >= NR_RESERVED_ENTRIES && Ref < NR_GRANT_ENTRIES);
|
||||
@@ -110,6 +111,7 @@ XenGrantTableEndAccess (
|
||||
DEBUG ((DEBUG_WARN, "WARNING: g.e. still in use! (%x)\n", Flags));
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
OldFlags = InterlockedCompareExchange16 (&GrantTable[Ref].flags, Flags, 0);
|
||||
} while (OldFlags != Flags);
|
||||
|
||||
@@ -122,40 +124,42 @@ XenGrantTableInit (
|
||||
IN XENBUS_DEVICE *Dev
|
||||
)
|
||||
{
|
||||
xen_add_to_physmap_t Parameters;
|
||||
INTN Index;
|
||||
INTN ReturnCode;
|
||||
xen_add_to_physmap_t Parameters;
|
||||
INTN Index;
|
||||
INTN ReturnCode;
|
||||
|
||||
#ifdef GNT_DEBUG
|
||||
SetMem(GrantInUseList, sizeof (GrantInUseList), 1);
|
||||
#endif
|
||||
#ifdef GNT_DEBUG
|
||||
SetMem (GrantInUseList, sizeof (GrantInUseList), 1);
|
||||
#endif
|
||||
EfiInitializeLock (&mGrantListLock, TPL_NOTIFY);
|
||||
for (Index = NR_RESERVED_ENTRIES; Index < NR_GRANT_ENTRIES; Index++) {
|
||||
XenGrantTablePutFreeEntry ((grant_ref_t)Index);
|
||||
}
|
||||
|
||||
GrantTable = (VOID*)(UINTN) Dev->XenIo->GrantTableAddress;
|
||||
GrantTable = (VOID *)(UINTN)Dev->XenIo->GrantTableAddress;
|
||||
for (Index = 0; Index < NR_GRANT_FRAMES; Index++) {
|
||||
Parameters.domid = DOMID_SELF;
|
||||
Parameters.idx = Index;
|
||||
Parameters.idx = Index;
|
||||
Parameters.space = XENMAPSPACE_grant_table;
|
||||
Parameters.gpfn = (xen_pfn_t) ((UINTN) GrantTable >> EFI_PAGE_SHIFT) + Index;
|
||||
ReturnCode = XenHypercallMemoryOp (XENMEM_add_to_physmap, &Parameters);
|
||||
Parameters.gpfn = (xen_pfn_t)((UINTN)GrantTable >> EFI_PAGE_SHIFT) + Index;
|
||||
ReturnCode = XenHypercallMemoryOp (XENMEM_add_to_physmap, &Parameters);
|
||||
if (ReturnCode != 0) {
|
||||
DEBUG ((DEBUG_ERROR,
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"Xen GrantTable, add_to_physmap hypercall error: %Ld\n",
|
||||
(INT64)ReturnCode));
|
||||
(INT64)ReturnCode
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
XenGrantTableDeinit (
|
||||
XENBUS_DEVICE *Dev
|
||||
XENBUS_DEVICE *Dev
|
||||
)
|
||||
{
|
||||
INTN ReturnCode, Index;
|
||||
xen_remove_from_physmap_t Parameters;
|
||||
INTN ReturnCode, Index;
|
||||
xen_remove_from_physmap_t Parameters;
|
||||
|
||||
if (GrantTable == NULL) {
|
||||
return;
|
||||
@@ -163,27 +167,33 @@ XenGrantTableDeinit (
|
||||
|
||||
for (Index = NR_GRANT_FRAMES - 1; Index >= 0; Index--) {
|
||||
Parameters.domid = DOMID_SELF;
|
||||
Parameters.gpfn = (xen_pfn_t) ((UINTN) GrantTable >> EFI_PAGE_SHIFT) + Index;
|
||||
DEBUG ((DEBUG_INFO, "Xen GrantTable, removing %Lx\n",
|
||||
(UINT64)Parameters.gpfn));
|
||||
Parameters.gpfn = (xen_pfn_t)((UINTN)GrantTable >> EFI_PAGE_SHIFT) + Index;
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"Xen GrantTable, removing %Lx\n",
|
||||
(UINT64)Parameters.gpfn
|
||||
));
|
||||
ReturnCode = XenHypercallMemoryOp (XENMEM_remove_from_physmap, &Parameters);
|
||||
if (ReturnCode != 0) {
|
||||
DEBUG ((DEBUG_ERROR,
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"Xen GrantTable, remove_from_physmap hypercall error: %Ld\n",
|
||||
(INT64)ReturnCode));
|
||||
(INT64)ReturnCode
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
GrantTable = NULL;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
XenBusGrantAccess (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN domid_t DomainId,
|
||||
IN UINTN Frame, // MFN
|
||||
IN BOOLEAN ReadOnly,
|
||||
OUT grant_ref_t *RefPtr
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN domid_t DomainId,
|
||||
IN UINTN Frame, // MFN
|
||||
IN BOOLEAN ReadOnly,
|
||||
OUT grant_ref_t *RefPtr
|
||||
)
|
||||
{
|
||||
*RefPtr = XenGrantTableGrantAccess (DomainId, Frame, ReadOnly);
|
||||
|
@@ -9,6 +9,7 @@
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __GNTTAB_H__
|
||||
#define __GNTTAB_H__
|
||||
|
||||
@@ -46,11 +47,11 @@ XenGrantTableDeinit (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
XenBusGrantAccess (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN domid_t DomainId,
|
||||
IN UINTN Frame, // MFN
|
||||
IN BOOLEAN ReadOnly,
|
||||
OUT grant_ref_t *RefPtr
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN domid_t DomainId,
|
||||
IN UINTN Frame, // MFN
|
||||
IN BOOLEAN ReadOnly,
|
||||
OUT grant_ref_t *RefPtr
|
||||
);
|
||||
|
||||
/**
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include "XenBusDxe.h"
|
||||
|
||||
CHAR8*
|
||||
CHAR8 *
|
||||
AsciiStrDup (
|
||||
IN CONST CHAR8* Str
|
||||
IN CONST CHAR8 *Str
|
||||
)
|
||||
{
|
||||
return AllocateCopyPool (AsciiStrSize (Str), Str);
|
||||
|
@@ -14,12 +14,12 @@
|
||||
INT32
|
||||
EFIAPI
|
||||
TestAndClearBit (
|
||||
IN INT32 Bit,
|
||||
IN VOID *Address
|
||||
IN INT32 Bit,
|
||||
IN VOID *Address
|
||||
)
|
||||
{
|
||||
UINT16 Word, Read;
|
||||
UINT16 Mask;
|
||||
UINT16 Word, Read;
|
||||
UINT16 Mask;
|
||||
|
||||
//
|
||||
// Calculate the effective address relative to 'Address' based on the
|
||||
@@ -27,14 +27,15 @@ TestAndClearBit (
|
||||
// ensure we round towards -Inf, and end up with a positive shift in
|
||||
// 'Bit', even if 'Bit' itself is negative.
|
||||
//
|
||||
Address = (VOID*)((UINT8*) Address + ((Bit >> 4) * sizeof(UINT16)));
|
||||
Mask = 1U << (Bit & 15);
|
||||
Address = (VOID *)((UINT8 *)Address + ((Bit >> 4) * sizeof (UINT16)));
|
||||
Mask = 1U << (Bit & 15);
|
||||
|
||||
for (Word = *(UINT16 *) Address; Word & Mask; Word = Read) {
|
||||
for (Word = *(UINT16 *)Address; Word &Mask; Word = Read) {
|
||||
Read = InterlockedCompareExchange16 (Address, Word, Word & ~Mask);
|
||||
if (Read == Word) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -26,16 +26,16 @@
|
||||
|
||||
#include <IndustryStandard/Xen/io/xenbus.h>
|
||||
|
||||
STATIC XENBUS_PRIVATE_DATA gXenBusPrivateData;
|
||||
STATIC XENBUS_PRIVATE_DATA gXenBusPrivateData;
|
||||
|
||||
STATIC XENBUS_DEVICE_PATH gXenBusDevicePathTemplate = {
|
||||
STATIC XENBUS_DEVICE_PATH gXenBusDevicePathTemplate = {
|
||||
{ // Vendor
|
||||
{ // Vendor.Header
|
||||
HARDWARE_DEVICE_PATH, // Vendor.Header.Type
|
||||
HW_VENDOR_DP, // Vendor.Header.SubType
|
||||
{
|
||||
(UINT8) (sizeof (XENBUS_DEVICE_PATH)), // Vendor.Header.Length[0]
|
||||
(UINT8) (sizeof (XENBUS_DEVICE_PATH) >> 8), // Vendor.Header.Length[1]
|
||||
(UINT8)(sizeof (XENBUS_DEVICE_PATH)), // Vendor.Header.Length[0]
|
||||
(UINT8)(sizeof (XENBUS_DEVICE_PATH) >> 8), // Vendor.Header.Length[1]
|
||||
}
|
||||
},
|
||||
XENBUS_PROTOCOL_GUID, // Vendor.Guid
|
||||
@@ -44,7 +44,6 @@ STATIC XENBUS_DEVICE_PATH gXenBusDevicePathTemplate = {
|
||||
0 // DeviceId
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Search our internal record of configured devices (not the XenStore) to
|
||||
determine if the XenBus device indicated by Node is known to the system.
|
||||
@@ -57,13 +56,13 @@ STATIC XENBUS_DEVICE_PATH gXenBusDevicePathTemplate = {
|
||||
STATIC
|
||||
XENBUS_PRIVATE_DATA *
|
||||
XenBusDeviceInitialized (
|
||||
IN XENBUS_DEVICE *Dev,
|
||||
IN CONST CHAR8 *Node
|
||||
IN XENBUS_DEVICE *Dev,
|
||||
IN CONST CHAR8 *Node
|
||||
)
|
||||
{
|
||||
LIST_ENTRY *Entry;
|
||||
XENBUS_PRIVATE_DATA *Child;
|
||||
XENBUS_PRIVATE_DATA *Result;
|
||||
LIST_ENTRY *Entry;
|
||||
XENBUS_PRIVATE_DATA *Child;
|
||||
XENBUS_PRIVATE_DATA *Result;
|
||||
|
||||
if (IsListEmpty (&Dev->ChildList)) {
|
||||
return NULL;
|
||||
@@ -72,7 +71,8 @@ XenBusDeviceInitialized (
|
||||
Result = NULL;
|
||||
for (Entry = GetFirstNode (&Dev->ChildList);
|
||||
!IsNodeAtEnd (&Dev->ChildList, Entry);
|
||||
Entry = GetNextNode (&Dev->ChildList, Entry)) {
|
||||
Entry = GetNextNode (&Dev->ChildList, Entry))
|
||||
{
|
||||
Child = XENBUS_PRIVATE_DATA_FROM_LINK (Entry);
|
||||
if (!AsciiStrCmp (Child->XenBusIo.Node, Node)) {
|
||||
Result = Child;
|
||||
@@ -86,12 +86,12 @@ XenBusDeviceInitialized (
|
||||
STATIC
|
||||
XenbusState
|
||||
XenBusReadDriverState (
|
||||
IN CONST CHAR8 *Path
|
||||
IN CONST CHAR8 *Path
|
||||
)
|
||||
{
|
||||
XenbusState State;
|
||||
CHAR8 *Ptr = NULL;
|
||||
XENSTORE_STATUS Status;
|
||||
XenbusState State;
|
||||
CHAR8 *Ptr = NULL;
|
||||
XENSTORE_STATUS Status;
|
||||
|
||||
Status = XenStoreRead (XST_NIL, Path, "state", NULL, (VOID **)&Ptr);
|
||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||
@@ -113,24 +113,30 @@ XenBusReadDriverState (
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
XenBusAddDevice (
|
||||
XENBUS_DEVICE *Dev,
|
||||
CONST CHAR8 *Type,
|
||||
CONST CHAR8 *Id)
|
||||
XENBUS_DEVICE *Dev,
|
||||
CONST CHAR8 *Type,
|
||||
CONST CHAR8 *Id
|
||||
)
|
||||
{
|
||||
CHAR8 DevicePath[XENSTORE_ABS_PATH_MAX];
|
||||
XENSTORE_STATUS StatusXenStore;
|
||||
XENBUS_PRIVATE_DATA *Private;
|
||||
EFI_STATUS Status;
|
||||
XENBUS_DEVICE_PATH *TempXenBusPath;
|
||||
VOID *ChildXenIo;
|
||||
CHAR8 DevicePath[XENSTORE_ABS_PATH_MAX];
|
||||
XENSTORE_STATUS StatusXenStore;
|
||||
XENBUS_PRIVATE_DATA *Private;
|
||||
EFI_STATUS Status;
|
||||
XENBUS_DEVICE_PATH *TempXenBusPath;
|
||||
VOID *ChildXenIo;
|
||||
|
||||
AsciiSPrint (DevicePath, sizeof (DevicePath),
|
||||
"device/%a/%a", Type, Id);
|
||||
AsciiSPrint (
|
||||
DevicePath,
|
||||
sizeof (DevicePath),
|
||||
"device/%a/%a",
|
||||
Type,
|
||||
Id
|
||||
);
|
||||
|
||||
if (XenStorePathExists (XST_NIL, DevicePath, "")) {
|
||||
XENBUS_PRIVATE_DATA *Child;
|
||||
enum xenbus_state State;
|
||||
CHAR8 *BackendPath;
|
||||
XENBUS_PRIVATE_DATA *Child;
|
||||
enum xenbus_state State;
|
||||
CHAR8 *BackendPath;
|
||||
|
||||
Child = XenBusDeviceInitialized (Dev, DevicePath);
|
||||
if (Child != NULL) {
|
||||
@@ -148,57 +154,80 @@ XenBusAddDevice (
|
||||
* happen if a device is going away after
|
||||
* switching to Closed.
|
||||
*/
|
||||
DEBUG ((DEBUG_INFO, "XenBus: Device %a ignored. "
|
||||
"State %d\n", DevicePath, State));
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"XenBus: Device %a ignored. "
|
||||
"State %d\n",
|
||||
DevicePath,
|
||||
State
|
||||
));
|
||||
Status = EFI_SUCCESS;
|
||||
goto out;
|
||||
}
|
||||
|
||||
StatusXenStore = XenStoreRead (XST_NIL, DevicePath, "backend",
|
||||
NULL, (VOID **) &BackendPath);
|
||||
StatusXenStore = XenStoreRead (
|
||||
XST_NIL,
|
||||
DevicePath,
|
||||
"backend",
|
||||
NULL,
|
||||
(VOID **)&BackendPath
|
||||
);
|
||||
if (StatusXenStore != XENSTORE_STATUS_SUCCESS) {
|
||||
DEBUG ((DEBUG_ERROR, "xenbus: %a no backend path.\n", DevicePath));
|
||||
Status = EFI_NOT_FOUND;
|
||||
goto out;
|
||||
}
|
||||
|
||||
Private = AllocateCopyPool (sizeof (*Private), &gXenBusPrivateData);
|
||||
Private->XenBusIo.Type = AsciiStrDup (Type);
|
||||
Private->XenBusIo.Node = AsciiStrDup (DevicePath);
|
||||
Private->XenBusIo.Backend = BackendPath;
|
||||
Private = AllocateCopyPool (sizeof (*Private), &gXenBusPrivateData);
|
||||
Private->XenBusIo.Type = AsciiStrDup (Type);
|
||||
Private->XenBusIo.Node = AsciiStrDup (DevicePath);
|
||||
Private->XenBusIo.Backend = BackendPath;
|
||||
Private->XenBusIo.DeviceId = (UINT16)AsciiStrDecimalToUintn (Id);
|
||||
Private->Dev = Dev;
|
||||
Private->Dev = Dev;
|
||||
|
||||
TempXenBusPath = AllocateCopyPool (sizeof (XENBUS_DEVICE_PATH),
|
||||
&gXenBusDevicePathTemplate);
|
||||
TempXenBusPath = AllocateCopyPool (
|
||||
sizeof (XENBUS_DEVICE_PATH),
|
||||
&gXenBusDevicePathTemplate
|
||||
);
|
||||
if (!AsciiStrCmp (Private->XenBusIo.Type, "vbd")) {
|
||||
TempXenBusPath->Type = XENBUS_DEVICE_PATH_TYPE_VBD;
|
||||
}
|
||||
|
||||
TempXenBusPath->DeviceId = Private->XenBusIo.DeviceId;
|
||||
Private->DevicePath = (XENBUS_DEVICE_PATH *)AppendDevicePathNode (
|
||||
Dev->DevicePath,
|
||||
&TempXenBusPath->Vendor.Header);
|
||||
Private->DevicePath = (XENBUS_DEVICE_PATH *)AppendDevicePathNode (
|
||||
Dev->DevicePath,
|
||||
&TempXenBusPath->Vendor.Header
|
||||
);
|
||||
FreePool (TempXenBusPath);
|
||||
|
||||
InsertTailList (&Dev->ChildList, &Private->Link);
|
||||
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&Private->Handle,
|
||||
&gEfiDevicePathProtocolGuid, Private->DevicePath,
|
||||
&gXenBusProtocolGuid, &Private->XenBusIo,
|
||||
NULL);
|
||||
&Private->Handle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
Private->DevicePath,
|
||||
&gXenBusProtocolGuid,
|
||||
&Private->XenBusIo,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ErrorInstallProtocol;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (Dev->ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
&ChildXenIo, Dev->This->DriverBindingHandle,
|
||||
Private->Handle,
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER);
|
||||
Status = gBS->OpenProtocol (
|
||||
Dev->ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
&ChildXenIo,
|
||||
Dev->This->DriverBindingHandle,
|
||||
Private->Handle,
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "open by child controller fail (%r)\n",
|
||||
Status));
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"open by child controller fail (%r)\n",
|
||||
Status
|
||||
));
|
||||
goto ErrorOpenProtocolByChild;
|
||||
}
|
||||
} else {
|
||||
@@ -210,16 +239,19 @@ XenBusAddDevice (
|
||||
|
||||
ErrorOpenProtocolByChild:
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
Private->Handle,
|
||||
&gEfiDevicePathProtocolGuid, Private->DevicePath,
|
||||
&gXenBusProtocolGuid, &Private->XenBusIo,
|
||||
NULL);
|
||||
Private->Handle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
Private->DevicePath,
|
||||
&gXenBusProtocolGuid,
|
||||
&Private->XenBusIo,
|
||||
NULL
|
||||
);
|
||||
ErrorInstallProtocol:
|
||||
RemoveEntryList (&Private->Link);
|
||||
FreePool (Private->DevicePath);
|
||||
FreePool ((VOID *) Private->XenBusIo.Backend);
|
||||
FreePool ((VOID *) Private->XenBusIo.Node);
|
||||
FreePool ((VOID *) Private->XenBusIo.Type);
|
||||
FreePool ((VOID *)Private->XenBusIo.Backend);
|
||||
FreePool ((VOID *)Private->XenBusIo.Node);
|
||||
FreePool ((VOID *)Private->XenBusIo.Type);
|
||||
FreePool (Private);
|
||||
out:
|
||||
return Status;
|
||||
@@ -239,29 +271,33 @@ out:
|
||||
STATIC
|
||||
VOID
|
||||
XenBusEnumerateDeviceType (
|
||||
XENBUS_DEVICE *Dev,
|
||||
CONST CHAR8 *Type
|
||||
XENBUS_DEVICE *Dev,
|
||||
CONST CHAR8 *Type
|
||||
)
|
||||
{
|
||||
CONST CHAR8 **Directory;
|
||||
UINTN Index;
|
||||
UINT32 Count;
|
||||
XENSTORE_STATUS Status;
|
||||
CONST CHAR8 **Directory;
|
||||
UINTN Index;
|
||||
UINT32 Count;
|
||||
XENSTORE_STATUS Status;
|
||||
|
||||
Status = XenStoreListDirectory (XST_NIL,
|
||||
"device", Type,
|
||||
&Count, &Directory);
|
||||
Status = XenStoreListDirectory (
|
||||
XST_NIL,
|
||||
"device",
|
||||
Type,
|
||||
&Count,
|
||||
&Directory
|
||||
);
|
||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (Index = 0; Index < Count; Index++) {
|
||||
XenBusAddDevice (Dev, Type, Directory[Index]);
|
||||
}
|
||||
|
||||
FreePool ((VOID*)Directory);
|
||||
FreePool ((VOID *)Directory);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Enumerate the devices on a XenBus bus and install a XenBus Protocol instance.
|
||||
|
||||
@@ -275,17 +311,21 @@ XenBusEnumerateDeviceType (
|
||||
*/
|
||||
XENSTORE_STATUS
|
||||
XenBusEnumerateBus (
|
||||
XENBUS_DEVICE *Dev
|
||||
XENBUS_DEVICE *Dev
|
||||
)
|
||||
{
|
||||
CONST CHAR8 **Types;
|
||||
UINTN Index;
|
||||
UINT32 Count;
|
||||
XENSTORE_STATUS Status;
|
||||
CONST CHAR8 **Types;
|
||||
UINTN Index;
|
||||
UINT32 Count;
|
||||
XENSTORE_STATUS Status;
|
||||
|
||||
Status = XenStoreListDirectory (XST_NIL,
|
||||
"device", "",
|
||||
&Count, &Types);
|
||||
Status = XenStoreListDirectory (
|
||||
XST_NIL,
|
||||
"device",
|
||||
"",
|
||||
&Count,
|
||||
&Types
|
||||
);
|
||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||
return Status;
|
||||
}
|
||||
@@ -294,7 +334,7 @@ XenBusEnumerateBus (
|
||||
XenBusEnumerateDeviceType (Dev, Types[Index]);
|
||||
}
|
||||
|
||||
FreePool ((VOID*)Types);
|
||||
FreePool ((VOID *)Types);
|
||||
|
||||
return XENSTORE_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -303,14 +343,14 @@ STATIC
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenBusSetState (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN enum xenbus_state NewState
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN enum xenbus_state NewState
|
||||
)
|
||||
{
|
||||
enum xenbus_state CurrentState;
|
||||
XENSTORE_STATUS Status;
|
||||
CHAR8 *Temp;
|
||||
enum xenbus_state CurrentState;
|
||||
XENSTORE_STATUS Status;
|
||||
CHAR8 *Temp;
|
||||
|
||||
DEBUG ((DEBUG_INFO, "XenBus: Set state to %d\n", NewState));
|
||||
|
||||
@@ -318,6 +358,7 @@ XenBusSetState (
|
||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||
goto Out;
|
||||
}
|
||||
|
||||
CurrentState = AsciiStrDecimalToUintn (Temp);
|
||||
FreePool (Temp);
|
||||
if (CurrentState == NewState) {
|
||||
@@ -327,17 +368,19 @@ XenBusSetState (
|
||||
do {
|
||||
Status = XenStoreSPrint (Transaction, This->Node, "state", "%d", NewState);
|
||||
} while (Status == XENSTORE_STATUS_EAGAIN);
|
||||
|
||||
if (Status != XENSTORE_STATUS_SUCCESS) {
|
||||
DEBUG ((DEBUG_ERROR, "XenBus: failed to write new state\n"));
|
||||
goto Out;
|
||||
}
|
||||
|
||||
DEBUG ((DEBUG_INFO, "XenBus: Set state to %d, done\n", NewState));
|
||||
|
||||
Out:
|
||||
return Status;
|
||||
}
|
||||
|
||||
STATIC XENBUS_PRIVATE_DATA gXenBusPrivateData = {
|
||||
STATIC XENBUS_PRIVATE_DATA gXenBusPrivateData = {
|
||||
XENBUS_PRIVATE_DATA_SIGNATURE, // Signature
|
||||
{ NULL, NULL }, // Link
|
||||
NULL, // Handle
|
||||
|
@@ -6,19 +6,19 @@
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _XEN_XENBUS_XENBUSB_H
|
||||
#define _XEN_XENBUS_XENBUSB_H
|
||||
|
||||
#include "XenBusDxe.h"
|
||||
|
||||
#define XENBUS_DEVICE_PATH_TYPE_VBD 0x1
|
||||
#define XENBUS_DEVICE_PATH_TYPE_VBD 0x1
|
||||
struct _XENBUS_DEVICE_PATH {
|
||||
VENDOR_DEVICE_PATH Vendor;
|
||||
UINT8 Type;
|
||||
UINT16 DeviceId;
|
||||
VENDOR_DEVICE_PATH Vendor;
|
||||
UINT8 Type;
|
||||
UINT16 DeviceId;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Perform XenBus bus enumeration and install protocol for children.
|
||||
|
||||
@@ -32,7 +32,7 @@ struct _XENBUS_DEVICE_PATH {
|
||||
**/
|
||||
XENSTORE_STATUS
|
||||
XenBusEnumerateBus (
|
||||
XENBUS_DEVICE *Dev
|
||||
XENBUS_DEVICE *Dev
|
||||
);
|
||||
|
||||
#endif /* _XEN_XENBUS_XENBUSB_H */
|
||||
|
@@ -32,7 +32,7 @@
|
||||
///
|
||||
/// Driver Binding Protocol instance
|
||||
///
|
||||
EFI_DRIVER_BINDING_PROTOCOL gXenBusDxeDriverBinding = {
|
||||
EFI_DRIVER_BINDING_PROTOCOL gXenBusDxeDriverBinding = {
|
||||
XenBusDxeDriverBindingSupported,
|
||||
XenBusDxeDriverBindingStart,
|
||||
XenBusDxeDriverBindingStop,
|
||||
@@ -41,9 +41,8 @@ EFI_DRIVER_BINDING_PROTOCOL gXenBusDxeDriverBinding = {
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
STATIC EFI_LOCK mMyDeviceLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_CALLBACK);
|
||||
STATIC XENBUS_DEVICE *mMyDevice = NULL;
|
||||
STATIC XENBUS_DEVICE *mMyDevice = NULL;
|
||||
|
||||
/**
|
||||
Map the shared_info_t page into memory.
|
||||
@@ -58,16 +57,16 @@ STATIC XENBUS_DEVICE *mMyDevice = NULL;
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
XenGetSharedInfoPage (
|
||||
IN OUT XENBUS_DEVICE *Dev
|
||||
IN OUT XENBUS_DEVICE *Dev
|
||||
)
|
||||
{
|
||||
xen_add_to_physmap_t Parameter;
|
||||
xen_add_to_physmap_t Parameter;
|
||||
|
||||
ASSERT (Dev->SharedInfo == NULL);
|
||||
|
||||
Parameter.domid = DOMID_SELF;
|
||||
Parameter.space = XENMAPSPACE_shared_info;
|
||||
Parameter.idx = 0;
|
||||
Parameter.idx = 0;
|
||||
|
||||
//
|
||||
// using reserved page because the page is not released when Linux is
|
||||
@@ -75,7 +74,7 @@ XenGetSharedInfoPage (
|
||||
// page, and fail because it have no right to do so (segv).
|
||||
//
|
||||
Dev->SharedInfo = AllocateReservedPages (1);
|
||||
Parameter.gpfn = (UINTN) Dev->SharedInfo >> EFI_PAGE_SHIFT;
|
||||
Parameter.gpfn = (UINTN)Dev->SharedInfo >> EFI_PAGE_SHIFT;
|
||||
if (XenHypercallMemoryOp (XENMEM_add_to_physmap, &Parameter) != 0) {
|
||||
FreePages (Dev->SharedInfo, 1);
|
||||
Dev->SharedInfo = NULL;
|
||||
@@ -132,15 +131,17 @@ XenBusDxeUnload (
|
||||
//
|
||||
FreePool (HandleBuffer);
|
||||
|
||||
|
||||
//
|
||||
// Uninstall protocols installed in the driver entry point
|
||||
//
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
ImageHandle,
|
||||
&gEfiDriverBindingProtocolGuid, &gXenBusDxeDriverBinding,
|
||||
&gEfiComponentNameProtocolGuid, &gXenBusDxeComponentName,
|
||||
&gEfiComponentName2ProtocolGuid, &gXenBusDxeComponentName2,
|
||||
&gEfiDriverBindingProtocolGuid,
|
||||
&gXenBusDxeDriverBinding,
|
||||
&gEfiComponentNameProtocolGuid,
|
||||
&gXenBusDxeComponentName,
|
||||
&gEfiComponentName2ProtocolGuid,
|
||||
&gXenBusDxeComponentName2,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -171,7 +172,7 @@ XenBusDxeDriverEntryPoint (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (! XenHypercallIsAvailable ()) {
|
||||
if (!XenHypercallIsAvailable ()) {
|
||||
return EFI_ABORTED;
|
||||
}
|
||||
|
||||
@@ -188,11 +189,9 @@ XenBusDxeDriverEntryPoint (
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||
@@ -229,24 +228,28 @@ XenBusDxeDriverBindingSupported (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
XENIO_PROTOCOL *XenIo;
|
||||
EFI_STATUS Status;
|
||||
XENIO_PROTOCOL *XenIo;
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
(VOID **)&XenIo,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
(VOID **)&XenIo,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
gBS->CloseProtocol (ControllerHandle, &gXenIoProtocolGuid,
|
||||
This->DriverBindingHandle, ControllerHandle);
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
|
||||
return Status;
|
||||
}
|
||||
@@ -254,14 +257,17 @@ XenBusDxeDriverBindingSupported (
|
||||
VOID
|
||||
EFIAPI
|
||||
NotifyExitBoot (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
XENBUS_DEVICE *Dev = Context;
|
||||
XENBUS_DEVICE *Dev = Context;
|
||||
|
||||
gBS->DisconnectController(Dev->ControllerHandle,
|
||||
Dev->This->DriverBindingHandle, NULL);
|
||||
gBS->DisconnectController (
|
||||
Dev->ControllerHandle,
|
||||
Dev->This->DriverBindingHandle,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,19 +315,19 @@ XenBusDxeDriverBindingStart (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
XENBUS_DEVICE *Dev;
|
||||
XENIO_PROTOCOL *XenIo;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_STATUS Status;
|
||||
XENBUS_DEVICE *Dev;
|
||||
XENIO_PROTOCOL *XenIo;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
(VOID**)&XenIo,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
(VOID **)&XenIo,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
@@ -330,7 +336,7 @@ XenBusDxeDriverBindingStart (
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID **) &DevicePath,
|
||||
(VOID **)&DevicePath,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
@@ -340,12 +346,12 @@ XenBusDxeDriverBindingStart (
|
||||
goto ErrorOpenningProtocol;
|
||||
}
|
||||
|
||||
Dev = AllocateZeroPool (sizeof (*Dev));
|
||||
Dev->Signature = XENBUS_DEVICE_SIGNATURE;
|
||||
Dev->This = This;
|
||||
Dev = AllocateZeroPool (sizeof (*Dev));
|
||||
Dev->Signature = XENBUS_DEVICE_SIGNATURE;
|
||||
Dev->This = This;
|
||||
Dev->ControllerHandle = ControllerHandle;
|
||||
Dev->XenIo = XenIo;
|
||||
Dev->DevicePath = DevicePath;
|
||||
Dev->XenIo = XenIo;
|
||||
Dev->DevicePath = DevicePath;
|
||||
InitializeListHead (&Dev->ChildList);
|
||||
|
||||
EfiAcquireLock (&mMyDeviceLock);
|
||||
@@ -357,6 +363,7 @@ XenBusDxeDriverBindingStart (
|
||||
Status = EFI_ALREADY_STARTED;
|
||||
goto ErrorAllocated;
|
||||
}
|
||||
|
||||
mMyDevice = Dev;
|
||||
EfiReleaseLock (&mMyDeviceLock);
|
||||
|
||||
@@ -374,21 +381,32 @@ XenBusDxeDriverBindingStart (
|
||||
|
||||
XenBusEnumerateBus (Dev);
|
||||
|
||||
Status = gBS->CreateEvent (EVT_SIGNAL_EXIT_BOOT_SERVICES, TPL_CALLBACK,
|
||||
NotifyExitBoot,
|
||||
(VOID*) Dev,
|
||||
&Dev->ExitBootEvent);
|
||||
Status = gBS->CreateEvent (
|
||||
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||
TPL_CALLBACK,
|
||||
NotifyExitBoot,
|
||||
(VOID *)Dev,
|
||||
&Dev->ExitBootEvent
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
ErrorAllocated:
|
||||
FreePool (Dev);
|
||||
gBS->CloseProtocol (ControllerHandle, &gEfiDevicePathProtocolGuid,
|
||||
This->DriverBindingHandle, ControllerHandle);
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
ErrorOpenningProtocol:
|
||||
gBS->CloseProtocol (ControllerHandle, &gXenIoProtocolGuid,
|
||||
This->DriverBindingHandle, ControllerHandle);
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -427,44 +445,54 @@ XenBusDxeDriverBindingStop (
|
||||
IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
XENBUS_PROTOCOL *XenBusIo;
|
||||
XENBUS_PRIVATE_DATA *ChildData;
|
||||
EFI_STATUS Status;
|
||||
XENBUS_DEVICE *Dev = mMyDevice;
|
||||
UINTN Index;
|
||||
XENBUS_PROTOCOL *XenBusIo;
|
||||
XENBUS_PRIVATE_DATA *ChildData;
|
||||
EFI_STATUS Status;
|
||||
XENBUS_DEVICE *Dev = mMyDevice;
|
||||
|
||||
for (Index = 0; Index < NumberOfChildren; Index++) {
|
||||
Status = gBS->OpenProtocol (
|
||||
ChildHandleBuffer[Index],
|
||||
&gXenBusProtocolGuid,
|
||||
(VOID **) &XenBusIo,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
ChildHandleBuffer[Index],
|
||||
&gXenBusProtocolGuid,
|
||||
(VOID **)&XenBusIo,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "XenBusDxe: get children protocol failed: %r\n", Status));
|
||||
continue;
|
||||
}
|
||||
|
||||
ChildData = XENBUS_PRIVATE_DATA_FROM_THIS (XenBusIo);
|
||||
|
||||
Status = gBS->CloseProtocol (Dev->ControllerHandle, &gXenIoProtocolGuid,
|
||||
Dev->This->DriverBindingHandle, ChildData->Handle);
|
||||
Status = gBS->CloseProtocol (
|
||||
Dev->ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
Dev->This->DriverBindingHandle,
|
||||
ChildData->Handle
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
ChildData->Handle,
|
||||
&gEfiDevicePathProtocolGuid, ChildData->DevicePath,
|
||||
&gXenBusProtocolGuid, &ChildData->XenBusIo,
|
||||
NULL);
|
||||
ChildData->Handle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
ChildData->DevicePath,
|
||||
&gXenBusProtocolGuid,
|
||||
&ChildData->XenBusIo,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
FreePool ((VOID*)ChildData->XenBusIo.Type);
|
||||
FreePool ((VOID*)ChildData->XenBusIo.Node);
|
||||
FreePool ((VOID*)ChildData->XenBusIo.Backend);
|
||||
FreePool ((VOID *)ChildData->XenBusIo.Type);
|
||||
FreePool ((VOID *)ChildData->XenBusIo.Node);
|
||||
FreePool ((VOID *)ChildData->XenBusIo.Backend);
|
||||
FreePool (ChildData->DevicePath);
|
||||
RemoveEntryList (&ChildData->Link);
|
||||
FreePool (ChildData);
|
||||
}
|
||||
|
||||
if (NumberOfChildren > 0) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -473,10 +501,18 @@ XenBusDxeDriverBindingStop (
|
||||
XenStoreDeinit (Dev);
|
||||
XenGrantTableDeinit (Dev);
|
||||
|
||||
gBS->CloseProtocol (ControllerHandle, &gEfiDevicePathProtocolGuid,
|
||||
This->DriverBindingHandle, ControllerHandle);
|
||||
gBS->CloseProtocol (ControllerHandle, &gXenIoProtocolGuid,
|
||||
This->DriverBindingHandle, ControllerHandle);
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
gBS->CloseProtocol (
|
||||
ControllerHandle,
|
||||
&gXenIoProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
ControllerHandle
|
||||
);
|
||||
|
||||
mMyDevice = NULL;
|
||||
FreePool (Dev);
|
||||
|
@@ -24,38 +24,32 @@
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
|
||||
|
||||
//
|
||||
// UEFI Driver Model Protocols
|
||||
//
|
||||
#include <Protocol/DriverBinding.h>
|
||||
|
||||
|
||||
//
|
||||
// Consumed Protocols
|
||||
//
|
||||
#include <Protocol/XenIo.h>
|
||||
|
||||
|
||||
//
|
||||
// Produced Protocols
|
||||
//
|
||||
#include <Protocol/XenBus.h>
|
||||
|
||||
|
||||
//
|
||||
// Driver Version
|
||||
//
|
||||
#define XENBUS_DXE_VERSION 0x00000010
|
||||
|
||||
|
||||
//
|
||||
// Protocol instances
|
||||
//
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gXenBusDxeDriverBinding;
|
||||
extern EFI_DRIVER_BINDING_PROTOCOL gXenBusDxeDriverBinding;
|
||||
extern EFI_COMPONENT_NAME2_PROTOCOL gXenBusDxeComponentName2;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gXenBusDxeComponentName;
|
||||
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gXenBusDxeComponentName;
|
||||
|
||||
//
|
||||
// Include files with function prototypes
|
||||
@@ -68,32 +62,32 @@ extern EFI_COMPONENT_NAME_PROTOCOL gXenBusDxeComponentName;
|
||||
//
|
||||
#include <IndustryStandard/Xen/xen.h>
|
||||
|
||||
typedef struct _XENBUS_DEVICE_PATH XENBUS_DEVICE_PATH;
|
||||
typedef struct _XENBUS_DEVICE XENBUS_DEVICE;
|
||||
typedef struct _XENBUS_DEVICE_PATH XENBUS_DEVICE_PATH;
|
||||
typedef struct _XENBUS_DEVICE XENBUS_DEVICE;
|
||||
|
||||
// Have the state of the driver.
|
||||
#define XENBUS_DEVICE_SIGNATURE SIGNATURE_32 ('X','B','s','t')
|
||||
#define XENBUS_DEVICE_SIGNATURE SIGNATURE_32 ('X','B','s','t')
|
||||
struct _XENBUS_DEVICE {
|
||||
UINT32 Signature;
|
||||
EFI_DRIVER_BINDING_PROTOCOL *This;
|
||||
EFI_HANDLE ControllerHandle;
|
||||
XENIO_PROTOCOL *XenIo;
|
||||
EFI_EVENT ExitBootEvent;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
LIST_ENTRY ChildList;
|
||||
UINT32 Signature;
|
||||
EFI_DRIVER_BINDING_PROTOCOL *This;
|
||||
EFI_HANDLE ControllerHandle;
|
||||
XENIO_PROTOCOL *XenIo;
|
||||
EFI_EVENT ExitBootEvent;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
LIST_ENTRY ChildList;
|
||||
|
||||
shared_info_t *SharedInfo;
|
||||
shared_info_t *SharedInfo;
|
||||
};
|
||||
|
||||
// There is one of this struct allocated for every child.
|
||||
#define XENBUS_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('X', 'B', 'p', 'd')
|
||||
#define XENBUS_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('X', 'B', 'p', 'd')
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
LIST_ENTRY Link;
|
||||
EFI_HANDLE Handle;
|
||||
XENBUS_PROTOCOL XenBusIo;
|
||||
XENBUS_DEVICE *Dev;
|
||||
XENBUS_DEVICE_PATH *DevicePath;
|
||||
UINTN Signature;
|
||||
LIST_ENTRY Link;
|
||||
EFI_HANDLE Handle;
|
||||
XENBUS_PROTOCOL XenBusIo;
|
||||
XENBUS_DEVICE *Dev;
|
||||
XENBUS_DEVICE_PATH *DevicePath;
|
||||
} XENBUS_PRIVATE_DATA;
|
||||
|
||||
#define XENBUS_PRIVATE_DATA_FROM_THIS(a) \
|
||||
@@ -116,13 +110,13 @@ typedef struct {
|
||||
INT32
|
||||
EFIAPI
|
||||
TestAndClearBit (
|
||||
IN INT32 Bit,
|
||||
IN VOID *Address
|
||||
IN INT32 Bit,
|
||||
IN VOID *Address
|
||||
);
|
||||
|
||||
CHAR8*
|
||||
CHAR8 *
|
||||
AsciiStrDup (
|
||||
IN CONST CHAR8* Str
|
||||
IN CONST CHAR8 *Str
|
||||
);
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -38,11 +38,11 @@ typedef struct _XENSTORE_WATCH XENSTORE_WATCH;
|
||||
**/
|
||||
XENSTORE_STATUS
|
||||
XenStoreListDirectory (
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT UINT32 *DirectoryCountPtr,
|
||||
OUT CONST CHAR8 ***DirectoryListPtr
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT UINT32 *DirectoryCountPtr,
|
||||
OUT CONST CHAR8 ***DirectoryListPtr
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -58,9 +58,9 @@ XenStoreListDirectory (
|
||||
**/
|
||||
BOOLEAN
|
||||
XenStorePathExists (
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *Directory,
|
||||
IN CONST CHAR8 *Node
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *Directory,
|
||||
IN CONST CHAR8 *Node
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -82,11 +82,11 @@ XenStorePathExists (
|
||||
**/
|
||||
XENSTORE_STATUS
|
||||
XenStoreRead (
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT UINT32 *LenPtr OPTIONAL,
|
||||
OUT VOID **Result
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT UINT32 *LenPtr OPTIONAL,
|
||||
OUT VOID **Result
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -102,10 +102,10 @@ XenStoreRead (
|
||||
**/
|
||||
XENSTORE_STATUS
|
||||
XenStoreWrite (
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
IN CONST CHAR8 *Str
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
IN CONST CHAR8 *Str
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -120,9 +120,9 @@ XenStoreWrite (
|
||||
**/
|
||||
XENSTORE_STATUS
|
||||
XenStoreRemove (
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -139,7 +139,7 @@ XenStoreRemove (
|
||||
**/
|
||||
XENSTORE_STATUS
|
||||
XenStoreTransactionStart (
|
||||
OUT XENSTORE_TRANSACTION *Transaction
|
||||
OUT XENSTORE_TRANSACTION *Transaction
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -154,8 +154,8 @@ XenStoreTransactionStart (
|
||||
**/
|
||||
XENSTORE_STATUS
|
||||
XenStoreTransactionEnd (
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN BOOLEAN Abort
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN BOOLEAN Abort
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -173,10 +173,10 @@ XenStoreTransactionEnd (
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenStoreSPrint (
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
...
|
||||
);
|
||||
|
||||
@@ -195,11 +195,11 @@ XenStoreSPrint (
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenStoreVSPrint (
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
IN VA_LIST Marker
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
IN VA_LIST Marker
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -232,7 +232,7 @@ XenStoreRegisterWatch (
|
||||
**/
|
||||
VOID
|
||||
XenStoreUnregisterWatch (
|
||||
IN XENSTORE_WATCH *Watch
|
||||
IN XENSTORE_WATCH *Watch
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -240,18 +240,17 @@ XenStoreUnregisterWatch (
|
||||
is the NUL string, the returned value contains the path string
|
||||
<DirectoryPath>.
|
||||
|
||||
@param DirectoryPath The NUL terminated directory prefix for new path.
|
||||
@param DirectoryPath The NUL terminated directory prefix for new path.
|
||||
@param Node The NUL terminated basename for the new path.
|
||||
|
||||
@return A buffer containing the joined path.
|
||||
*/
|
||||
CHAR8 *
|
||||
XenStoreJoin (
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Initialize the XenStore states and rings.
|
||||
|
||||
@@ -261,7 +260,7 @@ XenStoreJoin (
|
||||
**/
|
||||
EFI_STATUS
|
||||
XenStoreInit (
|
||||
XENBUS_DEVICE *Dev
|
||||
XENBUS_DEVICE *Dev
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -271,10 +270,9 @@ XenStoreInit (
|
||||
**/
|
||||
VOID
|
||||
XenStoreDeinit (
|
||||
IN XENBUS_DEVICE *Dev
|
||||
IN XENBUS_DEVICE *Dev
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// XENBUS protocol
|
||||
//
|
||||
@@ -282,34 +280,34 @@ XenStoreDeinit (
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenBusWaitForWatch (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN VOID *Token
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN VOID *Token
|
||||
);
|
||||
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenBusXenStoreRead (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT VOID **Value
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT VOID **Value
|
||||
);
|
||||
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenBusXenStoreBackendRead (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT VOID **Value
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT VOID **Value
|
||||
);
|
||||
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenBusXenStoreRemove (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *Node
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *Node
|
||||
);
|
||||
|
||||
XENSTORE_STATUS
|
||||
@@ -322,36 +320,36 @@ XenBusXenStoreTransactionStart (
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenBusXenStoreTransactionEnd (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN BOOLEAN Abort
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN BOOLEAN Abort
|
||||
);
|
||||
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenBusXenStoreSPrint (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST XENSTORE_TRANSACTION *Transaction,
|
||||
IN CONST CHAR8 *DirectoryPath,
|
||||
IN CONST CHAR8 *Node,
|
||||
IN CONST CHAR8 *FormatString,
|
||||
...
|
||||
);
|
||||
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenBusRegisterWatch (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT VOID **Token
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT VOID **Token
|
||||
);
|
||||
|
||||
XENSTORE_STATUS
|
||||
EFIAPI
|
||||
XenBusRegisterWatchBackend (
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT VOID **Token
|
||||
IN XENBUS_PROTOCOL *This,
|
||||
IN CONST CHAR8 *Node,
|
||||
OUT VOID **Token
|
||||
);
|
||||
|
||||
VOID
|
||||
|
Reference in New Issue
Block a user