diff options
author | Liming Gao <liming.gao@intel.com> | 2018-06-27 21:14:20 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-06-28 11:19:53 +0800 |
commit | 7367cc6c24d01b400d2370ffd58ae02854a56b32 (patch) | |
tree | c5b8a758492e188fb3246eb8a72f07340cd80d44 /UefiCpuPkg/Library/BaseXApicLib | |
parent | 77695f4da3dc8eedb6fc7fc67f91ef6ccd22daee (diff) | |
download | edk2-7367cc6c24d01b400d2370ffd58ae02854a56b32.zip edk2-7367cc6c24d01b400d2370ffd58ae02854a56b32.tar.gz edk2-7367cc6c24d01b400d2370ffd58ae02854a56b32.tar.bz2 |
UefiCpuPkg: Clean up source files
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/BaseXApicLib')
-rw-r--r-- | UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 64 | ||||
-rw-r--r-- | UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf | 8 | ||||
-rw-r--r-- | UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.uni | 4 |
3 files changed, 38 insertions, 38 deletions
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c index 52c0d39..7d66d89 100644 --- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c +++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c @@ -3,7 +3,7 @@ This local APIC library instance supports xAPIC mode only.
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2017, AMD Inc. All rights reserved.<BR>
This program and the accompanying materials
@@ -68,12 +68,12 @@ LocalApicBaseAddressMsrSupported ( {
UINT32 RegEax;
UINTN FamilyId;
-
+
AsmCpuid (1, &RegEax, NULL, NULL, NULL);
FamilyId = BitFieldRead32 (RegEax, 8, 11);
if (FamilyId == 0x04 || FamilyId == 0x05) {
//
- // CPUs with a FamilyId of 0x04 or 0x05 do not support the
+ // CPUs with a FamilyId of 0x04 or 0x05 do not support the
// Local APIC Base Address MSR
//
return FALSE;
@@ -104,7 +104,7 @@ GetLocalApicBaseAddress ( }
ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE);
-
+
return (UINTN)(LShiftU64 ((UINT64) ApicBaseMsr.Bits.ApicBaseHi, 32)) +
(((UINTN)ApicBaseMsr.Bits.ApicBase) << 12);
}
@@ -197,7 +197,7 @@ WriteLocalApicReg ( /**
Send an IPI by writing to ICR.
- This function returns after the IPI has been accepted by the target processor.
+ This function returns after the IPI has been accepted by the target processor.
@param IcrLow 32-bit value to be written to the low half of ICR.
@param ApicId APIC ID of the target processor if this IPI is targeted for a specific processor.
@@ -275,7 +275,7 @@ GetApicMode ( MSR_IA32_APIC_BASE_REGISTER ApicBaseMsr;
//
- // Check to see if the CPU supports the APIC Base Address MSR
+ // Check to see if the CPU supports the APIC Base Address MSR
//
if (LocalApicBaseAddressMsrSupported ()) {
ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE);
@@ -315,7 +315,7 @@ SetApicMode ( Get the initial local APIC ID of the executing processor assigned by hardware upon power on or reset.
In xAPIC mode, the initial local APIC ID may be different from current APIC ID.
- In x2APIC mode, the local APIC ID can't be changed and there is no concept of initial APIC ID. In this case,
+ In x2APIC mode, the local APIC ID can't be changed and there is no concept of initial APIC ID. In this case,
the 32-bit local APIC ID is returned as initial APIC ID.
@return 32-bit initial local APIC ID of the executing processor.
@@ -338,7 +338,7 @@ GetInitialApicId ( AsmCpuid (CPUID_SIGNATURE, &MaxCpuIdIndex, NULL, NULL, NULL);
//
- // If CPUID Leaf B is supported,
+ // If CPUID Leaf B is supported,
// And CPUID.0BH:EBX[15:0] reports a non-zero value,
// Then the initial 32-bit APIC ID = CPUID.0BH:EDX
// Else the initial 8-bit APIC ID = CPUID.1:EBX[31:24]
@@ -368,7 +368,7 @@ GetApicId ( UINT32 ApicId;
ASSERT (GetApicMode () == LOCAL_APIC_MODE_XAPIC);
-
+
if ((ApicId = GetInitialApicId ()) < 0x100) {
//
// If the initial local APIC ID is less 0x100, read APIC ID from
@@ -397,7 +397,7 @@ GetApicVersion ( /**
Send a Fixed IPI to a specified target processor.
- This function returns after the IPI has been accepted by the target processor.
+ This function returns after the IPI has been accepted by the target processor.
@param ApicId The local APIC ID of the target processor.
@param Vector The vector number of the interrupt being sent.
@@ -421,7 +421,7 @@ SendFixedIpi ( /**
Send a Fixed IPI to all processors excluding self.
- This function returns after the IPI has been accepted by the target processors.
+ This function returns after the IPI has been accepted by the target processors.
@param Vector The vector number of the interrupt being sent.
**/
@@ -444,7 +444,7 @@ SendFixedIpiAllExcludingSelf ( /**
Send a SMI IPI to a specified target processor.
- This function returns after the IPI has been accepted by the target processor.
+ This function returns after the IPI has been accepted by the target processor.
@param ApicId Specify the local APIC ID of the target processor.
**/
@@ -465,7 +465,7 @@ SendSmiIpi ( /**
Send a SMI IPI to all processors excluding self.
- This function returns after the IPI has been accepted by the target processors.
+ This function returns after the IPI has been accepted by the target processors.
**/
VOID
EFIAPI
@@ -485,7 +485,7 @@ SendSmiIpiAllExcludingSelf ( /**
Send an INIT IPI to a specified target processor.
- This function returns after the IPI has been accepted by the target processor.
+ This function returns after the IPI has been accepted by the target processor.
@param ApicId Specify the local APIC ID of the target processor.
**/
@@ -506,7 +506,7 @@ SendInitIpi ( /**
Send an INIT IPI to all processors excluding self.
- This function returns after the IPI has been accepted by the target processors.
+ This function returns after the IPI has been accepted by the target processors.
**/
VOID
EFIAPI
@@ -526,7 +526,7 @@ SendInitIpiAllExcludingSelf ( /**
Send an INIT-Start-up-Start-up IPI sequence to a specified target processor.
- This function returns after the IPI has been accepted by the target processor.
+ This function returns after the IPI has been accepted by the target processor.
if StartupRoutine >= 1M, then ASSERT.
if StartupRoutine is not multiple of 4K, then ASSERT.
@@ -563,7 +563,7 @@ SendInitSipiSipi ( /**
Send an INIT-Start-up-Start-up IPI sequence to all processors excluding self.
- This function returns after the IPI has been accepted by the target processors.
+ This function returns after the IPI has been accepted by the target processors.
if StartupRoutine >= 1M, then ASSERT.
if StartupRoutine is not multiple of 4K, then ASSERT.
@@ -767,7 +767,7 @@ InitializeApicTimer ( Dcr.Uint32 = ReadLocalApicReg (XAPIC_TIMER_DIVIDE_CONFIGURATION_OFFSET);
Dcr.Bits.DivideValue1 = (Divisor & 0x3);
Dcr.Bits.DivideValue2 = (Divisor >> 2);
- WriteLocalApicReg (XAPIC_TIMER_DIVIDE_CONFIGURATION_OFFSET, Dcr.Uint32);
+ WriteLocalApicReg (XAPIC_TIMER_DIVIDE_CONFIGURATION_OFFSET, Dcr.Uint32);
}
//
@@ -897,13 +897,13 @@ SendApicEoi ( }
/**
- Get the 32-bit address that a device should use to send a Message Signaled
+ Get the 32-bit address that a device should use to send a Message Signaled
Interrupt (MSI) to the Local APIC of the currently executing processor.
@return 32-bit address used to send an MSI to the Local APIC.
**/
UINT32
-EFIAPI
+EFIAPI
GetApicMsiAddress (
VOID
)
@@ -911,7 +911,7 @@ GetApicMsiAddress ( LOCAL_APIC_MSI_ADDRESS MsiAddress;
//
- // Return address for an MSI interrupt to be delivered only to the APIC ID
+ // Return address for an MSI interrupt to be delivered only to the APIC ID
// of the currently executing processor.
//
MsiAddress.Uint32 = 0;
@@ -919,17 +919,17 @@ GetApicMsiAddress ( MsiAddress.Bits.DestinationId = GetApicId ();
return MsiAddress.Uint32;
}
-
+
/**
- Get the 64-bit data value that a device should use to send a Message Signaled
+ Get the 64-bit data value that a device should use to send a Message Signaled
Interrupt (MSI) to the Local APIC of the currently executing processor.
If Vector is not in range 0x10..0xFE, then ASSERT().
If DeliveryMode is not supported, then ASSERT().
-
- @param Vector The 8-bit interrupt vector associated with the MSI.
+
+ @param Vector The 8-bit interrupt vector associated with the MSI.
Must be in the range 0x10..0xFE
- @param DeliveryMode A 3-bit value that specifies how the recept of the MSI
+ @param DeliveryMode A 3-bit value that specifies how the recept of the MSI
is handled. The only supported values are:
0: LOCAL_APIC_DELIVERY_MODE_FIXED
1: LOCAL_APIC_DELIVERY_MODE_LOWEST_PRIORITY
@@ -937,19 +937,19 @@ GetApicMsiAddress ( 4: LOCAL_APIC_DELIVERY_MODE_NMI
5: LOCAL_APIC_DELIVERY_MODE_INIT
7: LOCAL_APIC_DELIVERY_MODE_EXTINT
-
- @param LevelTriggered TRUE specifies a level triggered interrupt.
+
+ @param LevelTriggered TRUE specifies a level triggered interrupt.
FALSE specifies an edge triggered interrupt.
@param AssertionLevel Ignored if LevelTriggered is FALSE.
- TRUE specifies a level triggered interrupt that active
+ TRUE specifies a level triggered interrupt that active
when the interrupt line is asserted.
- FALSE specifies a level triggered interrupt that active
+ FALSE specifies a level triggered interrupt that active
when the interrupt line is deasserted.
@return 64-bit data value used to send an MSI to the Local APIC.
**/
UINT64
-EFIAPI
+EFIAPI
GetApicMsiValue (
IN UINT8 Vector,
IN UINTN DeliveryMode,
@@ -961,7 +961,7 @@ GetApicMsiValue ( ASSERT (Vector >= 0x10 && Vector <= 0xFE);
ASSERT (DeliveryMode < 8 && DeliveryMode != 6 && DeliveryMode != 3);
-
+
MsiData.Uint64 = 0;
MsiData.Bits.Vector = Vector;
MsiData.Bits.DeliveryMode = (UINT32)DeliveryMode;
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf index 7dd2714..b3b9725 100644 --- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf +++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf @@ -4,15 +4,15 @@ # Note: Local APIC library assumes local APIC is enabled. It does not handle cases
# where local APIC is disabled.
#
-# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
# 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.
-#
+#
##
[Defines]
@@ -22,7 +22,7 @@ FILE_GUID = D87CA0A8-1AC2-439b-90F8-EF4A2AC88DAF
MODULE_TYPE = BASE
VERSION_STRING = 1.1
- LIBRARY_CLASS = LocalApicLib
+ LIBRARY_CLASS = LocalApicLib
#
# The following information is for reference only and not required by the build tools.
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.uni b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.uni index 49b05e6..f0d1271 100644 --- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.uni +++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.uni @@ -4,13 +4,13 @@ // Note: Local APIC library assumes local APIC is enabled. It does not handle cases
// where local APIC is disabled.
//
-// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
//
// 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.
//
|