PcAtChipsetPkg: 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>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
Liming Gao
2018-06-27 21:12:46 +08:00
parent f75a7f568e
commit 5a702acd3d
48 changed files with 578 additions and 578 deletions

View File

@@ -1,14 +1,14 @@
## @file ## @file
# 8254 timer driver that provides Timer Arch protocol. # 8254 timer driver that provides Timer Arch protocol.
# #
# Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2005 - 2018, 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
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
# #
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
## ##
@@ -25,7 +25,7 @@
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec IntelFrameworkPkg/IntelFrameworkPkg.dec
[LibraryClasses] [LibraryClasses]
UefiBootServicesTableLib UefiBootServicesTableLib
BaseLib BaseLib
@@ -38,7 +38,7 @@
Timer.c Timer.c
[Protocols] [Protocols]
gEfiCpuArchProtocolGuid ## CONSUMES gEfiCpuArchProtocolGuid ## CONSUMES
gEfiLegacy8259ProtocolGuid ## CONSUMES gEfiLegacy8259ProtocolGuid ## CONSUMES
gEfiTimerArchProtocolGuid ## PRODUCES gEfiTimerArchProtocolGuid ## PRODUCES

View File

@@ -1,14 +1,14 @@
/** @file /** @file
Timer Architectural Protocol as defined in the DXE CIS Timer Architectural Protocol as defined in the DXE CIS
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR> Copyright (c) 2005 - 2018, 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
http://opensource.org/licenses/bsd-license.php http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
@@ -297,7 +297,7 @@ TimerDriverGenerateSoftInterrupt (
EFI_STATUS Status; EFI_STATUS Status;
UINT16 IRQMask; UINT16 IRQMask;
EFI_TPL OriginalTPL; EFI_TPL OriginalTPL;
// //
// If the timer interrupt is enabled, then the registered handler will be invoked. // If the timer interrupt is enabled, then the registered handler will be invoked.
// //
@@ -315,7 +315,7 @@ TimerDriverGenerateSoftInterrupt (
// //
mTimerNotifyFunction (mTimerPeriod); mTimerNotifyFunction (mTimerPeriod);
} }
gBS->RestoreTPL (OriginalTPL); gBS->RestoreTPL (OriginalTPL);
} else { } else {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;

View File

@@ -1,14 +1,14 @@
/** @file /** @file
Private data structures Private data structures
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR> Copyright (c) 2005 - 2018, 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
http://opensource.org/licenses/bsd-license.php http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _TIMER_H_ #ifndef _TIMER_H_

View File

@@ -3,13 +3,13 @@
// //
// 8254 timer driver that provides Timer Arch protocol. // 8254 timer driver that provides Timer Arch protocol.
// //
// Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2005 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,7 +1,7 @@
// /** @file // /** @file
// Timer Localized Strings and Content // Timer Localized Strings and Content
// //
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2013 - 2018, 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
@@ -13,8 +13,8 @@
// //
// **/ // **/
#string STR_PROPERTIES_MODULE_NAME #string STR_PROPERTIES_MODULE_NAME
#language en-US #language en-US
"8254 Timer DXE Driver" "8254 Timer DXE Driver"

View File

@@ -1,7 +1,7 @@
/** @file /** @file
This contains the installation function for the driver. This contains the installation function for the driver.
Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR> Copyright (c) 2005 - 2018, 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
@@ -213,7 +213,7 @@ Interrupt8259SetVectorBase (
IoWrite8 (LEGACY_8259_CONTROL_REGISTER_SLAVE, LEGACY_8259_EOI); IoWrite8 (LEGACY_8259_CONTROL_REGISTER_SLAVE, LEGACY_8259_EOI);
IoWrite8 (LEGACY_8259_CONTROL_REGISTER_MASTER, LEGACY_8259_EOI); IoWrite8 (LEGACY_8259_CONTROL_REGISTER_MASTER, LEGACY_8259_EOI);
gBS->RestoreTPL (OriginalTpl); gBS->RestoreTPL (OriginalTpl);
return EFI_SUCCESS; return EFI_SUCCESS;

View File

@@ -1,14 +1,14 @@
## @file ## @file
# 8259 Interrupt Controller driver that provides Legacy 8259 protocol. # 8259 Interrupt Controller driver that provides Legacy 8259 protocol.
# #
# Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2005 - 2018, 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
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
# #
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
## ##
@@ -29,14 +29,14 @@
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec IntelFrameworkPkg/IntelFrameworkPkg.dec
PcAtChipsetPkg/PcAtChipsetPkg.dec PcAtChipsetPkg/PcAtChipsetPkg.dec
[LibraryClasses] [LibraryClasses]
UefiBootServicesTableLib UefiBootServicesTableLib
DebugLib DebugLib
UefiDriverEntryPoint UefiDriverEntryPoint
IoLib IoLib
PcdLib PcdLib
[Protocols] [Protocols]
gEfiLegacy8259ProtocolGuid ## PRODUCES gEfiLegacy8259ProtocolGuid ## PRODUCES
gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMES gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMES
@@ -44,7 +44,7 @@
[Pcd] [Pcd]
gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeMask ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeMask ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel ## CONSUMES
[Depex] [Depex]
TRUE TRUE

View File

@@ -3,13 +3,13 @@
// //
// 8259 Interrupt Controller driver that provides Legacy 8259 protocol. // 8259 Interrupt Controller driver that provides Legacy 8259 protocol.
// //
// Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2005 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,7 +1,7 @@
// /** @file // /** @file
// Legacy8259 Localized Strings and Content // Legacy8259 Localized Strings and Content
// //
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2013 - 2018, 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
@@ -13,8 +13,8 @@
// //
// **/ // **/
#string STR_PROPERTIES_MODULE_NAME #string STR_PROPERTIES_MODULE_NAME
#language en-US #language en-US
"Legacy 8259 Interrupt Controller DXE Driver" "Legacy 8259 Interrupt Controller DXE Driver"

View File

