summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg/PiSmmCore: make type punning consistentLaszlo Ersek2019-10-091-4/+4
| | | | | | | | | | | | | | | | | | The SmiHandlerRegister() function explicitly casts "SmiHandler" (of type (SMI_HANDLER*)) to EFI_HANDLE, when outputting "DispatchHandle". Apply the same cast in the counterpart function SmiHandlerUnRegister(), which compares multiple "SmiHandler"s against the input "DispatchHandle". This is a semantic cleanup; there is no functional change. Cc: Eric Dong <eric.dong@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: fix UninstallMultipleProtocolInterfaces() callsLaszlo Ersek2019-10-097-9/+9
| | | | | | | | | | | | | | | | | | Unlike the InstallMultipleProtocolInterfaces() boot service, which takes an (EFI_HANDLE*) as first parameter, the UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as first parameter. These are actual bugs. They must have remained hidden until now because they are on error paths. Fix the UninstallMultipleProtocolInterfaces() calls. Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: PEI Core: clean up "AprioriFile" handling in FindFileEx()Laszlo Ersek2019-10-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Clean up two issues around FindFileEx(): - The "AprioriFile" parameter's type differs between the function declaration and the function definition. The correct type is (EFI_PEI_FILE_HANDLE*). - "FfsFileHeader" has type (EFI_FFS_FILE_HEADER*); for clarity, we should cast it explicitly to EFI_PEI_FILE_HANDLE when assigning it to (*AprioriFile). This is a semantic cleanup, there is no functional change. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: stop abusing EFI_HANDLE for keystroke notify registrationLaszlo Ersek2019-10-092-3/+3
| | | | | | | | | | | | | | | | | | | | EFI_REGISTER_KEYSTROKE_NOTIFY and EFI_UNREGISTER_KEYSTROKE_NOTIFY require the notification handle to have type (VOID*). The notification handle has nothing to do with the EFI_HANDLE type. This change is a semantic fix; functionally, it's a no-op. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: document workaround for EFI_RUNTIME_EVENT_ENTRY PI spec bugLaszlo Ersek2019-10-092-1/+17
| | | | | | | | | | | | | | | | | | | | | | The PI spec (v1.7) correctly specifies "EFI_RUNTIME_EVENT_ENTRY.Event" in natural language, but the field type in the structure definition itself is wrong -- it should be EFI_EVENT, not (EFI_EVENT*). This spec bug is likely unfixable for compatibility reasons, and so edk2 works it around already. We should clearly document the workaround. Functionally, this patch is a no-op. (I've also requested a non-normative (informative) clarification for the PI spec: <https://mantis.uefi.org/mantis/view.php?id=2017>.) Cc: Dandan Bi <dandan.bi@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/PlatformVarCleanupLib: fix HiiConstructConfigHdr() callLaszlo Ersek2019-10-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HiiConstructConfigHdr() function takes the "DriverHandle" parameter in order to fetch the device path from it, and then turn the device path into PATH routing information. The HiiConstructConfigHdr() function is called from VariableCleanupHiiExtractConfig(), which is only installed when "Type" is "VarCleanupManually" in PlatformVarCleanup(). In that case, we create "Private->DriverHandle" as a new handle, and install "mVarCleanupHiiVendorDevicePath" on it. Then we pass "Private->DriverHandle" to HiiAddPackages(), which consumes the device path for routing purposes. It follows that the "DriverHandle" argument passed to HiiConstructConfigHdr() should be the same driver handle, for matching routing. Currently we pass "Private->HiiHandle", which is clearly a typo, because it is the return value of HiiAddPackages(), and stands for the published HII package list. Therefore this patch addresses an actual bug. The typo has not been flagged by compilers because the UEFI spec regrettably defines both EFI_HANDLE and EFI_HII_HANDLE as (VOID*). Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: stop abusing EFI_EVENT for protocol notify registrationLaszlo Ersek2019-10-094-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | EfiCreateProtocolNotifyEvent() takes a (VOID**) for "Registration", similarly to gBS->RegisterProtocolNotify(). We should pass the address of an actual pointer-to-VOID, and not the address of an EFI_EVENT. EFI_EVENT just happens to be specified as (VOID*), and has nothing to do with the registration. The same applies to gMmst->MmRegisterProtocolNotify(). "mFtwRegistration", "mFvRegistration", and "mFvbRegistration" are used for nothing else. This change is a no-op in practice; it's a semantic improvement. Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* MdeModulePkg/UefiHiiLib: stop using EFI_HANDLE in place of EFI_HII_HANDLELaszlo Ersek2019-10-091-2/+2
| | | | | | | | | | | | | | | | HiiGetHiiHandles() returns an array of EFI_HII_HANDLEs, not EFI_HANDLEs. HiiGetString() takes an EFI_HII_HANDLE, not an EFI_HANDLE. This change is a no-op in practice; it's a semantic improvement. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg: fix cast in GetModuleInfoFromHandle() callsLaszlo Ersek2019-10-092-10/+10
| | | | | | | | | | | | | | | | | | | | | | GetModuleInfoFromHandle() takes an EFI_HANDLE -- (VOID*) -- as first parameter, but InsertFpdtRecord() passes (EFI_HANDLE*) -- (VOID**). (VOID**) converts silently to (VOID*), which is why the wrong cast is masked. Note that the *value* that is passed is alright -- therefore this patch does not change behavior --, it's just semantically wrong to pass an (EFI_HANDLE*) where an EFI_HANDLE is expected. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* EmulatorPkg: stop abusing EFI_HANDLE for keystroke notify registrationLaszlo Ersek2019-10-091-2/+2
| | | | | | | | | | | | | | | EFI_REGISTER_KEYSTROKE_NOTIFY and EFI_UNREGISTER_KEYSTROKE_NOTIFY require the notification handle to have type (VOID*). The notification handle has nothing to do with the EFI_HANDLE type. This change is a semantic fix; functionally, it's a no-op. Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* EmulatorPkg/DxeTimerLib: drop superfluous castLaszlo Ersek2019-10-091-1/+1
| | | | | | | | | | | "gTimerEvent" has type EFI_EVENT already, drop the superfluous cast. Cc: Andrew Fish <afish@apple.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* EmbeddedPkg/Universal/MmcDxe: "fix" CloseProtocol() call in BindingStop()Laszlo Ersek2019-10-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | The 3rd and 4th parameters of the CloseProtocol() call are wrong. Given that we're not dissociating a child controller from a parent controller (= closing a BY_CHILD_CONTROLLER open), but closing a BY_DRIVER open, the 4th parameter (ControllerHandle) should equal the 1st parameter (Handle). It's unclear why this code hasn't crashed before. Note that the patch doesn't fix the underlying driver model bug. I don't understand what the loop in MmcDriverBindingStop() attempts to do. Is this driver supposed to be a bus driver? It seems to create new handles, and to append device path nodes. But it doesn't set up proper parent/child protocol opens, and it doesn't close them. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* EmbeddedPkg/AndroidFastbootTransportTcpDxe: fix DestroyChild() callLaszlo Ersek2019-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | - The 2nd parameter of EFI_SERVICE_BINDING_CREATE_CHILD is: IN OUT EFI_HANDLE *ChildHandle - The 2nd parameter of EFI_SERVICE_BINDING_DESTROY_CHILD is: IN EFI_HANDLE ChildHandle Fix the DestroyChild() call in TcpFastbootTransportStop(). This is an actual bugfix; I don't know why the current code doesn't crash. Perhaps the function is never reached in practice? (It could be tied to an error path.) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* EmbeddedPkg: add missing EFIAPI calling convention specifiersLaszlo Ersek2019-10-096-8/+44
| | | | | | | | | | | | | This patch is unrelated to the rest of the series; it just makes sure that "EmbeddedPkg/EmbeddedPkg.dsc" builds for all platforms advertised in SUPPORTED_ARCHITECTURES (in particular, X64). No functional changes. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* MdeModulePkg/BdsDxe: Also call PlatformBootManagerWaitCallback on 0Pete Batard2019-10-081-0/+1
| | | | | | | | | | | | The existing loop is set to call PlatformBootManagerWaitCallback every second except the last one. We believe this is a mistake as it prevents the called code from performing timeout expiration tasks such as, for instance, ensuring that the last segment of a progress bar is displayed before continuing (which is a current issue for the RPi3 platform). Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* Maintainers.txt: Move ShellBin maintainers to EDK II Releases sectionLiming Gao2019-10-081-7/+8
| | | | | | | | | | | ShellBinPkg is generated for each edk2 stable tag release. Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* NetworkPkg: Remove unnecessary MdeModulePkg/MdeModulePkg.dec dependency in INFLiming Gao2019-10-0819-19/+0
| | | | | | | Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* MdeModulePkg: Remove PCD gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSizeLiming Gao2019-10-082-12/+0
| | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2195 This PCD has been moved to NetworkPkg.dec file. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* NetworkPkg UefiPxeBcDxe: Consume PcdTftpBlockSize defined in NetworkPkg.decLiming Gao2019-10-081-1/+1
| | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2195 Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Add PcdTftpBlockSize in NetworkPkg.decLiming Gao2019-10-082-0/+13
| | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2195 PcdTftpBlockSize is network related PCD. It should be defined in NetworkPkg.dec. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* MdeModulePkg: Remove network related guid definitions from MdeModulePkg.decLiming Gao2019-10-081-10/+0
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2196 Network related guid definitions have been moved into NetworkPkg.dec. So, they can be removed from MdeModulePkg.dec. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* NetworkPkg: Move network related header files from MdeModulePkg to NetworkPkgLiming Gao2019-10-084-0/+10
| | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2196 Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* UefiCpuPkg: strip trailing whitespaceLeif Lindholm2019-10-041-1/+1
| | | | | | | | | Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* OvmfPkg: strip trailing whitespaceLeif Lindholm2019-10-0427-301/+301
| | | | | | | | | | | | | Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Julien Grall <julien.grall@arm.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* MdeModulePkg: strip trailing whitespaceLeif Lindholm2019-10-0415-170/+170
| | | | | | | | | | | | Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* EmulatorPkg: strip trailing whitespaceLeif Lindholm2019-10-041-2/+2
| | | | | | | | | Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools: strip trailing whitespaceLeif Lindholm2019-10-0410-18/+18
| | | | | | | Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* ArmPlatformPkg: strip trailing whitespaceLeif Lindholm2019-10-042-2/+2
| | | | | | | Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* ArmPkg: strip trailing whitespaceLeif Lindholm2019-10-041-2/+2
| | | | | | | Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* EmbeddedPkg: convert Lauterbach README.txt to 7-bit safe Readme.mdLeif Lindholm2019-10-042-7/+16
| | | | | | | | | | | | This file contained what looked like windows 1250 encoded single quotation marks. Convert them to regular 's. Rework the file to markdown format and and rename it Readme.md while we're at it. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: "Kinney, Michael D" <michael.d.kinney@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools: correct line endings for ConvertFce Python scriptLeif Lindholm2019-10-041-5/+5
| | | | | | | | | | Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* ArmPkg: ArmScmiDxe - convert .h to from 8859-x to 7-bitLeif Lindholm2019-10-041-1/+1
| | | | | | | | | | | | A paragraph sign in a comment came from some ISO8859 encoding, convert it to the word "section" to remain 7-bit safe, since we're not actually doing anything special. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: "Kinney, Michael D" <michael.d.kinney@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* DynamicTablesPkg: fix .dsc line endingLeif Lindholm2019-10-041-1/+1
| | | | | | | | | | | Correct line ending in package .dsc. Cc: Sami Mujawar <Sami.Mujawar@arm.com> Cc: Alexei Fedorov <Alexei.Fedorov@arm.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Sami Mujawar <Sami.Mujawar@arm.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools: fix line endings in SetupGit.py Conf filesLeif Lindholm2019-10-042-2/+2
| | | | | | | | | | | | | | A file header license/copyright header copied around in commit 5b3e695d8ac5 ("BaseTools: add centralized location for git config files") was missing a CR - add it in both faulty locations. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* EmbeddedPkg: delete outdated FdtLib README.txtLeif Lindholm2019-10-041-1/+0
| | | | | | | | | | | | While looking at encoding and line ending errors, I found this file in fact simply points to a sourceforge page which no longer exists. Since there is nothing more to say than "this is an import of libfdt", let's just delete it. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* NetworkPkg: add missing newline at end of fileLeif Lindholm2019-10-041-1/+1
| | | | | | | | | | Add missing newline at end of WifiConnectionManagerDxe .uni. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* EmbeddedPkg: add missing newline at end of TemplateResetSystemLib.infLeif Lindholm2019-10-041-1/+1
| | | | | | | Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools: add missing newlines at end of filesLeif Lindholm2019-10-043-3/+3
| | | | | | | | | | | | Some scripts in Source/Python were missing newlines at end of files, so add them. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools: Fix GenMake multi-workspace failureKubacki, Michael A2019-10-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2232 Commit 0075ab2cec introduced an issue that causes an exception when multiple workspace packages paths are specified. For example, if edk2-platforms is used, the root directory will contain an edk and edk2-platforms directory representing the respective repositories. In GenMake, the path to the package DEC file for a module is discovered by getting the relative path of the INF to the workspace root directory. Each directory in the relative path is incrementally joined to the WORKSPACE directory. The file list in the joined path is searched for a DEC file. As an example, if the build command is used on a package outside the edk2 repository, the INF file path is relative to the edk2-platforms directory not edk2. This causes directory paths to be built that do not exist. Commit 0075ab2cec replaced the os.path.exists() call with a try except block that always fails when os.listdir() is invoked to enumerate the list of files in the built directory path on packages outside edk2. This commit restores the original conditional statement which avoids calling os.listdir() with an invalid directory path. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: use stdint.h for GCC ProcessorBind.h typedefsLeif Lindholm2019-10-011-13/+13
| | | | | | | | | | | | | | | | | The AArch64 definitions of UINT64/INT64 differ from the X64 ones. Since this is on the tool side, doing like X64 and picking the definitions from stdint.h feels like a better idea than hardcoding them. So copy the pattern from X64/ProcessorBind.h. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* MdeModulePkg: Enable/Disable S3BootScript dynamically.Chasel Chiu2019-10-012-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2212 In binary model the same binary may have to support both S3 enabled and disabled scenarios, however not all DXE drivers linking PiDxeS3BootScriptLib can return error to invoke library DESTRUCTOR for releasing resource. To support this usage model below PCD is used to skip S3BootScript functions when PCD set to FALSE: gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable Test: Verified on internal platform and S3BootScript functions can be skipped by PCD during boot time. Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* BaseTools/LzmaCompress: Fix the option "d" dictionary sizeZhang, Shenglei2019-09-301-4/+8
| | | | | | | | | | | | | | The range of dictionary size is set from [0,30] to [0,27]. And update the help information for this. The previous logic for processing the parameter dict size is incorrect. Now fix the logic. The option "d" is added at 6b80310f34199d1f62e45e40fa902734735091fa. (https://bugzilla.tianocore.org/show_bug.cgi?id=2077) Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/ScsiDiskDxe: Support Storage Security Command ProtocolZurcher, Christopher J2019-09-293-16/+774
| | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546 This patch implements the EFI_STORAGE_SECURITY_COMMAND_PROTOCOL in the ScsiDiskDxe driver. Support is currently limited to the RPMB Well-known LUN for UFS devices. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/ScsiBusDxe: Clean up Peripheral Type checkZurcher, Christopher J2019-09-291-2/+3
| | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546 Replacing "magic numbers" in the Peripheral Type check with defines for the reserved range from IndustryStandard/Scsi.h Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdeModulePkg/UfsPassThruDxe: Check for RPMB W-LUN (SecurityLun)Zurcher, Christopher J2019-09-291-1/+16
| | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546 Currently UfsPassThru only checks for 8 common LUNs. This adds a check for the RPMB Well-known LUN and sets the corresponding bit-mask. Further handling of the WLUN is already present in the driver. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdePkg: Implement SCSI commands for Security Protocol In/OutZurcher, Christopher J2019-09-293-19/+388
| | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546 This patch implements the Security Protocol In and Security Protocol Out commands in UefiScsiLib to prepare support for the Storage Security Command Protocol. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix the lib order in static_library_files.lstFeng, Bob C2019-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2216 This patch is going to fix the lib order in static_library_files.lst. This issue is introduced by commit 673d09a2dd. Before 673d09a2dd, build tool apply build rule for the module's library firstly and then apply build rule for module itself. Now, build tool apply build rule for module self and then for its library. That behavior impact the lib order in static_library_files.lst. This patch is to call module's LibraryAutoGenList function explicitly, where the applying build rule action for library is triggered. Cc: Liming Gao <liming.gao@intel.com> Cc: dann frazier <dann.frazier@canonical.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Tested-by: dann frazier <dann.frazier@canonical.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/SdMmcPciHcDxe: Fix SdMmcMmcLegacy bus timing handlingAlbecki, Mateusz2019-09-291-1/+7
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2218 There is a bug in current driver code that makes it impossible for it to work with devices that only work in legacy speed mode since the function EmmcSwitchToHighSpeed will return with EFI_INVALID_PARAMETER for such bus mode. Since the logic in that function will work well for SdMmcMmcLegacy this patch just allows to call this function with SdMmcMmcLegacy bus mode. Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Tested-by: Hao A Wu <hao.a.wu@intel.com> Tested-by: Marcin Wojtas <mw@semihalf.com>
* MdeModulePkg/SdMmcPciHcDxe: Fix bus timing switch sequenceAlbecki, Mateusz2019-09-291-44/+26
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2218 SD specification recommends switching card bus timing before switching bus timing in controller. Emmc driver used to do this switch other way around. This commit adds controller timing switch in EmmcSwitchBusTiming function to enforce this order and removes all controller timing programming from EmmcSwitchToXXX functions. Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Tested-by: Hao A Wu <hao.a.wu@intel.com> Tested-by: Marcin Wojtas <mw@semihalf.com>
* MdeModulePkg/SdMmcPciHcDxe: Remove clock stop from HS200 switchAlbecki, Mateusz2019-09-291-29/+0
| | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2218 Stopping the SD clock before switching host controller bus timing is only necessary if preset value enable is set in host controller. Code that performs switch to HS200 doesn't check this condition right now and we also don't do the SD clock stop before any other bus timing switch in host controller. Since the driver is generally not ready to support host controller with preset value enable set we removed this code. Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Tested-by: Hao A Wu <hao.a.wu@intel.com> Tested-by: Marcin Wojtas <mw@semihalf.com>