├── Tools └── PackageDocumentationTool │ ├── src │ ├── log.txt │ ├── freeze_steps.txt │ ├── __init__.py │ ├── plugins │ │ ├── __init__.py │ │ └── EDkPlugins │ │ │ ├── __init__.py │ │ │ ├── edk2 │ │ │ ├── __init__.py │ │ │ └── model │ │ │ │ ├── __init__.py │ │ │ │ └── dsc.py │ │ │ └── basemodel │ │ │ ├── __init__.py │ │ │ ├── inidocview.py │ │ │ └── message.py │ └── freeze.bat │ └── Installation_and_User_manual.pdf └── DriverDeveloper └── UefiDriverWizard ├── Logo.ico ├── Logo.png ├── Templates ├── UefiDriver.uni ├── UefiDriverExtra.uni ├── UefiDriverModStrs.uni ├── Guid.dec ├── Protocol.dec ├── LibraryClass.dec ├── Package.dec ├── UefiDriver.vfr ├── Guid.h ├── LibraryClass.h ├── NiiUndi.c ├── DriverFamilyOverride.h ├── EdidOverride.h ├── BusSpecificDriverOverride.h ├── DriverFamilyOverride.c ├── Protocol.h ├── EdidOverride.c ├── BusSpecificDriverOverride.c ├── LoadFile.h ├── Package.dsc ├── SimplePointer.h ├── LoadFile.c ├── SimplePointer.c ├── AbsolutePointer.h ├── AbsolutePointer.c ├── GraphicsOutput.h ├── DriverDiagnostics.h ├── ComponentName.h ├── GraphicsOutput.c ├── SerialIo.h ├── SerialIo.c ├── UefiDriver.h ├── ComponentName.c ├── SimpleTextOutput.h ├── SimpleTextInput.h ├── HiiConfigAccess.h └── DriverBinding.h ├── UefiDriverWizard.spec ├── Config.py ├── GenerateMsi.cmd ├── UefiDriverWizardNewLibraryClass.py ├── UefiDriverWizardNewGuid.py ├── UefiDriverWizardNewProtocol.py ├── UefiDriverWizardUefiDriverModelConsumedProtocols.py ├── UefiDriverWizardUefiDriverModelProducedProtocols.py ├── UefiDriverWizardNewPackage.py ├── README ├── UefiDriverWizardUefiDriverModelOptionalFeatures.py ├── UefiDriverWizard.wxs ├── UefiDriverWizardUefiDriverWizard.py ├── TemplateString.py └── UefiDriverWizardNewUefiDriver.py /Tools/PackageDocumentationTool/src/log.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tianocore/edk2-share/HEAD/DriverDeveloper/UefiDriverWizard/Logo.ico -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tianocore/edk2-share/HEAD/DriverDeveloper/UefiDriverWizard/Logo.png -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/freeze_steps.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tianocore/edk2-share/HEAD/Tools/PackageDocumentationTool/src/freeze_steps.txt -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/UefiDriver.uni: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tianocore/edk2-share/HEAD/DriverDeveloper/UefiDriverWizard/Templates/UefiDriver.uni -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/UefiDriverExtra.uni: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tianocore/edk2-share/HEAD/DriverDeveloper/UefiDriverWizard/Templates/UefiDriverExtra.uni -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/Installation_and_User_manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tianocore/edk2-share/HEAD/Tools/PackageDocumentationTool/Installation_and_User_manual.pdf -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/UefiDriverModStrs.uni: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tianocore/edk2-share/HEAD/DriverDeveloper/UefiDriverWizard/Templates/UefiDriverModStrs.uni -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/__init__.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
4 | # 5 | # This program and the accompanying materials are licensed and made available 6 | # under the terms and conditions of the BSD License which accompanies this 7 | # distribution. The full text of the license may be found at 8 | # http://opensource.org/licenses/bsd-license.php 9 | # 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | # -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
4 | # 5 | # This program and the accompanying materials are licensed and made available 6 | # under the terms and conditions of the BSD License which accompanies this 7 | # distribution. The full text of the license may be found at 8 | # http://opensource.org/licenses/bsd-license.php 9 | # 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | # -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/plugins/EDkPlugins/__init__.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
4 | # 5 | # This program and the accompanying materials are licensed and made available 6 | # under the terms and conditions of the BSD License which accompanies this 7 | # distribution. The full text of the license may be found at 8 | # http://opensource.org/licenses/bsd-license.php 9 | # 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | # -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/plugins/EDkPlugins/edk2/__init__.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
4 | # 5 | # This program and the accompanying materials are licensed and made available 6 | # under the terms and conditions of the BSD License which accompanies this 7 | # distribution. The full text of the license may be found at 8 | # http://opensource.org/licenses/bsd-license.php 9 | # 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | # -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/plugins/EDkPlugins/basemodel/__init__.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
4 | # 5 | # This program and the accompanying materials are licensed and made available 6 | # under the terms and conditions of the BSD License which accompanies this 7 | # distribution. The full text of the license may be found at 8 | # http://opensource.org/licenses/bsd-license.php 9 | # 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | # -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/plugins/EDkPlugins/edk2/model/__init__.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
4 | # 5 | # This program and the accompanying materials are licensed and made available 6 | # under the terms and conditions of the BSD License which accompanies this 7 | # distribution. The full text of the license may be found at 8 | # http://opensource.org/licenses/bsd-license.php 9 | # 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | # -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/freeze.bat: -------------------------------------------------------------------------------- 1 | @REM 2 | @REM CX_Freeze 4.0.1 has been integrated into python as a script. 3 | @REM After Cx_Freeze 4.0.1 installed, cxfreeze.bat is put into \scripts\ 4 | @REM 5 | 6 | @echo off 7 | pushd . 8 | cd %~dp0 9 | 10 | if not defined PYTHONFREEZE_PATH ( 11 | echo !!!ERROR!!! Please set PYTHONFREEZE_PATH macro for path of cxfreeze.bat. For example: set PYTHONFREEZE_PATH=c:\Python25\scripts\ 12 | @goto end 13 | ) 14 | 15 | %PYTHONFREEZE_PATH%\cxfreeze.bat --include-modules=encodings.utf_16 --base=Win32GUI --install-dir ..\bin_win32\ packagedocapp.pyw 16 | 17 | :end -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/Guid.dec: -------------------------------------------------------------------------------- 1 | <><> 2 | ## @file 3 | # 4 | # UEFI Driver Wizard template file 5 | # 6 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made 9 | # available under the terms and conditions of the BSD License which 10 | # accompanies this distribution. The full text of the license may 11 | # be found at http://opensource.org/licenses/bsd-license.php. 12 | # 13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 14 | # BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 15 | # EXPRESS OR IMPLIED. 16 | # 17 | ## 18 | <> 19 | 20 | [Guids] 21 | ## Include/Guid/<>.h 22 | gEfi<>Guid = <> 23 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/Protocol.dec: -------------------------------------------------------------------------------- 1 | <><> 2 | ## @file 3 | # 4 | # UEFI Driver Wizard template file 5 | # 6 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made 9 | # available under the terms and conditions of the BSD License which 10 | # accompanies this distribution. The full text of the license may 11 | # be found at http://opensource.org/licenses/bsd-license.php. 12 | # 13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 14 | # BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 15 | # EXPRESS OR IMPLIED. 16 | # 17 | ## 18 | <> 19 | 20 | [Protocols] 21 | ## Include/Protocol/<>.h 22 | gEfi<>ProtocolGuid = <> 23 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/LibraryClass.dec: -------------------------------------------------------------------------------- 1 | <><> 2 | ## @file 3 | # 4 | # UEFI Driver Wizard template file 5 | # 6 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made 9 | # available under the terms and conditions of the BSD License which 10 | # accompanies this distribution. The full text of the license may 11 | # be found at http://opensource.org/licenses/bsd-license.php. 12 | # 13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 14 | # BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 15 | # EXPRESS OR IMPLIED. 16 | # 17 | ## 18 | <> 19 | 20 | [LibraryClasses] 21 | ## @libraryclass <> 22 | ## 23 | <>|Include/Library/<>.h 24 | -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/plugins/EDkPlugins/basemodel/inidocview.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
4 | # 5 | # This program and the accompanying materials are licensed and made available 6 | # under the terms and conditions of the BSD License which accompanies this 7 | # distribution. The full text of the license may be found at 8 | # http://opensource.org/licenses/bsd-license.php 9 | # 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | # 13 | 14 | import core.editor 15 | 16 | class INIDoc(core.editor.EditorDocument): 17 | def __init__(self): 18 | core.editor.EditorDocument.__init__(self) 19 | self._iniobj = None 20 | 21 | 22 | class INIView(core.editor.EditorView): 23 | pass -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/Package.dec: -------------------------------------------------------------------------------- 1 | <><> 2 | ## @file 3 | # 4 | # UEFI Driver Wizard template file 5 | # 6 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made 9 | # available under the terms and conditions of the BSD License which 10 | # accompanies this distribution. The full text of the license may 11 | # be found at http://opensource.org/licenses/bsd-license.php. 12 | # 13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 14 | # BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 15 | # EXPRESS OR IMPLIED. 16 | # 17 | ## 18 | <> 19 | ## @file 20 | # <> 21 | # 22 | # <> 23 | # 24 | # <> 25 | # 26 | # <> 27 | # 28 | ## 29 | 30 | [Defines] 31 | DEC_SPECIFICATION = 0x00010005 32 | PACKAGE_NAME = <> 33 | PACKAGE_GUID = <> 34 | PACKAGE_VERSION = <> 35 | 36 | [Includes] 37 | Include 38 | 39 | [LibraryClasses] 40 | 41 | [Protocols] 42 | 43 | [Guids] 44 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/UefiDriver.vfr: -------------------------------------------------------------------------------- 1 | <><> 2 | //// @file 3 | // 4 | // UEFI Driver Wizard template file 5 | // 6 | // Copyright (c) 2012, Intel Corporation. All rights reserved.
7 | // 8 | // This program and the accompanying materials are licensed and made 9 | // available under the terms and conditions of the BSD License which 10 | // accompanies this distribution. The full text of the license may 11 | // be found at http://opensource.org/licenses/bsd-license.php. 12 | // 13 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 14 | // BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 15 | // EXPRESS OR IMPLIED. 16 | // 17 | //// 18 | <> 19 | //// @file 20 | // 21 | // <> 22 | // 23 | // <> 24 | // 25 | // <> 26 | // 27 | // <> 28 | // 29 | //// 30 | 31 | formset 32 | guid = <>, 33 | title = STRING_TOKEN(STR_SAMPLE_FORM_SET_TITLE), 34 | help = STRING_TOKEN(STR_SAMPLE_FORM_SET_HELP), 35 | 36 | form formid = 1, title = STRING_TOKEN(STR_SAMPLE_FORM1_TITLE); 37 | endform; 38 | 39 | endformset; 40 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/Guid.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #ifndef __<>_H__ 30 | #define __<>_H__ 31 | 32 | #define EFI_<>_GUID \ 33 | <> 34 | 35 | /// 36 | /// GUID specific defines 37 | /// 38 | 39 | /// 40 | /// GUID specific structures 41 | /// 42 | typedef struct { 43 | // 44 | // Place GUID specific data fields here 45 | // 46 | } EFI_<>_GUID; 47 | 48 | extern EFI_GUID gEfi<>Guid; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizard.spec: -------------------------------------------------------------------------------- 1 | ## @file 2 | # PyInstaller SPEC file used to generate Windows EXE for UEFI Driver Wizard 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | # -*- mode: python -*- 17 | a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), 'launch.py']) 18 | pyz = PYZ(a.pure) 19 | exe = EXE( pyz, 20 | a.scripts, 21 | a.binaries + [('Logo.png', 'Logo.png', 'DATA')] + Tree('Templates', 'Templates'), 22 | a.zipfiles, 23 | a.datas, 24 | name='UefiDriverWizard.exe', 25 | debug=False, 26 | strip=False, 27 | upx=True, 28 | console=False , 29 | icon='Logo.ico' 30 | ) 31 | app = BUNDLE(exe, name='UefiDriverWizard.exe.app') 32 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/LibraryClass.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #ifndef __<>_H__ 30 | #define __<>_H__ 31 | 32 | /// 33 | /// Library class public defines 34 | /// 35 | 36 | /// 37 | /// Library class public structures/unions 38 | /// 39 | 40 | /// 41 | /// Library class public functions 42 | /// 43 | EFI_STATUS 44 | EFIAPI 45 | LibraryFunction1 ( 46 | // 47 | // Additional function arguments here. 48 | // 49 | ); 50 | 51 | VOID 52 | EFIAPI 53 | LibraryFunction2 ( 54 | // 55 | // Additional function arguments here. 56 | // 57 | ); 58 | 59 | UINT8 60 | EFIAPI 61 | LibraryFunction3 ( 62 | // 63 | // Additional function arguments here. 64 | // 65 | ); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/NiiUndi.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | /// 32 | /// Network Interface Identifier Protocol instance 33 | /// 34 | GLOBAL_REMOVE_IF_UNREFERENCED 35 | EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL g<>Nii = { 36 | EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION, // Revision 37 | 0, // Id 38 | 0, // ImageAddr 39 | 0, // ImageSize 40 | { 'U', 'N', 'D', 'I' }, // StringId 41 | EfiNetworkInterfaceUndi, // Type 42 | PXE_ROMID_MAJORVER, // MajorVer 43 | PXE_ROMID_MINORVER, // MinorVer 44 | FALSE, // Ipv6Supported 45 | 0 // IfNum 46 | }; 47 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Config.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Global data for UEFI Driver Wizard 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | WorkspacePath = '' 17 | UefiDriverPath = '' 18 | UefiDriverName = '' 19 | UefiDriverVersion = '' 20 | UefiDriverGuid = '' 21 | UefiDriverType = u'' 22 | DriverBindingVersion = '' 23 | UefiDriverCommonFeatures = () 24 | UefiSpecificationVersion = '' 25 | UefiDriverCpuArchitecture = () 26 | UefiDriverDriverModelFeatures = () 27 | Rfc4646LanguageCodes = '' 28 | Iso639LanguageCodes = '' 29 | UefiDriverConsumedProtocols = () 30 | UefiDriverProducedProtocols = () 31 | UsbMajorVersion = '' 32 | UsbMinorVersion = '' 33 | PackageFile = '' 34 | PackagePath = '' 35 | PackageName = '' 36 | PackageGuidValue = '' 37 | PackageVersion = '' 38 | PlatformGuidValue = '' 39 | ProtocolGuidValue = '' 40 | ProtocolIncludeName = '' 41 | GuidValue = '' 42 | GuidIncludeName = '' 43 | LibraryClassIncludeName = '' 44 | App = None 45 | -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/plugins/EDkPlugins/basemodel/message.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
4 | # 5 | # This program and the accompanying materials are licensed and made available 6 | # under the terms and conditions of the BSD License which accompanies this 7 | # distribution. The full text of the license may be found at 8 | # http://opensource.org/licenses/bsd-license.php 9 | # 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | # 13 | 14 | def GetEdkLogger(): 15 | import logging 16 | return logging.getLogger('edk') 17 | 18 | class EdkException(Exception): 19 | def __init__(self, message, fName=None, fNo=None): 20 | self._message = message 21 | ErrorMsg(message, fName, fNo) 22 | 23 | def GetMessage(self): 24 | return '[EDK Failure]: %s' %self._message 25 | 26 | def ErrorMsg(mess, fName=None, fNo=None): 27 | GetEdkLogger().error(NormalMessage('#ERR#', mess, fName, fNo)) 28 | 29 | def LogMsg(mess, fName=None, fNo=None): 30 | GetEdkLogger().info(NormalMessage('@LOG@', mess, fName, fNo)) 31 | 32 | def WarnMsg(mess, fName=None, fNo=None): 33 | GetEdkLogger().warning(NormalMessage('!WAR!', mess, fName, fNo)) 34 | 35 | def NormalMessage(type, mess, fName=None, fNo=None): 36 | strMsg = type 37 | 38 | if fName != None: 39 | strMsg += ' %s' % fName.replace('/', '\\') 40 | if fNo != None: 41 | strMsg += '(%d):' % fNo 42 | else: 43 | strMsg += ' :' 44 | 45 | if fName == None and fNo == None: 46 | strMsg += ' ' 47 | strMsg += mess 48 | 49 | return strMsg 50 | 51 | 52 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/DriverFamilyOverride.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | This function returns the version value associated with the driver specified by This. 31 | 32 | Retrieves the version of the driver that is used by the EFI Boot Service ConnectController() 33 | to sort the set of Driver Binding Protocols in order from highest priority to lowest priority. 34 | For drivers that support the Driver Family Override Protocol, those drivers are sorted so that 35 | the drivers with higher values returned by GetVersion() are higher priority than drivers that 36 | return lower values from GetVersion(). 37 | 38 | @param This A pointer to the EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL instance. 39 | 40 | @return The version value associated with the driver specified by This. 41 | 42 | **/ 43 | UINT32 44 | EFIAPI 45 | <>DriverFamilyOverrideGetVersion ( 46 | IN EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL *This 47 | ); 48 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/EdidOverride.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Returns policy information and potentially a replacement EDID for the specified video output device. 31 | 32 | @param This The EFI_EDID_OVERRIDE_PROTOCOL instance. 33 | @param ChildHandle A child handle produced by the Graphics Output EFI 34 | driver that represents a video output device. 35 | @param Attributes The attributes associated with ChildHandle video output device. 36 | @param EdidSize A pointer to the size, in bytes, of the Edid buffer. 37 | @param Edid A pointer to callee allocated buffer that contains the EDID that 38 | should be used for ChildHandle. A value of NULL 39 | represents no EDID override for ChildHandle. 40 | 41 | @retval EFI_SUCCESS Valid overrides returned for ChildHandle. 42 | @retval EFI_UNSUPPORTED ChildHandle has no overrides. 43 | 44 | **/ 45 | EFI_STATUS 46 | EFIAPI 47 | <>EdidOverrideGetEdid ( 48 | IN EFI_EDID_OVERRIDE_PROTOCOL *This, 49 | IN EFI_HANDLE *ChildHandle, 50 | OUT UINT32 *Attributes, 51 | IN OUT UINTN *EdidSize, 52 | IN OUT UINT8 **Edid 53 | ); 54 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/GenerateMsi.cmd: -------------------------------------------------------------------------------- 1 | @REM @file 2 | @REM Batch file to convert UEFI Driver Wizard to EXE and MSI 3 | @REM 4 | @REM Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | @REM This program and the accompanying materials 6 | @REM are licensed and made available under the terms and conditions of the BSD License 7 | @REM which accompanies this distribution. The full text of the license may be found at 8 | @REM http://opensource.org/licenses/bsd-license.php 9 | @REM 10 | @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | @REM 13 | 14 | @echo off 15 | 16 | SETLOCAL 17 | 18 | @REM 19 | @REM Set locals for paths to PyInstaller and Windows Installer XML 20 | @REM 21 | SET PYINSTALLER_PATH=c:/pyinstaller-1.5.1 22 | SET WIX_PATH="c:\Program Files (x86)\Windows Installer XML v3.5\bin" 23 | 24 | @REM 25 | @REM Verify path PyInstaller 26 | @REM 27 | if exist %PYINSTALLER_PATH%/Configure.py goto continue1 28 | echo ERROR: PyInstaller path is not valid. Set PYINSTALLER_PATH in this script 29 | goto errorexit 30 | :continue1 31 | 32 | @REM 33 | @REM Verify path to Windows Installer XML 34 | @REM 35 | if exist %WIX_PATH%\candle.exe if exist %WIX_PATH%\light.exe goto continue2 36 | echo ERROR: Windows Installer XML path is not valid. Set WIX_PATH in this script 37 | goto errorexit 38 | :continue2 39 | 40 | @REM 41 | @REM Use PyInstaller to Convert UEFI Driver Wizard Python application to an EXE 42 | @REM 43 | python %PYINSTALLER_PATH%/Configure.py 44 | if not errorlevel 1 goto continue3 45 | echo ERROR: Python is not in PATH 46 | goto errorexit 47 | :continue3 48 | python %PYINSTALLER_PATH%/Makespec.py --onefile --icon Logo.ico --windowed -n UefiDriverWizard.Generated launch.py 49 | python %PYINSTALLER_PATH%/Build.py UefiDriverWizard.spec 50 | 51 | @REM 52 | @REM Use Windows Installer XML 3.5 to Convert UEFI Driver Wizard Python application to an EXE 53 | @REM 54 | %WIX_PATH%\candle UefiDriverWizard.wxs 55 | %WIX_PATH%\light UefiDriverWizard.wixobj -cultures:en-US -ext WixUIExtension.dll 56 | 57 | :errorexit 58 | 59 | ENDLOCAL 60 | 61 | @echo on -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/BusSpecificDriverOverride.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Uses a bus specific algorithm to retrieve a driver image handle for a controller. 31 | 32 | @param This A pointer to the EFI_BUS_SPECIFIC_DRIVER_ 33 | OVERRIDE_PROTOCOL instance. 34 | @param DriverImageHandle On input, a pointer to the previous driver image handle returned 35 | by GetDriver(). On output, a pointer to the next driver 36 | image handle. Passing in a NULL, will return the first driver 37 | image handle. 38 | 39 | @retval EFI_SUCCESS A bus specific override driver is returned in DriverImageHandle. 40 | @retval EFI_NOT_FOUND The end of the list of override drivers was reached. 41 | A bus specific override driver is not returned in DriverImageHandle. 42 | @retval EFI_INVALID_PARAMETER DriverImageHandle is not a handle that was returned on a 43 | previous call to GetDriver(). 44 | 45 | **/ 46 | EFI_STATUS 47 | EFIAPI 48 | <>BusSpecificDriverOverrideGetDriver ( 49 | IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This, 50 | IN OUT EFI_HANDLE *DriverImageHandle 51 | ); 52 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/DriverFamilyOverride.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | /// 32 | /// Driver Family Override Protocol instance 33 | /// 34 | GLOBAL_REMOVE_IF_UNREFERENCED 35 | EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL g<>DriverFamilyOverride = { 36 | <>DriverFamilyOverrideGetVersion 37 | }; 38 | 39 | /** 40 | This function returns the version value associated with the driver specified by This. 41 | 42 | Retrieves the version of the driver that is used by the EFI Boot Service ConnectController() 43 | to sort the set of Driver Binding Protocols in order from highest priority to lowest priority. 44 | For drivers that support the Driver Family Override Protocol, those drivers are sorted so that 45 | the drivers with higher values returned by GetVersion() are higher priority than drivers that 46 | return lower values from GetVersion(). 47 | 48 | @param This A pointer to the EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL instance. 49 | 50 | @return The version value associated with the driver specified by This. 51 | 52 | **/ 53 | UINT32 54 | EFIAPI 55 | <>DriverFamilyOverrideGetVersion ( 56 | IN EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL *This 57 | ) 58 | { 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/Protocol.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #ifndef __<>_H__ 30 | #define __<>_H__ 31 | 32 | #define EFI_<>_PROTOCOL_GUID \ 33 | <> 34 | 35 | /// 36 | /// Forward declaration 37 | /// 38 | typedef struct _EFI_<>_PROTOCOL EFI_<>_PROTOCOL; 39 | 40 | /// 41 | /// Function prototypes 42 | /// 43 | typedef 44 | EFI_STATUS 45 | (EFIAPI *EFI_<>_<>)( 46 | IN EFI_<>_PROTOCOL *This 47 | // 48 | // Place additional function arguments here 49 | // 50 | ); 51 | 52 | typedef 53 | EFI_STATUS 54 | (EFIAPI *EFI_<>_<>)( 55 | IN EFI_<>_PROTOCOL *This 56 | // 57 | // Place additional function arguments here 58 | // 59 | ); 60 | 61 | typedef 62 | EFI_STATUS 63 | (EFIAPI *EFI_<>_<>)( 64 | IN EFI_<>_PROTOCOL *This 65 | // 66 | // Place additional function arguments here 67 | // 68 | ); 69 | 70 | /// 71 | /// Protocol structure 72 | /// 73 | typedef struct _EFI_<>_PROTOCOL { 74 | EFI_<>_<> <>; 75 | EFI_<>_<> <>; 76 | // . . . 77 | EFI_<>_<> <>; 78 | // 79 | // Place protocol data fields here 80 | // 81 | } 82 | 83 | extern EFI_GUID gEfi<>ProtocolGuid; 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/EdidOverride.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | /// 32 | /// EDID Override Protocol instance 33 | /// 34 | GLOBAL_REMOVE_IF_UNREFERENCED 35 | EFI_EDID_OVERRIDE_PROTOCOL g<>EdidOverride = { 36 | <>EdidOverrideGetEdid 37 | }; 38 | 39 | /** 40 | Returns policy information and potentially a replacement EDID for the specified video output device. 41 | 42 | @param This The EFI_EDID_OVERRIDE_PROTOCOL instance. 43 | @param ChildHandle A child handle produced by the Graphics Output EFI 44 | driver that represents a video output device. 45 | @param Attributes The attributes associated with ChildHandle video output device. 46 | @param EdidSize A pointer to the size, in bytes, of the Edid buffer. 47 | @param Edid A pointer to callee allocated buffer that contains the EDID that 48 | should be used for ChildHandle. A value of NULL 49 | represents no EDID override for ChildHandle. 50 | 51 | @retval EFI_SUCCESS Valid overrides returned for ChildHandle. 52 | @retval EFI_UNSUPPORTED ChildHandle has no overrides. 53 | 54 | **/ 55 | EFI_STATUS 56 | EFIAPI 57 | <>EdidOverrideGetEdid ( 58 | IN EFI_EDID_OVERRIDE_PROTOCOL *This, 59 | IN EFI_HANDLE *ChildHandle, 60 | OUT UINT32 *Attributes, 61 | IN OUT UINTN *EdidSize, 62 | IN OUT UINT8 **Edid 63 | ) 64 | { 65 | return EFI_UNSUPPORTED; 66 | } 67 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/BusSpecificDriverOverride.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | /// 32 | /// Bus Specific Driver Override Protocol instance 33 | /// 34 | GLOBAL_REMOVE_IF_UNREFERENCED 35 | EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL g<>BusSpecificDriverOverride = { 36 | <>BusSpecificDriverOverrideGetDriver 37 | }; 38 | 39 | /** 40 | Uses a bus specific algorithm to retrieve a driver image handle for a controller. 41 | 42 | @param This A pointer to the EFI_BUS_SPECIFIC_DRIVER_ 43 | OVERRIDE_PROTOCOL instance. 44 | @param DriverImageHandle On input, a pointer to the previous driver image handle returned 45 | by GetDriver(). On output, a pointer to the next driver 46 | image handle. Passing in a NULL, will return the first driver 47 | image handle. 48 | 49 | @retval EFI_SUCCESS A bus specific override driver is returned in DriverImageHandle. 50 | @retval EFI_NOT_FOUND The end of the list of override drivers was reached. 51 | A bus specific override driver is not returned in DriverImageHandle. 52 | @retval EFI_INVALID_PARAMETER DriverImageHandle is not a handle that was returned on a 53 | previous call to GetDriver(). 54 | 55 | **/ 56 | EFI_STATUS 57 | EFIAPI 58 | <>BusSpecificDriverOverrideGetDriver ( 59 | IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL *This, 60 | IN OUT EFI_HANDLE *DriverImageHandle 61 | ) 62 | { 63 | return EFI_NOT_FOUND; 64 | } 65 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/LoadFile.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Causes the driver to load a specified file. 31 | 32 | @param This Protocol instance pointer. 33 | @param FilePath The device specific path of the file to load. 34 | @param BootPolicy If TRUE, indicates that the request originates from the 35 | boot manager is attempting to load FilePath as a boot 36 | selection. If FALSE, then FilePath must match as exact file 37 | to be loaded. 38 | @param BufferSize On input the size of Buffer in bytes. On output with a return 39 | code of EFI_SUCCESS, the amount of data transferred to 40 | Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL, 41 | the size of Buffer required to retrieve the requested file. 42 | @param Buffer The memory buffer to transfer the file to. IF Buffer is NULL, 43 | then the size of the requested file is returned in 44 | BufferSize. 45 | 46 | @retval EFI_SUCCESS The file was loaded. 47 | @retval EFI_UNSUPPORTED The device does not support the provided BootPolicy 48 | @retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or 49 | BufferSize is NULL. 50 | @retval EFI_NO_MEDIA No medium was present to load the file. 51 | @retval EFI_DEVICE_ERROR The file was not loaded due to a device error. 52 | @retval EFI_NO_RESPONSE The remote system did not respond. 53 | @retval EFI_NOT_FOUND The file was not found. 54 | @retval EFI_ABORTED The file load process was manually cancelled. 55 | 56 | **/ 57 | EFI_STATUS 58 | EFIAPI 59 | <>LoadFileLoadFile ( 60 | IN EFI_LOAD_FILE_PROTOCOL *This, 61 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath, 62 | IN BOOLEAN BootPolicy, 63 | IN OUT UINTN *BufferSize, 64 | IN VOID *Buffer OPTIONAL 65 | ); 66 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/Package.dsc: -------------------------------------------------------------------------------- 1 | <><> 2 | ## @file 3 | # 4 | # UEFI Driver Wizard template file 5 | # 6 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
7 | # 8 | # This program and the accompanying materials are licensed and made 9 | # available under the terms and conditions of the BSD License which 10 | # accompanies this distribution. The full text of the license may 11 | # be found at http://opensource.org/licenses/bsd-license.php. 12 | # 13 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 14 | # BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 15 | # EXPRESS OR IMPLIED. 16 | # 17 | ## 18 | <> 19 | ## @file 20 | # <> 21 | # 22 | # <> 23 | # 24 | # <> 25 | # 26 | # <> 27 | # 28 | ## 29 | 30 | [Defines] 31 | PLATFORM_NAME = <> 32 | PLATFORM_GUID = <> 33 | PLATFORM_VERSION = <> 34 | DSC_SPECIFICATION = 0x00010005 35 | OUTPUT_DIRECTORY = Build/<> 36 | SUPPORTED_ARCHITECTURES = IA32|IPF|X64|EBC|ARM 37 | BUILD_TARGETS = DEBUG|RELEASE 38 | SKUID_IDENTIFIER = DEFAULT 39 | 40 | [LibraryClasses] 41 | UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf 42 | UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf 43 | UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf 44 | UefiLib|MdePkg/Library/UefiLib/UefiLib.inf 45 | UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf 46 | UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf 47 | MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf 48 | DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf 49 | UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf 50 | UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf 51 | BaseLib|MdePkg/Library/BaseLib/BaseLib.inf 52 | BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf 53 | SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf 54 | PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf 55 | DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf 56 | DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf 57 | PostCodeLib|MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf 58 | PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf 59 | 60 | [Components] 61 | 62 | [Components.IA32] 63 | 64 | [Components.X64] 65 | 66 | [Components.IPF] 67 | 68 | [Components.EBC] 69 | 70 | [Components.ARM] 71 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/SimplePointer.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Resets the pointer device hardware. 31 | 32 | @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL 33 | instance. 34 | @param ExtendedVerification Indicates that the driver may perform a more exhaustive 35 | verification operation of the device during reset. 36 | 37 | @retval EFI_SUCCESS The device was reset. 38 | @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset. 39 | 40 | **/ 41 | EFI_STATUS 42 | EFIAPI 43 | <>SimplePointerReset ( 44 | IN EFI_SIMPLE_POINTER_PROTOCOL *This, 45 | IN BOOLEAN ExtendedVerification 46 | ); 47 | 48 | /** 49 | Retrieves the current state of a pointer device. 50 | 51 | @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL 52 | instance. 53 | @param State A pointer to the state information on the pointer device. 54 | 55 | @retval EFI_SUCCESS The state of the pointer device was returned in State. 56 | @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to 57 | GetState(). 58 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's 59 | current state. 60 | 61 | **/ 62 | EFI_STATUS 63 | EFIAPI 64 | <>SimplePointerGetState ( 65 | IN EFI_SIMPLE_POINTER_PROTOCOL *This, 66 | IN OUT EFI_SIMPLE_POINTER_STATE *State 67 | ); 68 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizardNewLibraryClass.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Subclass of NewLibraryClass, which is generated by wxFormBuilder. 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | """Subclass of NewLibraryClass, which is generated by wxFormBuilder.""" 17 | 18 | ## 19 | # Import Modules 20 | # 21 | import Config 22 | import wx 23 | import os 24 | import sys 25 | import uuid 26 | import string 27 | import TemplateString 28 | import UefiDriverWizard 29 | import UefiDriverWizardNewPackage 30 | import UefiDriverWizardNewUefiDriver 31 | import UefiDriverWizardNewProtocol 32 | import UefiDriverWizardNewGuid 33 | import UefiDriverWizardNewLibraryClass 34 | import UefiDriverWizardUefiDriverWizard 35 | import UefiDriverWizardUefiDriverModelOptionalFeatures 36 | import UefiDriverWizardUefiDriverModelConsumedProtocols 37 | import UefiDriverWizardUefiDriverModelProducedProtocols 38 | 39 | # Implementing NewLibraryClass 40 | class UefiDriverWizardNewLibraryClass( UefiDriverWizard.NewLibraryClass ): 41 | def __init__( self, parent ): 42 | UefiDriverWizard.NewLibraryClass.__init__( self, parent ) 43 | if Config.PackageFile <> '': 44 | self.PackageFile.SetPath(Config.PackageFile) 45 | else: 46 | if Config.PackagePath <> '': 47 | self.PackageFile.SetPath(Config.PackagePath + os.path.sep) 48 | else: 49 | self.PackageFile.SetPath(Config.WorkspacePath + os.path.sep) 50 | self.LibraryClassIncludeName.SetValue(Config.LibraryClassIncludeName) 51 | 52 | # Handlers for NewLibraryClass events. 53 | def PackageFileOnFileChanged( self, event ): 54 | Config.PackageFile = self.PackageFile.GetPath() 55 | 56 | def LibraryClassIncludeNameOnText( self, event ): 57 | Config.LibraryClassIncludeName = Config.App.TextFieldNameValid (self.LibraryClassIncludeName, event) 58 | 59 | def FinishOnButtonClick( self, event ): 60 | Result, Message = Config.App.CreateLibraryClass() 61 | if not Result: 62 | dlg = wx.MessageDialog( 63 | self, 64 | Message, 65 | 'ERROR', 66 | wx.OK | wx.ICON_ERROR 67 | ) 68 | dlg.ShowModal() 69 | dlg.Destroy() 70 | return 71 | dlg = wx.MessageDialog( 72 | self, 73 | Message, 74 | 'New Library Class', 75 | wx.OK | wx.ICON_INFORMATION 76 | ) 77 | dlg.ShowModal() 78 | dlg.Destroy() 79 | Config.LibraryClassIncludeName = '' 80 | self.Destroy() 81 | 82 | def CancelOnButtonClick( self, event ): 83 | Config.LibraryClassIncludeName = '' 84 | self.Destroy() 85 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/LoadFile.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | /// 32 | /// Load File Protocol instance 33 | /// 34 | GLOBAL_REMOVE_IF_UNREFERENCED 35 | EFI_LOAD_FILE_PROTOCOL g<>LoadFile = { 36 | <>LoadFileLoadFile 37 | }; 38 | 39 | /** 40 | Causes the driver to load a specified file. 41 | 42 | @param This Protocol instance pointer. 43 | @param FilePath The device specific path of the file to load. 44 | @param BootPolicy If TRUE, indicates that the request originates from the 45 | boot manager is attempting to load FilePath as a boot 46 | selection. If FALSE, then FilePath must match as exact file 47 | to be loaded. 48 | @param BufferSize On input the size of Buffer in bytes. On output with a return 49 | code of EFI_SUCCESS, the amount of data transferred to 50 | Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL, 51 | the size of Buffer required to retrieve the requested file. 52 | @param Buffer The memory buffer to transfer the file to. IF Buffer is NULL, 53 | then the size of the requested file is returned in 54 | BufferSize. 55 | 56 | @retval EFI_SUCCESS The file was loaded. 57 | @retval EFI_UNSUPPORTED The device does not support the provided BootPolicy 58 | @retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or 59 | BufferSize is NULL. 60 | @retval EFI_NO_MEDIA No medium was present to load the file. 61 | @retval EFI_DEVICE_ERROR The file was not loaded due to a device error. 62 | @retval EFI_NO_RESPONSE The remote system did not respond. 63 | @retval EFI_NOT_FOUND The file was not found. 64 | @retval EFI_ABORTED The file load process was manually cancelled. 65 | 66 | **/ 67 | EFI_STATUS 68 | EFIAPI 69 | <>LoadFileLoadFile ( 70 | IN EFI_LOAD_FILE_PROTOCOL *This, 71 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath, 72 | IN BOOLEAN BootPolicy, 73 | IN OUT UINTN *BufferSize, 74 | IN VOID *Buffer OPTIONAL 75 | ) 76 | { 77 | return EFI_UNSUPPORTED; 78 | } 79 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/SimplePointer.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | GLOBAL_REMOVE_IF_UNREFERENCED 32 | EFI_SIMPLE_POINTER_PROTOCOL g<>SimplePointer = { 33 | <>SimplePointerReset, 34 | <>SimplePointerGetState, 35 | NULL, 36 | NULL 37 | }; 38 | 39 | /** 40 | Resets the pointer device hardware. 41 | 42 | @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL 43 | instance. 44 | @param ExtendedVerification Indicates that the driver may perform a more exhaustive 45 | verification operation of the device during reset. 46 | 47 | @retval EFI_SUCCESS The device was reset. 48 | @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset. 49 | 50 | **/ 51 | EFI_STATUS 52 | EFIAPI 53 | <>SimplePointerReset ( 54 | IN EFI_SIMPLE_POINTER_PROTOCOL *This, 55 | IN BOOLEAN ExtendedVerification 56 | ) 57 | { 58 | return EFI_DEVICE_ERROR; 59 | } 60 | 61 | /** 62 | Retrieves the current state of a pointer device. 63 | 64 | @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL 65 | instance. 66 | @param State A pointer to the state information on the pointer device. 67 | 68 | @retval EFI_SUCCESS The state of the pointer device was returned in State. 69 | @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to 70 | GetState(). 71 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's 72 | current state. 73 | 74 | **/ 75 | EFI_STATUS 76 | EFIAPI 77 | <>SimplePointerGetState ( 78 | IN EFI_SIMPLE_POINTER_PROTOCOL *This, 79 | IN OUT EFI_SIMPLE_POINTER_STATE *State 80 | ) 81 | { 82 | return EFI_NOT_READY; 83 | } 84 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizardNewGuid.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Subclass of NewGuid, which is generated by wxFormBuilder. 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | """Subclass of NewGuid, which is generated by wxFormBuilder.""" 17 | 18 | ## 19 | # Import Modules 20 | # 21 | import Config 22 | import wx 23 | import os 24 | import sys 25 | import uuid 26 | import string 27 | import TemplateString 28 | import UefiDriverWizard 29 | import UefiDriverWizardNewPackage 30 | import UefiDriverWizardNewUefiDriver 31 | import UefiDriverWizardNewProtocol 32 | import UefiDriverWizardNewGuid 33 | import UefiDriverWizardNewLibraryClass 34 | import UefiDriverWizardUefiDriverWizard 35 | import UefiDriverWizardUefiDriverModelOptionalFeatures 36 | import UefiDriverWizardUefiDriverModelConsumedProtocols 37 | import UefiDriverWizardUefiDriverModelProducedProtocols 38 | 39 | # Implementing NewGuid 40 | class UefiDriverWizardNewGuid( UefiDriverWizard.NewGuid ): 41 | def __init__( self, parent ): 42 | UefiDriverWizard.NewGuid.__init__( self, parent ) 43 | if Config.PackageFile <> '': 44 | self.PackageFile.SetPath(Config.PackageFile) 45 | else: 46 | if Config.PackagePath <> '': 47 | self.PackageFile.SetPath(Config.PackagePath + os.path.sep) 48 | else: 49 | self.PackageFile.SetPath(Config.WorkspacePath + os.path.sep) 50 | if Config.GuidValue == '': 51 | Config.GuidValue = uuid.uuid1().get_urn().split(':')[2] 52 | self.GuidValue.SetValue(Config.GuidValue) 53 | self.GuidIncludeName.SetValue(Config.GuidIncludeName) 54 | 55 | # Handlers for NewGuid events. 56 | def PackageFileOnFileChanged( self, event ): 57 | Config.PackageFile = self.PackageFile.GetPath() 58 | 59 | def GuidValueOnText( self, event ): 60 | Config.GuidValue = event.GetString() 61 | 62 | def GenerateGuidOnButtonClick( self, event ): 63 | Config.GuidValue = uuid.uuid1().get_urn().split(':')[2] 64 | self.GuidValue.SetValue(Config.GuidValue) 65 | 66 | def GuidIncludeNameOnText( self, event ): 67 | Config.GuidIncludeName = Config.App.TextFieldNameValid (self.GuidIncludeName, event) 68 | 69 | def FinishOnButtonClick( self, event ): 70 | Result, Message = Config.App.CreateGuid() 71 | if not Result: 72 | dlg = wx.MessageDialog( 73 | self, 74 | Message, 75 | 'ERROR', 76 | wx.OK | wx.ICON_ERROR 77 | ) 78 | dlg.ShowModal() 79 | dlg.Destroy() 80 | return 81 | dlg = wx.MessageDialog( 82 | self, 83 | Message, 84 | 'New GUID', 85 | wx.OK | wx.ICON_INFORMATION 86 | ) 87 | dlg.ShowModal() 88 | dlg.Destroy() 89 | Config.GuidValue = '' 90 | Config.GuidIncludeName = '' 91 | self.Destroy() 92 | 93 | def CancelOnButtonClick( self, event ): 94 | Config.GuidValue = '' 95 | Config.GuidIncludeName = '' 96 | self.Destroy() 97 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizardNewProtocol.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Subclass of NewProtocol, which is generated by wxFormBuilder. 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | """Subclass of NewProtocol, which is generated by wxFormBuilder.""" 17 | 18 | ## 19 | # Import Modules 20 | # 21 | import Config 22 | import wx 23 | import os 24 | import sys 25 | import uuid 26 | import string 27 | import TemplateString 28 | import UefiDriverWizard 29 | import UefiDriverWizardNewPackage 30 | import UefiDriverWizardNewUefiDriver 31 | import UefiDriverWizardNewProtocol 32 | import UefiDriverWizardNewGuid 33 | import UefiDriverWizardNewLibraryClass 34 | import UefiDriverWizardUefiDriverWizard 35 | import UefiDriverWizardUefiDriverModelOptionalFeatures 36 | import UefiDriverWizardUefiDriverModelConsumedProtocols 37 | import UefiDriverWizardUefiDriverModelProducedProtocols 38 | 39 | # Implementing NewProtocol 40 | class UefiDriverWizardNewProtocol( UefiDriverWizard.NewProtocol ): 41 | def __init__( self, parent ): 42 | UefiDriverWizard.NewProtocol.__init__( self, parent ) 43 | if Config.PackageFile <> '': 44 | self.PackageFile.SetPath(Config.PackageFile) 45 | else: 46 | if Config.PackagePath <> '': 47 | self.PackageFile.SetPath(Config.PackagePath + os.path.sep) 48 | else: 49 | self.PackageFile.SetPath(Config.WorkspacePath + os.path.sep) 50 | if Config.ProtocolGuidValue == '': 51 | Config.ProtocolGuidValue = uuid.uuid1().get_urn().split(':')[2] 52 | self.ProtocolGuidValue.SetValue(Config.ProtocolGuidValue) 53 | self.ProtocolIncludeName.SetValue(Config.ProtocolIncludeName) 54 | 55 | # Handlers for NewProtocol events. 56 | def PackageFileOnFileChanged( self, event ): 57 | Config.PackageFile = self.PackageFile.GetPath() 58 | 59 | def ProtocolGuidValueOnText( self, event ): 60 | Config.ProtocolGuidValue = event.GetString() 61 | 62 | def GenerateGuidOnButtonClick( self, event ): 63 | Config.ProtocolGuidValue = uuid.uuid1().get_urn().split(':')[2] 64 | self.ProtocolGuidValue.SetValue(Config.ProtocolGuidValue) 65 | 66 | def ProtocolIncludeNameOnText( self, event ): 67 | Config.ProtocolIncludeName = Config.App.TextFieldNameValid (self.ProtocolIncludeName, event) 68 | 69 | def FinishOnButtonClick( self, event ): 70 | Result, Message = Config.App.CreateProtocol() 71 | if not Result: 72 | dlg = wx.MessageDialog( 73 | self, 74 | Message, 75 | 'ERROR', 76 | wx.OK | wx.ICON_ERROR 77 | ) 78 | dlg.ShowModal() 79 | dlg.Destroy() 80 | return 81 | dlg = wx.MessageDialog( 82 | self, 83 | Message, 84 | 'New Protocol', 85 | wx.OK | wx.ICON_INFORMATION 86 | ) 87 | dlg.ShowModal() 88 | dlg.Destroy() 89 | Config.ProtocolGuidValue = '' 90 | Config.ProtocolIncludeName = '' 91 | self.Destroy() 92 | 93 | def CancelOnButtonClick( self, event ): 94 | Config.ProtocolGuidValue = '' 95 | Config.ProtocolIncludeName = '' 96 | self.Destroy() 97 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/AbsolutePointer.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | This function resets the pointer device hardware. As part of 31 | initialization process, the firmware/device will make a quick 32 | but reasonable attempt to verify that the device is 33 | functioning. If the ExtendedVerification flag is TRUE the 34 | firmware may take an extended amount of time to verify the 35 | device is operating on reset. Otherwise the reset operation is 36 | to occur as quickly as possible. The hardware verification 37 | process is not defined by this specification and is left up to 38 | the platform firmware or driver to implement. 39 | 40 | @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL 41 | instance. 42 | 43 | @param ExtendedVerification Indicates that the driver may 44 | perform a more exhaustive 45 | verification operation of the 46 | device during reset. 47 | 48 | @retval EFI_SUCCESS The device was reset. 49 | 50 | @retval EFI_DEVICE_ERROR The device is not functioning 51 | correctly and could not be reset. 52 | 53 | **/ 54 | EFI_STATUS 55 | EFIAPI 56 | <>AbsolutePointerReset ( 57 | IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, 58 | IN BOOLEAN ExtendedVerification 59 | ); 60 | 61 | /** 62 | The GetState() function retrieves the current state of a pointer 63 | device. This includes information on the active state associated 64 | with the pointer device and the current position of the axes 65 | associated with the pointer device. If the state of the pointer 66 | device has not changed since the last call to GetState(), then 67 | EFI_NOT_READY is returned. If the state of the pointer device 68 | has changed since the last call to GetState(), then the state 69 | information is placed in State, and EFI_SUCCESS is returned. If 70 | a device error occurs while attempting to retrieve the state 71 | information, then EFI_DEVICE_ERROR is returned. 72 | 73 | 74 | @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL 75 | instance. 76 | 77 | @param State A pointer to the state information on the 78 | pointer device. 79 | 80 | @retval EFI_SUCCESS The state of the pointer device was 81 | returned in State. 82 | 83 | @retval EFI_NOT_READY The state of the pointer device has not 84 | changed since the last call to GetState(). 85 | 86 | @retval EFI_DEVICE_ERROR A device error occurred while 87 | attempting to retrieve the pointer 88 | device's current state. 89 | 90 | **/ 91 | EFI_STATUS 92 | EFIAPI 93 | <>AbsolutePointerGetState ( 94 | IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, 95 | IN OUT EFI_ABSOLUTE_POINTER_STATE *State 96 | ); 97 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizardUefiDriverModelConsumedProtocols.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Subclass of UefiDriverModelConsumedProtocols, which is generated by wxFormBuilder. 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | """Subclass of UefiDriverModelConsumedProtocols, which is generated by wxFormBuilder.""" 17 | 18 | ## 19 | # Import Modules 20 | # 21 | import Config 22 | import wx 23 | import os 24 | import sys 25 | import uuid 26 | import string 27 | import TemplateString 28 | import UefiDriverWizard 29 | import UefiDriverWizardNewPackage 30 | import UefiDriverWizardNewUefiDriver 31 | import UefiDriverWizardNewProtocol 32 | import UefiDriverWizardNewGuid 33 | import UefiDriverWizardNewLibraryClass 34 | import UefiDriverWizardUefiDriverWizard 35 | import UefiDriverWizardUefiDriverModelOptionalFeatures 36 | import UefiDriverWizardUefiDriverModelConsumedProtocols 37 | import UefiDriverWizardUefiDriverModelProducedProtocols 38 | 39 | # Implementing UefiDriverModelConsumedProtocols 40 | class UefiDriverWizardUefiDriverModelConsumedProtocols( UefiDriverWizard.UefiDriverModelConsumedProtocols ): 41 | def __init__( self, parent ): 42 | UefiDriverWizard.UefiDriverModelConsumedProtocols.__init__( self, parent ) 43 | self.UefiDriverConsumedProtocols.SetCheckedStrings(Config.UefiDriverConsumedProtocols) 44 | 45 | # Handlers for UefiDriverModelConsumedProtocols events. 46 | def UefiDriverConsumedProtocolsOnCheckListBoxToggled( self, event ): 47 | if self.UefiDriverConsumedProtocols.GetCheckedStrings() == (): 48 | self.UefiDriverConsumedProtocols.SetCheckedStrings(Config.UefiDriverConsumedProtocols) 49 | return 50 | Config.UefiDriverConsumedProtocols = tuple(set(self.UefiDriverConsumedProtocols.GetCheckedStrings()) - set(Config.UefiDriverConsumedProtocols)) 51 | self.UefiDriverConsumedProtocols.SetCheckedStrings(Config.UefiDriverConsumedProtocols) 52 | 53 | def PrevOnButtonClick( self, event ): 54 | self.Destroy() 55 | frame = UefiDriverWizardUefiDriverModelOptionalFeatures.UefiDriverWizardUefiDriverModelOptionalFeatures (None) 56 | frame.Show() 57 | 58 | def NextOnButtonClick( self, event ): 59 | self.Destroy() 60 | frame = UefiDriverWizardUefiDriverModelProducedProtocols.UefiDriverWizardUefiDriverModelProducedProtocols (None) 61 | frame.Show() 62 | 63 | def FinishOnButtonClick( self, event ): 64 | if Config.UefiDriverName == '': 65 | Config.UefiDriverName = os.path.split(Config.UefiDriverPath)[-1] 66 | Result, Message = Config.App.CreateUefiDriver() 67 | if not Result: 68 | dlg = wx.MessageDialog( 69 | self, 70 | Message, 71 | 'ERROR', 72 | wx.OK | wx.ICON_ERROR 73 | ) 74 | dlg.ShowModal() 75 | dlg.Destroy() 76 | return 77 | dlg = wx.MessageDialog( 78 | self, 79 | Message, 80 | 'New UEFI Driver', 81 | wx.OK | wx.ICON_INFORMATION 82 | ) 83 | dlg.ShowModal() 84 | dlg.Destroy() 85 | Config.UefiDriverName = '' 86 | Config.UefiDriverVersion = '' 87 | Config.UefiDriverGuid = '' 88 | self.Destroy() 89 | 90 | def CancelOnButtonClick( self, event ): 91 | Config.UefiDriverName = '' 92 | Config.UefiDriverVersion = '' 93 | Config.UefiDriverGuid = '' 94 | self.Destroy() 95 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/AbsolutePointer.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | GLOBAL_REMOVE_IF_UNREFERENCED 32 | EFI_ABSOLUTE_POINTER_PROTOCOL g<>AbsolutePointer = { 33 | <>AbsolutePointerReset, 34 | <>AbsolutePointerGetState, 35 | NULL, 36 | NULL 37 | }; 38 | 39 | /** 40 | This function resets the pointer device hardware. As part of 41 | initialization process, the firmware/device will make a quick 42 | but reasonable attempt to verify that the device is 43 | functioning. If the ExtendedVerification flag is TRUE the 44 | firmware may take an extended amount of time to verify the 45 | device is operating on reset. Otherwise the reset operation is 46 | to occur as quickly as possible. The hardware verification 47 | process is not defined by this specification and is left up to 48 | the platform firmware or driver to implement. 49 | 50 | @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL 51 | instance. 52 | 53 | @param ExtendedVerification Indicates that the driver may 54 | perform a more exhaustive 55 | verification operation of the 56 | device during reset. 57 | 58 | @retval EFI_SUCCESS The device was reset. 59 | 60 | @retval EFI_DEVICE_ERROR The device is not functioning 61 | correctly and could not be reset. 62 | 63 | **/ 64 | EFI_STATUS 65 | EFIAPI 66 | <>AbsolutePointerReset ( 67 | IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, 68 | IN BOOLEAN ExtendedVerification 69 | ) 70 | { 71 | return EFI_DEVICE_ERROR; 72 | } 73 | 74 | /** 75 | The GetState() function retrieves the current state of a pointer 76 | device. This includes information on the active state associated 77 | with the pointer device and the current position of the axes 78 | associated with the pointer device. If the state of the pointer 79 | device has not changed since the last call to GetState(), then 80 | EFI_NOT_READY is returned. If the state of the pointer device 81 | has changed since the last call to GetState(), then the state 82 | information is placed in State, and EFI_SUCCESS is returned. If 83 | a device error occurs while attempting to retrieve the state 84 | information, then EFI_DEVICE_ERROR is returned. 85 | 86 | 87 | @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL 88 | instance. 89 | 90 | @param State A pointer to the state information on the 91 | pointer device. 92 | 93 | @retval EFI_SUCCESS The state of the pointer device was 94 | returned in State. 95 | 96 | @retval EFI_NOT_READY The state of the pointer device has not 97 | changed since the last call to GetState(). 98 | 99 | @retval EFI_DEVICE_ERROR A device error occurred while 100 | attempting to retrieve the pointer 101 | device's current state. 102 | 103 | **/ 104 | EFI_STATUS 105 | EFIAPI 106 | <>AbsolutePointerGetState ( 107 | IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, 108 | IN OUT EFI_ABSOLUTE_POINTER_STATE *State 109 | ) 110 | { 111 | return EFI_NOT_READY; 112 | } 113 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizardUefiDriverModelProducedProtocols.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Subclass of UefiDriverModelProducedProtocols, which is generated by wxFormBuilder. 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | """Subclass of UefiDriverModelProducedProtocols, which is generated by wxFormBuilder.""" 17 | 18 | ## 19 | # Import Modules 20 | # 21 | import Config 22 | import wx 23 | import os 24 | import sys 25 | import uuid 26 | import string 27 | import TemplateString 28 | import UefiDriverWizard 29 | import UefiDriverWizardNewPackage 30 | import UefiDriverWizardNewUefiDriver 31 | import UefiDriverWizardNewProtocol 32 | import UefiDriverWizardNewGuid 33 | import UefiDriverWizardNewLibraryClass 34 | import UefiDriverWizardUefiDriverWizard 35 | import UefiDriverWizardUefiDriverModelOptionalFeatures 36 | import UefiDriverWizardUefiDriverModelConsumedProtocols 37 | import UefiDriverWizardUefiDriverModelProducedProtocols 38 | 39 | # Implementing UefiDriverModelProducedProtocols 40 | class UefiDriverWizardUefiDriverModelProducedProtocols( UefiDriverWizard.UefiDriverModelProducedProtocols ): 41 | def __init__( self, parent ): 42 | UefiDriverWizard.UefiDriverModelProducedProtocols.__init__( self, parent ) 43 | self.UefiDriverProducedProtocols.SetCheckedStrings(Config.UefiDriverProducedProtocols) 44 | self.UsbMajorVersion.SetValue (Config.UsbMajorVersion) 45 | self.UsbMinorVersion.SetValue (Config.UsbMinorVersion) 46 | if u"USB Host Controller producing the USB Host Controller 2 Protocol" in Config.UefiDriverProducedProtocols: 47 | self.UsbMajorVersion.Enable() 48 | self.UsbMinorVersion.Enable() 49 | else: 50 | self.UsbMajorVersion.Disable() 51 | self.UsbMinorVersion.Disable() 52 | 53 | # Handlers for UefiDriverModelProducedProtocols events. 54 | def UefiDriverProducedProtocolsOnCheckListBoxToggled( self, event ): 55 | Config.UefiDriverProducedProtocols = self.UefiDriverProducedProtocols.GetCheckedStrings() 56 | if u"USB Host Controller producing the USB Host Controller 2 Protocol" in Config.UefiDriverProducedProtocols: 57 | self.UsbMajorVersion.Enable() 58 | self.UsbMinorVersion.Enable() 59 | else: 60 | self.UsbMajorVersion.Disable() 61 | self.UsbMinorVersion.Disable() 62 | 63 | def UsbMajorVersionOnText( self, event ): 64 | Config.UsbMajorVersion = event.GetString() 65 | 66 | def UsbMinorVersionOnText( self, event ): 67 | Config.UsbMinorVersion = event.GetString() 68 | 69 | def PrevOnButtonClick( self, event ): 70 | self.Destroy() 71 | frame = UefiDriverWizardUefiDriverModelConsumedProtocols.UefiDriverWizardUefiDriverModelConsumedProtocols (None) 72 | frame.Show() 73 | 74 | def FinishOnButtonClick( self, event ): 75 | if Config.UefiDriverName == '': 76 | Config.UefiDriverName = os.path.split(Config.UefiDriverPath)[-1] 77 | Result, Message = Config.App.CreateUefiDriver() 78 | if not Result: 79 | dlg = wx.MessageDialog( 80 | self, 81 | Message, 82 | 'ERROR', 83 | wx.OK | wx.ICON_ERROR 84 | ) 85 | dlg.ShowModal() 86 | dlg.Destroy() 87 | return 88 | dlg = wx.MessageDialog( 89 | self, 90 | Message, 91 | 'New UEFI Driver', 92 | wx.OK | wx.ICON_INFORMATION 93 | ) 94 | dlg.ShowModal() 95 | dlg.Destroy() 96 | Config.UefiDriverName = '' 97 | Config.UefiDriverVersion = '' 98 | Config.UefiDriverGuid = '' 99 | self.Destroy() 100 | 101 | def CancelOnButtonClick( self, event ): 102 | Config.UefiDriverName = '' 103 | Config.UefiDriverVersion = '' 104 | Config.UefiDriverGuid = '' 105 | self.Destroy() 106 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/GraphicsOutput.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Returns information for an available graphics mode that the graphics device 31 | and the set of active video output devices supports. 32 | 33 | @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance. 34 | @param ModeNumber The mode number to return information on. 35 | @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer. 36 | @param Info A pointer to callee allocated buffer that returns information about ModeNumber. 37 | 38 | @retval EFI_SUCCESS Mode information returned. 39 | @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small. 40 | @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode. 41 | @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode () 42 | @retval EFI_INVALID_PARAMETER One of the input args was NULL. 43 | 44 | **/ 45 | EFI_STATUS 46 | EFIAPI 47 | <>GraphicsOutputQueryMode ( 48 | IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 49 | IN UINT32 ModeNumber, 50 | OUT UINTN *SizeOfInfo, 51 | OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info 52 | ); 53 | 54 | /** 55 | Set the video device into the specified mode and clears the visible portions of 56 | the output display to black. 57 | 58 | @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance. 59 | @param ModeNumber Abstraction that defines the current video mode. 60 | 61 | @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected. 62 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. 63 | @retval EFI_UNSUPPORTED ModeNumber is not supported by this device. 64 | 65 | **/ 66 | EFI_STATUS 67 | EFIAPI 68 | <>GraphicsOutputSetMode ( 69 | IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 70 | IN UINT32 ModeNumber 71 | ); 72 | 73 | /** 74 | Blt a rectangle of pixels on the graphics screen. Blt stands for BLock Transfer. 75 | 76 | @param This Protocol instance pointer. 77 | @param BltBuffer Buffer containing data to blit into video buffer. This 78 | buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) 79 | @param BltOperation Operation to perform on BlitBuffer and video memory 80 | @param SourceX X coordinate of source for the BltBuffer. 81 | @param SourceY Y coordinate of source for the BltBuffer. 82 | @param DestinationX X coordinate of destination for the BltBuffer. 83 | @param DestinationY Y coordinate of destination for the BltBuffer. 84 | @param Width Width of rectangle in BltBuffer in pixels. 85 | @param Height Hight of rectangle in BltBuffer in pixels. 86 | @param Delta OPTIONAL 87 | 88 | @retval EFI_SUCCESS The Blt operation completed. 89 | @retval EFI_INVALID_PARAMETER BltOperation is not valid. 90 | @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer. 91 | 92 | **/ 93 | EFI_STATUS 94 | EFIAPI 95 | <>GraphicsOutputBlt ( 96 | IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 97 | IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL 98 | IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, 99 | IN UINTN SourceX, 100 | IN UINTN SourceY, 101 | IN UINTN DestinationX, 102 | IN UINTN DestinationY, 103 | IN UINTN Width, 104 | IN UINTN Height, 105 | IN UINTN Delta OPTIONAL 106 | ); 107 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizardNewPackage.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Subclass of NewPackage, which is generated by wxFormBuilder. 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | """Subclass of NewPackage, which is generated by wxFormBuilder.""" 17 | 18 | ## 19 | # Import Modules 20 | # 21 | import Config 22 | import wx 23 | import os 24 | import sys 25 | import uuid 26 | import string 27 | import TemplateString 28 | import UefiDriverWizard 29 | import UefiDriverWizardNewPackage 30 | import UefiDriverWizardNewUefiDriver 31 | import UefiDriverWizardNewProtocol 32 | import UefiDriverWizardNewGuid 33 | import UefiDriverWizardNewLibraryClass 34 | import UefiDriverWizardUefiDriverWizard 35 | import UefiDriverWizardUefiDriverModelOptionalFeatures 36 | import UefiDriverWizardUefiDriverModelConsumedProtocols 37 | import UefiDriverWizardUefiDriverModelProducedProtocols 38 | 39 | # Implementing NewPackage 40 | class UefiDriverWizardNewPackage( UefiDriverWizard.NewPackage ): 41 | def __init__( self, parent ): 42 | UefiDriverWizard.NewPackage.__init__( self, parent ) 43 | if (Config.PackagePath <> ''): 44 | self.PackagePath.SetPath(Config.PackagePath + os.path.sep) 45 | else: 46 | self.PackagePath.SetPath(Config.WorkspacePath + os.path.sep) 47 | if Config.PackageName == '': 48 | Config.PackageName = os.path.split(Config.PackagePath)[-1] 49 | self.PackageName.SetValue(Config.PackageName) 50 | if Config.PackageGuidValue == '': 51 | Config.PackageGuidValue = uuid.uuid1().get_urn().split(':')[2] 52 | self.PackageGuidValue.SetValue(Config.PackageGuidValue) 53 | self.PackageVersion.SetValue(Config.PackageVersion) 54 | if Config.PlatformGuidValue == '': 55 | Config.PlatformGuidValue = uuid.uuid1().get_urn().split(':')[2] 56 | self.PlatformGuidValue.SetValue(Config.PlatformGuidValue) 57 | 58 | # Handlers for NewPackage events. 59 | def PackagePathOnDirChanged( self, event ): 60 | if Config.PackageName == '' or Config.PackageName == os.path.split(Config.PackagePath)[1]: 61 | Config.PackagePath = self.PackagePath.GetPath() 62 | self.PackageName.SetValue(os.path.split(Config.PackagePath)[1]) 63 | else: 64 | Config.PackagePath = self.PackagePath.GetPath() 65 | 66 | def PackageNameOnText( self, event ): 67 | Config.PackageName = Config.App.TextFieldNameValid (self.PackageName, event) 68 | 69 | def PackageGuidValueOnText( self, event ): 70 | Config.PackageGuidValue = event.GetString() 71 | 72 | def GenerateGuidOnButtonClick( self, event ): 73 | Config.PackageGuidValue = uuid.uuid1().get_urn().split(':')[2] 74 | self.PackageGuidValue.SetValue(Config.PackageGuidValue) 75 | 76 | def PackageVersionOnText( self, event ): 77 | Config.PackageVersion = Config.App.TextFieldVersionValid (self.PackageVersion, event) 78 | 79 | def PlatformGuidValueOnText( self, event ): 80 | Config.PlatformGuidValue = event.GetString() 81 | 82 | def GeneratePlatformGuidOnButtonClick( self, event ): 83 | Config.PlatformGuidValue = uuid.uuid1().get_urn().split(':')[2] 84 | self.PlatformGuidValue.SetValue(Config.PlatformGuidValue) 85 | 86 | def FinishOnButtonClick( self, event ): 87 | if Config.PackageName == '': 88 | Config.PackageName = os.path.split(Config.PackagePath)[-1] 89 | Result, Message = Config.App.CreatePackage() 90 | if not Result: 91 | dlg = wx.MessageDialog( 92 | self, 93 | Message, 94 | 'ERROR', 95 | wx.OK | wx.ICON_ERROR 96 | ) 97 | dlg.ShowModal() 98 | dlg.Destroy() 99 | return 100 | dlg = wx.MessageDialog( 101 | self, 102 | Message, 103 | 'New Package', 104 | wx.OK | wx.ICON_INFORMATION 105 | ) 106 | dlg.ShowModal() 107 | dlg.Destroy() 108 | Config.PackageName = '' 109 | Config.PackageGuidValue = '' 110 | Config.PackageVersion = '' 111 | Config.PlatformGuidValue = '' 112 | self.Destroy() 113 | 114 | def CancelOnButtonClick( self, event ): 115 | Config.PackageName = '' 116 | Config.PackageGuidValue = '' 117 | Config.PackageVersion = '' 118 | Config.PlatformGuidValue = '' 119 | self.Destroy() 120 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/README: -------------------------------------------------------------------------------- 1 | === UEFI DRIVER WIZARD README === 2 | Version : 0.11 3 | Date : 03/03/2012 4 | 5 | === UEFI DRIVBER WIZARD OVERVIEW === 6 | 7 | The UEFI Driver Wizard is designed to aid in the development of 8 | UEFI Drivers using the EDK II open source project as a development 9 | environment. The EDK II provides a cross-platform firmware 10 | development environment for UEFI. UEFI Drivers are described in 11 | the Unified Extensible Firmware Interface Specification, Version 12 | 2.3.1. There are different categories of UEFI Drivers, and many 13 | variations of each category. This wizard provides basic support 14 | for the most common categories of UEFI drivers. Many other driver 15 | designs are possible. In addition, this wizard provides a 16 | templates for the various driver-related UEFI Protocols including 17 | Consoles, Serial Ports, Graphics, Mass Storage, Network Interfaces, 18 | and User Credentials. 19 | 20 | * Information about the UEFI Driver Wizard can be found at: 21 | 22 | http://www.tianocore.org 23 | 24 | * Information about the EDK II code base can be found at: 25 | 26 | http://www.tianocore.org 27 | 28 | * Information about the UEFI Specification can be found at: 29 | 30 | http://www.uefi.org 31 | 32 | === UEFI DRIVER WIZARD STATUS === 33 | 34 | Current status: Alpha "as is" 35 | 36 | Current capabilities: 37 | * Create new EDK II packages with DEC/DSC files for building UEFI Drivers 38 | * Create new UEFI Driver 39 | - Generated C code compiles/links using EDK II development environment. 40 | - Compiled UEFI Driver is loadable with no modifications. 41 | * Create new Protocol template in an existing EDK II package 42 | * Create new GUID template in an existing EDK II package 43 | * Create new Library Class template in an existing EDK II package 44 | 45 | === RUNNING UEFI DRIVER WIZARD === 46 | 47 | Windows Executable: 48 | * Download and install UefiDriverWizard.msi 49 | * Run installed UefiDriverWizard.exe 50 | 51 | Python Script under Windows, Linux, UNIX, OS/X: 52 | * Install Python 2.7.2 53 | http://www.python.org 54 | * Install wxPython 2.8.12.1 55 | http://www.wxpython.org 56 | * Download UEFI Driver Wizard sources into a new directory 57 | * Run Python script "launch.py" 58 | 59 | === GENERATE UefiDriverWizard.msi === 60 | 61 | The following is the set of steps required to generate 62 | UefiDriverWizard.msi from the Python scripts: 63 | 64 | * Install Python 2.7.2 65 | http://www.python.org 66 | * Install wxPython 2.8.12.1 67 | http://www.wxpython.org 68 | * Install pyInstaller 1.5.1 69 | http://www.pyinstaller.org 70 | * Install Windows Installer XML 3.5 71 | http://wix.sourceforge.net 72 | * Download UEFI Driver Wizard sources into a new directory 73 | * Update PYINSTALLER_PATH in GenerateMsi.cmd 74 | * Update WIX_PATH in GenerateMsi.cmd 75 | * Run GenerateMsi.cmd 76 | 77 | Note: Only generation of a 32-bit MSI has been tested. 78 | 79 | === UEFI Driver Wizard Development === 80 | 81 | If you are interested in updating or extending the capabilities of the 82 | UEFI Driver Wizard, then the following tools are required. 83 | 84 | * Install Python 2.7.2 85 | http://www.python.org 86 | * Install wxPython 2.8.12.1 87 | http://www.wxpython.org 88 | * Install wxFormBuilder 3.1 89 | http://wxformbuilder.org 90 | 91 | GUI Design Changes 92 | ------------------ 93 | 1) Use wxFormBuilder to open the file UefiDriverWizard.fbp. 94 | 2) Make UI changes using wxFormBuilder. 95 | 3) Generate wxPython code and generate code for all the inherited classes. 96 | 4) All generated code goes into a subdirectory called InheritedClasses. 97 | 5) Merge code changes from InheritedClasses into main directory. 98 | Note: wxFormBuilder generates files with TABs. These must be converted 99 | to spaces to mach EDK II coding style. 100 | 101 | UEFI Driver Wizard Template Updates 102 | ----------------------------------- 103 | All template files are in the subdirectory called Templates. Updates to 104 | these files are used the next time the UEFI Driver Wizard is executed. 105 | Most of the content is plain text that can be easily modified. Strings 106 | that are replaced during code generation are placed between << >>. 107 | 108 | <> and <> are special keywords that mark a region of the 109 | template that can produce 0 or more repeats of the enclosed content. 110 | The use of 0 repeats is valuable for sections of code that are optional 111 | based in the set of features selected. 112 | 113 | All of the code generation logic is in the file launch.py. For each 114 | code generation task, launch.py initializes a dictionary of replacement 115 | strings whose values are set by the GUI forms. Once the dictionary 116 | initialization is completed, an internal method applies the dictionary 117 | to files in the Templates directory and writes the result to the proper 118 | destination directory. 119 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/DriverDiagnostics.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Runs diagnostics on a controller. 31 | 32 | @param This A pointer to the EFI_DRIVER_DIAGNOSTICS2_PROTOCOL instance. 33 | @param ControllerHandle The handle of the controller to run diagnostics on. 34 | @param ChildHandle The handle of the child controller to run diagnostics on 35 | This is an optional parameter that may be NULL. It will 36 | be NULL for device drivers. It will also be NULL for 37 | bus drivers that wish to run diagnostics on the bus 38 | controller. It will not be NULL for a bus driver that 39 | wishes to run diagnostics on one of its child controllers. 40 | @param DiagnosticType Indicates the type of diagnostics to perform on the controller 41 | specified by ControllerHandle and ChildHandle. See 42 | "Related Definitions" for the list of supported types. 43 | @param Language A pointer to a Null-terminated ASCII string 44 | array indicating the language. This is the 45 | language of the driver name that the caller 46 | is requesting, and it must match one of the 47 | languages specified in SupportedLanguages. 48 | The number of languages supported by a 49 | driver is up to the driver writer. Language 50 | is specified in RFC 4646 language code format. 51 | @param ErrorType A GUID that defines the format of the data returned in Buffer. 52 | @param BufferSize The size, in bytes, of the data returned in Buffer. 53 | @param Buffer A buffer that contains a Null-terminated Unicode string 54 | plus some additional data whose format is defined by 55 | ErrorType. Buffer is allocated by this function with 56 | AllocatePool(), and it is the caller's responsibility 57 | to free it with a call to FreePool(). 58 | 59 | @retval EFI_SUCCESS The controller specified by ControllerHandle and 60 | ChildHandle passed the diagnostic. 61 | @retval EFI_ACCESS_DENIED The request for initiating diagnostics was unable 62 | to be complete due to some underlying hardware or 63 | software state. 64 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. 65 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 66 | @retval EFI_INVALID_PARAMETER Language is NULL. 67 | @retval EFI_INVALID_PARAMETER ErrorType is NULL. 68 | @retval EFI_INVALID_PARAMETER BufferType is NULL. 69 | @retval EFI_INVALID_PARAMETER Buffer is NULL. 70 | @retval EFI_UNSUPPORTED The driver specified by This does not support 71 | running diagnostics for the controller specified 72 | by ControllerHandle and ChildHandle. 73 | @retval EFI_UNSUPPORTED The driver specified by This does not support the 74 | type of diagnostic specified by DiagnosticType. 75 | @retval EFI_UNSUPPORTED The driver specified by This does not support the 76 | language specified by Language. 77 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete 78 | the diagnostics. 79 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return 80 | the status information in ErrorType, BufferSize, 81 | and Buffer. 82 | @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and 83 | ChildHandle did not pass the diagnostic. 84 | 85 | **/ 86 | EFI_STATUS 87 | EFIAPI 88 | <>DriverDiagnosticsRunDiagnostics ( 89 | IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *This, 90 | IN EFI_HANDLE ControllerHandle, 91 | IN EFI_HANDLE ChildHandle OPTIONAL, 92 | IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType, 93 | IN CHAR8 *Language, 94 | OUT EFI_GUID **ErrorType, 95 | OUT UINTN *BufferSize, 96 | OUT CHAR16 **Buffer 97 | ); 98 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/ComponentName.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Retrieves a Unicode string that is the user-readable name of the EFI Driver. 31 | 32 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 33 | @param Language A pointer to a three-character ISO 639-2 language identifier. 34 | This is the language of the driver name that that the caller 35 | is requesting, and it must match one of the languages specified 36 | in SupportedLanguages. The number of languages supported by a 37 | driver is up to the driver writer. 38 | @param DriverName A pointer to the Unicode string to return. This Unicode string 39 | is the name of the driver specified by This in the language 40 | specified by Language. 41 | 42 | @retval EFI_SUCCESS The Unicode string for the Driver specified by This 43 | and the language specified by Language was returned 44 | in DriverName. 45 | @retval EFI_INVALID_PARAMETER Language is NULL. 46 | @retval EFI_INVALID_PARAMETER DriverName is NULL. 47 | @retval EFI_UNSUPPORTED The driver specified by This does not support the 48 | language specified by Language. 49 | 50 | **/ 51 | EFI_STATUS 52 | EFIAPI 53 | <>ComponentNameGetDriverName ( 54 | IN EFI_COMPONENT_NAME2_PROTOCOL *This, 55 | IN CHAR8 *Language, 56 | OUT CHAR16 **DriverName 57 | ); 58 | 59 | /** 60 | Retrieves a Unicode string that is the user readable name of the controller 61 | that is being managed by an EFI Driver. 62 | 63 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 64 | @param ControllerHandle The handle of a controller that the driver specified by 65 | This is managing. This handle specifies the controller 66 | whose name is to be returned. 67 | @param ChildHandle The handle of the child controller to retrieve the name 68 | of. This is an optional parameter that may be NULL. It 69 | will be NULL for device drivers. It will also be NULL 70 | for a bus drivers that wish to retrieve the name of the 71 | bus controller. It will not be NULL for a bus driver 72 | that wishes to retrieve the name of a child controller. 73 | @param Language A pointer to a three character ISO 639-2 language 74 | identifier. This is the language of the controller name 75 | that the caller is requesting, and it must match one 76 | of the languages specified in SupportedLanguages. The 77 | number of languages supported by a driver is up to the 78 | driver writer. 79 | @param ControllerName A pointer to the Unicode string to return. This Unicode 80 | string is the name of the controller specified by 81 | ControllerHandle and ChildHandle in the language specified 82 | by Language, from the point of view of the driver specified 83 | by This. 84 | 85 | @retval EFI_SUCCESS The Unicode string for the user-readable name in the 86 | language specified by Language for the driver 87 | specified by This was returned in DriverName. 88 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. 89 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 90 | @retval EFI_INVALID_PARAMETER Language is NULL. 91 | @retval EFI_INVALID_PARAMETER ControllerName is NULL. 92 | @retval EFI_UNSUPPORTED The driver specified by This is not currently managing 93 | the controller specified by ControllerHandle and 94 | ChildHandle. 95 | @retval EFI_UNSUPPORTED The driver specified by This does not support the 96 | language specified by Language. 97 | 98 | **/ 99 | EFI_STATUS 100 | EFIAPI 101 | <>ComponentNameGetControllerName ( 102 | IN EFI_COMPONENT_NAME2_PROTOCOL *This, 103 | IN EFI_HANDLE ControllerHandle, 104 | IN EFI_HANDLE ChildHandle OPTIONAL, 105 | IN CHAR8 *Language, 106 | OUT CHAR16 **ControllerName 107 | ); 108 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/GraphicsOutput.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | /// 32 | /// Graphics Output Protocol Mode structure 33 | /// 34 | GLOBAL_REMOVE_IF_UNREFERENCED 35 | EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE g<>GraphicsOutputMode = { 36 | 0, // MaxMode 37 | 0, // Mode 38 | NULL, // Info 39 | 0, // SizeOfInfo 40 | 0, // FrameBufferBase 41 | 0 // FrameBufferSize 42 | }; 43 | 44 | /// 45 | /// Graphics Output Protocol instance 46 | /// 47 | GLOBAL_REMOVE_IF_UNREFERENCED 48 | EFI_GRAPHICS_OUTPUT_PROTOCOL g<>GraphicsOutput = { 49 | <>GraphicsOutputQueryMode, 50 | <>GraphicsOutputSetMode, 51 | <>GraphicsOutputBlt, 52 | &g<>GraphicsOutputMode 53 | }; 54 | 55 | /** 56 | Returns information for an available graphics mode that the graphics device 57 | and the set of active video output devices supports. 58 | 59 | @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance. 60 | @param ModeNumber The mode number to return information on. 61 | @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer. 62 | @param Info A pointer to callee allocated buffer that returns information about ModeNumber. 63 | 64 | @retval EFI_SUCCESS Mode information returned. 65 | @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small. 66 | @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode. 67 | @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode () 68 | @retval EFI_INVALID_PARAMETER One of the input args was NULL. 69 | 70 | **/ 71 | EFI_STATUS 72 | EFIAPI 73 | <>GraphicsOutputQueryMode ( 74 | IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 75 | IN UINT32 ModeNumber, 76 | OUT UINTN *SizeOfInfo, 77 | OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info 78 | ) 79 | { 80 | return EFI_DEVICE_ERROR; 81 | } 82 | 83 | /** 84 | Set the video device into the specified mode and clears the visible portions of 85 | the output display to black. 86 | 87 | @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance. 88 | @param ModeNumber Abstraction that defines the current video mode. 89 | 90 | @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected. 91 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. 92 | @retval EFI_UNSUPPORTED ModeNumber is not supported by this device. 93 | 94 | **/ 95 | EFI_STATUS 96 | EFIAPI 97 | <>GraphicsOutputSetMode ( 98 | IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 99 | IN UINT32 ModeNumber 100 | ) 101 | { 102 | return EFI_DEVICE_ERROR; 103 | } 104 | 105 | /** 106 | Blt a rectangle of pixels on the graphics screen. Blt stands for BLock Transfer. 107 | 108 | @param This Protocol instance pointer. 109 | @param BltBuffer Buffer containing data to blit into video buffer. This 110 | buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) 111 | @param BltOperation Operation to perform on BlitBuffer and video memory 112 | @param SourceX X coordinate of source for the BltBuffer. 113 | @param SourceY Y coordinate of source for the BltBuffer. 114 | @param DestinationX X coordinate of destination for the BltBuffer. 115 | @param DestinationY Y coordinate of destination for the BltBuffer. 116 | @param Width Width of rectangle in BltBuffer in pixels. 117 | @param Height Hight of rectangle in BltBuffer in pixels. 118 | @param Delta OPTIONAL 119 | 120 | @retval EFI_SUCCESS The Blt operation completed. 121 | @retval EFI_INVALID_PARAMETER BltOperation is not valid. 122 | @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer. 123 | 124 | **/ 125 | EFI_STATUS 126 | EFIAPI 127 | <>GraphicsOutputBlt ( 128 | IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 129 | IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL 130 | IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, 131 | IN UINTN SourceX, 132 | IN UINTN SourceY, 133 | IN UINTN DestinationX, 134 | IN UINTN DestinationY, 135 | IN UINTN Width, 136 | IN UINTN Height, 137 | IN UINTN Delta OPTIONAL 138 | ) 139 | { 140 | return EFI_DEVICE_ERROR; 141 | } 142 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizardUefiDriverModelOptionalFeatures.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Subclass of UefiDriverModelOptionalFeatures, which is generated by wxFormBuilder. 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | """Subclass of UefiDriverModelOptionalFeatures, which is generated by wxFormBuilder.""" 17 | 18 | ## 19 | # Import Modules 20 | # 21 | import Config 22 | import wx 23 | import os 24 | import sys 25 | import uuid 26 | import string 27 | import TemplateString 28 | import UefiDriverWizard 29 | import UefiDriverWizardNewPackage 30 | import UefiDriverWizardNewUefiDriver 31 | import UefiDriverWizardNewProtocol 32 | import UefiDriverWizardNewGuid 33 | import UefiDriverWizardNewLibraryClass 34 | import UefiDriverWizardUefiDriverWizard 35 | import UefiDriverWizardUefiDriverModelOptionalFeatures 36 | import UefiDriverWizardUefiDriverModelConsumedProtocols 37 | import UefiDriverWizardUefiDriverModelProducedProtocols 38 | 39 | # Implementing UefiDriverModelOptionalFeatures 40 | class UefiDriverWizardUefiDriverModelOptionalFeatures( UefiDriverWizard.UefiDriverModelOptionalFeatures ): 41 | def __init__( self, parent ): 42 | UefiDriverWizard.UefiDriverModelOptionalFeatures.__init__( self, parent ) 43 | self.UefiDriverDriverModelFeatures.SetCheckedStrings(Config.UefiDriverDriverModelFeatures) 44 | self.Rfc4646LanguageCodes.SetValue (Config.Rfc4646LanguageCodes) 45 | self.Iso639LanguageCodes.SetValue (Config.Iso639LanguageCodes) 46 | Rfc = False 47 | Iso = False 48 | if u"HII Packages for forms and HII based configuration " in Config.UefiDriverDriverModelFeatures: 49 | Rfc = True 50 | if u"Component Name 2 Protocol" in Config.UefiDriverDriverModelFeatures: 51 | Rfc = True 52 | if u"Component Name Protocol" in Config.UefiDriverDriverModelFeatures: 53 | Iso = True 54 | if u"Driver Diagnostics 2 Protocol" in Config.UefiDriverDriverModelFeatures: 55 | Rfc = True 56 | if u"Driver Diagnostics Protocol" in Config.UefiDriverDriverModelFeatures: 57 | Iso = True 58 | if u"Driver Configuration 2 Protocol" in Config.UefiDriverDriverModelFeatures: 59 | Rfc = True 60 | if u"Driver Configuration Protocol" in Config.UefiDriverDriverModelFeatures: 61 | Iso = True 62 | if Rfc: 63 | self.Rfc4646LanguageCodes.Enable() 64 | else: 65 | self.Rfc4646LanguageCodes.Disable() 66 | if Iso: 67 | self.Iso639LanguageCodes.Enable() 68 | else: 69 | self.Iso639LanguageCodes.Disable() 70 | 71 | # Handlers for UefiDriverModelOptionalFeatures events. 72 | def UefiDriverDriverModelFeaturesOnCheckListBoxToggled( self, event ): 73 | Config.UefiDriverDriverModelFeatures = self.UefiDriverDriverModelFeatures.GetCheckedStrings() 74 | Rfc = False 75 | Iso = False 76 | if u"HII Packages for forms and HII based configuration " in Config.UefiDriverDriverModelFeatures: 77 | Rfc = True 78 | if u"Component Name 2 Protocol" in Config.UefiDriverDriverModelFeatures: 79 | Rfc = True 80 | if u"Component Name Protocol" in Config.UefiDriverDriverModelFeatures: 81 | Iso = True 82 | if u"Driver Diagnostics 2 Protocol" in Config.UefiDriverDriverModelFeatures: 83 | Rfc = True 84 | if u"Driver Diagnostics Protocol" in Config.UefiDriverDriverModelFeatures: 85 | Iso = True 86 | if u"Driver Configuration 2 Protocol" in Config.UefiDriverDriverModelFeatures: 87 | Rfc = True 88 | if u"Driver Configuration Protocol" in Config.UefiDriverDriverModelFeatures: 89 | Iso = True 90 | if Rfc: 91 | self.Rfc4646LanguageCodes.Enable() 92 | else: 93 | self.Rfc4646LanguageCodes.Disable() 94 | if Iso: 95 | self.Iso639LanguageCodes.Enable() 96 | else: 97 | self.Iso639LanguageCodes.Disable() 98 | 99 | def Rfc4646LanguageCodesOnText( self, event ): 100 | Config.Rfc4646LanguageCodes = event.GetString() 101 | 102 | def Iso639LanguageCodesOnText( self, event ): 103 | Config.Iso639LanguageCodes = event.GetString() 104 | 105 | def PrevOnButtonClick( self, event ): 106 | self.Destroy() 107 | frame = UefiDriverWizardNewUefiDriver.UefiDriverWizardNewUefiDriver (None) 108 | frame.Show() 109 | 110 | def NextOnButtonClick( self, event ): 111 | self.Destroy() 112 | frame = UefiDriverWizardUefiDriverModelConsumedProtocols.UefiDriverWizardUefiDriverModelConsumedProtocols (None) 113 | frame.Show() 114 | 115 | def FinishOnButtonClick( self, event ): 116 | if Config.UefiDriverName == '': 117 | Config.UefiDriverName = os.path.split(Config.UefiDriverPath)[-1] 118 | Result, Message = Config.App.CreateUefiDriver() 119 | if not Result: 120 | dlg = wx.MessageDialog( 121 | self, 122 | Message, 123 | 'ERROR', 124 | wx.OK | wx.ICON_ERROR 125 | ) 126 | dlg.ShowModal() 127 | dlg.Destroy() 128 | return 129 | dlg = wx.MessageDialog( 130 | self, 131 | Message, 132 | 'New UEFI Driver', 133 | wx.OK | wx.ICON_INFORMATION 134 | ) 135 | dlg.ShowModal() 136 | dlg.Destroy() 137 | Config.UefiDriverName = '' 138 | Config.UefiDriverVersion = '' 139 | Config.UefiDriverGuid = '' 140 | self.Destroy() 141 | 142 | def CancelOnButtonClick( self, event ): 143 | Config.UefiDriverName = '' 144 | Config.UefiDriverVersion = '' 145 | Config.UefiDriverGuid = '' 146 | self.Destroy() 147 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/SerialIo.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Reset the serial device. 31 | 32 | @param This Protocol instance pointer. 33 | 34 | @retval EFI_SUCCESS The device was reset. 35 | @retval EFI_DEVICE_ERROR The serial device could not be reset. 36 | 37 | **/ 38 | EFI_STATUS 39 | EFIAPI 40 | <>SerialIoReset ( 41 | IN EFI_SERIAL_IO_PROTOCOL *This 42 | ); 43 | 44 | /** 45 | Sets the baud rate, receive FIFO depth, transmit/receice time out, parity, 46 | data buts, and stop bits on a serial device. 47 | 48 | @param This Protocol instance pointer. 49 | @param BaudRate The requested baud rate. A BaudRate value of 0 will use the 50 | device's default interface speed. 51 | @param ReveiveFifoDepth The requested depth of the FIFO on the receive side of the 52 | serial interface. A ReceiveFifoDepth value of 0 will use 53 | the device's default FIFO depth. 54 | @param Timeout The requested time out for a single character in microseconds. 55 | This timeout applies to both the transmit and receive side of the 56 | interface. A Timeout value of 0 will use the device's default time 57 | out value. 58 | @param Parity The type of parity to use on this serial device. A Parity value of 59 | DefaultParity will use the device's default parity value. 60 | @param DataBits The number of data bits to use on the serial device. A DataBits 61 | vaule of 0 will use the device's default data bit setting. 62 | @param StopBits The number of stop bits to use on this serial device. A StopBits 63 | value of DefaultStopBits will use the device's default number of 64 | stop bits. 65 | 66 | @retval EFI_SUCCESS The device was reset. 67 | @retval EFI_DEVICE_ERROR The serial device could not be reset. 68 | 69 | **/ 70 | EFI_STATUS 71 | EFIAPI 72 | <>SerialIoSetAttributes ( 73 | IN EFI_SERIAL_IO_PROTOCOL *This, 74 | IN UINT64 BaudRate, 75 | IN UINT32 ReceiveFifoDepth, 76 | IN UINT32 Timeout, 77 | IN EFI_PARITY_TYPE Parity, 78 | IN UINT8 DataBits, 79 | IN EFI_STOP_BITS_TYPE StopBits 80 | ); 81 | 82 | /** 83 | Set the control bits on a serial device 84 | 85 | @param This Protocol instance pointer. 86 | @param Control Set the bits of Control that are settable. 87 | 88 | @retval EFI_SUCCESS The new control bits were set on the serial device. 89 | @retval EFI_UNSUPPORTED The serial device does not support this operation. 90 | @retval EFI_DEVICE_ERROR The serial device is not functioning correctly. 91 | 92 | **/ 93 | EFI_STATUS 94 | EFIAPI 95 | <>SerialIoSetControl ( 96 | IN EFI_SERIAL_IO_PROTOCOL *This, 97 | IN UINT32 Control 98 | ); 99 | 100 | /** 101 | Retrieves the status of thecontrol bits on a serial device 102 | 103 | @param This Protocol instance pointer. 104 | @param Control A pointer to return the current Control signals from the serial device. 105 | 106 | @retval EFI_SUCCESS The control bits were read from the serial device. 107 | @retval EFI_DEVICE_ERROR The serial device is not functioning correctly. 108 | 109 | **/ 110 | EFI_STATUS 111 | EFIAPI 112 | <>SerialIoGetControl ( 113 | IN EFI_SERIAL_IO_PROTOCOL *This, 114 | OUT UINT32 *Control 115 | ); 116 | 117 | /** 118 | Writes data to a serial device. 119 | 120 | @param This Protocol instance pointer. 121 | @param BufferSize On input, the size of the Buffer. On output, the amount of 122 | data actually written. 123 | @param Buffer The buffer of data to write 124 | 125 | @retval EFI_SUCCESS The data was written. 126 | @retval EFI_DEVICE_ERROR The device reported an error. 127 | @retval EFI_TIMEOUT The data write was stopped due to a timeout. 128 | 129 | **/ 130 | EFI_STATUS 131 | EFIAPI 132 | <>SerialIoWrite ( 133 | IN EFI_SERIAL_IO_PROTOCOL *This, 134 | IN OUT UINTN *BufferSize, 135 | IN VOID *Buffer 136 | ); 137 | 138 | /** 139 | Writes data to a serial device. 140 | 141 | @param This Protocol instance pointer. 142 | @param BufferSize On input, the size of the Buffer. On output, the amount of 143 | data returned in Buffer. 144 | @param Buffer The buffer to return the data into. 145 | 146 | @retval EFI_SUCCESS The data was read. 147 | @retval EFI_DEVICE_ERROR The device reported an error. 148 | @retval EFI_TIMEOUT The data write was stopped due to a timeout. 149 | 150 | **/ 151 | EFI_STATUS 152 | EFIAPI 153 | <>SerialIoRead ( 154 | IN EFI_SERIAL_IO_PROTOCOL *This, 155 | IN OUT UINTN *BufferSize, 156 | OUT VOID *Buffer 157 | ); 158 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizard.wxs: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 1 72 | "1"]]> 73 | 1 74 | 1 75 | 1 76 | 1 77 | NOT WIXUI_DONTVALIDATEPATH 78 | "1"]]> 79 | WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1" 80 | 1 81 | 1 82 | NOT Installed 83 | Installed 84 | 1 85 | 1 86 | 1 87 | 1 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizardUefiDriverWizard.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Subclass of UefiDriverWizard, which is generated by wxFormBuilder. 3 | # 4 | # Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | """Subclass of UefiDriverWizard, which is generated by wxFormBuilder.""" 17 | 18 | ## 19 | # Import Modules 20 | # 21 | import Config 22 | import wx 23 | import os 24 | import sys 25 | import uuid 26 | import string 27 | import TemplateString 28 | import UefiDriverWizard 29 | import UefiDriverWizardNewPackage 30 | import UefiDriverWizardNewUefiDriver 31 | import UefiDriverWizardNewProtocol 32 | import UefiDriverWizardNewGuid 33 | import UefiDriverWizardNewLibraryClass 34 | import UefiDriverWizardUefiDriverWizard 35 | import UefiDriverWizardUefiDriverModelOptionalFeatures 36 | import UefiDriverWizardUefiDriverModelConsumedProtocols 37 | import UefiDriverWizardUefiDriverModelProducedProtocols 38 | 39 | # Implementing UefiDriverWizard 40 | class UefiDriverWizardUefiDriverWizard( UefiDriverWizard.UefiDriverWizard ): 41 | def __init__( self, parent ): 42 | UefiDriverWizard.UefiDriverWizard.__init__( self, parent ) 43 | self.newUefiDriver.Enable(False) 44 | self.newProtocol.Enable(False) 45 | self.newPackage.Enable(False) 46 | self.newGuid.Enable(False) 47 | self.newLibraryClass.Enable(False) 48 | 49 | def WorkspaceValid(self): 50 | if Config.WorkspacePath == '': 51 | Message = 'WORKSPACE not selected' 52 | elif not os.path.isdir(Config.WorkspacePath): 53 | Message = 'WORKSPACE %s is not a directory' % (Config.WorkspacePath) 54 | elif not os.path.exists (os.path.join(Config.WorkspacePath, 'Conf', 'target.txt')): 55 | Message = 'WORKSPACE %s is invalid' % (Config.WorkspacePath) 56 | elif not os.path.isfile (os.path.join(Config.WorkspacePath, 'Conf', 'target.txt')): 57 | Message = 'WORKSPACE %s is invalid' % (Config.WorkspacePath) 58 | else: 59 | return True 60 | dlg = wx.MessageDialog(self, Message, 'ERROR', wx.OK | wx.ICON_ERROR) 61 | dlg.ShowModal() 62 | dlg.Destroy() 63 | return False 64 | 65 | # Handlers for UefiDriverWizard events. 66 | def openWorkspaceOnMenuSelection( self, event ): 67 | dlg = wx.DirDialog(self, u"EDK II WORKSPACE Path", Config.WorkspacePath, wx.DD_DIR_MUST_EXIST) 68 | while dlg.ShowModal() == wx.ID_OK: 69 | Config.WorkspacePath = dlg.GetPath() 70 | if self.WorkspaceValid(): 71 | Config.App.TopWindow.SetTitle ("%s - UEFI Driver Wizard" % (Config.WorkspacePath)) 72 | dlg.Destroy() 73 | self.LogMessageWindow.AppendText('\nWORKSPACE %s selected\n' % (Config.WorkspacePath)) 74 | self.newUefiDriver.Enable(True) 75 | self.newProtocol.Enable(True) 76 | self.newPackage.Enable(True) 77 | self.newGuid.Enable(True) 78 | self.newLibraryClass.Enable(True) 79 | 80 | return 81 | Config.WorkspacePath = '' 82 | Config.App.TopWindow.SetTitle ("UEFI Driver Wizard") 83 | self.newUefiDriver.Enable(False) 84 | self.newProtocol.Enable(False) 85 | self.newPackage.Enable(False) 86 | self.newGuid.Enable(False) 87 | self.newLibraryClass.Enable(False) 88 | Config.WorkspacePath = '' 89 | dlg.Destroy() 90 | 91 | def newUefiDriverOnMenuSelection( self, event ): 92 | if not self.WorkspaceValid(): 93 | return 94 | frame = UefiDriverWizardNewUefiDriver.UefiDriverWizardNewUefiDriver (None) 95 | frame.Show() 96 | 97 | def newPackageOnMenuSelection( self, event ): 98 | if not self.WorkspaceValid(): 99 | return 100 | frame = UefiDriverWizardNewPackage.UefiDriverWizardNewPackage (None) 101 | frame.Show() 102 | 103 | def newProtocolOnMenuSelection( self, event ): 104 | if not self.WorkspaceValid(): 105 | return 106 | frame = UefiDriverWizardNewProtocol.UefiDriverWizardNewProtocol (None) 107 | frame.Show() 108 | 109 | def newGuidOnMenuSelection( self, event ): 110 | if not self.WorkspaceValid(): 111 | return 112 | frame = UefiDriverWizardNewGuid.UefiDriverWizardNewGuid (None) 113 | frame.Show() 114 | 115 | def newLibraryClassOnMenuSelection( self, event ): 116 | if not self.WorkspaceValid(): 117 | return 118 | frame = UefiDriverWizardNewLibraryClass.UefiDriverWizardNewLibraryClass (None) 119 | frame.Show() 120 | 121 | def exitOnMenuSelection( self, event ): 122 | sys.exit() 123 | 124 | def aboutOnMenuSelection( self, event ): 125 | info = wx.AboutDialogInfo() 126 | info.Name = "UEFI Driver Wizard" 127 | info.Version = "0.11" 128 | info.Copyright = "Copyright (C) 2012-2014 Intel Corporation. All rights reserved" 129 | info.Icon = wx.Icon(os.path.join(os.path.abspath(sys.path[0]), 'Logo.png'), wx.BITMAP_TYPE_PNG) 130 | info.Description = ''' 131 | This wizard is designed to aid in the development of UEFI Drivers 132 | using the EDK II open source project as a development environment. 133 | The EDK II provides a cross-platform firmware development 134 | environment for UEFI. UEFI Drivers are described in the Unified 135 | Extensible Firmware Interface Specification, Version 2.3.1. There 136 | are different categories of UEFI Drivers, and many variations of 137 | each category. This wizard provides basic support for the most 138 | common categories of UEFI drivers. Many other driver designs are 139 | possible. In addition, this wizard provides a templates for the 140 | various driver-related UEFI Protocols including Consoles, Serial 141 | Ports, Graphics, Mass Storage, Network Interfaces, and User 142 | Credentials. 143 | ''' 144 | info.WebSite = ("http://www.tianocore.org", "EDK II home page") 145 | wx.AboutBox(info) 146 | 147 | def licenseOnMenuSelection( self, event ): 148 | info = wx.AboutDialogInfo() 149 | info.Name = "UEFI Driver Wizard" 150 | info.Version = "0.11" 151 | info.Copyright = "Copyright (C) 2012 Intel Corporation. All rights reserved" 152 | info.Icon = wx.Icon(os.path.join(os.path.abspath(sys.path[0]), 'Logo.png'), wx.BITMAP_TYPE_PNG) 153 | info.Description = ''' 154 | This program and the accompanying materials are licensed and 155 | made available under the terms and conditions of the BSD License 156 | which accompanies this distribution. The full text of the license 157 | may be found at http://opensource.org/licenses/bsd-license.php 158 | 159 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN 160 | "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS 161 | OF ANY KIND, EITHER EXPRESS OR IMPLIED. 162 | ''' 163 | info.WebSite = ("http://opensource.org/licenses/bsd-license.php", "BDS License") 164 | wx.AboutBox(info) 165 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/SerialIo.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | /// 32 | /// Serial I/O Protocol Mode instance 33 | /// 34 | GLOBAL_REMOVE_IF_UNREFERENCED 35 | EFI_SERIAL_IO_MODE g<>SerialIoMode = { 36 | 0x00000000, // ControlMask 37 | 0, // Timeout 38 | 0, // BaudRate 39 | 0, // ReceiveFifoDepth 40 | 0, // DataBits 41 | DefaultParity, // Parity 42 | DefaultStopBits // StopBits 43 | }; 44 | 45 | /// 46 | /// Serial I/O Protocol instance 47 | /// 48 | GLOBAL_REMOVE_IF_UNREFERENCED 49 | EFI_SERIAL_IO_PROTOCOL g<>SerialIo = { 50 | EFI_SERIAL_IO_PROTOCOL_REVISION, 51 | <>SerialIoReset, 52 | <>SerialIoSetAttributes, 53 | <>SerialIoSetControl, 54 | <>SerialIoGetControl, 55 | <>SerialIoWrite, 56 | <>SerialIoRead, 57 | &g<>SerialIoMode 58 | }; 59 | 60 | /** 61 | Reset the serial device. 62 | 63 | @param This Protocol instance pointer. 64 | 65 | @retval EFI_SUCCESS The device was reset. 66 | @retval EFI_DEVICE_ERROR The serial device could not be reset. 67 | 68 | **/ 69 | EFI_STATUS 70 | EFIAPI 71 | <>SerialIoReset ( 72 | IN EFI_SERIAL_IO_PROTOCOL *This 73 | ) 74 | { 75 | return EFI_DEVICE_ERROR; 76 | } 77 | 78 | /** 79 | Sets the baud rate, receive FIFO depth, transmit/receice time out, parity, 80 | data buts, and stop bits on a serial device. 81 | 82 | @param This Protocol instance pointer. 83 | @param BaudRate The requested baud rate. A BaudRate value of 0 will use the 84 | device's default interface speed. 85 | @param ReveiveFifoDepth The requested depth of the FIFO on the receive side of the 86 | serial interface. A ReceiveFifoDepth value of 0 will use 87 | the device's default FIFO depth. 88 | @param Timeout The requested time out for a single character in microseconds. 89 | This timeout applies to both the transmit and receive side of the 90 | interface. A Timeout value of 0 will use the device's default time 91 | out value. 92 | @param Parity The type of parity to use on this serial device. A Parity value of 93 | DefaultParity will use the device's default parity value. 94 | @param DataBits The number of data bits to use on the serial device. A DataBits 95 | vaule of 0 will use the device's default data bit setting. 96 | @param StopBits The number of stop bits to use on this serial device. A StopBits 97 | value of DefaultStopBits will use the device's default number of 98 | stop bits. 99 | 100 | @retval EFI_SUCCESS The device was reset. 101 | @retval EFI_DEVICE_ERROR The serial device could not be reset. 102 | 103 | **/ 104 | EFI_STATUS 105 | EFIAPI 106 | <>SerialIoSetAttributes ( 107 | IN EFI_SERIAL_IO_PROTOCOL *This, 108 | IN UINT64 BaudRate, 109 | IN UINT32 ReceiveFifoDepth, 110 | IN UINT32 Timeout, 111 | IN EFI_PARITY_TYPE Parity, 112 | IN UINT8 DataBits, 113 | IN EFI_STOP_BITS_TYPE StopBits 114 | ) 115 | { 116 | return EFI_DEVICE_ERROR; 117 | } 118 | 119 | /** 120 | Set the control bits on a serial device 121 | 122 | @param This Protocol instance pointer. 123 | @param Control Set the bits of Control that are settable. 124 | 125 | @retval EFI_SUCCESS The new control bits were set on the serial device. 126 | @retval EFI_UNSUPPORTED The serial device does not support this operation. 127 | @retval EFI_DEVICE_ERROR The serial device is not functioning correctly. 128 | 129 | **/ 130 | EFI_STATUS 131 | EFIAPI 132 | <>SerialIoSetControl ( 133 | IN EFI_SERIAL_IO_PROTOCOL *This, 134 | IN UINT32 Control 135 | ) 136 | { 137 | return EFI_DEVICE_ERROR; 138 | } 139 | 140 | /** 141 | Retrieves the status of thecontrol bits on a serial device 142 | 143 | @param This Protocol instance pointer. 144 | @param Control A pointer to return the current Control signals from the serial device. 145 | 146 | @retval EFI_SUCCESS The control bits were read from the serial device. 147 | @retval EFI_DEVICE_ERROR The serial device is not functioning correctly. 148 | 149 | **/ 150 | EFI_STATUS 151 | EFIAPI 152 | <>SerialIoGetControl ( 153 | IN EFI_SERIAL_IO_PROTOCOL *This, 154 | OUT UINT32 *Control 155 | ) 156 | { 157 | return EFI_DEVICE_ERROR; 158 | } 159 | 160 | /** 161 | Writes data to a serial device. 162 | 163 | @param This Protocol instance pointer. 164 | @param BufferSize On input, the size of the Buffer. On output, the amount of 165 | data actually written. 166 | @param Buffer The buffer of data to write 167 | 168 | @retval EFI_SUCCESS The data was written. 169 | @retval EFI_DEVICE_ERROR The device reported an error. 170 | @retval EFI_TIMEOUT The data write was stopped due to a timeout. 171 | 172 | **/ 173 | EFI_STATUS 174 | EFIAPI 175 | <>SerialIoWrite ( 176 | IN EFI_SERIAL_IO_PROTOCOL *This, 177 | IN OUT UINTN *BufferSize, 178 | IN VOID *Buffer 179 | ) 180 | { 181 | return EFI_DEVICE_ERROR; 182 | } 183 | 184 | /** 185 | Writes data to a serial device. 186 | 187 | @param This Protocol instance pointer. 188 | @param BufferSize On input, the size of the Buffer. On output, the amount of 189 | data returned in Buffer. 190 | @param Buffer The buffer to return the data into. 191 | 192 | @retval EFI_SUCCESS The data was read. 193 | @retval EFI_DEVICE_ERROR The device reported an error. 194 | @retval EFI_TIMEOUT The data write was stopped due to a timeout. 195 | 196 | **/ 197 | EFI_STATUS 198 | EFIAPI 199 | <>SerialIoRead ( 200 | IN EFI_SERIAL_IO_PROTOCOL *This, 201 | IN OUT UINTN *BufferSize, 202 | OUT VOID *Buffer 203 | ) 204 | { 205 | return EFI_DEVICE_ERROR; 206 | } 207 | -------------------------------------------------------------------------------- /Tools/PackageDocumentationTool/src/plugins/EDkPlugins/edk2/model/dsc.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # 3 | # Copyright (c) 2011, Intel Corporation. All rights reserved.
4 | # 5 | # This program and the accompanying materials are licensed and made available 6 | # under the terms and conditions of the BSD License which accompanies this 7 | # distribution. The full text of the license may be found at 8 | # http://opensource.org/licenses/bsd-license.php 9 | # 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | # 13 | 14 | import plugins.EdkPlugins.basemodel.ini as ini 15 | import re, os 16 | from plugins.EdkPlugins.basemodel.message import * 17 | 18 | class DSCFile(ini.BaseINIFile): 19 | def GetSectionInstance(self, parent, name, isCombined=False): 20 | return DSCSection(parent, name, isCombined) 21 | 22 | def GetComponents(self): 23 | return self.GetSectionObjectsByName('Components') 24 | 25 | class DSCSection(ini.BaseINISection): 26 | def GetSectionINIObject(self, parent): 27 | type = self.GetType() 28 | 29 | if type.lower() == 'components': 30 | return DSCComponentObject(self) 31 | if type.lower() == 'libraryclasses': 32 | return DSCLibraryClassObject(self) 33 | if type.lower() == 'defines': 34 | return ini.BaseINISectionObject(self) 35 | if type.lower() == 'pcdsfeatureflag' or \ 36 | type.lower() == 'pcdsfixedatbuild' or \ 37 | type.lower() == 'pcdspatchableinmodule' or\ 38 | type.lower() == 'pcdsdynamicdefault' or \ 39 | type.lower() == 'pcdsdynamicex' or \ 40 | type.lower() == 'pcdsdynamichii' or \ 41 | type.lower() == 'pcdsdynamicvpd': 42 | return DSCPcdObject(self) 43 | 44 | return DSCSectionObject(self) 45 | 46 | def GetType(self): 47 | arr = self._name.split('.') 48 | return arr[0].strip() 49 | 50 | def GetArch(self): 51 | arr = self._name.split('.') 52 | if len(arr) == 1: 53 | return 'common' 54 | return arr[1] 55 | 56 | def GetModuleType(self): 57 | arr = self._name.split('.') 58 | if len(arr) < 3: 59 | return 'common' 60 | return arr[2] 61 | 62 | class DSCSectionObject(ini.BaseINISectionObject): 63 | def GetArch(self): 64 | return self.GetParent().GetArch() 65 | 66 | class DSCPcdObject(DSCSectionObject): 67 | 68 | def __init__(self, parent): 69 | ini.BaseINISectionObject.__init__(self, parent) 70 | self._name = None 71 | 72 | def Parse(self): 73 | line = self.GetLineByOffset(self._start).strip().split('#')[0] 74 | self._name = line.split('|')[0] 75 | self._value = line.split('|')[1] 76 | return True 77 | 78 | def GetPcdName(self): 79 | return self._name 80 | 81 | def GetPcdType(self): 82 | return self.GetParent().GetType() 83 | 84 | def GetPcdValue(self): 85 | return self._value 86 | 87 | class DSCLibraryClassObject(DSCSectionObject): 88 | def __init__(self, parent): 89 | ini.BaseINISectionObject.__init__(self, parent) 90 | 91 | def GetClass(self): 92 | line = self.GetLineByOffset(self._start) 93 | return line.split('#')[0].split('|')[0].strip() 94 | 95 | def GetInstance(self): 96 | line = self.GetLineByOffset(self._start) 97 | return line.split('#')[0].split('|')[1].strip() 98 | 99 | def GetArch(self): 100 | return self.GetParent().GetArch() 101 | 102 | def GetModuleType(self): 103 | return self.GetParent().GetModuleType() 104 | 105 | class DSCComponentObject(DSCSectionObject): 106 | 107 | def __init__(self, parent): 108 | ini.BaseINISectionObject.__init__(self, parent) 109 | self._OveridePcds = {} 110 | self._OverideLibraries = {} 111 | self._Filename = '' 112 | 113 | def __del__(self): 114 | self._OverideLibraries.clear() 115 | self._OverideLibraries.clear() 116 | ini.BaseINISectionObject.__del__(self) 117 | 118 | def AddOverideLib(self, libclass, libinstPath): 119 | if libclass not in self._OverideLibraries.keys(): 120 | self._OverideLibraries[libclass] = libinstPath 121 | 122 | def AddOveridePcd(self, name, type, value=None): 123 | if type not in self._OveridePcds.keys(): 124 | self._OveridePcds[type] = [] 125 | self._OveridePcds[type].append((name, value)) 126 | 127 | def GetOverideLibs(self): 128 | return self._OverideLibraries 129 | 130 | def GetArch(self): 131 | return self.GetParent().GetArch() 132 | 133 | def GetOveridePcds(self): 134 | return self._OveridePcds 135 | 136 | def GetFilename(self): 137 | return self.GetLineByOffset(self._start).split('#')[0].split('{')[0].strip() 138 | 139 | def SetFilename(self, fName): 140 | self._Filename = fName 141 | 142 | def Parse(self): 143 | if (self._start < self._end): 144 | # 145 | # The first line is inf path and could be ignored 146 | # The end line is '}' and could be ignored 147 | # 148 | curr = self._start + 1 149 | end = self._end - 1 150 | OverideName = '' 151 | while (curr <= end): 152 | line = self.GetLineByOffset(curr).strip() 153 | if len(line) > 0 and line[0] != '#': 154 | line = line.split('#')[0].strip() 155 | if line[0] == '<': 156 | OverideName = line[1:len(line)-1] 157 | elif OverideName.lower() == 'libraryclasses': 158 | arr = line.split('|') 159 | self._OverideLibraries[arr[0].strip()] = arr[1].strip() 160 | elif OverideName.lower() == 'pcds': 161 | ErrorMsg('EDES does not support PCD overide', 162 | self.GetFileName(), 163 | self.GetParent().GetLinenumberByOffset(curr)) 164 | curr = curr + 1 165 | return True 166 | 167 | def GenerateLines(self): 168 | lines = [] 169 | hasLib = False 170 | hasPcd = False 171 | if len(self._OverideLibraries) != 0: 172 | hasLib = True 173 | if len(self._OveridePcds) != 0: 174 | hasPcd = True 175 | 176 | if hasLib or hasPcd: 177 | lines.append((' %s {\n' % self._Filename)) 178 | else: 179 | lines.append((' %s \n' % self._Filename)) 180 | return lines 181 | 182 | if hasLib: 183 | lines.append(' \n') 184 | for libKey in self._OverideLibraries.keys(): 185 | lines.append(' %s|%s\n' % (libKey, self._OverideLibraries[libKey])) 186 | 187 | if hasPcd: 188 | for key in self._OveridePcds.keys(): 189 | lines.append(' <%s>\n' % key) 190 | 191 | for name, value in self._OveridePcds[key]: 192 | if value != None: 193 | lines.append(' %s|%s\n' % (name, value)) 194 | else: 195 | lines.append(' %s\n' % name) 196 | 197 | if hasLib or hasPcd: 198 | lines.append(' }\n') 199 | 200 | return lines 201 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/TemplateString.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Template string processing required by UEFI Driver Wizard code generation 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | ## 17 | # Import Modules 18 | # 19 | import re 20 | 21 | gPlaceholderPattern = re.compile("\$\{([^$()\s]+)\}", re.MULTILINE|re.UNICODE) 22 | 23 | ## A string template class 24 | # 25 | # This class implements a template for string replacement. A string template 26 | # looks like following 27 | # 28 | # ${BEGIN} other_string ${placeholder_name} other_string ${END} 29 | # 30 | # The string between ${BEGIN} and ${END} will be repeated as many times as the 31 | # length of "placeholder_name", which is a list passed through a dict. The 32 | # "placeholder_name" is the key name of the dict. The ${BEGIN} and ${END} can 33 | # be not used and, in this case, the "placeholder_name" must not a list and it 34 | # will just be replaced once. 35 | # 36 | class TemplateString(object): 37 | _REPEAT_START_FLAG = "BEGIN" 38 | _REPEAT_END_FLAG = "END" 39 | 40 | class Section(object): 41 | _LIST_TYPES = [type([]), type(set()), type((0,))] 42 | 43 | def __init__(self, TemplateSection, PlaceHolderList): 44 | self._Template = TemplateSection 45 | self._PlaceHolderList = [] 46 | 47 | # Split the section into sub-sections according to the position of placeholders 48 | if PlaceHolderList: 49 | self._SubSectionList = [] 50 | SubSectionStart = 0 51 | # 52 | # The placeholders passed in must be in the format of 53 | # 54 | # PlaceHolderName, PlaceHolderStartPoint, PlaceHolderEndPoint 55 | # 56 | for PlaceHolder,Start,End in PlaceHolderList: 57 | self._SubSectionList.append(TemplateSection[SubSectionStart:Start]) 58 | self._SubSectionList.append(TemplateSection[Start:End]) 59 | self._PlaceHolderList.append(PlaceHolder) 60 | SubSectionStart = End 61 | if SubSectionStart < len(TemplateSection): 62 | self._SubSectionList.append(TemplateSection[SubSectionStart:]) 63 | else: 64 | self._SubSectionList = [TemplateSection] 65 | 66 | def __str__(self): 67 | return self._Template + " : " + str(self._PlaceHolderList) 68 | 69 | def Instantiate(self, PlaceHolderValues): 70 | RepeatTime = -1 71 | RepeatPlaceHolders = {} 72 | NonRepeatPlaceHolders = {} 73 | 74 | for PlaceHolder in self._PlaceHolderList: 75 | if PlaceHolder not in PlaceHolderValues: 76 | continue 77 | Value = PlaceHolderValues[PlaceHolder] 78 | if type(Value) in self._LIST_TYPES: 79 | if RepeatTime < 0: 80 | RepeatTime = len(Value) 81 | elif RepeatTime != len(Value): 82 | EdkLogger.error( 83 | "TemplateString", 84 | PARAMETER_INVALID, 85 | "${%s} has different repeat time from others!" % PlaceHolder, 86 | ExtraData=str(self._Template) 87 | ) 88 | RepeatPlaceHolders["${%s}" % PlaceHolder] = Value 89 | else: 90 | NonRepeatPlaceHolders["${%s}" % PlaceHolder] = Value 91 | 92 | if NonRepeatPlaceHolders: 93 | StringList = [] 94 | for S in self._SubSectionList: 95 | if S not in NonRepeatPlaceHolders: 96 | StringList.append(S) 97 | else: 98 | StringList.append(str(NonRepeatPlaceHolders[S])) 99 | else: 100 | StringList = self._SubSectionList 101 | 102 | if RepeatPlaceHolders: 103 | TempStringList = [] 104 | for Index in range(RepeatTime): 105 | for S in StringList: 106 | if S not in RepeatPlaceHolders: 107 | TempStringList.append(S) 108 | else: 109 | TempStringList.append(str(RepeatPlaceHolders[S][Index])) 110 | StringList = TempStringList 111 | ReturnString = "".join(StringList) 112 | if ReturnString.strip() == '': 113 | return '' 114 | if len(ReturnString) > 0 and ReturnString[0] == '\n': 115 | return ReturnString[1:] 116 | return ReturnString 117 | 118 | ## Constructor 119 | def __init__(self, Template=None): 120 | self.String = '' 121 | self.IsBinary = False 122 | self._Template = Template 123 | self._TemplateSectionList = self._Parse(Template) 124 | 125 | ## str() operator 126 | # 127 | # @retval string The string replaced 128 | # 129 | def __str__(self): 130 | return self.String 131 | 132 | ## Split the template string into fragments per the ${BEGIN} and ${END} flags 133 | # 134 | # @retval list A list of TemplateString.Section objects 135 | # 136 | def _Parse(self, Template): 137 | SectionStart = 0 138 | SearchFrom = 0 139 | MatchEnd = 0 140 | PlaceHolderList = [] 141 | TemplateSectionList = [] 142 | while Template: 143 | MatchObj = gPlaceholderPattern.search(Template, SearchFrom) 144 | if not MatchObj: 145 | if MatchEnd <= len(Template): 146 | TemplateSection = TemplateString.Section(Template[SectionStart:], PlaceHolderList) 147 | TemplateSectionList.append(TemplateSection) 148 | break 149 | 150 | MatchString = MatchObj.group(1) 151 | MatchStart = MatchObj.start() 152 | MatchEnd = MatchObj.end() 153 | 154 | if MatchString == self._REPEAT_START_FLAG: 155 | if MatchStart > SectionStart: 156 | TemplateSection = TemplateString.Section(Template[SectionStart:MatchStart], PlaceHolderList) 157 | TemplateSectionList.append(TemplateSection) 158 | SectionStart = MatchEnd 159 | PlaceHolderList = [] 160 | elif MatchString == self._REPEAT_END_FLAG: 161 | TemplateSection = TemplateString.Section(Template[SectionStart:MatchStart], PlaceHolderList) 162 | TemplateSectionList.append(TemplateSection) 163 | SectionStart = MatchEnd 164 | PlaceHolderList = [] 165 | else: 166 | PlaceHolderList.append((MatchString, MatchStart - SectionStart, MatchEnd - SectionStart)) 167 | SearchFrom = MatchEnd 168 | return TemplateSectionList 169 | 170 | ## Replace the string template with dictionary of placeholders and append it to previous one 171 | # 172 | # @param AppendString The string template to append 173 | # @param Dictionary The placeholder dictionaries 174 | # 175 | def Append(self, AppendString, Dictionary=None): 176 | if Dictionary: 177 | SectionList = self._Parse(AppendString) 178 | self.String += "".join([S.Instantiate(Dictionary) for S in SectionList]) 179 | else: 180 | self.String += AppendString 181 | 182 | ## Replace the string template with dictionary of placeholders 183 | # 184 | # @param Dictionary The placeholder dictionaries 185 | # 186 | # @retval str The string replaced with placeholder values 187 | # 188 | def Replace(self, Dictionary=None): 189 | return "".join([S.Instantiate(Dictionary) for S in self._TemplateSectionList]) 190 | 191 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/UefiDriver.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #ifndef __EFI_<>_H__ 30 | #define __EFI_<>_H__ 31 | 32 | #include 33 | 34 | // 35 | // Libraries 36 | // 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | <><>#include 45 | <> 46 | <><>#include 47 | <> 48 | 49 | // 50 | // UEFI Driver Model Protocols 51 | // 52 | <><>#include 53 | <> 54 | <><>#include 55 | <> 56 | <><>#include 57 | <> 58 | <><>#include 59 | <> 60 | <><>#include 61 | <> 62 | <><>#include 63 | <> 64 | <><>#include 65 | <> 66 | <><>#include 67 | <> 68 | <><>#include 69 | <> 70 | <><>#include 71 | <> 72 | <><>#include 73 | <> 74 | <><>#include 75 | <> 76 | <><>#include 77 | <> 78 | <><>#include 79 | <> 80 | 81 | // 82 | // Consumed Protocols 83 | // 84 | <><>#include >> 85 | <> 86 | 87 | // 88 | // Produced Protocols 89 | // 90 | <><>#include 91 | <> 92 | <><>#include 93 | <> 94 | <><>#include 95 | <> 96 | <><>#include 97 | <> 98 | <><>#include 99 | <> 100 | <><>#include 101 | <> 102 | <><>#include 103 | <> 104 | <><>#include 105 | <> 106 | <><>#include 107 | <> 108 | <><>#include 109 | <> 110 | <><>#include 111 | <> 112 | <><>#include 113 | <> 114 | <><>#include 115 | <> 116 | <><>#include 117 | <> 118 | <><>#include 119 | <> 120 | <><>#include 121 | <> 122 | <><>#include 123 | <> 124 | <><>#include 125 | <> 126 | <><>#include 127 | <> 128 | <><>#include 129 | <> 130 | <><>#include 131 | <> 132 | 133 | // 134 | // Guids 135 | // 136 | 137 | // 138 | // Driver Version 139 | // 140 | <><>#define <>_VERSION <> 141 | <> 142 | 143 | // 144 | // Protocol instances 145 | // 146 | <><>extern EFI_DRIVER_BINDING_PROTOCOL g<>DriverBinding; 147 | <> 148 | <><>extern EFI_COMPONENT_NAME2_PROTOCOL g<>ComponentName2; 149 | <> 150 | <><>extern EFI_COMPONENT_NAME_PROTOCOL g<>ComponentName; 151 | <> 152 | <><>extern EFI_DRIVER_DIAGNOSTICS2_PROTOCOL g<>DriverDiagnostics2; 153 | <> 154 | <><>extern EFI_DRIVER_DIAGNOSTICS_PROTOCOL g<>DriverDiagnostics; 155 | <> 156 | <><>extern EFI_DRIVER_CONFIGURATION2_PROTOCOL g<>DriverConfiguration2; 157 | <> 158 | <><>extern EFI_DRIVER_CONFIGURATION_PROTOCOL g<>DriverConfiguration; 159 | <> 160 | <><>extern EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL g<>DriverFamilyOverride; 161 | <> 162 | <><>extern EFI_DRIVER_HEALTH_PROTOCOL g<>DriverHealth; 163 | <> 164 | <><>extern EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL g<>BusSpecificDriverOverride; 165 | <> 166 | <><>extern EFI_HII_CONFIG_ACCESS_PROTOCOL g<>HiiConfigAccess; 167 | <> 168 | 169 | // 170 | // Include files with function prototypes 171 | // 172 | <><>#include "DriverBinding.h" 173 | <> 174 | <><>#include "ComponentName.h" 175 | <> 176 | <><>#include "DriverDiagnostics.h" 177 | <> 178 | <><>#include "DriverConfiguration.h" 179 | <> 180 | <><>#include "DriverFamilyOverride.h" 181 | <> 182 | <><>#include "DriverHealth.h" 183 | <> 184 | <><>#include "BusSpecificDriverOverride.h" 185 | <> 186 | <><>#include "HiiConfigAccess.h" 187 | <> 188 | <><>#include "SimpleTextInput.h" 189 | <> 190 | <><>#include "SimplePointer.h" 191 | <> 192 | <><>#include "AbsolutePointer.h" 193 | <> 194 | <><>#include "SimpleTextOutput.h" 195 | <> 196 | <><>#include "SerialIo.h" 197 | <> 198 | <><>#include "GraphicsOutput.h" 199 | <> 200 | <><>#include "BlockIo.h" 201 | <> 202 | <><>#include "StorageSecurityCommand.h" 203 | <> 204 | <><>#include "SimpleNetwork.h" 205 | <> 206 | <><>#include "Usb2HostController.h" 207 | <> 208 | <><>#include "ScsiPassThru.h" 209 | <> 210 | <><>#include "ExtScsiPassThru.h" 211 | <> 212 | <><>#include "AtaPassThru.h" 213 | <> 214 | <><>#include "UserCredential.h" 215 | <> 216 | <><>#include "LoadFile.h" 217 | <> 218 | <><>#include "EdidOverride.h" 219 | <> 220 | 221 | #endif 222 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/UefiDriverWizardNewUefiDriver.py: -------------------------------------------------------------------------------- 1 | ## @file 2 | # Subclass of NewUefiDriver, which is generated by wxFormBuilder. 3 | # 4 | # Copyright (c) 2012, Intel Corporation. All rights reserved.
5 | # 6 | # This program and the accompanying materials are licensed and made available 7 | # under the terms and conditions of the BSD License which accompanies this 8 | # distribution. The full text of the license may be found at 9 | # http://opensource.org/licenses/bsd-license.php 10 | # 11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | # 14 | ## 15 | 16 | """Subclass of NewUefiDriver, which is generated by wxFormBuilder.""" 17 | 18 | ## 19 | # Import Modules 20 | # 21 | import Config 22 | import wx 23 | import os 24 | import sys 25 | import uuid 26 | import string 27 | import TemplateString 28 | import UefiDriverWizard 29 | import UefiDriverWizardNewPackage 30 | import UefiDriverWizardNewUefiDriver 31 | import UefiDriverWizardNewProtocol 32 | import UefiDriverWizardNewGuid 33 | import UefiDriverWizardNewLibraryClass 34 | import UefiDriverWizardUefiDriverWizard 35 | import UefiDriverWizardUefiDriverModelOptionalFeatures 36 | import UefiDriverWizardUefiDriverModelConsumedProtocols 37 | import UefiDriverWizardUefiDriverModelProducedProtocols 38 | 39 | # Implementing NewUefiDriver 40 | class UefiDriverWizardNewUefiDriver( UefiDriverWizard.NewUefiDriver ): 41 | def __init__( self, parent ): 42 | UefiDriverWizard.NewUefiDriver.__init__( self, parent ) 43 | if Config.UefiDriverPath <> '': 44 | self.UefiDriverPath.SetPath(Config.UefiDriverPath + os.path.sep) 45 | else: 46 | if Config.PackagePath <> '': 47 | self.UefiDriverPath.SetPath(Config.PackagePath + os.path.sep) 48 | else: 49 | self.UefiDriverPath.SetPath(Config.WorkspacePath + os.path.sep) 50 | self.UefiDriverName.SetValue(Config.UefiDriverName) 51 | self.UefiDriverVersion.SetValue(Config.UefiDriverVersion) 52 | if Config.UefiDriverGuid == '': 53 | Config.UefiDriverGuid = uuid.uuid1().get_urn().split(':')[2] 54 | self.UefiDriverGuid.SetValue(Config.UefiDriverGuid) 55 | if Config.UefiDriverType == u"": 56 | Config.UefiDriverType = u"UEFI Driver Model Device Driver" 57 | self.UefiDriverType.SetStringSelection(Config.UefiDriverType) 58 | if Config.DriverBindingVersion == '': 59 | Config.DriverBindingVersion = '0x00000000' 60 | self.DriverBindingVersion.SetValue (Config.DriverBindingVersion) 61 | DriverModel = False 62 | if u"UEFI Driver Model Device Driver" in Config.UefiDriverType: 63 | DriverModel = True 64 | if u"UEFI Driver Model Bus Driver" in Config.UefiDriverType: 65 | DriverModel = True 66 | if u"UEFI Driver Model Hybrid Driver" in Config.UefiDriverType: 67 | DriverModel = True 68 | if DriverModel: 69 | self.DriverBindingVersion.Enable() 70 | else: 71 | self.DriverBindingVersion.Disable() 72 | if Config.UefiDriverCpuArchitecture == (): 73 | Config.UefiDriverCpuArchitecture = (u'All CPU Architectures',) 74 | self.UefiDriverCpuArchitecture.SetCheckedStrings(Config.UefiDriverCpuArchitecture) 75 | self.UefiDriverCommonFeatures.SetCheckedStrings(Config.UefiDriverCommonFeatures) 76 | if Config.UefiSpecificationVersion == '': 77 | Config.UefiSpecificationVersion = '0x0002001E' 78 | self.UefiSpecificationVersion.SetValue (Config.UefiSpecificationVersion) 79 | if u"Driver Supported EFI Version Protocol" in Config.UefiDriverCommonFeatures: 80 | self.UefiSpecificationVersion.Enable() 81 | else: 82 | self.UefiSpecificationVersion.Disable() 83 | if Config.Rfc4646LanguageCodes == '': 84 | Config.Rfc4646LanguageCodes = 'en' 85 | if Config.Iso639LanguageCodes == '': 86 | Config.Iso639LanguageCodes = 'eng' 87 | if Config.UefiDriverConsumedProtocols == (): 88 | Config.UefiDriverConsumedProtocols = (u"PCI Driver that consumes the PCI I/O Protocol",) 89 | if Config.UsbMajorVersion == '': 90 | Config.UsbMajorVersion = '3' 91 | if Config.UsbMinorVersion == '': 92 | Config.UsbMinorVersion = '0' 93 | 94 | # Handlers for NewUefiDriver events. 95 | def UefiDriverPathOnDirChanged( self, event ): 96 | if Config.UefiDriverName == '' or Config.UefiDriverName == os.path.split(Config.UefiDriverPath)[-1]: 97 | Config.UefiDriverPath = self.UefiDriverPath.GetPath() 98 | self.UefiDriverName.SetValue(os.path.split(Config.UefiDriverPath)[-1]) 99 | else: 100 | Config.UefiDriverPath = self.UefiDriverPath.GetPath() 101 | 102 | def UefiDriverNameOnText( self, event ): 103 | Config.UefiDriverName = Config.App.TextFieldNameValid (self.UefiDriverName, event) 104 | 105 | def UefiDriverVersionOnText( self, event ): 106 | Config.UefiDriverVersion = Config.App.TextFieldVersionValid (self.UefiDriverVersion, event) 107 | 108 | def UefiDriverGuidOnText( self, event ): 109 | Config.UefiDriverGuid = event.GetString() 110 | 111 | def GenerateGuidOnButtonClick( self, event ): 112 | Config.UefiDriverGuid = uuid.uuid1().get_urn().split(':')[2] 113 | self.UefiDriverGuid.SetValue(Config.UefiDriverGuid) 114 | 115 | def UefiDriverTypeOnRadioBox( self, event ): 116 | Config.UefiDriverType = event.GetString() 117 | DriverModel = False 118 | if u"UEFI Driver Model Device Driver" in Config.UefiDriverType: 119 | DriverModel = True 120 | if u"UEFI Driver Model Bus Driver" in Config.UefiDriverType: 121 | DriverModel = True 122 | if u"UEFI Driver Model Hybrid Driver" in Config.UefiDriverType: 123 | DriverModel = True 124 | if DriverModel: 125 | self.DriverBindingVersion.Enable() 126 | else: 127 | self.DriverBindingVersion.Disable() 128 | 129 | def DriverBindingVersionOnText( self, event ): 130 | Config.DriverBindingVersion = event.GetString() 131 | 132 | def UefiDriverCommonFeaturesOnCheckListBoxToggled( self, event ): 133 | Config.UefiDriverCommonFeatures = self.UefiDriverCommonFeatures.GetCheckedStrings() 134 | if u"Driver Supported EFI Version Protocol" in Config.UefiDriverCommonFeatures: 135 | self.UefiSpecificationVersion.Enable() 136 | else: 137 | self.UefiSpecificationVersion.Disable() 138 | 139 | def UefiSpecificationVersionOnText( self, event ): 140 | Config.UefiSpecificationVersion = event.GetString() 141 | 142 | def UefiDriverCpuArchitectureOnCheckListBoxToggled( self, event ): 143 | if u'All CPU Architectures' in Config.UefiDriverCpuArchitecture: 144 | if len(self.UefiDriverCpuArchitecture.GetCheckedStrings()) <= 1: 145 | Config.UefiDriverCpuArchitecture = () 146 | else: 147 | Config.UefiDriverCpuArchitecture = tuple(set(self.UefiDriverCpuArchitecture.GetCheckedStrings()) - set(Config.UefiDriverCpuArchitecture)) 148 | else: 149 | if u'All CPU Architectures' in self.UefiDriverCpuArchitecture.GetCheckedStrings(): 150 | Config.UefiDriverCpuArchitecture = () 151 | else: 152 | Config.UefiDriverCpuArchitecture = self.UefiDriverCpuArchitecture.GetCheckedStrings() 153 | if len(Config.UefiDriverCpuArchitecture) == 0: 154 | Config.UefiDriverCpuArchitecture = (u'All CPU Architectures',) 155 | self.UefiDriverCpuArchitecture.SetCheckedStrings(Config.UefiDriverCpuArchitecture) 156 | 157 | def NextOnButtonClick( self, event ): 158 | self.Destroy() 159 | frame = UefiDriverWizardUefiDriverModelOptionalFeatures.UefiDriverWizardUefiDriverModelOptionalFeatures (None) 160 | frame.Show() 161 | 162 | def FinishOnButtonClick( self, event ): 163 | if Config.UefiDriverName == '': 164 | Config.UefiDriverName = os.path.split(Config.UefiDriverPath)[-1] 165 | Result, Message = Config.App.CreateUefiDriver() 166 | if not Result: 167 | dlg = wx.MessageDialog( 168 | self, 169 | Message, 170 | 'ERROR', 171 | wx.OK | wx.ICON_ERROR 172 | ) 173 | dlg.ShowModal() 174 | dlg.Destroy() 175 | return 176 | dlg = wx.MessageDialog( 177 | self, 178 | Message, 179 | 'New UEFI Driver', 180 | wx.OK | wx.ICON_INFORMATION 181 | ) 182 | dlg.ShowModal() 183 | dlg.Destroy() 184 | Config.UefiDriverName = '' 185 | Config.UefiDriverVersion = '' 186 | Config.UefiDriverGuid = '' 187 | self.Destroy() 188 | 189 | def CancelOnButtonClick( self, event ): 190 | Config.UefiDriverName = '' 191 | Config.UefiDriverVersion = '' 192 | Config.UefiDriverGuid = '' 193 | self.Destroy() 194 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/ComponentName.c: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | #include "<>.h" 30 | 31 | /// 32 | /// Component Name Protocol instance 33 | /// 34 | GLOBAL_REMOVE_IF_UNREFERENCED 35 | EFI_COMPONENT_NAME_PROTOCOL g<>ComponentName = { 36 | (EFI_COMPONENT_NAME_GET_DRIVER_NAME) <>ComponentNameGetDriverName, 37 | (EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)<>ComponentNameGetControllerName, 38 | "<>" 39 | }; 40 | 41 | /// 42 | /// Component Name 2 Protocol instance 43 | /// 44 | GLOBAL_REMOVE_IF_UNREFERENCED 45 | EFI_COMPONENT_NAME2_PROTOCOL g<>ComponentName2 = { 46 | <>ComponentNameGetDriverName, 47 | <>ComponentNameGetControllerName, 48 | "<>" 49 | }; 50 | 51 | /// 52 | /// Table of driver names 53 | /// 54 | GLOBAL_REMOVE_IF_UNREFERENCED 55 | EFI_UNICODE_STRING_TABLE m<>DriverNameTable[] = { 56 | { "<>;<>", (CHAR16 *)L"<>" }, 57 | { NULL, NULL } 58 | }; 59 | 60 | /** 61 | Retrieves a Unicode string that is the user-readable name of the EFI Driver. 62 | 63 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 64 | @param Language A pointer to a three-character ISO 639-2 language identifier. 65 | This is the language of the driver name that that the caller 66 | is requesting, and it must match one of the languages specified 67 | in SupportedLanguages. The number of languages supported by a 68 | driver is up to the driver writer. 69 | @param DriverName A pointer to the Unicode string to return. This Unicode string 70 | is the name of the driver specified by This in the language 71 | specified by Language. 72 | 73 | @retval EFI_SUCCESS The Unicode string for the Driver specified by This 74 | and the language specified by Language was returned 75 | in DriverName. 76 | @retval EFI_INVALID_PARAMETER Language is NULL. 77 | @retval EFI_INVALID_PARAMETER DriverName is NULL. 78 | @retval EFI_UNSUPPORTED The driver specified by This does not support the 79 | language specified by Language. 80 | 81 | **/ 82 | EFI_STATUS 83 | EFIAPI 84 | <>ComponentNameGetDriverName ( 85 | IN EFI_COMPONENT_NAME2_PROTOCOL *This, 86 | IN CHAR8 *Language, 87 | OUT CHAR16 **DriverName 88 | ) 89 | { 90 | return LookupUnicodeString2 ( 91 | Language, 92 | This->SupportedLanguages, 93 | m<>DriverNameTable, 94 | DriverName, 95 | (BOOLEAN)(This != &g<>ComponentName2) 96 | ); 97 | } 98 | 99 | /** 100 | Retrieves a Unicode string that is the user readable name of the controller 101 | that is being managed by an EFI Driver. 102 | 103 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 104 | @param ControllerHandle The handle of a controller that the driver specified by 105 | This is managing. This handle specifies the controller 106 | whose name is to be returned. 107 | @param ChildHandle The handle of the child controller to retrieve the name 108 | of. This is an optional parameter that may be NULL. It 109 | will be NULL for device drivers. It will also be NULL 110 | for a bus drivers that wish to retrieve the name of the 111 | bus controller. It will not be NULL for a bus driver 112 | that wishes to retrieve the name of a child controller. 113 | @param Language A pointer to a three character ISO 639-2 language 114 | identifier. This is the language of the controller name 115 | that the caller is requesting, and it must match one 116 | of the languages specified in SupportedLanguages. The 117 | number of languages supported by a driver is up to the 118 | driver writer. 119 | @param ControllerName A pointer to the Unicode string to return. This Unicode 120 | string is the name of the controller specified by 121 | ControllerHandle and ChildHandle in the language specified 122 | by Language, from the point of view of the driver specified 123 | by This. 124 | 125 | @retval EFI_SUCCESS The Unicode string for the user-readable name in the 126 | language specified by Language for the driver 127 | specified by This was returned in DriverName. 128 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. 129 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 130 | @retval EFI_INVALID_PARAMETER Language is NULL. 131 | @retval EFI_INVALID_PARAMETER ControllerName is NULL. 132 | @retval EFI_UNSUPPORTED The driver specified by This is not currently managing 133 | the controller specified by ControllerHandle and 134 | ChildHandle. 135 | @retval EFI_UNSUPPORTED The driver specified by This does not support the 136 | language specified by Language. 137 | 138 | **/ 139 | EFI_STATUS 140 | EFIAPI 141 | <>ComponentNameGetControllerName ( 142 | IN EFI_COMPONENT_NAME2_PROTOCOL *This, 143 | IN EFI_HANDLE ControllerHandle, 144 | IN EFI_HANDLE ChildHandle OPTIONAL, 145 | IN CHAR8 *Language, 146 | OUT CHAR16 **ControllerName 147 | ) 148 | { 149 | EFI_STATUS Status; 150 | <><> 151 | // 152 | // ChildHandle must be NULL for a Device Driver 153 | // 154 | if (ChildHandle != NULL) { 155 | return EFI_UNSUPPORTED; 156 | } 157 | 158 | // 159 | // Make sure this driver is currently managing ControllerHandle 160 | // 161 | Status = EfiTestManagedDevice ( 162 | ControllerHandle, 163 | g<>DriverBinding.DriverBindingHandle, 164 | &<> 165 | ); 166 | if (EFI_ERROR (Status)) { 167 | return Status; 168 | } 169 | 170 | // 171 | // Lookup name of controller specified by ControllerHandle 172 | // 173 | Status = EFI_UNSUPPORTED; 174 | <> 175 | <><> 176 | // 177 | // Make sure this driver is currently managing ControllerHandle 178 | // 179 | Status = EfiTestManagedDevice ( 180 | ControllerHandle, 181 | g<>DriverBinding.DriverBindingHandle, 182 | &<> 183 | ); 184 | if (EFI_ERROR (Status)) { 185 | return Status; 186 | } 187 | 188 | if (ChildHandle == NULL) { 189 | // 190 | // Lookup name of controller specified by ControllerHandle 191 | // 192 | Status = EFI_UNSUPPORTED; 193 | } else { 194 | // 195 | // If ChildHandle is not NULL, then make sure this driver produced ChildHandle 196 | // 197 | Status = EfiTestChildHandle ( 198 | ControllerHandle, 199 | ChildHandle, 200 | &<> 201 | ); 202 | if (EFI_ERROR (Status)) { 203 | return Status; 204 | } 205 | 206 | // 207 | // Lookup name of child specified by ControllerHandle and ChildHandle 208 | // 209 | Status = EFI_UNSUPPORTED; 210 | } 211 | <> 212 | return Status; 213 | } 214 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/SimpleTextOutput.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Reset the text output device hardware and optionaly run diagnostics 31 | 32 | @param This The protocol instance pointer. 33 | @param ExtendedVerification Driver may perform more exhaustive verfication 34 | operation of the device during reset. 35 | 36 | @retval EFI_SUCCESS The text output device was reset. 37 | @retval EFI_DEVICE_ERROR The text output device is not functioning correctly and 38 | could not be reset. 39 | 40 | **/ 41 | EFI_STATUS 42 | EFIAPI 43 | <>SimpleTextOutputReset ( 44 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, 45 | IN BOOLEAN ExtendedVerification 46 | ); 47 | 48 | /** 49 | Write a string to the output device. 50 | 51 | @param This The protocol instance pointer. 52 | @param String The NULL-terminated string to be displayed on the output 53 | device(s). All output devices must also support the Unicode 54 | drawing character codes defined in this file. 55 | 56 | @retval EFI_SUCCESS The string was output to the device. 57 | @retval EFI_DEVICE_ERROR The device reported an error while attempting to output 58 | the text. 59 | @retval EFI_UNSUPPORTED The output device's mode is not currently in a 60 | defined text mode. 61 | @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the 62 | characters in the string could not be 63 | rendered and were skipped. 64 | 65 | **/ 66 | EFI_STATUS 67 | EFIAPI 68 | <>SimpleTextOutputOutputString ( 69 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, 70 | IN CHAR16 *String 71 | ); 72 | 73 | /** 74 | Verifies that all characters in a string can be output to the 75 | target device. 76 | 77 | @param This The protocol instance pointer. 78 | @param String The NULL-terminated string to be examined for the output 79 | device(s). 80 | 81 | @retval EFI_SUCCESS The device(s) are capable of rendering the output string. 82 | @retval EFI_UNSUPPORTED Some of the characters in the string cannot be 83 | rendered by one or more of the output devices mapped 84 | by the EFI handle. 85 | 86 | **/ 87 | EFI_STATUS 88 | EFIAPI 89 | <>SimpleTextOutputTestString ( 90 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, 91 | IN CHAR16 *String 92 | ); 93 | 94 | /** 95 | Returns information for an available text mode that the output device(s) 96 | supports. 97 | 98 | @param This The protocol instance pointer. 99 | @param ModeNumber The mode number to return information on. 100 | @param Columns Returns the geometry of the text output device for the 101 | requested ModeNumber. 102 | @param Rows Returns the geometry of the text output device for the 103 | requested ModeNumber. 104 | 105 | @retval EFI_SUCCESS The requested mode information was returned. 106 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. 107 | @retval EFI_UNSUPPORTED The mode number was not valid. 108 | 109 | **/ 110 | EFI_STATUS 111 | EFIAPI 112 | <>SimpleTextOutputQueryMode ( 113 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, 114 | IN UINTN ModeNumber, 115 | OUT UINTN *Columns, 116 | OUT UINTN *Rows 117 | ); 118 | 119 | /** 120 | Sets the output device(s) to a specified mode. 121 | 122 | @param This The protocol instance pointer. 123 | @param ModeNumber The mode number to set. 124 | 125 | @retval EFI_SUCCESS The requested text mode was set. 126 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. 127 | @retval EFI_UNSUPPORTED The mode number was not valid. 128 | 129 | **/ 130 | EFI_STATUS 131 | EFIAPI 132 | <>SimpleTextOutputSetMode ( 133 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, 134 | IN UINTN ModeNumber 135 | ); 136 | 137 | /** 138 | Sets the background and foreground colors for the OutputString () and 139 | ClearScreen () functions. 140 | 141 | @param This The protocol instance pointer. 142 | @param Attribute The attribute to set. Bits 0..3 are the foreground color, and 143 | bits 4..6 are the background color. All other bits are undefined 144 | and must be zero. The valid Attributes are defined in this file. 145 | 146 | @retval EFI_SUCCESS The attribute was set. 147 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. 148 | @retval EFI_UNSUPPORTED The attribute requested is not defined. 149 | 150 | **/ 151 | EFI_STATUS 152 | EFIAPI 153 | <>SimpleTextOutputSetAttribute ( 154 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, 155 | IN UINTN Attribute 156 | ); 157 | 158 | /** 159 | Clears the output device(s) display to the currently selected background 160 | color. 161 | 162 | @param This The protocol instance pointer. 163 | 164 | @retval EFI_SUCCESS The operation completed successfully. 165 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. 166 | @retval EFI_UNSUPPORTED The output device is not in a valid text mode. 167 | 168 | **/ 169 | EFI_STATUS 170 | EFIAPI 171 | <>SimpleTextOutputClearScreen ( 172 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This 173 | ); 174 | 175 | /** 176 | Sets the current coordinates of the cursor position 177 | 178 | @param This The protocol instance pointer. 179 | @param Column The position to set the cursor to. Must be greater than or 180 | equal to zero and less than the number of columns and rows 181 | by QueryMode (). 182 | @param Row The position to set the cursor to. Must be greater than or 183 | equal to zero and less than the number of columns and rows 184 | by QueryMode (). 185 | 186 | @retval EFI_SUCCESS The operation completed successfully. 187 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. 188 | @retval EFI_UNSUPPORTED The output device is not in a valid text mode, or the 189 | cursor position is invalid for the current mode. 190 | 191 | **/ 192 | EFI_STATUS 193 | EFIAPI 194 | <>SimpleTextOutputSetCursorPosition ( 195 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, 196 | IN UINTN Column, 197 | IN UINTN Row 198 | ); 199 | 200 | /** 201 | Makes the cursor visible or invisible 202 | 203 | @param This The protocol instance pointer. 204 | @param Visible If TRUE, the cursor is set to be visible. If FALSE, the cursor is 205 | set to be invisible. 206 | 207 | @retval EFI_SUCCESS The operation completed successfully. 208 | @retval EFI_DEVICE_ERROR The device had an error and could not complete the 209 | request, or the device does not support changing 210 | the cursor mode. 211 | @retval EFI_UNSUPPORTED The output device is not in a valid text mode. 212 | 213 | **/ 214 | EFI_STATUS 215 | EFIAPI 216 | <>SimpleTextOutputEnableCursor ( 217 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, 218 | IN BOOLEAN Visible 219 | ); 220 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/SimpleTextInput.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | The Reset() function resets the input device hardware. As part 31 | of initialization process, the firmware/device will make a quick 32 | but reasonable attempt to verify that the device is functioning. 33 | If the ExtendedVerification flag is TRUE the firmware may take 34 | an extended amount of time to verify the device is operating on 35 | reset. Otherwise the reset operation is to occur as quickly as 36 | possible. The hardware verification process is not defined by 37 | this specification and is left up to the platform firmware or 38 | driver to implement. 39 | 40 | @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. 41 | 42 | @param ExtendedVerification Indicates that the driver may 43 | perform a more exhaustive 44 | verification operation of the 45 | device during reset. 46 | 47 | 48 | @retval EFI_SUCCESS The device was reset. 49 | 50 | @retval EFI_DEVICE_ERROR The device is not functioning 51 | correctly and could not be reset. 52 | 53 | **/ 54 | EFI_STATUS 55 | EFIAPI 56 | <>SimpleTextInputReset ( 57 | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, 58 | IN BOOLEAN ExtendedVerification 59 | ); 60 | 61 | /** 62 | The function reads the next keystroke from the input device. If 63 | there is no pending keystroke the function returns 64 | EFI_NOT_READY. If there is a pending keystroke, then 65 | KeyData.Key.ScanCode is the EFI scan code defined in Error! 66 | Reference source not found. The KeyData.Key.UnicodeChar is the 67 | actual printable character or is zero if the key does not 68 | represent a printable character (control key, function key, 69 | etc.). The KeyData.KeyState is shift state for the character 70 | reflected in KeyData.Key.UnicodeChar or KeyData.Key.ScanCode . 71 | When interpreting the data from this function, it should be 72 | noted that if a class of printable characters that are 73 | normally adjusted by shift modifiers (e.g. Shift Key + "f" 74 | key) would be presented solely as a KeyData.Key.UnicodeChar 75 | without the associated shift state. So in the previous example 76 | of a Shift Key + "f" key being pressed, the only pertinent 77 | data returned would be KeyData.Key.UnicodeChar with the value 78 | of "F". This of course would not typically be the case for 79 | non-printable characters such as the pressing of the Right 80 | Shift Key + F10 key since the corresponding returned data 81 | would be reflected both in the KeyData.KeyState.KeyShiftState 82 | and KeyData.Key.ScanCode values. UEFI drivers which implement 83 | the EFI_SIMPLE_TEXT_INPUT_EX protocol are required to return 84 | KeyData.Key and KeyData.KeyState values. These drivers must 85 | always return the most current state of 86 | KeyData.KeyState.KeyShiftState and 87 | KeyData.KeyState.KeyToggleState. It should also be noted that 88 | certain input devices may not be able to produce shift or toggle 89 | state information, and in those cases the high order bit in the 90 | respective Toggle and Shift state fields should not be active. 91 | 92 | 93 | @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. 94 | 95 | @param KeyData A pointer to a buffer that is filled in with 96 | the keystroke state data for the key that was 97 | pressed. 98 | 99 | 100 | @retval EFI_SUCCESS The keystroke information was 101 | returned. 102 | 103 | @retval EFI_NOT_READY There was no keystroke data available. 104 | EFI_DEVICE_ERROR The keystroke 105 | information was not returned due to 106 | hardware errors. 107 | 108 | 109 | **/ 110 | EFI_STATUS 111 | EFIAPI 112 | <>SimpleTextInputReadKeyStrokeEx ( 113 | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, 114 | OUT EFI_KEY_DATA *KeyData 115 | ); 116 | 117 | /** 118 | The SetState() function allows the input device hardware to 119 | have state settings adjusted. 120 | 121 | @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. 122 | 123 | @param KeyToggleState Pointer to the EFI_KEY_TOGGLE_STATE to 124 | set the state for the input device. 125 | 126 | 127 | @retval EFI_SUCCESS The device state was set appropriately. 128 | 129 | @retval EFI_DEVICE_ERROR The device is not functioning 130 | correctly and could not have the 131 | setting adjusted. 132 | 133 | @retval EFI_UNSUPPORTED The device does not support the 134 | ability to have its state set. 135 | 136 | **/ 137 | EFI_STATUS 138 | EFIAPI 139 | <>SimpleTextInputSetState ( 140 | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, 141 | IN EFI_KEY_TOGGLE_STATE *KeyToggleState 142 | ); 143 | 144 | /** 145 | The RegisterKeystrokeNotify() function registers a function 146 | which will be called when a specified keystroke will occur. 147 | 148 | @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. 149 | 150 | @param KeyData A pointer to a buffer that is filled in with 151 | the keystroke information for the key that was 152 | pressed. 153 | 154 | @param KeyNotificationFunction Points to the function to be 155 | called when the key sequence 156 | is typed specified by KeyData. 157 | 158 | 159 | @param NotifyHandle Points to the unique handle assigned to 160 | the registered notification. 161 | 162 | @retval EFI_SUCCESS The device state was set 163 | appropriately. 164 | 165 | @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary 166 | data structures. 167 | 168 | **/ 169 | EFI_STATUS 170 | EFIAPI 171 | <>SimpleTextInputRegisterKeyNotify ( 172 | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, 173 | IN EFI_KEY_DATA *KeyData, 174 | IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction, 175 | OUT EFI_HANDLE *NotifyHandle 176 | ); 177 | 178 | /** 179 | The UnregisterKeystrokeNotify() function removes the 180 | notification which was previously registered. 181 | 182 | @param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance. 183 | 184 | @param NotificationHandle The handle of the notification 185 | function being unregistered. 186 | 187 | @retval EFI_SUCCESS The device state was set appropriately. 188 | 189 | @retval EFI_INVALID_PARAMETER The NotificationHandle is 190 | invalid. 191 | 192 | **/ 193 | EFI_STATUS 194 | EFIAPI 195 | <>SimpleTextInputUnregisterKeyNotify ( 196 | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, 197 | IN EFI_HANDLE NotificationHandle 198 | ); 199 | 200 | /** 201 | Reads the next keystroke from the input device. The WaitForKey Event can 202 | be used to test for existence of a keystroke via WaitForEvent () call. 203 | 204 | @param This Protocol instance pointer. 205 | @param Key A pointer to a buffer that is filled in with the keystroke 206 | information for the key that was pressed. 207 | 208 | @retval EFI_SUCCESS The keystroke information was returned. 209 | @retval EFI_NOT_READY There was no keystroke data available. 210 | @retval EFI_DEVICE_ERROR The keystroke information was not returned due to 211 | hardware errors. 212 | 213 | **/ 214 | EFI_STATUS 215 | EFIAPI 216 | <>SimpleTextInputReadKeyStroke ( 217 | IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, 218 | OUT EFI_INPUT_KEY *Key 219 | ); 220 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/HiiConfigAccess.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | 31 | This function allows the caller to request the current 32 | configuration for one or more named elements. The resulting 33 | string is in format. Any and all alternative 34 | configuration strings shall also be appended to the end of the 35 | current configuration string. If they are, they must appear 36 | after the current configuration. They must contain the same 37 | routing (GUID, NAME, PATH) as the current configuration string. 38 | They must have an additional description indicating the type of 39 | alternative configuration the string represents, 40 | "ALTCFG=". That (when 41 | converted from Hex UNICODE to binary) is a reference to a 42 | string in the associated string pack. 43 | 44 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. 45 | 46 | @param Request A null-terminated Unicode string in 47 | format. Note that this 48 | includes the routing information as well as 49 | the configurable name / value pairs. It is 50 | invalid for this string to be in 51 | format. 52 | If a NULL is passed in for the Request field, 53 | all of the settings being abstracted by this function 54 | will be returned in the Results field. In addition, 55 | if a ConfigHdr is passed in with no request elements, 56 | all of the settings being abstracted for that particular 57 | ConfigHdr reference will be returned in the Results Field. 58 | 59 | @param Progress On return, points to a character in the 60 | Request string. Points to the string's null 61 | terminator if request was successful. Points 62 | to the most recent "&" before the first 63 | failing name / value pair (or the beginning 64 | of the string if the failure is in the first 65 | name / value pair) if the request was not 66 | successful. 67 | 68 | @param Results A null-terminated Unicode string in 69 | format which has all values 70 | filled in for the names in the Request string. 71 | String to be allocated by the called function. 72 | 73 | @retval EFI_SUCCESS The Results string is filled with the 74 | values corresponding to all requested 75 | names. 76 | 77 | @retval EFI_OUT_OF_RESOURCES Not enough memory to store the 78 | parts of the results that must be 79 | stored awaiting possible future 80 | protocols. 81 | 82 | @retval EFI_NOT_FOUND Routing data doesn't match any 83 | known driver. Progress set to the 84 | first character in the routing header. 85 | Note: There is no requirement that the 86 | driver validate the routing data. It 87 | must skip the in order to 88 | process the names. 89 | 90 | @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set 91 | to most recent "&" before the 92 | error or the beginning of the 93 | string. 94 | 95 | @retval EFI_INVALID_PARAMETER Unknown name. Progress points 96 | to the & before the name in 97 | question. 98 | 99 | **/ 100 | EFI_STATUS 101 | EFIAPI 102 | <>HiiConfigAccessExtractConfig ( 103 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, 104 | IN CONST EFI_STRING Request, 105 | OUT EFI_STRING *Progress, 106 | OUT EFI_STRING *Results 107 | ); 108 | 109 | /** 110 | 111 | This function applies changes in a driver's configuration. 112 | Input is a Configuration, which has the routing data for this 113 | driver followed by name / value configuration pairs. The driver 114 | must apply those pairs to its configurable storage. If the 115 | driver's configuration is stored in a linear block of data 116 | and the driver's name / value pairs are in 117 | format, it may use the ConfigToBlock helper function (above) to 118 | simplify the job. 119 | 120 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. 121 | 122 | @param Configuration A null-terminated Unicode string in 123 | format. 124 | 125 | @param Progress A pointer to a string filled in with the 126 | offset of the most recent '&' before the 127 | first failing name / value pair (or the 128 | beginn ing of the string if the failure 129 | is in the first name / value pair) or 130 | the terminating NULL if all was 131 | successful. 132 | 133 | @retval EFI_SUCCESS The results have been distributed or are 134 | awaiting distribution. 135 | 136 | @retval EFI_OUT_OF_RESOURCES Not enough memory to store the 137 | parts of the results that must be 138 | stored awaiting possible future 139 | protocols. 140 | 141 | @retval EFI_INVALID_PARAMETERS Passing in a NULL for the 142 | Results parameter would result 143 | in this type of error. 144 | 145 | @retval EFI_NOT_FOUND Target for the specified routing data 146 | was not found 147 | 148 | **/ 149 | EFI_STATUS 150 | EFIAPI 151 | <>HiiConfigAccessRouteConfig ( 152 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, 153 | IN CONST EFI_STRING Configuration, 154 | OUT EFI_STRING *Progress 155 | ); 156 | 157 | /** 158 | 159 | This function is called to provide results data to the driver. 160 | This data consists of a unique key that is used to identify 161 | which data is either being passed back or being asked for. 162 | 163 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. 164 | @param Action Specifies the type of action taken by the browser. 165 | @param QuestionId A unique value which is sent to the original 166 | exporting driver so that it can identify the type 167 | of data to expect. The format of the data tends to 168 | vary based on the opcode that generated the callback. 169 | @param Type The type of value for the question. 170 | @param Value A pointer to the data being sent to the original 171 | exporting driver. 172 | @param ActionRequest On return, points to the action requested by the 173 | callback function. 174 | 175 | @retval EFI_SUCCESS The callback successfully handled the action. 176 | @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the 177 | variable and its data. 178 | @retval EFI_DEVICE_ERROR The variable could not be saved. 179 | @retval EFI_UNSUPPORTED The specified Action is not supported by the 180 | callback. 181 | **/ 182 | EFI_STATUS 183 | EFIAPI 184 | <>HiiConfigAccessCallback ( 185 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, 186 | IN EFI_BROWSER_ACTION Action, 187 | IN EFI_QUESTION_ID QuestionId, 188 | IN UINT8 Type, 189 | IN OUT EFI_IFR_TYPE_VALUE *Value, 190 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest 191 | ); 192 | -------------------------------------------------------------------------------- /DriverDeveloper/UefiDriverWizard/Templates/DriverBinding.h: -------------------------------------------------------------------------------- 1 | <><> 2 | /** @file 3 | UEFI Driver Wizard template file 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | 7 | This program and the accompanying materials are licensed and made 8 | available under the terms and conditions of the BSD License which 9 | accompanies this distribution. The full text of the license may 10 | be found at http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" 13 | BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 14 | EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | <> 18 | /** @file 19 | <> 20 | 21 | <> 22 | 23 | <> 24 | 25 | <> 26 | 27 | **/ 28 | 29 | /** 30 | Tests to see if this driver supports a given controller. If a child device is provided, 31 | it further tests to see if this driver supports creating a handle for the specified child device. 32 | 33 | This function checks to see if the driver specified by This supports the device specified by 34 | ControllerHandle. Drivers will typically use the device path attached to 35 | ControllerHandle and/or the services from the bus I/O abstraction attached to 36 | ControllerHandle to determine if the driver supports ControllerHandle. This function 37 | may be called many times during platform initialization. In order to reduce boot times, the tests 38 | performed by this function must be very small, and take as little time as possible to execute. This 39 | function must not change the state of any hardware devices, and this function must be aware that the 40 | device specified by ControllerHandle may already be managed by the same driver or a 41 | different driver. This function must match its calls to AllocatePages() with FreePages(), 42 | AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol(). 43 | Because ControllerHandle may have been previously started by the same driver, if a protocol is 44 | already in the opened state, then it must not be closed with CloseProtocol(). This is required 45 | to guarantee the state of ControllerHandle is not modified by this function. 46 | 47 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 48 | @param[in] ControllerHandle The handle of the controller to test. This handle 49 | must support a protocol interface that supplies 50 | an I/O abstraction to the driver. 51 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This 52 | parameter is ignored by device drivers, and is optional for bus 53 | drivers. For bus drivers, if this parameter is not NULL, then 54 | the bus driver must determine if the bus controller specified 55 | by ControllerHandle and the child controller specified 56 | by RemainingDevicePath are both supported by this 57 | bus driver. 58 | 59 | @retval EFI_SUCCESS The device specified by ControllerHandle and 60 | RemainingDevicePath is supported by the driver specified by This. 61 | @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and 62 | RemainingDevicePath is already being managed by the driver 63 | specified by This. 64 | @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and 65 | RemainingDevicePath is already being managed by a different 66 | driver or an application that requires exclusive access. 67 | Currently not implemented. 68 | @retval EFI_UNSUPPORTED The device specified by ControllerHandle and 69 | RemainingDevicePath is not supported by the driver specified by This. 70 | **/ 71 | EFI_STATUS 72 | EFIAPI 73 | <>DriverBindingSupported ( 74 | IN EFI_DRIVER_BINDING_PROTOCOL *This, 75 | IN EFI_HANDLE ControllerHandle, 76 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL 77 | ); 78 | 79 | /** 80 | Starts a device controller or a bus controller. 81 | 82 | The Start() function is designed to be invoked from the EFI boot service ConnectController(). 83 | As a result, much of the error checking on the parameters to Start() has been moved into this 84 | common boot service. It is legal to call Start() from other locations, 85 | but the following calling restrictions must be followed, or the system behavior will not be deterministic. 86 | 1. ControllerHandle must be a valid EFI_HANDLE. 87 | 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned 88 | EFI_DEVICE_PATH_PROTOCOL. 89 | 3. Prior to calling Start(), the Supported() function for the driver specified by This must 90 | have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 91 | 92 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 93 | @param[in] ControllerHandle The handle of the controller to start. This handle 94 | must support a protocol interface that supplies 95 | an I/O abstraction to the driver. 96 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This 97 | parameter is ignored by device drivers, and is optional for bus 98 | drivers. For a bus driver, if this parameter is NULL, then handles 99 | for all the children of Controller are created by this driver. 100 | If this parameter is not NULL and the first Device Path Node is 101 | not the End of Device Path Node, then only the handle for the 102 | child device specified by the first Device Path Node of 103 | RemainingDevicePath is created by this driver. 104 | If the first Device Path Node of RemainingDevicePath is 105 | the End of Device Path Node, no child handle is created by this 106 | driver. 107 | 108 | @retval EFI_SUCCESS The device was started. 109 | @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented. 110 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. 111 | @retval Others The driver failded to start the device. 112 | 113 | **/ 114 | EFI_STATUS 115 | EFIAPI 116 | <>DriverBindingStart ( 117 | IN EFI_DRIVER_BINDING_PROTOCOL *This, 118 | IN EFI_HANDLE ControllerHandle, 119 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL 120 | ); 121 | 122 | /** 123 | Stops a device controller or a bus controller. 124 | 125 | The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). 126 | As a result, much of the error checking on the parameters to Stop() has been moved 127 | into this common boot service. It is legal to call Stop() from other locations, 128 | but the following calling restrictions must be followed, or the system behavior will not be deterministic. 129 | 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this 130 | same driver's Start() function. 131 | 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid 132 | EFI_HANDLE. In addition, all of these handles must have been created in this driver's 133 | Start() function, and the Start() function must have called OpenProtocol() on 134 | ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 135 | 136 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 137 | @param[in] ControllerHandle A handle to the device being stopped. The handle must 138 | support a bus specific I/O protocol for the driver 139 | to use to stop the device. 140 | @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. 141 | @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 142 | if NumberOfChildren is 0. 143 | 144 | @retval EFI_SUCCESS The device was stopped. 145 | @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error. 146 | 147 | **/ 148 | EFI_STATUS 149 | EFIAPI 150 | <>DriverBindingStop ( 151 | IN EFI_DRIVER_BINDING_PROTOCOL *This, 152 | IN EFI_HANDLE ControllerHandle, 153 | IN UINTN NumberOfChildren, 154 | IN EFI_HANDLE *ChildHandleBuffer OPTIONAL 155 | ); 156 | --------------------------------------------------------------------------------