mirror of https://github.com/acidanthera/audk.git
UEFI Capsule HOB updating includes:
1. add BuildCapsuleHob() in HobLib.h 2. add related APIs implementation in hob library instances. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9378 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
62ba2e4ade
commit
b6b55af34c
|
@ -415,6 +415,25 @@ BuildMemoryAllocationHob (
|
||||||
IN EFI_MEMORY_TYPE MemoryType
|
IN EFI_MEMORY_TYPE MemoryType
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builds an UEFI Capsule HOB.
|
||||||
|
|
||||||
|
This function builds an UEFI Capsule HOB.
|
||||||
|
It can only be invoked during PEI phase;
|
||||||
|
for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
|
||||||
|
If there is no additional space for HOB creation, then ASSERT().
|
||||||
|
|
||||||
|
@param BaseAddress The physical memory-mapped base address of an UEFI capsule.
|
||||||
|
@param Length The length of the contiguous memory in bytes.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
BuildCapsuleHob (
|
||||||
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||||
|
IN UINT64 Length
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the type of a HOB.
|
Returns the type of a HOB.
|
||||||
|
|
||||||
|
|
|
@ -528,3 +528,28 @@ BuildMemoryAllocationHob (
|
||||||
//
|
//
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builds an UEFI Capsule HOB.
|
||||||
|
|
||||||
|
This function builds an UEFI Capsule HOB.
|
||||||
|
It can only be invoked during PEI phase;
|
||||||
|
for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
|
||||||
|
If there is no additional space for HOB creation, then ASSERT().
|
||||||
|
|
||||||
|
@param BaseAddress The physical memory-mapped base address of an UEFI capsule.
|
||||||
|
@param Length The length of the contiguous memory in bytes.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
BuildCapsuleHob (
|
||||||
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||||
|
IN UINT64 Length
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// PEI HOB is read only for DXE phase
|
||||||
|
//
|
||||||
|
ASSERT (FALSE);
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
HOB Library implemenation for Dxe Phase.
|
HOB Library implemenation for Dxe Phase.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation<BR>
|
Copyright (c) 2006 - 2009, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -562,3 +562,28 @@ BuildMemoryAllocationHob (
|
||||||
//
|
//
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builds an UEFI Capsule HOB.
|
||||||
|
|
||||||
|
This function builds an UEFI Capsule HOB.
|
||||||
|
It can only be invoked during PEI phase;
|
||||||
|
for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
|
||||||
|
If there is no additional space for HOB creation, then ASSERT().
|
||||||
|
|
||||||
|
@param BaseAddress The physical memory-mapped base address of an UEFI capsule.
|
||||||
|
@param Length The length of the contiguous memory in bytes.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
BuildCapsuleHob (
|
||||||
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||||
|
IN UINT64 Length
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// PEI HOB is read only for DXE phase
|
||||||
|
//
|
||||||
|
ASSERT (FALSE);
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Provide Hob Library functions for Pei phase.
|
Provide Hob Library functions for Pei phase.
|
||||||
|
|
||||||
Copyright (c) 2007 - 2008, Intel Corporation<BR>
|
Copyright (c) 2007 - 2009, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -641,3 +641,30 @@ BuildMemoryAllocationHob (
|
||||||
//
|
//
|
||||||
ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
|
ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Builds an UEFI Capsule HOB.
|
||||||
|
|
||||||
|
This function builds an UEFI Capsule HOB.
|
||||||
|
It can only be invoked during PEI phase;
|
||||||
|
for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
|
||||||
|
If there is no additional space for HOB creation, then ASSERT().
|
||||||
|
|
||||||
|
@param BaseAddress The physical memory-mapped base address of an UEFI capsule.
|
||||||
|
@param Length The length of the contiguous memory in bytes.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
BuildCapsuleHob (
|
||||||
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
||||||
|
IN UINT64 Length
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_HOB_UEFI_CAPSULE *Hob;
|
||||||
|
|
||||||
|
Hob = InternalPeiCreateHob (EFI_HOB_TYPE_UEFI_CAPSULE, sizeof (EFI_HOB_UEFI_CAPSULE));
|
||||||
|
|
||||||
|
Hob->BaseAddress = BaseAddress;
|
||||||
|
Hob->Length = Length;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue