Variable driver: add checking to make sure flash is properly initialized

PxeBc driver: fix the issue that the giaddr is wrongly interpreted to "gateway address"

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2515 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2007-03-29 07:48:48 +00:00
parent 46dd23b81e
commit 02dab42847
2 changed files with 9 additions and 2 deletions

View File

@ -621,8 +621,6 @@ AddRouters (
DHCP_RECEIVE_BUFFER *RxBufPtr DHCP_RECEIVE_BUFFER *RxBufPtr
) )
{ {
Ip4AddRouter (Private, &RxBufPtr->u.Dhcpv4.giaddr);
Ip4AddRouterList ( Ip4AddRouterList (
Private, Private,
(DHCPV4_OP_IP_LIST *) RxBufPtr->OpAdds.PktOptAdds[OP_ROUTER_LIST_IX - 1] (DHCPV4_OP_IP_LIST *) RxBufPtr->OpAdds.PktOptAdds[OP_ROUTER_LIST_IX - 1]

View File

@ -1403,6 +1403,15 @@ Returns:
sizeof (UINT32), sizeof (UINT32),
(UINT8 *) &VariableStoreEntry.Length (UINT8 *) &VariableStoreEntry.Length
); );
//
// As Variables are stored in NV storage, which are slow devices,such as flash.
// Variable operation may skip checking variable program result to improve performance,
// We can assume Variable program is OK through some check point.
// Variable Store Size Setting should be the first Variable write operation,
// We can assume all Read/Write is OK if we can set Variable store size successfully.
// If write fail, we will assert here
//
ASSERT(VariableStoreHeader->Size == VariableStoreEntry.Length);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return Status; return Status;