summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformDxe
Commit message (Collapse)AuthorAgeFilesLines
* OvmfPkg: replace old EFI_D_ debug levels with new DEBUG_ onesRebecca Cran2020-04-301-7/+7
| | | | | | | | | | | | | Generated mechanically with: find OvmfPkg -type f -exec sed -i -e 's/EFI_D_/DEBUG_/g' {} \; Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Cc: Philippe Mathieu-Daude <philmd@redhat.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Laszlo Ersek <lersek@redhat.com> Message-Id: <20200429215327.606467-1-rebecca@bsdio.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* OvmfPkg/PlatformDxe: fix EFI_HII_HANDLE parameters of internal functionsLaszlo Ersek2019-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following call tree: PlatformInit () mInstalledPackages = HiiAddPackages () GopInstalled () PopulateForm (PackageList = mInstalledPackages) CreateResolutionOptions (PackageList) HiiSetString (PackageList HiiUpdateForm (PackageList) PlatformDxe passes around an EFI_HII_HANDLE that (a) originates from HiiAddPackages() and (b) is ultimately passed to HiiSetString() and HiiUpdateForm(). The intermediate functions PopulateForm() and CreateResolutionOptions() however take that parameter as an (EFI_HII_HANDLE*). There is no bug in practice (because the affected functions never try to de-reference the "PackageList" parameter, they just pass it on), but the function prototypes are semantically wrong. Fix that. This could remain hidden so long because pointer-to-VOID silently converts to/from any pointer-to-object type, and the UEFI spec mandates that EFI_HII_HANDLE be a typedef to (VOID*). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* OvmfPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-097-52/+7
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* OvmfPkg/PlatformDxe: list "PlatformConfig.h" in the INF fileLaszlo Ersek2018-03-131-0/+1
| | | | | | | | | | | | | | | The header file declares the PlatformConfigSave() and PlatformConfigLoad() functions (and defines related types and macros). The functions are defined in "PlatformConfig.c" and called from "Platform.c". Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Suggested-by: Michael Kinney <michael.d.kinney@intel.com> Ref: http://mid.mail-archive.com/E92EE9817A31E24EB0585FDF735412F56327F7D3@ORSMSX113.amr.corp.intel.com Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg/PlatformDxe: list "Platform.h" in the INF fileLaszlo Ersek2018-03-131-0/+1
| | | | | | | | | | | | | | | The header file defines HII-related macros and types that are shared between the form description in "PlatformForms.vfr" and the HII driver logic "Platform.c". Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Suggested-by: Michael Kinney <michael.d.kinney@intel.com> Ref: http://mid.mail-archive.com/E92EE9817A31E24EB0585FDF735412F56327F7D3@ORSMSX113.amr.corp.intel.com Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg/PlatformDxe: eliminate unchecked PcdSetXX() callsLaszlo Ersek2016-10-251-2/+6
| | | | | | | | | | | | | | | These are deprecated / disabled under the DISABLE_NEW_DEPRECATED_INTERFACES feature test macro. Introduce a variable called PcdStatus, and use it to assert the success of these operations (there is no reason for them to fail here). Cc: Jordan Justen <jordan.l.justen@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=166 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> # RVCT Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg/PlatformDxe: Convert Platform.uni to UTF-8Jordan Justen2015-06-231-0/+0
| | | | | | | | | | | | | | | This command was used to convert the file: iconv -f UTF-16 -t UTF-8 \ -o OvmfPkg/PlatformDxe/Platform.uni \ OvmfPkg/PlatformDxe/Platform.uni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17700 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformDxe: connect RouteConfig() to platform dataLaszlo Ersek2014-03-221-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Establish the full stack of conversions when modifying the platform configuration: ConfigResp -- form engine / HII communication | [ConfigToBlock] | v MAIN_FORM_STATE -- binary representation of form/widget state | [FormStateToPlatformConfig] | v PLATFORM_CONFIG -- accessible to DXE and UEFI drivers | [PlatformConfigSave] | v UEFI non-volatile variable -- accessible to external utilities Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15375 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformDxe: connect ExtractConfig() to platform dataLaszlo Ersek2014-03-221-4/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Establish the full stack of conversions in retrieving the platform configuration: MultiConfigAltResp -- form engine / HII communication ^ | [BlockToConfig] | MAIN_FORM_STATE -- binary representation of form/widget state ^ | [PlatformConfigToFormState] | PLATFORM_CONFIG -- accessible to DXE and UEFI drivers ^ | [PlatformConfigLoad] | UEFI non-volatile variable -- accessible to external utilities Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15374 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformDxe: add save and discard buttons to the formLaszlo Ersek2014-03-224-0/+38
| | | | | | | | | | The RouteConfig() function is also called now as expected. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15373 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformDxe: get available resolutions from GOPLaszlo Ersek2014-03-222-20/+222
| | | | | | | | | | Generate the options for the drop-down list from the GOP resolutions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15372 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/PlatformDxe: Silence warning seen with GCC48 IA32Jordan Justen2014-03-221-1/+3
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15370 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformDxe: add form widgets for video modesLaszlo Ersek2014-03-225-1/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch we populate the form with the two widgets related to video resolution: - A read-only string field displaying the preference for the next boot. - A drop-down list offering choices for changing the setting. This list is implemented with dynamically generated IFR opcodes. (In general, the current preference may be missing, or it may be invalid for the available video RAM size. The list of possible new settings is filtered with the video RAM size.) Because the form now becomes able to receive input, we must also implement ExtractConfig(). This function tells the HII engine about the state of the widgets. For now we set up both widgets with static data only: - The current preference always says "Unset". The driver code is still isolated from the backend (the UEFI variable store). - The list of possible resolutions offers 800x600 only. We don't interrogate the GOP yet. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15369 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformDxe: introduce state for the main formLaszlo Ersek2014-03-222-0/+17
| | | | | | | | | | | | | | | We'll need a C language (ie. structure) representation for the state of the visual elements on the form. We choose the Buffer Storage kind (see 29.2.5.6 "Storage" in UEFI 2.4A), because it's easy to work with. Note that the structure added in this patch has nothing to do with UEFI non-volatile variables. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15368 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformDxe: add an empty HII formLaszlo Ersek2014-03-225-0/+236
| | | | | | | | | | ... which opens from the Device Manager window. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15367 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformDxe: set preferred video resolution from platform configLaszlo Ersek2014-03-222-0/+45
| | | | | | | | | | | | | | | | | The GraphicsConsoleDxe driver (in MdeModulePkg/Universal/Console) determines the preferred video resolution from the dynamic PCDs - gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution - gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution Setting the graphics resolution during boot is useful when the guest OS (for lack of a dedicated display driver) continues to work with the original GOP resolution and framebuffer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15366 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformDxe: utility functions for saving / loading configurationLaszlo Ersek2014-03-223-1/+200
| | | | | | | | | | | | | | | | | | | | | The two functions introduced here allow the saving and loading of platform configuration to/from the non-volatile variable store. The PLATFORM_CONFIG structure and the two functions that take it / return it are generally meant for any DXE or UEFI driver that needs to access platform configuration. For now we keep this small "library" internal to PlatformDxe. The PLATFORM_CONFIG wire format is intended only to grow over time (as long as the variable GUID remains unchanged). At the introduction of new fields, new feature flags must be added, and recognized in PlatformConfigLoad(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15365 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: introduce empty PlatformDxeLaszlo Ersek2014-03-222-0/+94
This DXE driver will load/save persistent values for OVMF's config knobs, plus expose those knobs via HII. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15364 6f19259b-4bc3-4df7-8a09-765794883524