summaryrefslogtreecommitdiff
path: root/Board/EM/RsdpPlus/RsdpPlusLInk.c
blob: db28f6b2645961b21fc5ed324a33da8aca3a8302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2012, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/SOURCE/Modules/RsdpPlus/RsdpPlusLInk.c 4     7/27/12 7:00a Norlwu $
//
// $Revision: 4 $
//
// $Date: 7/27/12 7:00a $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/RsdpPlus/RsdpPlusLInk.c $
// 
// 4     7/27/12 7:00a Norlwu
// [TAG]  		EIP94704
// [Category]  	Bug Fix
// [Symptom]  	Cause the system hatl at the post time.
// [RootCause]  	ManageShasdow protocl is not able to installed, when
// monitor was disconnected.So change the register event to
// BdsAllDeriverConnectGuid and if locate protocl failure return status
// continue.
// [Solution]  	[HP_DTO_emodule] token DEFAULT_CSM_LAUNCH_POLICY=0 and
// BIOS hang with FastBoot enable when monitor was disconnected
// [Files]  		RsdpPlusLInk.c
// ManageShadowRam.c
// 
// 3     2/09/12 3:15a Norlwu
// [TAG]  		EIP81756
// [Category]  	New Feature
// [Description]  	Enhance RspdPlus module.
// [Files]  		RsdpPlus.sdl
// RsdpPlus.mak
// RsdpPlus.c
// RsdpPlusLInk.c
// RsdpPlus.cif
// 
// 2     9/28/11 4:01a Norlwu
// Bug Fix - Solved locate RSDP protocol failure.
// 
// 1     9/19/11 2:05a Norlwu
// [TAG]  		EIP67948
// [Category]  	New Feature
// [Description]  	EFI boot need to create the RSDT table
// [Files]  		RsdpPlus.cif
// RsdpPlus.sdl
// RsdpPlus.mak
// RsdpPlus.c
// RsdpPlusLInk.c
// RsdpPlus.dxs
// RsdpPlus.chm
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:  		RsdpPlusLink.c
//
// Description:	
//
//<AMI_FHDR_END>
//**********************************************************************

#include <AmiDxeLib.h>
#include "ShadowRamProtocol.h"

extern EFI_BOOT_SERVICES *gBS;
extern EFI_SYSTEM_TABLE *gST;
extern EFI_RUNTIME_SERVICES *gRT;

EFI_GUID gShdowRamProtocolGuid = SHADOW_RAM_PROTOCOL_GUID;
SHADOW_RAM_PROTOCOL	*gShadowRamProtocol;

//<AMI_PHDR_START>
//----------------------------------------------------------------------------
// Procedure: 	UpdateShadow
//
// Description: BeforeEfiBootLaunchHook eLink function.
//				
// Input:	VOID
//
// Output:	VOID
//      
//----------------------------------------------------------------------------
//<AMI_PHDR_END>
VOID UpdateShadow(VOID)
{
	EFI_STATUS	Status;
	
	Status = gBS->LocateProtocol(&gShdowRamProtocolGuid,NULL,&gShadowRamProtocol);
    if(!EFI_ERROR(Status))
	    gShadowRamProtocol->UpdateShadowBeforEfiBoot();
		
	return;
}

//<AMI_PHDR_START>
//----------------------------------------------------------------------------
// Procedure: 	EraseShadow
//
// Description: AfterEfiBootLaunchHook eLink function.
//				
// Input:	VOID
//
// Output:	VOID
//      
//----------------------------------------------------------------------------
//<AMI_PHDR_END>
VOID EraseShadow(VOID)
{
	EFI_STATUS	Status;

	Status = gBS->LocateProtocol(&gShdowRamProtocolGuid,NULL,&gShadowRamProtocol);
    if(!EFI_ERROR(Status))
	    gShadowRamProtocol->EraseShadowAfterEfiBoot();
	
	return;
}
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2012, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************