mirror of https://github.com/acidanthera/audk.git
1. Merger Tracker 8448: PciHostBridgeEnumerator() error checking could lead to memory leak
2. Merger Tracker 8450: AllRootHPCInitialized() passed in timeout value incorrect git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2629 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1650d76a3f
commit
d97430c57a
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, 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
|
||||
|
@ -21,7 +21,7 @@ Revision History
|
|||
|
||||
--*/
|
||||
|
||||
#include "pcibus.h"
|
||||
#include "Pcibus.h"
|
||||
#include "PciHotPlugSupport.h"
|
||||
|
||||
EFI_PCI_HOT_PLUG_INIT_PROTOCOL *gPciHotPlugInit;
|
||||
|
@ -270,17 +270,18 @@ Returns:
|
|||
|
||||
EFI_STATUS
|
||||
AllRootHPCInitialized (
|
||||
IN UINTN TimeoutInMilliSeconds
|
||||
IN UINTN TimeoutInMicroSeconds
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Arguments:
|
||||
TimeoutInMicroSeconds - microseconds to wait for all root hpc's initialization
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
EFI_SUCCESS - All root hpc's initialization is finished before the timeout
|
||||
EFI_TIMEOUT - Time out
|
||||
|
||||
--*/
|
||||
// TODO: TimeoutInMilliSeconds - add argument and description to function comment
|
||||
|
@ -290,7 +291,7 @@ Returns:
|
|||
UINT32 Delay;
|
||||
UINTN Index;
|
||||
|
||||
Delay = (UINT32) (((TimeoutInMilliSeconds * STALL_1_MILLI_SECOND) / 30) + 1);
|
||||
Delay = (UINT32) ((TimeoutInMicroSeconds / 30) + 1);
|
||||
do {
|
||||
|
||||
for (Index = 0; Index < gPciRootHpcCount; Index++) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, 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
|
||||
|
@ -24,10 +24,6 @@ Revision History
|
|||
#ifndef _EFI_PCI_HOT_PLUG_SUPPORT_H
|
||||
#define _EFI_PCI_HOT_PLUG_SUPPORT_H
|
||||
|
||||
//
|
||||
// stall 1 ms
|
||||
//
|
||||
#define STALL_1_MILLI_SECOND 1000
|
||||
|
||||
//
|
||||
// stall 1 second
|
||||
|
@ -205,7 +201,7 @@ Returns:
|
|||
|
||||
EFI_STATUS
|
||||
AllRootHPCInitialized (
|
||||
IN UINTN TimeoutInMilliSeconds
|
||||
IN UINTN TimeoutInMicroSeconds
|
||||
)
|
||||
/*++
|
||||
|
||||
|
@ -214,12 +210,11 @@ Routine Description:
|
|||
TODO: Add function description
|
||||
|
||||
Arguments:
|
||||
|
||||
TimeoutInMilliSeconds - TODO: add argument description
|
||||
TimeoutInMicroSeconds - microseconds to wait for all root hpc's initialization
|
||||
|
||||
Returns:
|
||||
|
||||
TODO: add return values
|
||||
EFI_SUCCESS - All root hpc's initialization is finished before the timeout
|
||||
EFI_TIMEOUT - Time out
|
||||
|
||||
--*/
|
||||
;
|
||||
|
|
|
@ -1881,15 +1881,10 @@ Returns:
|
|||
RootBridgeDev
|
||||
);
|
||||
|
||||
DestroyRootBridge (RootBridgeDev);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
DestroyRootBridge (RootBridgeDev);
|
||||
|
||||
//
|
||||
// Error proccess here
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue