mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg: Added code to enable Local APIC.
This patch enables interrupt delivery via the Local APIC as part of the initialization process. Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com> Reviewed-by: Rosenbaum, Lee G <lee.g.rosenbaum@intel.com> Reviewed-by: Sun Rui <rui.sun@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13338 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c5ae1de611
commit
d4605c23ea
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
CPU DXE Module.
|
CPU DXE Module.
|
||||||
|
|
||||||
Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -969,7 +969,7 @@ RefreshGcdMemoryAttributes (
|
||||||
// Go for variable MTRRs with the attribute except for WB and UC attributes
|
// Go for variable MTRRs with the attribute except for WB and UC attributes
|
||||||
//
|
//
|
||||||
for (Index = 0; Index < FirmwareVariableMtrrCount; Index++) {
|
for (Index = 0; Index < FirmwareVariableMtrrCount; Index++) {
|
||||||
if (VariableMtrr[Index].Valid &&
|
if (VariableMtrr[Index].Valid &&
|
||||||
VariableMtrr[Index].Type != MTRR_CACHE_WRITE_BACK &&
|
VariableMtrr[Index].Type != MTRR_CACHE_WRITE_BACK &&
|
||||||
VariableMtrr[Index].Type != MTRR_CACHE_UNCACHEABLE) {
|
VariableMtrr[Index].Type != MTRR_CACHE_UNCACHEABLE) {
|
||||||
Attributes = GetMemorySpaceAttributeFromMtrrType ((UINT8) VariableMtrr[Index].Type);
|
Attributes = GetMemorySpaceAttributeFromMtrrType ((UINT8) VariableMtrr[Index].Type);
|
||||||
|
@ -1161,7 +1161,7 @@ InitInterruptDescriptorTable (
|
||||||
// preserve it.
|
// preserve it.
|
||||||
//
|
//
|
||||||
if (Index < OldIdtSize) {
|
if (Index < OldIdtSize) {
|
||||||
IntHandler =
|
IntHandler =
|
||||||
(VOID*) (
|
(VOID*) (
|
||||||
OldIdt[Index].Bits.OffsetLow +
|
OldIdt[Index].Bits.OffsetLow +
|
||||||
(OldIdt[Index].Bits.OffsetHigh << 16)
|
(OldIdt[Index].Bits.OffsetHigh << 16)
|
||||||
|
@ -1209,7 +1209,7 @@ InitInterruptDescriptorTable (
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Callback function for idle events.
|
Callback function for idle events.
|
||||||
|
|
||||||
@param Event Event whose notification function is being invoked.
|
@param Event Event whose notification function is being invoked.
|
||||||
@param Context The pointer to the notification function's context,
|
@param Context The pointer to the notification function's context,
|
||||||
which is implementation-dependent.
|
which is implementation-dependent.
|
||||||
|
@ -1262,6 +1262,11 @@ InitializeCpu (
|
||||||
//
|
//
|
||||||
InitInterruptDescriptorTable ();
|
InitInterruptDescriptorTable ();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Enable the local APIC for Virtual Wire Mode.
|
||||||
|
//
|
||||||
|
ProgramVirtualWireMode ();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install CPU Architectural Protocol
|
// Install CPU Architectural Protocol
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
CPU DXE Module.
|
CPU DXE Module.
|
||||||
|
|
||||||
Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/MtrrLib.h>
|
#include <Library/MtrrLib.h>
|
||||||
|
#include <Library/LocalApicLib.h>
|
||||||
#include <Guid/IdleLoopEvent.h>
|
#include <Guid/IdleLoopEvent.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# Component description file for simple CPU driver
|
# Component description file for simple CPU driver
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
MtrrLib
|
MtrrLib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
|
LocalApicLib
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
CpuDxe.c
|
CpuDxe.c
|
||||||
|
|
Loading…
Reference in New Issue