@@ -2,7 +2,7 @@
This portion is to register the IDE Controller Driver name: This portion is to register the IDE Controller Driver name:
"IDE Controller Init Driver" "IDE Controller Init Driver"
Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2008 - 2018, 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
@@ -73,7 +73,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIdeControllerControllerN
@param DriverName A pointer to the Unicode string to return. This Unicode string @param DriverName A pointer to the Unicode string to return. This Unicode string
is the name of the driver specified by This in the language is the name of the driver specified by This in the language
specified by Language. specified by Language.
@retval EFI_SUCCESS The Unicode string for the Driver specified by This @retval EFI_SUCCESS The Unicode string for the Driver specified by This
and the language specified by Language was returned and the language specified by Language was returned
in DriverName. in DriverName.
@@ -101,7 +101,7 @@ IdeControllerComponentNameGetDriverName (
/** /**
Retrieves a Unicode string that is the user readable name of the controller Retrieves a Unicode string that is the user readable name of the controller
that is being managed by an EFI Driver. that is being managed by an EFI Driver.
@param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
@param ControllerHandle The handle of a controller that the driver specified by @param ControllerHandle The handle of a controller that the driver specified by
@@ -124,7 +124,7 @@ IdeControllerComponentNameGetDriverName (
ControllerHandle and ChildHandle in the language ControllerHandle and ChildHandle in the language
specified by Language from the point of view of the specified by Language from the point of view of the
driver specified by This. driver specified by This.
@retval EFI_SUCCESS The Unicode string for the user readable name in the @retval EFI_SUCCESS The Unicode string for the user readable name in the
language specified by Language for the driver language specified by Language for the driver
specified by This was returned in DriverName. specified by This was returned in DriverName.

View File

@@ -3,7 +3,7 @@
IDE Bus driver to support platform dependent timing information. This driver IDE Bus driver to support platform dependent timing information. This driver
is responsible for early initialization of IDE controller. is responsible for early initialization of IDE controller.
Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2008 - 2018, 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
@@ -314,34 +314,34 @@ IdeControllerStop (
// //
/** /**
Returns the information about the specified IDE channel. Returns the information about the specified IDE channel.
This function can be used to obtain information about a particular IDE channel. This function can be used to obtain information about a particular IDE channel.
The driver entity uses this information during the enumeration process. The driver entity uses this information during the enumeration process.
If Enabled is set to FALSE, the driver entity will not scan the channel. Note If Enabled is set to FALSE, the driver entity will not scan the channel. Note
that it will not prevent an operating system driver from scanning the channel. that it will not prevent an operating system driver from scanning the channel.
For most of today's controllers, MaxDevices will either be 1 or 2. For SATA For most of today's controllers, MaxDevices will either be 1 or 2. For SATA
controllers, this value will always be 1. SATA configurations can contain SATA controllers, this value will always be 1. SATA configurations can contain SATA
port multipliers. SATA port multipliers behave like SATA bridges and can support port multipliers. SATA port multipliers behave like SATA bridges and can support
up to 16 devices on the other side. If a SATA port out of the IDE controller up to 16 devices on the other side. If a SATA port out of the IDE controller
is connected to a port multiplier, MaxDevices will be set to the number of SATA is connected to a port multiplier, MaxDevices will be set to the number of SATA
devices that the port multiplier supports. Because today's port multipliers devices that the port multiplier supports. Because today's port multipliers
support up to fifteen SATA devices, this number can be as large as fifteen. The IDE support up to fifteen SATA devices, this number can be as large as fifteen. The IDE
bus driver is required to scan for the presence of port multipliers behind an SATA bus driver is required to scan for the presence of port multipliers behind an SATA
controller and enumerate up to MaxDevices number of devices behind the port controller and enumerate up to MaxDevices number of devices behind the port
multiplier. multiplier.
In this context, the devices behind a port multiplier constitute a channel. In this context, the devices behind a port multiplier constitute a channel.
@param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Channel Zero-based channel number. @param[in] Channel Zero-based channel number.
@param[out] Enabled TRUE if this channel is enabled. Disabled channels @param[out] Enabled TRUE if this channel is enabled. Disabled channels
are not scanned to see if any devices are present. are not scanned to see if any devices are present.
@param[out] MaxDevices The maximum number of IDE devices that the bus driver @param[out] MaxDevices The maximum number of IDE devices that the bus driver
can expect on this channel. For the ATA/ATAPI can expect on this channel. For the ATA/ATAPI
specification, version 6, this number will either be specification, version 6, this number will either be
one or two. For Serial ATA (SATA) configurations with a one or two. For Serial ATA (SATA) configurations with a
port multiplier, this number can be as large as fifteen. port multiplier, this number can be as large as fifteen.
@retval EFI_SUCCESS Information was returned without any errors. @retval EFI_SUCCESS Information was returned without any errors.
@@ -373,13 +373,13 @@ IdeInitGetChannelInfo (
/** /**
The notifications from the driver entity that it is about to enter a certain The notifications from the driver entity that it is about to enter a certain
phase of the IDE channel enumeration process. phase of the IDE channel enumeration process.
This function can be used to notify the IDE controller driver to perform This function can be used to notify the IDE controller driver to perform
specific actions, including any chipset-specific initialization, so that the specific actions, including any chipset-specific initialization, so that the
chipset is ready to enter the next phase. Seven notification points are defined chipset is ready to enter the next phase. Seven notification points are defined
at this time. at this time.
More synchronization points may be added as required in the future. More synchronization points may be added as required in the future.
@param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Phase The phase during enumeration. @param[in] Phase The phase during enumeration.
@@ -388,9 +388,9 @@ IdeInitGetChannelInfo (
@retval EFI_SUCCESS The notification was accepted without any errors. @retval EFI_SUCCESS The notification was accepted without any errors.
@retval EFI_UNSUPPORTED Phase is not supported. @retval EFI_UNSUPPORTED Phase is not supported.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
@retval EFI_NOT_READY This phase cannot be entered at this time; for @retval EFI_NOT_READY This phase cannot be entered at this time; for
example, an attempt was made to enter a Phase example, an attempt was made to enter a Phase
without having entered one or more previous without having entered one or more previous
Phase. Phase.
**/ **/
@@ -408,32 +408,32 @@ IdeInitNotifyPhase (
/** /**
Submits the device information to the IDE controller driver. Submits the device information to the IDE controller driver.
This function is used by the driver entity to pass detailed information about This function is used by the driver entity to pass detailed information about
a particular device to the IDE controller driver. The driver entity obtains a particular device to the IDE controller driver. The driver entity obtains
this information by issuing an ATA or ATAPI IDENTIFY_DEVICE command. IdentifyData this information by issuing an ATA or ATAPI IDENTIFY_DEVICE command. IdentifyData
is the pointer to the response data buffer. The IdentifyData buffer is owned is the pointer to the response data buffer. The IdentifyData buffer is owned
by the driver entity, and the IDE controller driver must make a local copy by the driver entity, and the IDE controller driver must make a local copy
of the entire buffer or parts of the buffer as needed. The original IdentifyData of the entire buffer or parts of the buffer as needed. The original IdentifyData
buffer pointer may not be valid when buffer pointer may not be valid when
- EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() or - EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() or
- EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() is called at a later point. - EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() is called at a later point.
The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to
compute the optimum mode for the device. These fields are not limited to the compute the optimum mode for the device. These fields are not limited to the
timing information. For example, an implementation of the IDE controller driver timing information. For example, an implementation of the IDE controller driver
may examine the vendor and type/mode field to match known bad drives. may examine the vendor and type/mode field to match known bad drives.
The driver entity may submit drive information in any order, as long as it The driver entity may submit drive information in any order, as long as it
submits information for all the devices belonging to the enumeration group submits information for all the devices belonging to the enumeration group
before EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() is called for any device before EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() is called for any device
in that enumeration group. If a device is absent, EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() in that enumeration group. If a device is absent, EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
should be called with IdentifyData set to NULL. The IDE controller driver may should be called with IdentifyData set to NULL. The IDE controller driver may
not have any other mechanism to know whether a device is present or not. Therefore, not have any other mechanism to know whether a device is present or not. Therefore,
setting IdentifyData to NULL does not constitute an error condition. setting IdentifyData to NULL does not constitute an error condition.
EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a
given (Channel, Device) pair. given (Channel, Device) pair.
@param[in] This A pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This A pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Channel Zero-based channel number. @param[in] Channel Zero-based channel number.
@param[in] Device Zero-based device number on the Channel. @param[in] Device Zero-based device number on the Channel.
@@ -459,31 +459,31 @@ IdeInitSubmitData (
/** /**
Disqualifies specific modes for an IDE device. Disqualifies specific modes for an IDE device.
This function allows the driver entity or other drivers (such as platform This function allows the driver entity or other drivers (such as platform
drivers) to reject certain timing modes and request the IDE controller driver drivers) to reject certain timing modes and request the IDE controller driver
to recalculate modes. This function allows the driver entity and the IDE to recalculate modes. This function allows the driver entity and the IDE
controller driver to negotiate the timings on a per-device basis. This function controller driver to negotiate the timings on a per-device basis. This function
is useful in the case of drives that lie about their capabilities. An example is useful in the case of drives that lie about their capabilities. An example
is when the IDE device fails to accept the timing modes that are calculated is when the IDE device fails to accept the timing modes that are calculated
by the IDE controller driver based on the response to the Identify Drive command. by the IDE controller driver based on the response to the Identify Drive command.
If the driver entity does not want to limit the ATA timing modes and leave that If the driver entity does not want to limit the ATA timing modes and leave that
decision to the IDE controller driver, it can either not call this function for decision to the IDE controller driver, it can either not call this function for
the given device or call this function and set the Valid flag to FALSE for all the given device or call this function and set the Valid flag to FALSE for all
modes that are listed in EFI_ATA_COLLECTIVE_MODE. modes that are listed in EFI_ATA_COLLECTIVE_MODE.
The driver entity may disqualify modes for a device in any order and any number The driver entity may disqualify modes for a device in any order and any number
of times. of times.
This function can be called multiple times to invalidate multiple modes of the This function can be called multiple times to invalidate multiple modes of the
same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI
specification for more information on PIO modes. specification for more information on PIO modes.
For Serial ATA (SATA) controllers, this member function can be used to disqualify For Serial ATA (SATA) controllers, this member function can be used to disqualify
a higher transfer rate mode on a given channel. For example, a platform driver a higher transfer rate mode on a given channel. For example, a platform driver
may inform the IDE controller driver to not use second-generation (Gen2) speeds may inform the IDE controller driver to not use second-generation (Gen2) speeds
for a certain SATA drive. for a certain SATA drive.
@param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Channel The zero-based channel number. @param[in] Channel The zero-based channel number.
@param[in] Device The zero-based device number on the Channel. @param[in] Device The zero-based device number on the Channel.
@@ -494,7 +494,7 @@ IdeInitSubmitData (
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
@retval EFI_INVALID_PARAMETER Device is invalid. @retval EFI_INVALID_PARAMETER Device is invalid.
@retval EFI_INVALID_PARAMETER IdentifyData is NULL. @retval EFI_INVALID_PARAMETER IdentifyData is NULL.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@@ -512,39 +512,39 @@ IdeInitDisqualifyMode (
Returns the information about the optimum modes for the specified IDE device. Returns the information about the optimum modes for the specified IDE device.
This function is used by the driver entity to obtain the optimum ATA modes for This function is used by the driver entity to obtain the optimum ATA modes for
a specific device. The IDE controller driver takes into account the following a specific device. The IDE controller driver takes into account the following
while calculating the mode: while calculating the mode:
- The IdentifyData inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - The IdentifyData inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
- The BadModes inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() - The BadModes inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode()
The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
for all the devices that belong to an enumeration group before calling for all the devices that belong to an enumeration group before calling
EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group. EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group.
The IDE controller driver will use controller- and possibly platform-specific The IDE controller driver will use controller- and possibly platform-specific
algorithms to arrive at SupportedModes. The IDE controller may base its algorithms to arrive at SupportedModes. The IDE controller may base its
decision on user preferences and other considerations as well. This function decision on user preferences and other considerations as well. This function
may be called multiple times because the driver entity may renegotiate the mode may be called multiple times because the driver entity may renegotiate the mode
with the IDE controller driver using EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode(). with the IDE controller driver using EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode().
The driver entity may collect timing information for various devices in any The driver entity may collect timing information for various devices in any
order. The driver entity is responsible for making sure that all the dependencies order. The driver entity is responsible for making sure that all the dependencies
are satisfied. For example, the SupportedModes information for device A that are satisfied. For example, the SupportedModes information for device A that
was previously returned may become stale after a call to was previously returned may become stale after a call to
EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() for device B. EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() for device B.
The buffer SupportedModes is allocated by the callee because the caller does The buffer SupportedModes is allocated by the callee because the caller does
not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE
is defined in a way that allows for future extensibility and can be of variable is defined in a way that allows for future extensibility and can be of variable
length. This memory pool should be deallocated by the caller when it is no length. This memory pool should be deallocated by the caller when it is no
longer necessary. longer necessary.
The IDE controller driver for a Serial ATA (SATA) controller can use this The IDE controller driver for a Serial ATA (SATA) controller can use this
member function to force a lower speed (first-generation [Gen1] speeds on a member function to force a lower speed (first-generation [Gen1] speeds on a
second-generation [Gen2]-capable hardware). The IDE controller driver can second-generation [Gen2]-capable hardware). The IDE controller driver can
also allow the driver entity to stay with the speed that has been negotiated also allow the driver entity to stay with the speed that has been negotiated
by the physical layer. by the physical layer.
@param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Channel A zero-based channel number. @param[in] Channel A zero-based channel number.
@param[in] Device A zero-based device number on the Channel. @param[in] Device A zero-based device number on the Channel.
@@ -552,13 +552,13 @@ IdeInitDisqualifyMode (
@retval EFI_SUCCESS SupportedModes was returned. @retval EFI_SUCCESS SupportedModes was returned.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
@retval EFI_INVALID_PARAMETER Device is invalid. @retval EFI_INVALID_PARAMETER Device is invalid.
@retval EFI_INVALID_PARAMETER SupportedModes is NULL. @retval EFI_INVALID_PARAMETER SupportedModes is NULL.
@retval EFI_NOT_READY Modes cannot be calculated due to a lack of @retval EFI_NOT_READY Modes cannot be calculated due to a lack of
data. This error may happen if data. This error may happen if
EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData() and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData()
were not called for at least one drive in the were not called for at least one drive in the
same enumeration group. same enumeration group.
**/ **/
@@ -587,9 +587,9 @@ IdeInitCalculateMode (
Commands the IDE controller driver to program the IDE controller hardware Commands the IDE controller driver to program the IDE controller hardware
so that the specified device can operate at the specified mode. so that the specified device can operate at the specified mode.
This function is used by the driver entity to instruct the IDE controller This function is used by the driver entity to instruct the IDE controller
driver to program the IDE controller hardware to the specified modes. This driver to program the IDE controller hardware to the specified modes. This
function can be called only once for a particular device. For a Serial ATA function can be called only once for a particular device. For a Serial ATA
(SATA) Advanced Host Controller Interface (AHCI) controller, no controller- (SATA) Advanced Host Controller Interface (AHCI) controller, no controller-
specific programming may be required. specific programming may be required.

View File

@@ -1,7 +1,7 @@
/** @file /** @file
Header file for IDE controller driver. Header file for IDE controller driver.
Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2008 - 2018, 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
@@ -118,34 +118,34 @@ IdeControllerStop (
// //
/** /**
Returns the information about the specified IDE channel. Returns the information about the specified IDE channel.
This function can be used to obtain information about a particular IDE channel. This function can be used to obtain information about a particular IDE channel.
The driver entity uses this information during the enumeration process. The driver entity uses this information during the enumeration process.
If Enabled is set to FALSE, the driver entity will not scan the channel. Note If Enabled is set to FALSE, the driver entity will not scan the channel. Note
that it will not prevent an operating system driver from scanning the channel. that it will not prevent an operating system driver from scanning the channel.
For most of today's controllers, MaxDevices will either be 1 or 2. For SATA For most of today's controllers, MaxDevices will either be 1 or 2. For SATA
controllers, this value will always be 1. SATA configurations can contain SATA controllers, this value will always be 1. SATA configurations can contain SATA
port multipliers. SATA port multipliers behave like SATA bridges and can support port multipliers. SATA port multipliers behave like SATA bridges and can support
up to 16 devices on the other side. If a SATA port out of the IDE controller up to 16 devices on the other side. If a SATA port out of the IDE controller
is connected to a port multiplier, MaxDevices will be set to the number of SATA is connected to a port multiplier, MaxDevices will be set to the number of SATA
devices that the port multiplier supports. Because today's port multipliers devices that the port multiplier supports. Because today's port multipliers
support up to fifteen SATA devices, this number can be as large as fifteen. The IDE support up to fifteen SATA devices, this number can be as large as fifteen. The IDE
bus driver is required to scan for the presence of port multipliers behind an SATA bus driver is required to scan for the presence of port multipliers behind an SATA
controller and enumerate up to MaxDevices number of devices behind the port controller and enumerate up to MaxDevices number of devices behind the port
multiplier. multiplier.
In this context, the devices behind a port multiplier constitute a channel. In this context, the devices behind a port multiplier constitute a channel.
@param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Channel Zero-based channel number. @param[in] Channel Zero-based channel number.
@param[out] Enabled TRUE if this channel is enabled. Disabled channels @param[out] Enabled TRUE if this channel is enabled. Disabled channels
are not scanned to see if any devices are present. are not scanned to see if any devices are present.
@param[out] MaxDevices The maximum number of IDE devices that the bus driver @param[out] MaxDevices The maximum number of IDE devices that the bus driver
can expect on this channel. For the ATA/ATAPI can expect on this channel. For the ATA/ATAPI
specification, version 6, this number will either be specification, version 6, this number will either be
one or two. For Serial ATA (SATA) configurations with a one or two. For Serial ATA (SATA) configurations with a
port multiplier, this number can be as large as fifteen. port multiplier, this number can be as large as fifteen.
@retval EFI_SUCCESS Information was returned without any errors. @retval EFI_SUCCESS Information was returned without any errors.
@@ -165,13 +165,13 @@ IdeInitGetChannelInfo (
/** /**
The notifications from the driver entity that it is about to enter a certain The notifications from the driver entity that it is about to enter a certain
phase of the IDE channel enumeration process. phase of the IDE channel enumeration process.
This function can be used to notify the IDE controller driver to perform This function can be used to notify the IDE controller driver to perform
specific actions, including any chipset-specific initialization, so that the specific actions, including any chipset-specific initialization, so that the
chipset is ready to enter the next phase. Seven notification points are defined chipset is ready to enter the next phase. Seven notification points are defined
at this time. at this time.
More synchronization points may be added as required in the future. More synchronization points may be added as required in the future.
@param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Phase The phase during enumeration. @param[in] Phase The phase during enumeration.
@@ -180,9 +180,9 @@ IdeInitGetChannelInfo (
@retval EFI_SUCCESS The notification was accepted without any errors. @retval EFI_SUCCESS The notification was accepted without any errors.
@retval EFI_UNSUPPORTED Phase is not supported. @retval EFI_UNSUPPORTED Phase is not supported.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
@retval EFI_NOT_READY This phase cannot be entered at this time; for @retval EFI_NOT_READY This phase cannot be entered at this time; for
example, an attempt was made to enter a Phase example, an attempt was made to enter a Phase
without having entered one or more previous without having entered one or more previous
Phase. Phase.
**/ **/
@@ -198,32 +198,32 @@ IdeInitNotifyPhase (
/** /**
Submits the device information to the IDE controller driver. Submits the device information to the IDE controller driver.
This function is used by the driver entity to pass detailed information about This function is used by the driver entity to pass detailed information about
a particular device to the IDE controller driver. The driver entity obtains a particular device to the IDE controller driver. The driver entity obtains
this information by issuing an ATA or ATAPI IDENTIFY_DEVICE command. IdentifyData this information by issuing an ATA or ATAPI IDENTIFY_DEVICE command. IdentifyData
is the pointer to the response data buffer. The IdentifyData buffer is owned is the pointer to the response data buffer. The IdentifyData buffer is owned
by the driver entity, and the IDE controller driver must make a local copy by the driver entity, and the IDE controller driver must make a local copy
of the entire buffer or parts of the buffer as needed. The original IdentifyData of the entire buffer or parts of the buffer as needed. The original IdentifyData
buffer pointer may not be valid when buffer pointer may not be valid when
- EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() or - EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() or
- EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() is called at a later point. - EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() is called at a later point.
The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to
compute the optimum mode for the device. These fields are not limited to the compute the optimum mode for the device. These fields are not limited to the
timing information. For example, an implementation of the IDE controller driver timing information. For example, an implementation of the IDE controller driver
may examine the vendor and type/mode field to match known bad drives. may examine the vendor and type/mode field to match known bad drives.
The driver entity may submit drive information in any order, as long as it The driver entity may submit drive information in any order, as long as it
submits information for all the devices belonging to the enumeration group submits information for all the devices belonging to the enumeration group
before EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() is called for any device before EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() is called for any device
in that enumeration group. If a device is absent, EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() in that enumeration group. If a device is absent, EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
should be called with IdentifyData set to NULL. The IDE controller driver may should be called with IdentifyData set to NULL. The IDE controller driver may
not have any other mechanism to know whether a device is present or not. Therefore, not have any other mechanism to know whether a device is present or not. Therefore,
setting IdentifyData to NULL does not constitute an error condition. setting IdentifyData to NULL does not constitute an error condition.
EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a
given (Channel, Device) pair. given (Channel, Device) pair.
@param[in] This A pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This A pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Channel Zero-based channel number. @param[in] Channel Zero-based channel number.
@param[in] Device Zero-based device number on the Channel. @param[in] Device Zero-based device number on the Channel.
@@ -247,31 +247,31 @@ IdeInitSubmitData (
/** /**
Disqualifies specific modes for an IDE device. Disqualifies specific modes for an IDE device.
This function allows the driver entity or other drivers (such as platform This function allows the driver entity or other drivers (such as platform
drivers) to reject certain timing modes and request the IDE controller driver drivers) to reject certain timing modes and request the IDE controller driver
to recalculate modes. This function allows the driver entity and the IDE to recalculate modes. This function allows the driver entity and the IDE
controller driver to negotiate the timings on a per-device basis. This function controller driver to negotiate the timings on a per-device basis. This function
is useful in the case of drives that lie about their capabilities. An example is useful in the case of drives that lie about their capabilities. An example
is when the IDE device fails to accept the timing modes that are calculated is when the IDE device fails to accept the timing modes that are calculated
by the IDE controller driver based on the response to the Identify Drive command. by the IDE controller driver based on the response to the Identify Drive command.
If the driver entity does not want to limit the ATA timing modes and leave that If the driver entity does not want to limit the ATA timing modes and leave that
decision to the IDE controller driver, it can either not call this function for decision to the IDE controller driver, it can either not call this function for
the given device or call this function and set the Valid flag to FALSE for all the given device or call this function and set the Valid flag to FALSE for all
modes that are listed in EFI_ATA_COLLECTIVE_MODE. modes that are listed in EFI_ATA_COLLECTIVE_MODE.
The driver entity may disqualify modes for a device in any order and any number The driver entity may disqualify modes for a device in any order and any number
of times. of times.
This function can be called multiple times to invalidate multiple modes of the This function can be called multiple times to invalidate multiple modes of the
same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI
specification for more information on PIO modes. specification for more information on PIO modes.
For Serial ATA (SATA) controllers, this member function can be used to disqualify For Serial ATA (SATA) controllers, this member function can be used to disqualify
a higher transfer rate mode on a given channel. For example, a platform driver a higher transfer rate mode on a given channel. For example, a platform driver
may inform the IDE controller driver to not use second-generation (Gen2) speeds may inform the IDE controller driver to not use second-generation (Gen2) speeds
for a certain SATA drive. for a certain SATA drive.
@param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Channel The zero-based channel number. @param[in] Channel The zero-based channel number.
@param[in] Device The zero-based device number on the Channel. @param[in] Device The zero-based device number on the Channel.
@@ -282,7 +282,7 @@ IdeInitSubmitData (
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
@retval EFI_INVALID_PARAMETER Device is invalid. @retval EFI_INVALID_PARAMETER Device is invalid.
@retval EFI_INVALID_PARAMETER IdentifyData is NULL. @retval EFI_INVALID_PARAMETER IdentifyData is NULL.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@@ -298,39 +298,39 @@ IdeInitDisqualifyMode (
Returns the information about the optimum modes for the specified IDE device. Returns the information about the optimum modes for the specified IDE device.
This function is used by the driver entity to obtain the optimum ATA modes for This function is used by the driver entity to obtain the optimum ATA modes for
a specific device. The IDE controller driver takes into account the following a specific device. The IDE controller driver takes into account the following
while calculating the mode: while calculating the mode:
- The IdentifyData inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - The IdentifyData inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
- The BadModes inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() - The BadModes inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode()
The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
for all the devices that belong to an enumeration group before calling for all the devices that belong to an enumeration group before calling
EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group. EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group.
The IDE controller driver will use controller- and possibly platform-specific The IDE controller driver will use controller- and possibly platform-specific
algorithms to arrive at SupportedModes. The IDE controller may base its algorithms to arrive at SupportedModes. The IDE controller may base its
decision on user preferences and other considerations as well. This function decision on user preferences and other considerations as well. This function
may be called multiple times because the driver entity may renegotiate the mode may be called multiple times because the driver entity may renegotiate the mode
with the IDE controller driver using EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode(). with the IDE controller driver using EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode().
The driver entity may collect timing information for various devices in any The driver entity may collect timing information for various devices in any
order. The driver entity is responsible for making sure that all the dependencies order. The driver entity is responsible for making sure that all the dependencies
are satisfied. For example, the SupportedModes information for device A that are satisfied. For example, the SupportedModes information for device A that
was previously returned may become stale after a call to was previously returned may become stale after a call to
EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() for device B. EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() for device B.
The buffer SupportedModes is allocated by the callee because the caller does The buffer SupportedModes is allocated by the callee because the caller does
not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE
is defined in a way that allows for future extensibility and can be of variable is defined in a way that allows for future extensibility and can be of variable
length. This memory pool should be deallocated by the caller when it is no length. This memory pool should be deallocated by the caller when it is no
longer necessary. longer necessary.
The IDE controller driver for a Serial ATA (SATA) controller can use this The IDE controller driver for a Serial ATA (SATA) controller can use this
member function to force a lower speed (first-generation [Gen1] speeds on a member function to force a lower speed (first-generation [Gen1] speeds on a
second-generation [Gen2]-capable hardware). The IDE controller driver can second-generation [Gen2]-capable hardware). The IDE controller driver can
also allow the driver entity to stay with the speed that has been negotiated also allow the driver entity to stay with the speed that has been negotiated
by the physical layer. by the physical layer.
@param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
@param[in] Channel A zero-based channel number. @param[in] Channel A zero-based channel number.
@param[in] Device A zero-based device number on the Channel. @param[in] Device A zero-based device number on the Channel.
@@ -338,13 +338,13 @@ IdeInitDisqualifyMode (
@retval EFI_SUCCESS SupportedModes was returned. @retval EFI_SUCCESS SupportedModes was returned.
@retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).
@retval EFI_INVALID_PARAMETER Device is invalid. @retval EFI_INVALID_PARAMETER Device is invalid.
@retval EFI_INVALID_PARAMETER SupportedModes is NULL. @retval EFI_INVALID_PARAMETER SupportedModes is NULL.
@retval EFI_NOT_READY Modes cannot be calculated due to a lack of @retval EFI_NOT_READY Modes cannot be calculated due to a lack of
data. This error may happen if data. This error may happen if
EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData() and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData()
were not called for at least one drive in the were not called for at least one drive in the
same enumeration group. same enumeration group.
**/ **/
@@ -362,9 +362,9 @@ IdeInitCalculateMode (
Commands the IDE controller driver to program the IDE controller hardware Commands the IDE controller driver to program the IDE controller hardware
so that the specified device can operate at the specified mode. so that the specified device can operate at the specified mode.
This function is used by the driver entity to instruct the IDE controller This function is used by the driver entity to instruct the IDE controller
driver to program the IDE controller hardware to the specified modes. This driver to program the IDE controller hardware to the specified modes. This
function can be called only once for a particular device. For a Serial ATA function can be called only once for a particular device. For a Serial ATA
(SATA) Advanced Host Controller Interface (AHCI) controller, no controller- (SATA) Advanced Host Controller Interface (AHCI) controller, no controller-
specific programming may be required. specific programming may be required.

View File

@@ -3,13 +3,13 @@
// //
// Component description file for the IDE Controller Init module. // Component description file for the IDE Controller Init module.
// //
// Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2008 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,7 +1,7 @@
// /** @file // /** @file
// IdeController Localized Strings and Content // IdeController Localized Strings and Content
// //
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2013 - 2018, 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
@@ -13,8 +13,8 @@
// //
// **/ // **/
#string STR_PROPERTIES_MODULE_NAME #string STR_PROPERTIES_MODULE_NAME
#language en-US #language en-US
"IDE Controller DXE Driver" "IDE Controller DXE Driver"

View File

@@ -1,7 +1,7 @@
/** @file /** @file
Timer Architectural Protocol module using High Precesion Event Timer (HPET) Timer Architectural Protocol module using High Precesion Event Timer (HPET)
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2018, 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
@@ -52,11 +52,11 @@
is returned. is returned.
@param This The EFI_TIMER_ARCH_PROTOCOL instance. @param This The EFI_TIMER_ARCH_PROTOCOL instance.
@param NotifyFunction The function to call when a timer interrupt fires. @param NotifyFunction The function to call when a timer interrupt fires.
This function executes at TPL_HIGH_LEVEL. The DXE This function executes at TPL_HIGH_LEVEL. The DXE
Core will register a handler for the timer interrupt, Core will register a handler for the timer interrupt,
so it can know how much time has passed. This so it can know how much time has passed. This
information is used to signal timer based events. information is used to signal timer based events.
NULL will unregister the handler. NULL will unregister the handler.
@retval EFI_SUCCESS The timer handler was registered. @retval EFI_SUCCESS The timer handler was registered.
@@ -90,11 +90,11 @@ TimerDriverRegisterHandler (
@param This The EFI_TIMER_ARCH_PROTOCOL instance. @param This The EFI_TIMER_ARCH_PROTOCOL instance.
@param TimerPeriod The rate to program the timer interrupt in 100 nS units. @param TimerPeriod The rate to program the timer interrupt in 100 nS units.
If the timer hardware is not programmable, then If the timer hardware is not programmable, then
EFI_UNSUPPORTED is returned. If the timer is programmable, EFI_UNSUPPORTED is returned. If the timer is programmable,
then the timer period will be rounded up to the nearest then the timer period will be rounded up to the nearest
timer period that is supported by the timer hardware. timer period that is supported by the timer hardware.
If TimerPeriod is set to 0, then the timer interrupts If TimerPeriod is set to 0, then the timer interrupts
will be disabled. will be disabled.
@retval EFI_SUCCESS The timer period was changed. @retval EFI_SUCCESS The timer period was changed.
@@ -151,7 +151,7 @@ EFIAPI
TimerDriverGenerateSoftInterrupt ( TimerDriverGenerateSoftInterrupt (
IN EFI_TIMER_ARCH_PROTOCOL *This IN EFI_TIMER_ARCH_PROTOCOL *This
); );
/// ///
/// The handle onto which the Timer Architectural Protocol will be installed. /// The handle onto which the Timer Architectural Protocol will be installed.
/// ///
@@ -222,7 +222,7 @@ HPET_GENERAL_CAPABILITIES_ID_REGISTER mHpetGeneralCapabilities;
HPET_GENERAL_CONFIGURATION_REGISTER mHpetGeneralConfiguration; HPET_GENERAL_CONFIGURATION_REGISTER mHpetGeneralConfiguration;
/// ///
/// Cached state of the Configuration register for the HPET Timer managed by /// Cached state of the Configuration register for the HPET Timer managed by
/// this driver. Caching the state reduces the number of times the configuration /// this driver. Caching the state reduces the number of times the configuration
/// register is read. /// register is read.
/// ///
@@ -277,7 +277,7 @@ HpetEnable (
IN BOOLEAN Enable IN BOOLEAN Enable
) )
{ {
mHpetGeneralConfiguration.Bits.MainCounterEnable = Enable ? 1 : 0; mHpetGeneralConfiguration.Bits.MainCounterEnable = Enable ? 1 : 0;
HpetWrite (HPET_GENERAL_CONFIGURATION_OFFSET, mHpetGeneralConfiguration.Uint64); HpetWrite (HPET_GENERAL_CONFIGURATION_OFFSET, mHpetGeneralConfiguration.Uint64);
} }
@@ -286,7 +286,7 @@ HpetEnable (
and computes the amount of time that has passed since the last HPET timer interrupt. and computes the amount of time that has passed since the last HPET timer interrupt.
If a notification function is registered, then the amount of time since the last If a notification function is registered, then the amount of time since the last
HPET interrupt is passed to that notification function in 100 ns units. The HPET HPET interrupt is passed to that notification function in 100 ns units. The HPET
time is updated to generate another interrupt in the required time period. time is updated to generate another interrupt in the required time period.
@param InterruptType The type of interrupt that occurred. @param InterruptType The type of interrupt that occurred.
@param SystemContext A pointer to the system context when the interrupt occurred. @param SystemContext A pointer to the system context when the interrupt occurred.
@@ -322,7 +322,7 @@ TimerInterruptHandler (
// Disable HPET timer when adjusting the COMPARATOR value to prevent a missed interrupt // Disable HPET timer when adjusting the COMPARATOR value to prevent a missed interrupt
// //
HpetEnable (FALSE); HpetEnable (FALSE);
// //
// Capture main counter value // Capture main counter value
// //
@@ -363,13 +363,13 @@ TimerInterruptHandler (
// Enable the HPET counter once the new COMPARATOR value has been set. // Enable the HPET counter once the new COMPARATOR value has been set.
// //
HpetEnable (TRUE); HpetEnable (TRUE);
// //
// Check to see if there is a registered notification function // Check to see if there is a registered notification function
// //
if (mTimerNotifyFunction != NULL) { if (mTimerNotifyFunction != NULL) {
// //
// Compute time since last notification in 100 ns units (10 ^ -7) // Compute time since last notification in 100 ns units (10 ^ -7)
// //
if (MainCounter > mPreviousMainCounter) { if (MainCounter > mPreviousMainCounter) {
// //
@@ -386,17 +386,17 @@ TimerInterruptHandler (
MultU64x32 ( MultU64x32 (
Delta & mCounterMask, Delta & mCounterMask,
mHpetGeneralCapabilities.Bits.CounterClockPeriod mHpetGeneralCapabilities.Bits.CounterClockPeriod
), ),
100000000 100000000
); );
// //
// Call registered notification function passing in the time since the last // Call registered notification function passing in the time since the last
// interrupt in 100 ns units. // interrupt in 100 ns units.
// //
mTimerNotifyFunction (TimerPeriod); mTimerNotifyFunction (TimerPeriod);
} }
// //
// Save main counter value // Save main counter value
// //
@@ -417,11 +417,11 @@ TimerInterruptHandler (
is returned. is returned.
@param This The EFI_TIMER_ARCH_PROTOCOL instance. @param This The EFI_TIMER_ARCH_PROTOCOL instance.
@param NotifyFunction The function to call when a timer interrupt fires. @param NotifyFunction The function to call when a timer interrupt fires.
This function executes at TPL_HIGH_LEVEL. The DXE This function executes at TPL_HIGH_LEVEL. The DXE
Core will register a handler for the timer interrupt, Core will register a handler for the timer interrupt,
so it can know how much time has passed. This so it can know how much time has passed. This
information is used to signal timer based events. information is used to signal timer based events.
NULL will unregister the handler. NULL will unregister the handler.
@retval EFI_SUCCESS The timer handler was registered. @retval EFI_SUCCESS The timer handler was registered.
@@ -473,11 +473,11 @@ TimerDriverRegisterHandler (
@param This The EFI_TIMER_ARCH_PROTOCOL instance. @param This The EFI_TIMER_ARCH_PROTOCOL instance.
@param TimerPeriod The rate to program the timer interrupt in 100 nS units. @param TimerPeriod The rate to program the timer interrupt in 100 nS units.
If the timer hardware is not programmable, then If the timer hardware is not programmable, then
EFI_UNSUPPORTED is returned. If the timer is programmable, EFI_UNSUPPORTED is returned. If the timer is programmable,
then the timer period will be rounded up to the nearest then the timer period will be rounded up to the nearest
timer period that is supported by the timer hardware. timer period that is supported by the timer hardware.
If TimerPeriod is set to 0, then the timer interrupts If TimerPeriod is set to 0, then the timer interrupts
will be disabled. will be disabled.
@retval EFI_SUCCESS The timer period was changed. @retval EFI_SUCCESS The timer period was changed.
@@ -507,7 +507,7 @@ TimerDriverSetTimerPeriod (
// Disable HPET timer when adjusting the timer period // Disable HPET timer when adjusting the timer period
// //
HpetEnable (FALSE); HpetEnable (FALSE);
if (TimerPeriod == 0) { if (TimerPeriod == 0) {
if (mTimerPeriod != 0) { if (mTimerPeriod != 0) {
// //
@@ -516,7 +516,7 @@ TimerDriverSetTimerPeriod (
MainCounter = HpetRead (HPET_MAIN_COUNTER_OFFSET); MainCounter = HpetRead (HPET_MAIN_COUNTER_OFFSET);
if (MainCounter < mPreviousMainCounter) { if (MainCounter < mPreviousMainCounter) {
Delta = (mCounterMask - mPreviousMainCounter) + MainCounter; Delta = (mCounterMask - mPreviousMainCounter) + MainCounter;
} else { } else {
Delta = MainCounter - mPreviousMainCounter; Delta = MainCounter - mPreviousMainCounter;
} }
if ((Delta & mCounterMask) >= mTimerCount) { if ((Delta & mCounterMask) >= mTimerCount) {
@@ -535,7 +535,7 @@ TimerDriverSetTimerPeriod (
// //
// If TimerPeriod is 0, then mask HPET Timer interrupts // If TimerPeriod is 0, then mask HPET Timer interrupts
// //
if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0 && FeaturePcdGet (PcdHpetMsiEnable)) { if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0 && FeaturePcdGet (PcdHpetMsiEnable)) {
// //
// Disable HPET MSI interrupt generation // Disable HPET MSI interrupt generation
@@ -547,18 +547,18 @@ TimerDriverSetTimerPeriod (
// //
IoApicEnableInterrupt (mTimerIrq, FALSE); IoApicEnableInterrupt (mTimerIrq, FALSE);
} }
// //
// Disable HPET timer interrupt // Disable HPET timer interrupt
// //
mTimerConfiguration.Bits.InterruptEnable = 0; mTimerConfiguration.Bits.InterruptEnable = 0;
HpetWrite (HPET_TIMER_CONFIGURATION_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, mTimerConfiguration.Uint64); HpetWrite (HPET_TIMER_CONFIGURATION_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, mTimerConfiguration.Uint64);
} else { } else {
// //
// Convert TimerPeriod to femtoseconds and divide by the number if femtoseconds // Convert TimerPeriod to femtoseconds and divide by the number if femtoseconds
// per tick of the HPET counter to determine the number of HPET counter ticks // per tick of the HPET counter to determine the number of HPET counter ticks
// in TimerPeriod 100 ns units. // in TimerPeriod 100 ns units.
// //
mTimerCount = DivU64x32 ( mTimerCount = DivU64x32 (
MultU64x32 (TimerPeriod, 100000000), MultU64x32 (TimerPeriod, 100000000),
mHpetGeneralCapabilities.Bits.CounterClockPeriod mHpetGeneralCapabilities.Bits.CounterClockPeriod
@@ -570,15 +570,15 @@ TimerDriverSetTimerPeriod (
MainCounter = HpetRead (HPET_MAIN_COUNTER_OFFSET); MainCounter = HpetRead (HPET_MAIN_COUNTER_OFFSET);
if (MainCounter > mPreviousMainCounter) { if (MainCounter > mPreviousMainCounter) {
Delta = MainCounter - mPreviousMainCounter; Delta = MainCounter - mPreviousMainCounter;
} else { } else {
Delta = (mCounterMask - mPreviousMainCounter) + MainCounter; Delta = (mCounterMask - mPreviousMainCounter) + MainCounter;
} }
if ((Delta & mCounterMask) >= mTimerCount) { if ((Delta & mCounterMask) >= mTimerCount) {
HpetWrite (HPET_TIMER_COMPARATOR_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, (MainCounter + 1) & mCounterMask); HpetWrite (HPET_TIMER_COMPARATOR_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, (MainCounter + 1) & mCounterMask);
} else { } else {
HpetWrite (HPET_TIMER_COMPARATOR_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, (mPreviousMainCounter + mTimerCount) & mCounterMask); HpetWrite (HPET_TIMER_COMPARATOR_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, (mPreviousMainCounter + mTimerCount) & mCounterMask);
} }
// //
// Enable HPET Timer interrupt generation // Enable HPET Timer interrupt generation
// //
@@ -609,7 +609,7 @@ TimerDriverSetTimerPeriod (
mTimerConfiguration.Bits.InterruptEnable = 1; mTimerConfiguration.Bits.InterruptEnable = 1;
HpetWrite (HPET_TIMER_CONFIGURATION_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, mTimerConfiguration.Uint64); HpetWrite (HPET_TIMER_CONFIGURATION_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, mTimerConfiguration.Uint64);
} }
// //
// Save the new timer period // Save the new timer period
// //
@@ -690,9 +690,9 @@ TimerDriverGenerateSoftInterrupt (
// //
// Disable interrupts // Disable interrupts
// //
Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL); Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
// //
// Capture main counter value // Capture main counter value
// //
@@ -703,7 +703,7 @@ TimerDriverGenerateSoftInterrupt (
// //
if (mTimerNotifyFunction != NULL) { if (mTimerNotifyFunction != NULL) {
// //
// Compute time since last interrupt in 100 ns units (10 ^ -7) // Compute time since last interrupt in 100 ns units (10 ^ -7)
// //
if (MainCounter > mPreviousMainCounter) { if (MainCounter > mPreviousMainCounter) {
// //
@@ -721,14 +721,14 @@ TimerDriverGenerateSoftInterrupt (
MultU64x32 ( MultU64x32 (
Delta & mCounterMask, Delta & mCounterMask,
mHpetGeneralCapabilities.Bits.CounterClockPeriod mHpetGeneralCapabilities.Bits.CounterClockPeriod
), ),
100000000 100000000
); );
// //
// Call registered notification function passing in the time since the last // Call registered notification function passing in the time since the last
// interrupt in 100 ns units. // interrupt in 100 ns units.
// //
mTimerNotifyFunction (TimerPeriod); mTimerNotifyFunction (TimerPeriod);
} }
@@ -736,12 +736,12 @@ TimerDriverGenerateSoftInterrupt (
// Save main counter value // Save main counter value
// //
mPreviousMainCounter = MainCounter; mPreviousMainCounter = MainCounter;
// //
// Restore interrupts // Restore interrupts
// //
gBS->RestoreTPL (Tpl); gBS->RestoreTPL (Tpl);
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@@ -783,14 +783,14 @@ TimerDriverInitialize (
// //
// Retrieve HPET Capabilities and Configuration Information // Retrieve HPET Capabilities and Configuration Information
// //
mHpetGeneralCapabilities.Uint64 = HpetRead (HPET_GENERAL_CAPABILITIES_ID_OFFSET); mHpetGeneralCapabilities.Uint64 = HpetRead (HPET_GENERAL_CAPABILITIES_ID_OFFSET);
mHpetGeneralConfiguration.Uint64 = HpetRead (HPET_GENERAL_CONFIGURATION_OFFSET); mHpetGeneralConfiguration.Uint64 = HpetRead (HPET_GENERAL_CONFIGURATION_OFFSET);
// //
// If Revision is not valid, then ASSERT() and unload the driver because the HPET // If Revision is not valid, then ASSERT() and unload the driver because the HPET
// device is not present. // device is not present.
// //
ASSERT (mHpetGeneralCapabilities.Uint64 != 0); ASSERT (mHpetGeneralCapabilities.Uint64 != 0);
ASSERT (mHpetGeneralCapabilities.Uint64 != 0xFFFFFFFFFFFFFFFFULL); ASSERT (mHpetGeneralCapabilities.Uint64 != 0xFFFFFFFFFFFFFFFFULL);
if (mHpetGeneralCapabilities.Uint64 == 0 || mHpetGeneralCapabilities.Uint64 == 0xFFFFFFFFFFFFFFFFULL) { if (mHpetGeneralCapabilities.Uint64 == 0 || mHpetGeneralCapabilities.Uint64 == 0xFFFFFFFFFFFFFFFFULL) {
@@ -805,7 +805,7 @@ TimerDriverInitialize (
// //
// Dump HPET Configuration Information // Dump HPET Configuration Information
// //
DEBUG_CODE ( DEBUG_CODE (
DEBUG ((DEBUG_INFO, "HPET Base Address = 0x%08x\n", PcdGet32 (PcdHpetBaseAddress))); DEBUG ((DEBUG_INFO, "HPET Base Address = 0x%08x\n", PcdGet32 (PcdHpetBaseAddress)));
DEBUG ((DEBUG_INFO, " HPET_GENERAL_CAPABILITIES_ID = 0x%016lx\n", mHpetGeneralCapabilities)); DEBUG ((DEBUG_INFO, " HPET_GENERAL_CAPABILITIES_ID = 0x%016lx\n", mHpetGeneralCapabilities));
@@ -819,16 +819,16 @@ TimerDriverInitialize (
DEBUG ((DEBUG_INFO, " HPET_TIMER%d_MSI_ROUTE = 0x%016lx\n", TimerIndex, HpetRead (HPET_TIMER_MSI_ROUTE_OFFSET + TimerIndex * HPET_TIMER_STRIDE))); DEBUG ((DEBUG_INFO, " HPET_TIMER%d_MSI_ROUTE = 0x%016lx\n", TimerIndex, HpetRead (HPET_TIMER_MSI_ROUTE_OFFSET + TimerIndex * HPET_TIMER_STRIDE)));
} }
); );
// //
// Capture the current HPET main counter value. // Capture the current HPET main counter value.
// //
mPreviousMainCounter = HpetRead (HPET_MAIN_COUNTER_OFFSET); mPreviousMainCounter = HpetRead (HPET_MAIN_COUNTER_OFFSET);
// //
// Determine the interrupt mode to use for the HPET Timer. // Determine the interrupt mode to use for the HPET Timer.
// Look for MSI first, then unused PIC mode interrupt, then I/O APIC mode interrupt // Look for MSI first, then unused PIC mode interrupt, then I/O APIC mode interrupt
// //
MsiTimerIndex = HPET_INVALID_TIMER_INDEX; MsiTimerIndex = HPET_INVALID_TIMER_INDEX;
mTimerIndex = HPET_INVALID_TIMER_INDEX; mTimerIndex = HPET_INVALID_TIMER_INDEX;
for (TimerIndex = 0; TimerIndex <= mHpetGeneralCapabilities.Bits.NumberOfTimers; TimerIndex++) { for (TimerIndex = 0; TimerIndex <= mHpetGeneralCapabilities.Bits.NumberOfTimers; TimerIndex++) {
@@ -836,9 +836,9 @@ TimerDriverInitialize (
// Read the HPET Timer Capabilities and Configuration register // Read the HPET Timer Capabilities and Configuration register
// //
mTimerConfiguration.Uint64 = HpetRead (HPET_TIMER_CONFIGURATION_OFFSET + TimerIndex * HPET_TIMER_STRIDE); mTimerConfiguration.Uint64 = HpetRead (HPET_TIMER_CONFIGURATION_OFFSET + TimerIndex * HPET_TIMER_STRIDE);
// //
// Check to see if this HPET Timer supports MSI // Check to see if this HPET Timer supports MSI
// //
if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0) { if (mTimerConfiguration.Bits.MsiInterruptCapablity != 0) {
// //
@@ -848,7 +848,7 @@ TimerDriverInitialize (
MsiTimerIndex = TimerIndex; MsiTimerIndex = TimerIndex;
} }
} }
// //
// Check to see if this HPET Timer supports I/O APIC interrupts // Check to see if this HPET Timer supports I/O APIC interrupts
// //
@@ -891,7 +891,7 @@ TimerDriverInitialize (
DEBUG ((DEBUG_ERROR, "No HPET timers support MSI or I/O APIC mode. Unload HPET driver.\n")); DEBUG ((DEBUG_ERROR, "No HPET timers support MSI or I/O APIC mode. Unload HPET driver.\n"));
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
// //
// Initialize I/O APIC entry for HPET Timer Interrupt // Initialize I/O APIC entry for HPET Timer Interrupt
// Fixed Delivery Mode, Level Triggered, Asserted Low // Fixed Delivery Mode, Level Triggered, Asserted Low
@@ -911,15 +911,15 @@ TimerDriverInitialize (
// //
// Configure the selected HPET Timer with settings common to both MSI mode and I/O APIC mode // Configure the selected HPET Timer with settings common to both MSI mode and I/O APIC mode
// Clear InterruptEnable to keep interrupts disabled until full init is complete // Clear InterruptEnable to keep interrupts disabled until full init is complete
// Clear PeriodicInterruptEnable to use one-shot mode // Clear PeriodicInterruptEnable to use one-shot mode
// Configure as a 32-bit counter // Configure as a 32-bit counter
// //
mTimerConfiguration.Bits.InterruptEnable = 0; mTimerConfiguration.Bits.InterruptEnable = 0;
mTimerConfiguration.Bits.PeriodicInterruptEnable = 0; mTimerConfiguration.Bits.PeriodicInterruptEnable = 0;
mTimerConfiguration.Bits.CounterSizeEnable = 1; mTimerConfiguration.Bits.CounterSizeEnable = 1;
HpetWrite (HPET_TIMER_CONFIGURATION_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, mTimerConfiguration.Uint64); HpetWrite (HPET_TIMER_CONFIGURATION_OFFSET + mTimerIndex * HPET_TIMER_STRIDE, mTimerConfiguration.Uint64);
// //
// Read the HPET Timer Capabilities and Configuration register back again. // Read the HPET Timer Capabilities and Configuration register back again.
// CounterSizeEnable will be read back as a 0 if it is a 32-bit only timer // CounterSizeEnable will be read back as a 0 if it is a 32-bit only timer
@@ -970,7 +970,7 @@ TimerDriverInitialize (
} else { } else {
DEBUG ((DEBUG_INFO, "HPET Interrupt Mode I/O APIC\n")); DEBUG ((DEBUG_INFO, "HPET Interrupt Mode I/O APIC\n"));
DEBUG ((DEBUG_INFO, "HPET I/O APIC IRQ = 0x%02x\n", mTimerIrq)); DEBUG ((DEBUG_INFO, "HPET I/O APIC IRQ = 0x%02x\n", mTimerIrq));
} }
DEBUG ((DEBUG_INFO, "HPET Interrupt Vector = 0x%02x\n", PcdGet8 (PcdHpetLocalApicVector))); DEBUG ((DEBUG_INFO, "HPET Interrupt Vector = 0x%02x\n", PcdGet8 (PcdHpetLocalApicVector)));
DEBUG ((DEBUG_INFO, "HPET Counter Mask = 0x%016lx\n", mCounterMask)); DEBUG ((DEBUG_INFO, "HPET Counter Mask = 0x%016lx\n", mCounterMask));
DEBUG ((DEBUG_INFO, "HPET Timer Period = %d\n", mTimerPeriod)); DEBUG ((DEBUG_INFO, "HPET Timer Period = %d\n", mTimerPeriod));
@@ -981,10 +981,10 @@ TimerDriverInitialize (
// //
// Wait for a few timer interrupts to fire before continuing // Wait for a few timer interrupts to fire before continuing
// //
while (mNumTicks < 10); while (mNumTicks < 10);
); );
// //
// Install the Timer Architectural Protocol onto a new handle // Install the Timer Architectural Protocol onto a new handle
// //

View File

@@ -1,14 +1,14 @@
## @file ## @file
# Timer Architectural Protocol module using High Precesion Event Timer (HPET). # Timer Architectural Protocol module using High Precesion Event Timer (HPET).
# #
# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2011 - 2018, 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
# http://opensource.org/licenses/bsd-license.php # http://opensource.org/licenses/bsd-license.php
# #
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
# #
## ##
@@ -30,12 +30,12 @@
[Sources] [Sources]
HpetTimer.c HpetTimer.c
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
UefiCpuPkg/UefiCpuPkg.dec UefiCpuPkg/UefiCpuPkg.dec
PcAtChipsetPkg/PcAtChipsetPkg.dec PcAtChipsetPkg/PcAtChipsetPkg.dec
[LibraryClasses] [LibraryClasses]
PcdLib PcdLib
IoLib IoLib

View File

@@ -3,13 +3,13 @@
// //
// Timer Architectural Protocol module using High Precision Event Timer (HPET). // Timer Architectural Protocol module using High Precision Event Timer (HPET).
// //
// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2011 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,7 +1,7 @@
// /** @file // /** @file
// HpetTimerDxe Localized Strings and Content // HpetTimerDxe Localized Strings and Content
// //
// Copyright (c) 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2014 - 2018, 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
@@ -13,8 +13,8 @@
// //
// **/ // **/
#string STR_PROPERTIES_MODULE_NAME #string STR_PROPERTIES_MODULE_NAME
#language en-US #language en-US
"High Precision Event Timer DXE Driver" "High Precision Event Timer DXE Driver"

View File

@@ -4,7 +4,7 @@
I/O APIC library assumes I/O APIC is enabled. It does not I/O APIC library assumes I/O APIC is enabled. It does not
handles cases where I/O APIC is disabled. handles cases where I/O APIC is disabled.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2018, 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
@@ -21,7 +21,7 @@
Read a 32-bit I/O APIC register. Read a 32-bit I/O APIC register.
If Index is >= 0x100, then ASSERT(). If Index is >= 0x100, then ASSERT().
@param Index Specifies the I/O APIC register to read. @param Index Specifies the I/O APIC register to read.
@return The 32-bit value read from the I/O APIC register specified by Index. @return The 32-bit value read from the I/O APIC register specified by Index.
@@ -36,7 +36,7 @@ IoApicRead (
Write a 32-bit I/O APIC register. Write a 32-bit I/O APIC register.
If Index is >= 0x100, then ASSERT(). If Index is >= 0x100, then ASSERT().
@param Index Specifies the I/O APIC register to write. @param Index Specifies the I/O APIC register to write.
@param Value Specifies the value to write to the I/O APIC register specified by Index. @param Value Specifies the value to write to the I/O APIC register specified by Index.
@@ -52,8 +52,8 @@ IoApicWrite (
/** /**
Set the interrupt mask of an I/O APIC interrupt. Set the interrupt mask of an I/O APIC interrupt.
If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT(). If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT().
@param Irq Specifies the I/O APIC interrupt to enable or disable. @param Irq Specifies the I/O APIC interrupt to enable or disable.
@param Enable If TRUE, then enable the I/O APIC interrupt specified by Irq. @param Enable If TRUE, then enable the I/O APIC interrupt specified by Irq.
If FALSE, then disable the I/O APIC interrupt specified by Irq. If FALSE, then disable the I/O APIC interrupt specified by Irq.
@@ -67,13 +67,13 @@ IoApicEnableInterrupt (
/** /**
Configures an I/O APIC interrupt. Configures an I/O APIC interrupt.
Configure an I/O APIC Redirection Table Entry to deliver an interrupt in physical Configure an I/O APIC Redirection Table Entry to deliver an interrupt in physical
mode to the Local APIC of the currntly executing CPU. The default state of the mode to the Local APIC of the currntly executing CPU. The default state of the
entry is for the interrupt to be disabled (masked). IoApicEnableInterrupts() must entry is for the interrupt to be disabled (masked). IoApicEnableInterrupts() must
be used to enable(unmask) the I/O APIC Interrupt. be used to enable(unmask) the I/O APIC Interrupt.
If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT(). If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT().
If Vector >= 0x100, then ASSERT(). If Vector >= 0x100, then ASSERT().
If DeliveryMode is not supported, then ASSERT(). If DeliveryMode is not supported, then ASSERT().

View File

@@ -1,8 +1,8 @@
/** @file /** @file
HPET register definitions from the IA-PC HPET (High Precision Event Timers) HPET register definitions from the IA-PC HPET (High Precision Event Timers)
Specification, Revision 1.0a, October 2004. Specification, Revision 1.0a, October 2004.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2018, 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

View File

@@ -1,8 +1,8 @@
/** @file /** @file
I/O APIC Register Definitions from 82093AA I/O Advanced Programmable Interrupt I/O APIC Register Definitions from 82093AA I/O Advanced Programmable Interrupt
Controller (IOAPIC), 1996. Controller (IOAPIC), 1996.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2018, 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

View File

@@ -1,14 +1,14 @@
/** @file /** @file
UEFI Component Name(2) protocol implementation for IsaAcpi driver. UEFI Component Name(2) protocol implementation for IsaAcpi driver.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2018, 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
http://opensource.org/licenses/bsd-license.php http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#include "PcatIsaAcpi.h" #include "PcatIsaAcpi.h"
@@ -219,7 +219,7 @@ PcatIsaAcpiComponentNameGetDriverName (
return LookupUnicodeString2 ( return LookupUnicodeString2 (
Language, Language,
This->SupportedLanguages, This->SupportedLanguages,
mPcatIsaAcpiDriverNameTable, mPcatIsaAcpiDriverNameTable,
DriverName, DriverName,
(BOOLEAN)(This == &gPcatIsaAcpiComponentName) (BOOLEAN)(This == &gPcatIsaAcpiComponentName)
); );

View File

@@ -1,14 +1,14 @@
/** @file /** @file
ISA ACPI Protocol Implementation ISA ACPI Protocol Implementation
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2018, 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
http://opensource.org/licenses/bsd-license.php http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#include "PcatIsaAcpi.h" #include "PcatIsaAcpi.h"
@@ -146,7 +146,7 @@ InitializePcatIsaAcpiDeviceList (
/** /**
Enumerate the ISA devices on the ISA bus. Enumerate the ISA devices on the ISA bus.
@param Device Point to device ID instance @param Device Point to device ID instance
@param IsaAcpiDevice On return, point to resource data for Isa device @param IsaAcpiDevice On return, point to resource data for Isa device
@param NextIsaAcpiDevice On return, point to resource data for next Isa device @param NextIsaAcpiDevice On return, point to resource data for next Isa device
**/ **/
@@ -167,7 +167,7 @@ IsaDeviceLookup (
Index = 0; Index = 0;
} else { } else {
for(Index = 0; gPcatIsaAcpiDeviceList[Index].ResourceItem != NULL; Index++) { for(Index = 0; gPcatIsaAcpiDeviceList[Index].ResourceItem != NULL; Index++) {
if (Device->HID == gPcatIsaAcpiDeviceList[Index].Device.HID && if (Device->HID == gPcatIsaAcpiDeviceList[Index].Device.HID &&
Device->UID == gPcatIsaAcpiDeviceList[Index].Device.UID ) { Device->UID == gPcatIsaAcpiDeviceList[Index].Device.UID ) {
break; break;
} }
@@ -188,7 +188,7 @@ IsaDeviceLookup (
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@retval EFI_NOT_FOUND Can not found the next Isa device. @retval EFI_NOT_FOUND Can not found the next Isa device.
@retval EFI_SUCCESS Success retrieve the next Isa device for enumration. @retval EFI_SUCCESS Success retrieve the next Isa device for enumration.
@@ -217,7 +217,7 @@ IsaDeviceEnumerate (
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param OnOff TRUE for setting isa device power on, @param OnOff TRUE for setting isa device power on,
FALSE for setting isa device power off FALSE for setting isa device power off
@@ -232,13 +232,13 @@ IsaDeviceSetPower (
) )
{ {
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
Get current resource for the specific ISA device. Get current resource for the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param ResourceList On return, point to resources instances for given isa device @param ResourceList On return, point to resources instances for given isa device
@retval EFI_NOT_FOUND Can not found the resource instance for given isa device @retval EFI_NOT_FOUND Can not found the resource instance for given isa device
@@ -248,7 +248,7 @@ EFI_STATUS
EFIAPI EFIAPI
IsaGetCurrentResource ( IsaGetCurrentResource (
IN EFI_ISA_ACPI_PROTOCOL *This, IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device, IN EFI_ISA_ACPI_DEVICE_ID *Device,
OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
) )
{ {
@@ -261,9 +261,9 @@ IsaGetCurrentResource (
/** /**
Get possible resource for the specific ISA device. Get possible resource for the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param ResourceList On return, point to resources instances for given isa device @param ResourceList On return, point to resources instances for given isa device
@retval EFI_SUCCESS Success to get resource instance for given isa device. @retval EFI_SUCCESS Success to get resource instance for given isa device.
@@ -272,7 +272,7 @@ EFI_STATUS
EFIAPI EFIAPI
IsaGetPossibleResource ( IsaGetPossibleResource (
IN EFI_ISA_ACPI_PROTOCOL *This, IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device, IN EFI_ISA_ACPI_DEVICE_ID *Device,
OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
) )
{ {
@@ -283,7 +283,7 @@ IsaGetPossibleResource (
Set resource for the specific ISA device. Set resource for the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param ResourceList Point to resources instances for given isa device @param ResourceList Point to resources instances for given isa device
@return EFI_SUCCESS Success to set resource. @return EFI_SUCCESS Success to set resource.
@@ -293,18 +293,18 @@ EFI_STATUS
EFIAPI EFIAPI
IsaSetResource ( IsaSetResource (
IN EFI_ISA_ACPI_PROTOCOL *This, IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device, IN EFI_ISA_ACPI_DEVICE_ID *Device,
IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList
) )
{ {
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
Enable/Disable the specific ISA device. Enable/Disable the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param Enable Enable/Disable @param Enable Enable/Disable
@return EFI_SUCCESS Success to enable/disable. @return EFI_SUCCESS Success to enable/disable.
@@ -318,14 +318,14 @@ IsaEnableDevice (
IN BOOLEAN Enable IN BOOLEAN Enable
) )
{ {
return EFI_SUCCESS; return EFI_SUCCESS;
} }
/** /**
Initialize the specific ISA device. Initialize the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@return EFI_SUCCESS Success to initialize. @return EFI_SUCCESS Success to initialize.
@@ -353,7 +353,7 @@ EFI_STATUS
EFIAPI EFIAPI
IsaInterfaceInit ( IsaInterfaceInit (
IN EFI_ISA_ACPI_PROTOCOL *This IN EFI_ISA_ACPI_PROTOCOL *This
) )
{ {
return EFI_SUCCESS; return EFI_SUCCESS;
} }

View File

@@ -3,13 +3,13 @@
// //
// PCAT ISA ACPI driver for a Generic PC Platform. // PCAT ISA ACPI driver for a Generic PC Platform.
// //
// Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2005 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,7 +1,7 @@
// /** @file // /** @file
// IsaAcpi Localized Strings and Content // IsaAcpi Localized Strings and Content
// //
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2013 - 2018, 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
@@ -13,8 +13,8 @@
// //
// **/ // **/
#string STR_PROPERTIES_MODULE_NAME #string STR_PROPERTIES_MODULE_NAME
#language en-US #language en-US
"PCAT ISA ACPI DXE Driver" "PCAT ISA ACPI DXE Driver"

View File

@@ -1,7 +1,7 @@
/** @file /** @file
EFI PCAT ISA ACPI Driver for a Generic PC Platform EFI PCAT ISA ACPI Driver for a Generic PC Platform
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2018, 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
@@ -42,8 +42,8 @@ PcatIsaAcpiDriverEntryPoint (
) )
{ {
return EfiLibInstallDriverBindingComponentName2 ( return EfiLibInstallDriverBindingComponentName2 (
ImageHandle, ImageHandle,
SystemTable, SystemTable,
&gPcatIsaAcpiDriverBinding, &gPcatIsaAcpiDriverBinding,
ImageHandle, ImageHandle,
&gPcatIsaAcpiComponentName, &gPcatIsaAcpiComponentName,
@@ -54,7 +54,7 @@ PcatIsaAcpiDriverEntryPoint (
/** /**
ControllerDriver Protocol Method ControllerDriver Protocol Method
@param This Driver Binding protocol instance pointer. @param This Driver Binding protocol instance pointer.
@param Controller Handle of device to test. @param Controller Handle of device to test.
@param RemainingDevicePath Optional parameter use to pick a specific child @param RemainingDevicePath Optional parameter use to pick a specific child
device to start. device to start.
@@ -80,10 +80,10 @@ PcatIsaAcpiDriverBindingSupported (
// //
// Get PciIo protocol instance // Get PciIo protocol instance
// //
Status = gBS->OpenProtocol ( Status = gBS->OpenProtocol (
Controller, Controller,
&gEfiPciIoProtocolGuid, &gEfiPciIoProtocolGuid,
(VOID**)&PciIo, (VOID**)&PciIo,
This->DriverBindingHandle, This->DriverBindingHandle,
Controller, Controller,
@@ -97,7 +97,7 @@ PcatIsaAcpiDriverBindingSupported (
PciIo, PciIo,
EfiPciIoWidthUint32, EfiPciIoWidthUint32,
0, 0,
sizeof(Pci) / sizeof(UINT32), sizeof(Pci) / sizeof(UINT32),
&Pci); &Pci);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
@@ -109,23 +109,23 @@ PcatIsaAcpiDriverBindingSupported (
// //
if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA) { if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA) {
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
} }
// //
// See if this is an Intel PCI to ISA bridge in Positive Decode Mode // See if this is an Intel PCI to ISA bridge in Positive Decode Mode
// //
if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE && if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE &&
Pci.Hdr.VendorId == 0x8086 ) { Pci.Hdr.VendorId == 0x8086 ) {
// //
// See if this is on Function #0 to avoid false positives on // See if this is on Function #0 to avoid false positives on
// PCI_CLASS_BRIDGE_OTHER that has the same value as // PCI_CLASS_BRIDGE_OTHER that has the same value as
// PCI_CLASS_BRIDGE_ISA_PDECODE // PCI_CLASS_BRIDGE_ISA_PDECODE
// //
Status = PciIo->GetLocation ( Status = PciIo->GetLocation (
PciIo, PciIo,
&SegmentNumber, &SegmentNumber,
&BusNumber, &BusNumber,
&DeviceNumber, &DeviceNumber,
&FunctionNumber &FunctionNumber
); );
if (!EFI_ERROR (Status) && FunctionNumber == 0) { if (!EFI_ERROR (Status) && FunctionNumber == 0) {
@@ -134,17 +134,17 @@ PcatIsaAcpiDriverBindingSupported (
Status = EFI_UNSUPPORTED; Status = EFI_UNSUPPORTED;
} }
} }
} }
} }
} }
gBS->CloseProtocol ( gBS->CloseProtocol (
Controller, Controller,
&gEfiPciIoProtocolGuid, &gEfiPciIoProtocolGuid,
This->DriverBindingHandle, This->DriverBindingHandle,
Controller Controller
); );
return Status; return Status;
} }
@@ -184,12 +184,12 @@ PcatIsaAcpiDriverBindingStart (
// //
PciIo = NULL; PciIo = NULL;
Status = gBS->OpenProtocol ( Status = gBS->OpenProtocol (
Controller, Controller,
&gEfiPciIoProtocolGuid, &gEfiPciIoProtocolGuid,
(VOID**)&PciIo, (VOID**)&PciIo,
This->DriverBindingHandle, This->DriverBindingHandle,
Controller, Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER EFI_OPEN_PROTOCOL_BY_DRIVER
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
goto Done; goto Done;
@@ -225,10 +225,10 @@ PcatIsaAcpiDriverBindingStart (
} }
Status = PciIo->Attributes ( Status = PciIo->Attributes (
PciIo, PciIo,
EfiPciIoAttributeOperationEnable, EfiPciIoAttributeOperationEnable,
EFI_PCI_DEVICE_ENABLE | Supports | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO, EFI_PCI_DEVICE_ENABLE | Supports | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO,
NULL NULL
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
goto Done; goto Done;
@@ -260,7 +260,7 @@ PcatIsaAcpiDriverBindingStart (
// Initialize PcatIsaAcpiDeviceList // Initialize PcatIsaAcpiDeviceList
// //
InitializePcatIsaAcpiDeviceList (); InitializePcatIsaAcpiDeviceList ();
// //
// IsaAcpi interface // IsaAcpi interface
// //
@@ -272,7 +272,7 @@ PcatIsaAcpiDriverBindingStart (
(PcatIsaAcpiDev->IsaAcpi).EnableDevice = IsaEnableDevice; (PcatIsaAcpiDev->IsaAcpi).EnableDevice = IsaEnableDevice;
(PcatIsaAcpiDev->IsaAcpi).InitDevice = IsaInitDevice; (PcatIsaAcpiDev->IsaAcpi).InitDevice = IsaInitDevice;
(PcatIsaAcpiDev->IsaAcpi).InterfaceInit = IsaInterfaceInit; (PcatIsaAcpiDev->IsaAcpi).InterfaceInit = IsaInterfaceInit;
// //
// Install the ISA ACPI Protocol interface // Install the ISA ACPI Protocol interface
// //
@@ -286,16 +286,16 @@ Done:
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
if (PciIo != NULL && Enabled) { if (PciIo != NULL && Enabled) {
PciIo->Attributes ( PciIo->Attributes (
PciIo, PciIo,
EfiPciIoAttributeOperationSet, EfiPciIoAttributeOperationSet,
OriginalAttributes, OriginalAttributes,
NULL NULL
); );
} }
gBS->CloseProtocol ( gBS->CloseProtocol (
Controller, Controller,
&gEfiPciIoProtocolGuid, &gEfiPciIoProtocolGuid,
This->DriverBindingHandle, This->DriverBindingHandle,
Controller Controller
); );
if (PcatIsaAcpiDev != NULL) { if (PcatIsaAcpiDev != NULL) {
@@ -303,7 +303,7 @@ Done:
} }
return Status; return Status;
} }
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@@ -334,16 +334,16 @@ PcatIsaAcpiDriverBindingStop (
EFI_STATUS Status; EFI_STATUS Status;
EFI_ISA_ACPI_PROTOCOL *IsaAcpi; EFI_ISA_ACPI_PROTOCOL *IsaAcpi;
PCAT_ISA_ACPI_DEV *PcatIsaAcpiDev; PCAT_ISA_ACPI_DEV *PcatIsaAcpiDev;
// //
// Get the ISA ACPI Protocol Interface // Get the ISA ACPI Protocol Interface
// //
Status = gBS->OpenProtocol ( Status = gBS->OpenProtocol (
Controller, Controller,
&gEfiIsaAcpiProtocolGuid, &gEfiIsaAcpiProtocolGuid,
(VOID**)&IsaAcpi, (VOID**)&IsaAcpi,
This->DriverBindingHandle, This->DriverBindingHandle,
Controller, Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL EFI_OPEN_PROTOCOL_GET_PROTOCOL
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
@@ -380,13 +380,13 @@ PcatIsaAcpiDriverBindingStop (
} }
gBS->CloseProtocol ( gBS->CloseProtocol (
Controller, Controller,
&gEfiPciIoProtocolGuid, &gEfiPciIoProtocolGuid,
This->DriverBindingHandle, This->DriverBindingHandle,
Controller Controller
); );
gBS->FreePool (PcatIsaAcpiDev); gBS->FreePool (PcatIsaAcpiDev);
return EFI_SUCCESS; return EFI_SUCCESS;
} }

View File

@@ -1,14 +1,14 @@
/** @file /** @file
EFI PCAT ISA ACPI Driver for a Generic PC Platform EFI PCAT ISA ACPI Driver for a Generic PC Platform
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2018, 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
http://opensource.org/licenses/bsd-license.php http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
@@ -40,7 +40,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
typedef struct { typedef struct {
UINTN Signature; UINTN Signature;
EFI_HANDLE Handle; EFI_HANDLE Handle;
EFI_ISA_ACPI_PROTOCOL IsaAcpi; EFI_ISA_ACPI_PROTOCOL IsaAcpi;
EFI_PCI_IO_PROTOCOL *PciIo; EFI_PCI_IO_PROTOCOL *PciIo;
UINT64 OriginalAttributes; UINT64 OriginalAttributes;
@@ -64,7 +64,7 @@ extern EFI_COMPONENT_NAME_PROTOCOL gPcatIsaAcpiComponentName;
/** /**
ControllerDriver Protocol Method ControllerDriver Protocol Method
@param This Driver Binding protocol instance pointer. @param This Driver Binding protocol instance pointer.
@param Controller Handle of device to test. @param Controller Handle of device to test.
@param RemainingDevicePath Optional parameter use to pick a specific child @param RemainingDevicePath Optional parameter use to pick a specific child
device to start. device to start.
@@ -131,7 +131,7 @@ PcatIsaAcpiDriverBindingStop (
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@retval EFI_NOT_FOUND Can not found the next Isa device. @retval EFI_NOT_FOUND Can not found the next Isa device.
@retval EFI_SUCCESS Success retrieve the next Isa device for enumration. @retval EFI_SUCCESS Success retrieve the next Isa device for enumration.
@@ -149,7 +149,7 @@ IsaDeviceEnumerate (
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param OnOff TRUE for setting isa device power on, @param OnOff TRUE for setting isa device power on,
FALSE for setting isa device power off FALSE for setting isa device power off
@@ -162,12 +162,12 @@ IsaDeviceSetPower (
IN EFI_ISA_ACPI_DEVICE_ID *Device, IN EFI_ISA_ACPI_DEVICE_ID *Device,
IN BOOLEAN OnOff IN BOOLEAN OnOff
); );
/** /**
Get current resource for the specific ISA device. Get current resource for the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param ResourceList On return, point to resources instances for given isa device @param ResourceList On return, point to resources instances for given isa device
@retval EFI_NOT_FOUND Can not found the resource instance for given isa device @retval EFI_NOT_FOUND Can not found the resource instance for given isa device
@@ -180,12 +180,12 @@ IsaGetCurrentResource (
IN EFI_ISA_ACPI_DEVICE_ID *Device, IN EFI_ISA_ACPI_DEVICE_ID *Device,
OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
); );
/** /**
Get possible resource for the specific ISA device. Get possible resource for the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param ResourceList On return, point to resources instances for given isa device @param ResourceList On return, point to resources instances for given isa device
@retval EFI_SUCCESS Success to get resource instance for given isa device. @retval EFI_SUCCESS Success to get resource instance for given isa device.
@@ -194,15 +194,15 @@ EFI_STATUS
EFIAPI EFIAPI
IsaGetPossibleResource ( IsaGetPossibleResource (
IN EFI_ISA_ACPI_PROTOCOL *This, IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device, IN EFI_ISA_ACPI_DEVICE_ID *Device,
OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
); );
/** /**
Set resource for the specific ISA device. Set resource for the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param ResourceList Point to resources instances for given isa device @param ResourceList Point to resources instances for given isa device
@return EFI_SUCCESS Success to set resource. @return EFI_SUCCESS Success to set resource.
@@ -215,12 +215,12 @@ IsaSetResource (
IN EFI_ISA_ACPI_DEVICE_ID *Device, IN EFI_ISA_ACPI_DEVICE_ID *Device,
IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList
); );
/** /**
Enable/Disable the specific ISA device. Enable/Disable the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@param Enable Enable/Disable @param Enable Enable/Disable
@return EFI_SUCCESS Success to enable/disable. @return EFI_SUCCESS Success to enable/disable.
@@ -238,7 +238,7 @@ IsaEnableDevice (
Initialize the specific ISA device. Initialize the specific ISA device.
@param This Point to instance of EFI_ISA_ACPI_PROTOCOL @param This Point to instance of EFI_ISA_ACPI_PROTOCOL
@param Device Point to device ID instance @param Device Point to device ID instance
@return EFI_SUCCESS Success to initialize. @return EFI_SUCCESS Success to initialize.
@@ -249,7 +249,7 @@ IsaInitDevice (
IN EFI_ISA_ACPI_PROTOCOL *This, IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device IN EFI_ISA_ACPI_DEVICE_ID *Device
); );
/** /**
Initialize the ISA interface. Initialize the ISA interface.
@@ -262,7 +262,7 @@ EFI_STATUS
EFIAPI EFIAPI
IsaInterfaceInit ( IsaInterfaceInit (
IN EFI_ISA_ACPI_PROTOCOL *This IN EFI_ISA_ACPI_PROTOCOL *This
); );
/** /**
Initialize the ISA device list. Initialize the ISA device list.

View File

@@ -58,13 +58,13 @@ AcpiTimerLibConstructor (
UINT8 EnableMask; UINT8 EnableMask;
// //
// ASSERT for the invalid PCD values. They must be configured to the real value. // ASSERT for the invalid PCD values. They must be configured to the real value.
// //
ASSERT (PcdGet16 (PcdAcpiIoPciBarRegisterOffset) != 0xFFFF); ASSERT (PcdGet16 (PcdAcpiIoPciBarRegisterOffset) != 0xFFFF);
ASSERT (PcdGet16 (PcdAcpiIoPortBaseAddress) != 0xFFFF); ASSERT (PcdGet16 (PcdAcpiIoPortBaseAddress) != 0xFFFF);
// //
// If the register offset to the BAR for the ACPI I/O Port Base Address is 0x0000, then // If the register offset to the BAR for the ACPI I/O Port Base Address is 0x0000, then
// no PCI register programming is required to enable access to the the ACPI registers // no PCI register programming is required to enable access to the the ACPI registers
// specified by PcdAcpiIoPortBaseAddress // specified by PcdAcpiIoPortBaseAddress
// //
@@ -73,7 +73,7 @@ AcpiTimerLibConstructor (
} }
// //
// ASSERT for the invalid PCD values. They must be configured to the real value. // ASSERT for the invalid PCD values. They must be configured to the real value.
// //
ASSERT (PcdGet8 (PcdAcpiIoPciDeviceNumber) != 0xFF); ASSERT (PcdGet8 (PcdAcpiIoPciDeviceNumber) != 0xFF);
ASSERT (PcdGet8 (PcdAcpiIoPciFunctionNumber) != 0xFF); ASSERT (PcdGet8 (PcdAcpiIoPciFunctionNumber) != 0xFF);
@@ -101,7 +101,7 @@ AcpiTimerLibConstructor (
EnableMask EnableMask
); );
} }
return RETURN_SUCCESS; return RETURN_SUCCESS;
} }
@@ -119,23 +119,23 @@ InternalAcpiGetAcpiTimerIoPort (
) )
{ {
UINT16 Port; UINT16 Port;
Port = PcdGet16 (PcdAcpiIoPortBaseAddress); Port = PcdGet16 (PcdAcpiIoPortBaseAddress);
// //
// If the register offset to the BAR for the ACPI I/O Port Base Address is not 0x0000, then // If the register offset to the BAR for the ACPI I/O Port Base Address is not 0x0000, then
// read the PCI register for the ACPI BAR value in case the BAR has been programmed to a // read the PCI register for the ACPI BAR value in case the BAR has been programmed to a
// value other than PcdAcpiIoPortBaseAddress // value other than PcdAcpiIoPortBaseAddress
// //
if (PcdGet16 (PcdAcpiIoPciBarRegisterOffset) != 0x0000) { if (PcdGet16 (PcdAcpiIoPciBarRegisterOffset) != 0x0000) {
Port = PciRead16 (PCI_LIB_ADDRESS ( Port = PciRead16 (PCI_LIB_ADDRESS (
PcdGet8 (PcdAcpiIoPciBusNumber), PcdGet8 (PcdAcpiIoPciBusNumber),
PcdGet8 (PcdAcpiIoPciDeviceNumber), PcdGet8 (PcdAcpiIoPciDeviceNumber),
PcdGet8 (PcdAcpiIoPciFunctionNumber), PcdGet8 (PcdAcpiIoPciFunctionNumber),
PcdGet16 (PcdAcpiIoPciBarRegisterOffset) PcdGet16 (PcdAcpiIoPciBarRegisterOffset)
)); ));
} }
return (Port & PcdGet16 (PcdAcpiIoPortBaseAddressMask)) + PcdGet16 (PcdAcpiPm1TmrOffset); return (Port & PcdGet16 (PcdAcpiIoPortBaseAddressMask)) + PcdGet16 (PcdAcpiPm1TmrOffset);
} }

View File

@@ -1,7 +1,7 @@
/** @file /** @file
ACPI Timer implements one instance of Timer Library. ACPI Timer implements one instance of Timer Library.
Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR> Copyright (c) 2013 - 2018, 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
@@ -47,7 +47,7 @@ InternalCalculateTscFrequency (
UINT64 UINT64
InternalGetPerformanceCounterFrequency ( InternalGetPerformanceCounterFrequency (
VOID VOID
) )
{ {
return InternalCalculateTscFrequency (); return InternalCalculateTscFrequency ();
} }

View File

@@ -7,7 +7,7 @@
# Note: The implementation uses the lower 24-bits of the ACPI timer and # Note: The implementation uses the lower 24-bits of the ACPI timer and
# is compatible with both 24-bit and 32-bit ACPI timers. # is compatible with both 24-bit and 32-bit ACPI timers.
# #
# Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2013 - 2018, 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
@@ -31,7 +31,7 @@
[Sources] [Sources]
AcpiTimerLib.c AcpiTimerLib.c
BaseAcpiTimerLib.c BaseAcpiTimerLib.c
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
PcAtChipsetPkg/PcAtChipsetPkg.dec PcAtChipsetPkg/PcAtChipsetPkg.dec
@@ -52,4 +52,4 @@
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddress ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddress ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiPm1TmrOffset ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiPm1TmrOffset ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddressMask ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddressMask ## CONSUMES

View File

@@ -4,13 +4,13 @@
// Provides basic timer support using the ACPI timer hardware. The performance // Provides basic timer support using the ACPI timer hardware. The performance
// counter features are provided by the processors time stamp counter. // counter features are provided by the processors time stamp counter.
// //
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2013 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,7 +1,7 @@
/** @file /** @file
ACPI Timer implements one instance of Timer Library. ACPI Timer implements one instance of Timer Library.
Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR> Copyright (c) 2013 - 2018, 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
@@ -70,13 +70,13 @@ UINT64 mPerformanceCounterFrequency = 0;
UINT64 UINT64
InternalGetPerformanceCounterFrequency ( InternalGetPerformanceCounterFrequency (
VOID VOID
) )
{ {
return mPerformanceCounterFrequency; return mPerformanceCounterFrequency;
} }
/** /**
The constructor function enables ACPI IO space, and caches PerformanceCounterFrequency. The constructor function enables ACPI IO space, and caches PerformanceCounterFrequency.
@param ImageHandle The firmware allocated handle for the EFI image. @param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table. @param SystemTable A pointer to the EFI System Table.

View File

@@ -4,13 +4,13 @@
// Provides basic timer support using the ACPI timer hardware. The performance // Provides basic timer support using the ACPI timer hardware. The performance
// counter features are provided by the processors time stamp counter. // counter features are provided by the processors time stamp counter.
// //
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2013 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -3,13 +3,13 @@
// //
// Library instance for I/O APIC library class. // Library instance for I/O APIC library class.
// //
// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2011 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,10 +1,10 @@
/** @file /** @file
I/O APIC library. I/O APIC library.
I/O APIC library assumes I/O APIC is enabled. It does not I/O APIC library assumes I/O APIC is enabled. It does not
handles cases where I/O APIC is disabled. handles cases where I/O APIC is disabled.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2018, 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
@@ -30,7 +30,7 @@
Read a 32-bit I/O APIC register. Read a 32-bit I/O APIC register.
If Index is >= 0x100, then ASSERT(). If Index is >= 0x100, then ASSERT().
@param Index Specifies the I/O APIC register to read. @param Index Specifies the I/O APIC register to read.
@return The 32-bit value read from the I/O APIC register specified by Index. @return The 32-bit value read from the I/O APIC register specified by Index.
@@ -50,7 +50,7 @@ IoApicRead (
Write a 32-bit I/O APIC register. Write a 32-bit I/O APIC register.
If Index is >= 0x100, then ASSERT(). If Index is >= 0x100, then ASSERT().
@param Index Specifies the I/O APIC register to write. @param Index Specifies the I/O APIC register to write.
@param Value Specifies the value to write to the I/O APIC register specified by Index. @param Value Specifies the value to write to the I/O APIC register specified by Index.
@@ -71,7 +71,7 @@ IoApicWrite (
/** /**
Set the interrupt mask of an I/O APIC interrupt. Set the interrupt mask of an I/O APIC interrupt.
If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT(). If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT().
@param Irq Specifies the I/O APIC interrupt to enable or disable. @param Irq Specifies the I/O APIC interrupt to enable or disable.
@param Enable If TRUE, then enable the I/O APIC interrupt specified by Irq. @param Enable If TRUE, then enable the I/O APIC interrupt specified by Irq.
@@ -98,13 +98,13 @@ IoApicEnableInterrupt (
/** /**
Configures an I/O APIC interrupt. Configures an I/O APIC interrupt.
Configure an I/O APIC Redirection Table Entry to deliver an interrupt in physical Configure an I/O APIC Redirection Table Entry to deliver an interrupt in physical
mode to the Local APIC of the currntly executing CPU. The default state of the mode to the Local APIC of the currntly executing CPU. The default state of the
entry is for the interrupt to be disabled (masked). IoApicEnableInterrupts() must entry is for the interrupt to be disabled (masked). IoApicEnableInterrupts() must
be used to enable(unmask) the I/O APIC Interrupt. be used to enable(unmask) the I/O APIC Interrupt.
If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT(). If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT().
If Vector >= 0x100, then ASSERT(). If Vector >= 0x100, then ASSERT().
If DeliveryMode is not supported, then ASSERT(). If DeliveryMode is not supported, then ASSERT().
@@ -142,11 +142,11 @@ IoApicConfigureInterrupt (
ASSERT (Irq <= Version.Bits.MaximumRedirectionEntry); ASSERT (Irq <= Version.Bits.MaximumRedirectionEntry);
ASSERT (Vector <= 0xFF); ASSERT (Vector <= 0xFF);
ASSERT (DeliveryMode < 8 && DeliveryMode != 6 && DeliveryMode != 3); ASSERT (DeliveryMode < 8 && DeliveryMode != 6 && DeliveryMode != 3);
Entry.Uint32.Low = IoApicRead (IO_APIC_REDIRECTION_TABLE_ENTRY_INDEX + Irq * 2); Entry.Uint32.Low = IoApicRead (IO_APIC_REDIRECTION_TABLE_ENTRY_INDEX + Irq * 2);
Entry.Bits.Vector = (UINT8)Vector; Entry.Bits.Vector = (UINT8)Vector;
Entry.Bits.DeliveryMode = (UINT32)DeliveryMode; Entry.Bits.DeliveryMode = (UINT32)DeliveryMode;
Entry.Bits.DestinationMode = 0; Entry.Bits.DestinationMode = 0;
Entry.Bits.Polarity = AssertionLevel ? 0 : 1; Entry.Bits.Polarity = AssertionLevel ? 0 : 1;
Entry.Bits.TriggerMode = LevelTriggered ? 1 : 0; Entry.Bits.TriggerMode = LevelTriggered ? 1 : 0;
Entry.Bits.Mask = 1; Entry.Bits.Mask = 1;

View File

@@ -3,13 +3,13 @@
// //
// Library instance for ResetSystem library class for PCAT systems // Library instance for ResetSystem library class for PCAT systems
// //
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2006 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -3,13 +3,13 @@
// //
// Library instance for SerialIO library class. // Library instance for SerialIO library class.
// //
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2006 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,7 +1,7 @@
/** @file /** @file
UART Serial Port library functions UART Serial Port library functions
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2018, 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
@@ -58,11 +58,11 @@ UINT8 gBreakSet = 0;
/** /**
Initialize the serial device hardware. Initialize the serial device hardware.
If no initialization is required, then return RETURN_SUCCESS. If no initialization is required, then return RETURN_SUCCESS.
If the serial device was successfully initialized, then return RETURN_SUCCESS. If the serial device was successfully initialized, then return RETURN_SUCCESS.
If the serial device could not be initialized, then return RETURN_DEVICE_ERROR. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.
@retval RETURN_SUCCESS The serial device was initialized. @retval RETURN_SUCCESS The serial device was initialized.
@retval RETURN_DEVICE_ERROR The serail device could not be initialized. @retval RETURN_DEVICE_ERROR The serail device could not be initialized.
@@ -86,7 +86,7 @@ SerialPortInitialize (
// Calculate divisor for baud generator // Calculate divisor for baud generator
// //
Divisor = 115200 / gBps; Divisor = 115200 / gBps;
// //
// Set communications format // Set communications format
// //
@@ -109,13 +109,13 @@ SerialPortInitialize (
} }
/** /**
Write data from buffer to serial device. Write data from buffer to serial device.
Writes NumberOfBytes data bytes from Buffer to the serial device. Writes NumberOfBytes data bytes from Buffer to the serial device.
The number of bytes actually written to the serial device is returned. The number of bytes actually written to the serial device is returned.
If the return value is less than NumberOfBytes, then the write operation failed. If the return value is less than NumberOfBytes, then the write operation failed.
If Buffer is NULL, then ASSERT(). If Buffer is NULL, then ASSERT().
If NumberOfBytes is zero, then return 0. If NumberOfBytes is zero, then return 0.
@@ -123,7 +123,7 @@ SerialPortInitialize (
@param NumberOfBytes Number of bytes to written to the serial device. @param NumberOfBytes Number of bytes to written to the serial device.
@retval 0 NumberOfBytes is 0. @retval 0 NumberOfBytes is 0.
@retval >0 The number of bytes written to the serial device. @retval >0 The number of bytes written to the serial device.
If this value is less than NumberOfBytes, then the write operation failed. If this value is less than NumberOfBytes, then the write operation failed.
**/ **/
@@ -164,7 +164,7 @@ SerialPortWrite (
@param NumberOfBytes Number of bytes to read from the serial device. @param NumberOfBytes Number of bytes to read from the serial device.
@retval 0 NumberOfBytes is 0. @retval 0 NumberOfBytes is 0.
@retval >0 The number of bytes read from the serial device. @retval >0 The number of bytes read from the serial device.
If this value is less than NumberOfBytes, then the read operation failed. If this value is less than NumberOfBytes, then the read operation failed.
**/ **/

View File

@@ -31,7 +31,7 @@
## @libraryclass Provides functions to manage I/O APIC Redirection Table Entries. ## @libraryclass Provides functions to manage I/O APIC Redirection Table Entries.
# #
IoApicLib|Include/Library/IoApicLib.h IoApicLib|Include/Library/IoApicLib.h
[Guids] [Guids]
gPcAtChipsetPkgTokenSpaceGuid = { 0x326ae723, 0xae32, 0x4589, { 0x98, 0xb8, 0xca, 0xc2, 0x3c, 0xdc, 0xc1, 0xb1 } } gPcAtChipsetPkgTokenSpaceGuid = { 0x326ae723, 0xae32, 0x4589, { 0x98, 0xb8, 0xca, 0xc2, 0x3c, 0xdc, 0xc1, 0xb1 } }
@@ -52,7 +52,7 @@
# 1) If platform only support pure UEFI, value should be set to 0xFFFF or 0xFFFE; # 1) If platform only support pure UEFI, value should be set to 0xFFFF or 0xFFFE;
# Because only clock interrupt is allowed in legacy mode in pure UEFI platform.<BR> # Because only clock interrupt is allowed in legacy mode in pure UEFI platform.<BR>
# 2) If platform install CSM and use thunk module:<BR> # 2) If platform install CSM and use thunk module:<BR>
# a) If thunk call provided by CSM binary requires some legacy interrupt support, the corresponding bit # a) If thunk call provided by CSM binary requires some legacy interrupt support, the corresponding bit
# should be opened as 0.<BR> # should be opened as 0.<BR>
# For example, if keyboard interfaces provided CSM binary use legacy keyboard interrupt in 8259 bit 1, then # For example, if keyboard interfaces provided CSM binary use legacy keyboard interrupt in 8259 bit 1, then
# the value should be set to 0xFFFC.<BR> # the value should be set to 0xFFFC.<BR>
@@ -60,11 +60,11 @@
# to 0xFFFF or 0xFFFE.<BR> # to 0xFFFF or 0xFFFE.<BR>
# #
# The default value of legacy mode mask could be changed by EFI_LEGACY_8259_PROTOCOL->SetMask(). But it is rarely # The default value of legacy mode mask could be changed by EFI_LEGACY_8259_PROTOCOL->SetMask(). But it is rarely
# need change it except some special cases such as when initializing the CSM binary, it should be set to 0xFFFF to # need change it except some special cases such as when initializing the CSM binary, it should be set to 0xFFFF to
# mask all legacy interrupt. Please restore the original legacy mask value if changing is made for these special case.<BR> # mask all legacy interrupt. Please restore the original legacy mask value if changing is made for these special case.<BR>
# @Prompt 8259 Legacy Mode mask. # @Prompt 8259 Legacy Mode mask.
gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeMask|0xFFFF|UINT16|0x00000001 gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeMask|0xFFFF|UINT16|0x00000001
## Pcd8259LegacyModeEdgeLevel defines the default edge level for legacy mode's interrrupt controller. ## Pcd8259LegacyModeEdgeLevel defines the default edge level for legacy mode's interrrupt controller.
# For the corresponding bits, 0 = Edge triggered and 1 = Level triggered. # For the corresponding bits, 0 = Edge triggered and 1 = Level triggered.
# @Prompt 8259 Legacy Mode edge level. # @Prompt 8259 Legacy Mode edge level.
@@ -118,7 +118,7 @@
# The default value of 100000 100 ns units is the same as 10 ms. # The default value of 100000 100 ns units is the same as 10 ms.
# @Prompt Default period of HPET timer. # @Prompt Default period of HPET timer.
gPcAtChipsetPkgTokenSpaceGuid.PcdHpetDefaultTimerPeriod|100000|UINT64|0x0000000B gPcAtChipsetPkgTokenSpaceGuid.PcdHpetDefaultTimerPeriod|100000|UINT64|0x0000000B
## This PCD specifies the base address of the IO APIC. ## This PCD specifies the base address of the IO APIC.
# @Prompt IO APIC base address. # @Prompt IO APIC base address.
gPcAtChipsetPkgTokenSpaceGuid.PcdIoApicBaseAddress|0xFEC00000|UINT32|0x0000000C gPcAtChipsetPkgTokenSpaceGuid.PcdIoApicBaseAddress|0xFEC00000|UINT32|0x0000000C
@@ -131,10 +131,10 @@
# @Prompt Maximal valid year in RTC. # @Prompt Maximal valid year in RTC.
# @Expression 0x80000001 | gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear < gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear + 100 # @Expression 0x80000001 | gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear < gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear + 100
gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear|2097|UINT16|0x0000000E gPcAtChipsetPkgTokenSpaceGuid.PcdMaximalValidYear|2097|UINT16|0x0000000E
[PcdsFixedAtBuild, PcdsPatchableInModule] [PcdsFixedAtBuild, PcdsPatchableInModule]
## Defines the ACPI register set base address. ## Defines the ACPI register set base address.
# The invalid 0xFFFF is as its default value. It must be configured to the real value. # The invalid 0xFFFF is as its default value. It must be configured to the real value.
# @Prompt ACPI Timer IO Port Address # @Prompt ACPI Timer IO Port Address
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddress |0xFFFF|UINT16|0x00000010 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddress |0xFFFF|UINT16|0x00000010
@@ -143,26 +143,26 @@
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBusNumber | 0x00| UINT8|0x00000011 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBusNumber | 0x00| UINT8|0x00000011
## Defines the PCI Device Number of the PCI device that contains the BAR and Enable for ACPI hardware registers. ## Defines the PCI Device Number of the PCI device that contains the BAR and Enable for ACPI hardware registers.
# The invalid 0xFF is as its default value. It must be configured to the real value. # The invalid 0xFF is as its default value. It must be configured to the real value.
# @Prompt ACPI Hardware PCI Device Number # @Prompt ACPI Hardware PCI Device Number
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciDeviceNumber | 0xFF| UINT8|0x00000012 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciDeviceNumber | 0xFF| UINT8|0x00000012
## Defines the PCI Function Number of the PCI device that contains the BAR and Enable for ACPI hardware registers. ## Defines the PCI Function Number of the PCI device that contains the BAR and Enable for ACPI hardware registers.
# The invalid 0xFF is as its default value. It must be configured to the real value. # The invalid 0xFF is as its default value. It must be configured to the real value.
# @Prompt ACPI Hardware PCI Function Number # @Prompt ACPI Hardware PCI Function Number
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciFunctionNumber | 0xFF| UINT8|0x00000013 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciFunctionNumber | 0xFF| UINT8|0x00000013
## Defines the PCI Register Offset of the PCI device that contains the Enable for ACPI hardware registers. ## Defines the PCI Register Offset of the PCI device that contains the Enable for ACPI hardware registers.
# The invalid 0xFFFF is as its default value. It must be configured to the real value. # The invalid 0xFFFF is as its default value. It must be configured to the real value.
# @Prompt ACPI Hardware PCI Register Offset # @Prompt ACPI Hardware PCI Register Offset
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciEnableRegisterOffset |0xFFFF|UINT16|0x00000014 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciEnableRegisterOffset |0xFFFF|UINT16|0x00000014
## Defines the bit mask that must be set to enable the APIC hardware register BAR. ## Defines the bit mask that must be set to enable the APIC hardware register BAR.
# @Prompt ACPI Hardware PCI Bar Enable BitMask # @Prompt ACPI Hardware PCI Bar Enable BitMask
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoBarEnableMask | 0x00| UINT8|0x00000015 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoBarEnableMask | 0x00| UINT8|0x00000015
## Defines the PCI Register Offset of the PCI device that contains the BAR for ACPI hardware registers. ## Defines the PCI Register Offset of the PCI device that contains the BAR for ACPI hardware registers.
# The invalid 0xFFFF is as its default value. It must be configured to the real value. # The invalid 0xFFFF is as its default value. It must be configured to the real value.
# @Prompt ACPI Hardware PCI Bar Register Offset # @Prompt ACPI Hardware PCI Bar Register Offset
gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset |0xFFFF|UINT16|0x00000016 gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset |0xFFFF|UINT16|0x00000016

View File

@@ -27,7 +27,7 @@
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf

View File

@@ -10,7 +10,7 @@
// 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,7 +1,7 @@
// /** @file // /** @file
// PcAtChipset Package Localized Strings and Content. // PcAtChipset Package Localized Strings and Content.
// //
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2013 - 2018, 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
@@ -13,8 +13,8 @@
// //
// **/ // **/
#string STR_PROPERTIES_PACKAGE_NAME #string STR_PROPERTIES_PACKAGE_NAME
#language en-US #language en-US
"PcAtChipset package" "PcAtChipset package"

View File

@@ -28,7 +28,7 @@ CHAR16 mTimeZoneVariableName[] = L"RTC";
/** /**
Compare the Hour, Minute and Second of the From time and the To time. Compare the Hour, Minute and Second of the From time and the To time.
Only compare H/M/S in EFI_TIME and ignore other fields here. Only compare H/M/S in EFI_TIME and ignore other fields here.
@param From the first time @param From the first time
@@ -187,7 +187,7 @@ PcRtcInit (
if (!EfiAtRuntime ()) { if (!EfiAtRuntime ()) {
EfiReleaseLock (&Global->RtcLock); EfiReleaseLock (&Global->RtcLock);
} }
// //
// Get the data of Daylight saving and time zone, if they have been // Get the data of Daylight saving and time zone, if they have been
// stored in NV variable during previous boot. // stored in NV variable during previous boot.
@@ -205,7 +205,7 @@ PcRtcInit (
Time.Daylight = (UINT8) (TimerVar >> 16); Time.Daylight = (UINT8) (TimerVar >> 16);
} else { } else {
Time.TimeZone = EFI_UNSPECIFIED_TIMEZONE; Time.TimeZone = EFI_UNSPECIFIED_TIMEZONE;
Time.Daylight = 0; Time.Daylight = 0;
} }
// //
@@ -241,7 +241,7 @@ PcRtcInit (
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
// //
// Reset wakeup time value to valid state when wakeup alarm is disabled and wakeup time is invalid. // Reset wakeup time value to valid state when wakeup alarm is disabled and wakeup time is invalid.
// Global variable has already had valid SavedTimeZone and Daylight, // Global variable has already had valid SavedTimeZone and Daylight,
@@ -251,9 +251,9 @@ PcRtcInit (
if ((Enabled) || (!EFI_ERROR (Status))) { if ((Enabled) || (!EFI_ERROR (Status))) {
return EFI_SUCCESS; return EFI_SUCCESS;
} }
// //
// When wakeup time is disabled and invalid, reset wakeup time register to valid state // When wakeup time is disabled and invalid, reset wakeup time register to valid state
// but keep wakeup alarm disabled. // but keep wakeup alarm disabled.
// //
Time.Second = RTC_INIT_SECOND; Time.Second = RTC_INIT_SECOND;
@@ -301,13 +301,13 @@ PcRtcInit (
} }
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
// //
// Inhibit updates of the RTC // Inhibit updates of the RTC
// //
RegisterB.Bits.Set = 1; RegisterB.Bits.Set = 1;
RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data);
// //
// Set RTC alarm time registers // Set RTC alarm time registers
// //
@@ -320,7 +320,7 @@ PcRtcInit (
// //
RegisterB.Bits.Set = 0; RegisterB.Bits.Set = 0;
RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data); RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data);
// //
// Release RTC Lock. // Release RTC Lock.
// //
@@ -485,7 +485,7 @@ PcRtcSetTime (
} }
return Status; return Status;
} }
// //
// Write timezone and daylight to RTC variable // Write timezone and daylight to RTC variable
// //
@@ -789,7 +789,7 @@ PcRtcSetWakeupTime (
} }
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
// //
// Inhibit updates of the RTC // Inhibit updates of the RTC
// //
@@ -932,7 +932,7 @@ ConvertRtcTimeToEfiTime (
@param Timeout Tell how long it should take to wait. @param Timeout Tell how long it should take to wait.
@retval EFI_DEVICE_ERROR RTC device error. @retval EFI_DEVICE_ERROR RTC device error.
@retval EFI_SUCCESS RTC is updated and ready. @retval EFI_SUCCESS RTC is updated and ready.
**/ **/
EFI_STATUS EFI_STATUS
RtcWaitToUpdate ( RtcWaitToUpdate (
@@ -1113,7 +1113,7 @@ ConvertEfiTimeToRtcTime (
/** /**
Compare the Hour, Minute and Second of the From time and the To time. Compare the Hour, Minute and Second of the From time and the To time.
Only compare H/M/S in EFI_TIME and ignore other fields here. Only compare H/M/S in EFI_TIME and ignore other fields here.
@param From the first time @param From the first time
@@ -1164,7 +1164,7 @@ IsWithinOneDay (
// //
ASSERT (From->Month >=1); ASSERT (From->Month >=1);
ASSERT (From->Month <=12); ASSERT (From->Month <=12);
if (From->Year == To->Year) { if (From->Year == To->Year) {
if (From->Month == To->Month) { if (From->Month == To->Month) {
if ((From->Day + 1) == To->Day) { if ((From->Day + 1) == To->Day) {

View File

@@ -318,7 +318,7 @@ ConvertRtcTimeToEfiTime (
@param Timeout Tell how long it should take to wait. @param Timeout Tell how long it should take to wait.
@retval EFI_DEVICE_ERROR RTC device error. @retval EFI_DEVICE_ERROR RTC device error.
@retval EFI_SUCCESS RTC is updated and ready. @retval EFI_SUCCESS RTC is updated and ready.
**/ **/
EFI_STATUS EFI_STATUS
RtcWaitToUpdate ( RtcWaitToUpdate (

View File

@@ -2,17 +2,17 @@
// PcRtc driver to install EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL // PcRtc driver to install EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL
// //
// PcRtc driver to install EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL. // PcRtc driver to install EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL.
// //
// This driver provides GetTime, SetTime, GetWakeupTime, SetWakeupTime services to Runtime Service Table. // This driver provides GetTime, SetTime, GetWakeupTime, SetWakeupTime services to Runtime Service Table.
// It will install a tagging protocol with gEfiRealTimeClockArchProtocolGuid. // It will install a tagging protocol with gEfiRealTimeClockArchProtocolGuid.
// //
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2006 - 2018, 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
// http://opensource.org/licenses/bsd-license.php // http://opensource.org/licenses/bsd-license.php
// //
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //

View File

@@ -1,7 +1,7 @@
/** @file /** @file
Provides Set/Get time operations. Provides Set/Get time operations.
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2018, 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
@@ -139,7 +139,7 @@ InitializePcRtc (
Status = PcRtcInit (&mModuleGlobal); Status = PcRtcInit (&mModuleGlobal);
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
Status = gBS->CreateEventEx ( Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL, EVT_NOTIFY_SIGNAL,
TPL_CALLBACK, TPL_CALLBACK,
@@ -149,7 +149,7 @@ InitializePcRtc (
&Event &Event
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
Status = gBS->CreateEventEx ( Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL, EVT_NOTIFY_SIGNAL,
TPL_CALLBACK, TPL_CALLBACK,

View File

@@ -1,7 +1,7 @@
// /** @file // /** @file
// PcRtc Localized Strings and Content // PcRtc Localized Strings and Content
// //
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR> // Copyright (c) 2013 - 2018, 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
@@ -13,8 +13,8 @@
// //
// **/ // **/
#string STR_PROPERTIES_MODULE_NAME #string STR_PROPERTIES_MODULE_NAME
#language en-US #language en-US
"PCAT Real Time Clock DXE Driver" "PCAT Real Time Clock DXE Driver"

View File

@@ -72,7 +72,7 @@
gPcAtChipsetPkgTokenSpaceGuid.PcdInitialValueRtcRegisterA ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdInitialValueRtcRegisterA ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdInitialValueRtcRegisterB ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdInitialValueRtcRegisterB ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdInitialValueRtcRegisterD ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdInitialValueRtcRegisterD ## CONSUMES
[Pcd] [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdRealTimeClockUpdateTimeout ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdRealTimeClockUpdateTimeout ## CONSUMES
gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear ## CONSUMES gPcAtChipsetPkgTokenSpaceGuid.PcdMinimalValidYear ## CONSUMES