https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
88 lines
1.6 KiB
C
88 lines
1.6 KiB
C
/** @file
|
|
Platform init DXE driver for this platform.
|
|
|
|
Copyright (c) 2013 Intel Corporation.
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
//
|
|
// Statements that include other files
|
|
//
|
|
#include "PlatformInitDxe.h"
|
|
#include <Library/PciLib.h>
|
|
#include <IndustryStandard/Pci.h>
|
|
|
|
VOID
|
|
GetQncName (
|
|
VOID
|
|
)
|
|
{
|
|
DEBUG ((EFI_D_INFO, "QNC Name: "));
|
|
switch (PciRead16 (PCI_LIB_ADDRESS (MC_BUS, MC_DEV, MC_FUN, PCI_DEVICE_ID_OFFSET))) {
|
|
case QUARK_MC_DEVICE_ID:
|
|
DEBUG ((EFI_D_INFO, "Quark"));
|
|
break;
|
|
case QUARK2_MC_DEVICE_ID:
|
|
DEBUG ((EFI_D_INFO, "Quark2"));
|
|
break;
|
|
default:
|
|
DEBUG ((EFI_D_INFO, "Unknown"));
|
|
}
|
|
|
|
//
|
|
// Revision
|
|
//
|
|
switch (PciRead8 (PCI_LIB_ADDRESS (MC_BUS, MC_DEV, MC_FUN, PCI_REVISION_ID_OFFSET))) {
|
|
case QNC_MC_REV_ID_A0:
|
|
DEBUG ((EFI_D_INFO, " - A0 stepping\n"));
|
|
break;
|
|
default:
|
|
DEBUG ((EFI_D_INFO, " - xx\n"));
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
EFI_STATUS
|
|
EFIAPI
|
|
PlatformInit (
|
|
IN EFI_HANDLE ImageHandle,
|
|
IN EFI_SYSTEM_TABLE *SystemTable
|
|
)
|
|
/*++
|
|
|
|
Routine Description:
|
|
Entry point for the driver.
|
|
|
|
Arguments:
|
|
|
|
ImageHandle - Image Handle.
|
|
SystemTable - EFI System Table.
|
|
|
|
Returns:
|
|
|
|
EFI_SUCCESS - Function has completed successfully.
|
|
|
|
--*/
|
|
{
|
|
EFI_STATUS Status;
|
|
|
|
GetQncName();
|
|
|
|
//
|
|
// Create events for configuration callbacks.
|
|
//
|
|
CreateConfigEvents ();
|
|
|
|
//
|
|
// Init Platform LEDs.
|
|
//
|
|
Status = PlatformLedInit ((EFI_PLATFORM_TYPE)PcdGet16 (PcdPlatformType));
|
|
ASSERT_EFI_ERROR (Status);
|
|
|
|
return EFI_SUCCESS;
|
|
}
|
|
|