1. Removed #ifdef SNP_DEBUG and used debug lib to output information
2. Rename PcdPlatformNoCsmSupport to PcdPlatformCsmSupport. 3 Removed #ifdef EFI_NO_CSM and used PcdPlatformCsmSupport. 4. Removed #ifdef ALIGNMENT from C Variable.c and added 2 files Variable/Pei/Ipf/VariableWorker.c and Variable/Pei/VariableWorker.c git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2487 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
/*++
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
Module Name:
|
||||
pxe_bc_dhcp.c
|
||||
|
||||
|
||||
Abstract:
|
||||
DHCP and PXE discovery protocol implementations.
|
||||
|
||||
@@ -411,7 +411,7 @@ Routine description:
|
||||
|
||||
Arguments:
|
||||
Smbios - Pointer to SMBIOS structure
|
||||
StringNumber - String number to return. 0 is used to skip all strings and
|
||||
StringNumber - String number to return. 0 is used to skip all strings and
|
||||
point to the next SMBIOS structure.
|
||||
|
||||
Returns:
|
||||
@@ -1165,11 +1165,11 @@ Parameters:
|
||||
Private := Pointer to PxeBc interface
|
||||
ExtraEdit := Pointer to extra option checking function
|
||||
OpFlags := UdpRead() option flags
|
||||
ServerIpPtr :=
|
||||
ServerPortPtr :=
|
||||
ClientIpPtr :=
|
||||
ClientPortPtr :=
|
||||
DhcpRxBuf :=
|
||||
ServerIpPtr :=
|
||||
ServerPortPtr :=
|
||||
ClientIpPtr :=
|
||||
ClientPortPtr :=
|
||||
DhcpRxBuf :=
|
||||
TimeoutEvent :=
|
||||
|
||||
Returns:
|
||||
@@ -2309,7 +2309,7 @@ Routine description:
|
||||
|
||||
Parameters:
|
||||
This := Pointer to PxeBc interface
|
||||
SortOffers :=
|
||||
SortOffers :=
|
||||
|
||||
Returns:
|
||||
--*/
|
||||
@@ -2466,12 +2466,12 @@ DoDiscover (
|
||||
PXE_SERVER_LISTS *ServerListPtr
|
||||
)
|
||||
/*++
|
||||
Routine description:
|
||||
Routine description:
|
||||
This function tries to complete the PXE Bootserver and/or boot image
|
||||
discovery sequence. When this command completes successfully, the
|
||||
PXEdiscover and PXEreply fields in the BC instance data structure are
|
||||
updated. If the Info pointer is set to NULL, the discovery information
|
||||
in the DHCPack and ProxyOffer packets must be valid and will be used.
|
||||
in the DHCPack and ProxyOffer packets must be valid and will be used.
|
||||
If Info is not set to NULL, the discovery methods in the Info field
|
||||
must be set and will be used. When discovering any layer number other
|
||||
than zero (the credential flag does not count), only unicast discovery
|
||||
@@ -2479,12 +2479,12 @@ Routine description:
|
||||
|
||||
Parameters:
|
||||
Private := Pointer to PxeBc interface
|
||||
OpFlags :=
|
||||
Type :=
|
||||
LayerPtr :=
|
||||
UseBis :=
|
||||
DestPtr :=
|
||||
ServerListPtr :=
|
||||
OpFlags :=
|
||||
Type :=
|
||||
LayerPtr :=
|
||||
UseBis :=
|
||||
DestPtr :=
|
||||
ServerListPtr :=
|
||||
|
||||
Returns:
|
||||
--*/
|
||||
@@ -2771,12 +2771,12 @@ Routine Description:
|
||||
|
||||
Parameters:
|
||||
Private := Pointer to PxeBc interface
|
||||
Type :=
|
||||
LayerPtr :=
|
||||
UseBis :=
|
||||
DiscoverInfoPtr :=
|
||||
McastServerListPtr :=
|
||||
ServerListPtr :=
|
||||
Type :=
|
||||
LayerPtr :=
|
||||
UseBis :=
|
||||
DiscoverInfoPtr :=
|
||||
McastServerListPtr :=
|
||||
ServerListPtr :=
|
||||
|
||||
Returns:
|
||||
--*/
|
||||
@@ -2907,11 +2907,11 @@ BcDiscover (
|
||||
Routine description:
|
||||
|
||||
Parameters:
|
||||
This :=
|
||||
Type :=
|
||||
LayerPtr :=
|
||||
UseBis :=
|
||||
DiscoverInfoPtr :=
|
||||
This :=
|
||||
Type :=
|
||||
LayerPtr :=
|
||||
UseBis :=
|
||||
DiscoverInfoPtr :=
|
||||
|
||||
Returns:
|
||||
--*/
|
||||
|
@@ -19,11 +19,6 @@ Abstract:
|
||||
|
||||
#include "PxeDhcp4.h"
|
||||
|
||||
#define DebugPrint(x)
|
||||
//
|
||||
// #define DebugPrint(x) Aprint x
|
||||
//
|
||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
STATIC
|
||||
INTN
|
||||
offer_verify (
|
||||
@@ -400,7 +395,7 @@ PxeDhcp4Init (
|
||||
Private->offer_list = NULL;
|
||||
Private->callback = NULL;
|
||||
|
||||
DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));
|
||||
DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));
|
||||
return EfiStatus;
|
||||
}
|
||||
|
||||
@@ -687,7 +682,7 @@ PxeDhcp4Select (
|
||||
EfiStatus = add_opt (&request, srvid);
|
||||
|
||||
if (EFI_ERROR (EfiStatus)) {
|
||||
DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));
|
||||
DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));
|
||||
Private->callback = NULL;
|
||||
return EfiStatus;
|
||||
}
|
||||
@@ -702,7 +697,7 @@ PxeDhcp4Select (
|
||||
EfiStatus = add_opt (&request, op);
|
||||
|
||||
if (EFI_ERROR (EfiStatus)) {
|
||||
DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));
|
||||
DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));
|
||||
Private->callback = NULL;
|
||||
return EfiStatus;
|
||||
}
|
||||
@@ -724,7 +719,7 @@ PxeDhcp4Select (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (EfiStatus)) {
|
||||
DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));
|
||||
DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));
|
||||
Private->callback = NULL;
|
||||
return EfiStatus;
|
||||
}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/*++
|
||||
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.
|
||||
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.
|
||||
|
||||
Module name:
|
||||
snp.h
|
||||
@@ -22,17 +22,8 @@ Revision history:
|
||||
|
||||
#include "IndustryStandard/pci22.h"
|
||||
|
||||
#define SNP_DEBUG 0
|
||||
#define FOUR_GIGABYTES (UINT64) 0x100000000ULL
|
||||
|
||||
#if SNP_DEBUG
|
||||
#undef D_NET
|
||||
#define D_NET D_WARN
|
||||
#define SNP_PRINT(DebugInfo) Print (DebugInfo)
|
||||
#else
|
||||
#define SNP_PRINT(DebugInfo)
|
||||
#endif
|
||||
|
||||
#define SNP_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('s', 'n', 'd', 's')
|
||||
#define MAX_MAP_LENGTH 100
|
||||
|
||||
@@ -455,13 +446,4 @@ VOID
|
||||
|
||||
#define SNP_MEM_PAGES(x) (((x) - 1) / 4096 + 1)
|
||||
|
||||
#if SNP_DEBUG
|
||||
extern
|
||||
VOID
|
||||
snp_wait_for_key (
|
||||
VOID
|
||||
)
|
||||
;
|
||||
#endif
|
||||
|
||||
#endif /* _SNP_H */
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/*++
|
||||
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.
|
||||
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.
|
||||
|
||||
Module name:
|
||||
callback.c
|
||||
@@ -482,7 +482,7 @@ Returns:
|
||||
}
|
||||
|
||||
if (Index >= MAX_MAP_LENGTH) {
|
||||
SNP_PRINT (L"SNP maplist is FULL\n");
|
||||
DEBUG ((EFI_D_INFO, "SNP maplist is FULL\n"));
|
||||
*DevAddrPtr = 0;
|
||||
return ;
|
||||
}
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/*++
|
||||
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.
|
||||
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.
|
||||
|
||||
Module name:
|
||||
snp.c
|
||||
@@ -41,10 +41,8 @@ Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
#if SNP_DEBUG
|
||||
Aprint ("\nissue_hwundi_command() - This should not be called!");
|
||||
snp_wait_for_key ();
|
||||
#endif
|
||||
DEBUG ((EFI_D_ERROR, "\nissue_hwundi_command() - This should not be called!"));
|
||||
|
||||
if (cdb == 0) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
||||
@@ -65,7 +63,7 @@ calc_8bit_cksum (
|
||||
|
||||
Routine Description:
|
||||
Compute 8-bit checksum of a buffer.
|
||||
|
||||
|
||||
Arguments:
|
||||
ptr - Pointer to buffer.
|
||||
len - Length of buffer in bytes.
|
||||
@@ -147,19 +145,13 @@ SimpleNetworkDriverSupported (
|
||||
);
|
||||
if (Status == EFI_ALREADY_STARTED)
|
||||
{
|
||||
#if SNP_DEBUG
|
||||
Aprint ("Support(): Already Started. on handle %x\n", Controller);
|
||||
#endif
|
||||
DEBUG ((EFI_D_INFO, "Support(): Already Started. on handle %x\n", Controller));
|
||||
return EFI_ALREADY_STARTED;
|
||||
}
|
||||
|
||||
if (!EFI_ERROR (Status))
|
||||
{
|
||||
|
||||
#if SNP_DEBUG
|
||||
Aprint ("Support(): UNDI3.1 found on handle %x\n", Controller);
|
||||
snp_wait_for_key ();
|
||||
#endif
|
||||
DEBUG ((EFI_D_INFO, "Support(): UNDI3.1 found on handle %x\n", Controller));
|
||||
IsUndi31 = TRUE;
|
||||
} else {
|
||||
//
|
||||
@@ -177,10 +169,7 @@ SimpleNetworkDriverSupported (
|
||||
return Status;
|
||||
}
|
||||
|
||||
#if SNP_DEBUG
|
||||
Aprint ("Support(): UNDI3.0 found on handle %x\n", Controller);
|
||||
snp_wait_for_key ();
|
||||
#endif
|
||||
DEBUG ((EFI_D_INFO, "Support(): UNDI3.0 found on handle %x\n", Controller));
|
||||
}
|
||||
//
|
||||
// check the version, we don't want to connect to the undi16
|
||||
@@ -244,10 +233,7 @@ SimpleNetworkDriverSupported (
|
||||
}
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
#if SNP_DEBUG
|
||||
Aprint ("Support(): supported on %x\n", Controller);
|
||||
snp_wait_for_key ();
|
||||
#endif
|
||||
DEBUG ((EFI_D_INFO, "Support(): supported on %x\n", Controller));
|
||||
|
||||
Done:
|
||||
if (IsUndi31) {
|
||||
@@ -374,10 +360,8 @@ Arguments:
|
||||
// probably not a 3.1 UNDI
|
||||
//
|
||||
UndiNew = TRUE;
|
||||
#if SNP_DEBUG
|
||||
Aprint ("Start(): UNDI3.1 found\n");
|
||||
snp_wait_for_key ();
|
||||
#endif
|
||||
DEBUG ((EFI_D_INFO, "Start(): UNDI3.1 found\n"));
|
||||
|
||||
} else {
|
||||
UndiNew = FALSE;
|
||||
Status = gBS->OpenProtocol (
|
||||
@@ -399,10 +383,7 @@ Arguments:
|
||||
return Status;
|
||||
}
|
||||
|
||||
#if SNP_DEBUG
|
||||
Aprint ("Start(): UNDI3.0 found\n");
|
||||
snp_wait_for_key ();
|
||||
#endif
|
||||
DEBUG ((EFI_D_INFO, "Start(): UNDI3.0 found\n"));
|
||||
}
|
||||
|
||||
pxe = (PXE_UNDI *) (UINTN) (Nii->ID);
|
||||
@@ -996,7 +977,7 @@ Returns:
|
||||
Controller
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Status = gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
@@ -1077,7 +1058,7 @@ add_v2p (
|
||||
|
||||
Routine Description:
|
||||
This routine maps the given CPU address to a Device address. It creates a
|
||||
an entry in the map list with the virtual and physical addresses and the
|
||||
an entry in the map list with the virtual and physical addresses and the
|
||||
un map cookie.
|
||||
|
||||
Arguments:
|
||||
@@ -1138,7 +1119,7 @@ find_v2p (
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This routine searches the linked list of mapped address nodes (for undi3.0
|
||||
This routine searches the linked list of mapped address nodes (for undi3.0
|
||||
interface) to find the node that corresponds to the given virtual address and
|
||||
returns a pointer to that node.
|
||||
|
||||
@@ -1176,9 +1157,9 @@ del_v2p (
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This routine unmaps the given virtual address and frees the memory allocated
|
||||
This routine unmaps the given virtual address and frees the memory allocated
|
||||
for the map list node corresponding to that address.
|
||||
|
||||
|
||||
Arguments:
|
||||
vaddr - virtual address (or CPU address) to be unmapped
|
||||
|
||||
@@ -1210,11 +1191,9 @@ Returns:
|
||||
|
||||
gBS->FreePool (v);
|
||||
|
||||
#if SNP_DEBUG
|
||||
if (Status) {
|
||||
Print (L"Unmap failed with status = %x\n", Status);
|
||||
DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));
|
||||
}
|
||||
#endif
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -1223,42 +1202,13 @@ Returns:
|
||||
v->next = t->next;
|
||||
Status = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);
|
||||
gBS->FreePool (t);
|
||||
#if SNP_DEBUG
|
||||
|
||||
if (Status) {
|
||||
Print (L"Unmap failed with status = %x\n", Status);
|
||||
DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));
|
||||
}
|
||||
#endif
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
#if SNP_DEBUG
|
||||
VOID
|
||||
snp_wait_for_key (
|
||||
VOID
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Wait for a key stroke, used for debugging purposes
|
||||
|
||||
Arguments:
|
||||
none
|
||||
|
||||
Returns:
|
||||
none
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_INPUT_KEY key;
|
||||
|
||||
Aprint ("\nPress any key to continue\n");
|
||||
|
||||
while (gST->ConIn->ReadKeyStroke (gST->ConIn, &key) == EFI_NOT_READY) {
|
||||
;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user