Skip to content
AArch64 UEFI firmware for Lumia 950 / Lumia 950 XL / Hapanero
Branch: master
Clone or download
gus33000 and imbushuo Fixed 8992 acpi tables with prefilled header values (#49)
* Fixed 8992 acpi tables with prefilled header values

* Updated ACPI tables further

* Update DSDT.asl

* Fixed alignments
Latest commit c173a8c Jun 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
AcpiTables Fixed 8992 acpi tables with prefilled header values (#49) Jun 15, 2019
Application/BdsMenuApp Standarized code styles (clang-format) (#37) Apr 1, 2019
Driver SynapticsTouch: disable touch polling until requested (#45) May 6, 2019
GPLDriver Standarized code styles (clang-format) (#37) Apr 1, 2019
Include Regulator: Fix typo. Apr 9, 2019
Library PlatformBm: Update boot text for amusement purposes. May 4, 2019
PrePi Standarized code styles (clang-format) (#37) Apr 1, 2019
Resources MSM8992/Lumia 950: Add preliminary support. (#10) Jun 2, 2018
Tools CI: checkout only UDK2018 branch with recent commit (#46) May 9, 2019
.clang-format Standarized code styles (clang-format) (#37) Apr 1, 2019
.gitignore ACPI: Build SSDT(s) at compile time. Apr 4, 2019
FvWrapper.ld Port DB820c target to 950XL. Apr 2, 2018
Hapanero.dsc Fix for overwritten values in platform definitions (#26) Jan 30, 2019
Hapanero.fdf RPM: Enable 5V BSTB for USB-C / USB-OTG. Apr 9, 2019
LICENSE Project: Update LICENSE. Mar 17, 2019
Lumia950.dsc talkman: Fixing a typo about the processor model (#40) Apr 9, 2019
Lumia950.fdf RPM: Enable 5V BSTB for USB-C / USB-OTG. Apr 9, 2019
Lumia950XL.dsc Fix for overwritten values in platform definitions (#26) Jan 30, 2019
Lumia950XL.fdf RPM: Enable 5V BSTB for USB-C / USB-OTG. Apr 9, 2019 Build: ready for next public release. Jun 27, 2018
Lumia950XLPkg.dec RPM: Make protocol installation optional. (#44) May 6, 2019 Project: Update [skip ci] Apr 30, 2019 Project: version 2.03 May 6, 2019
azure-pipelines.yml Project: Update CI config [skip ci] May 6, 2019

EDK2 Implementation for Lumia 950, Lumia 950 XL and Hapanero

For final users

You can download the latest UEFI build by clicking the Azure Pipelines icon below. Click Artifacts button in Azure Pipelines, then download UEFI.elf in ELF directory.

Build Status (Visual Studio Team Services)

What's this?

This package demonstrates an AArch64 UEFI implementation for hacked Lumia 950, Lumia 950 XL and Hapanero. Currently, it is able to boot Windows 10 ARM64, as well as Linux. See notes below for more details.

Please be aware that MSM8992 have reduced support status due to the lack of testing device.

Support Status

Applicable to all supported targets unless noted.

  • Low-speed I/O: I2C, GPIO, SPMI and Pinmux (TLMM).
  • Power Management: PMIC and Resource Power Manager (RPM).
  • High-speed I/O for firmware and HLOS use: eMMC (SDR50 in firmware, HS200/HS400 in OS), PCI Express (Firmware-configured, HLOS Only, x2 Lane)
  • Peripherals: Touchscreen (QUP I2C), side-band buttons (TLMM GPIO and PMIC GPIO)
  • Display FrameBuffer depends on stock Qualcomm UEFI for boostrapping, MDP is not fully implemented.

What can you do?

I am too busy to write an average-user instruction. So, if you are interested in, you are welcome to contribute to an easy instruction for all Lumia 950 XL users.

Or you can buy me a coffee: PayPal.


If you are familiar with EDK2, you don't need to use my build script.

  • Checkout a copy of EDK2. Switch to UDK2018 branch. Commit 49fa59e82e4c6ea798f65fc4e5948eae63ad6e07 absolutely works for you.
  • Checkout this repository under EDK2's worktree.
  • Install ACPI tools from your package manager or ACPICA website.
  • Install uuid-dev and python (or equivalent package on your distribution).
  • Install Linaro AArch64 GCC toolchains, my build script uses gcc-linaro-7.2.1-2017.11. Then untar them. I place everything under /opt directory, so I have directories like /opt/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf/bin. If you placed it somewhere else, modify build scripts.
  • Run EDK2 BaseTools setup (make -C BaseTools).
  • Copy in Tools directory to your EDK2 worktree root directory.
  • By default only MSM8994 target is built. To build all, set environment variable BUILDALL.
  • Start build: . --950xl --development

WSL Build Notes

If you checked out the EDK2 repository under Windows and build it using WSL, you will have trouble locating BaseTools Python classes due to file case sensitive behavior changes in WSL. Run the following PowerShell script under EDK2 directory prior to build:

Get-ChildItem .\BaseTools\ -Directory -Recurse | Foreach-Object { fsutil.exe file setCaseSensitiveInfo $_.FullName }

You only need to run it once.


Per UEFI specification, ARM32 UEFI cannot boot ARM64 binaries directly. A recent engineering change removed the dependency of Little Kernel. LK can still boot it, but the path is untested.

To run this UEFI build on Lumia 950 XL, the following procedure is required:

  • Check out Boot Shim. This Boot Manager Application implements a simple ELF loader for the kickstarter (LK) with Secure Monitor Call for EL1 transition. You will need branch msm8994-aa64.
  • Place UEFI.elf in the WP EFIESP root directory, copy Boot Shim EFI application to the EFIESP partition, create a new BCD entry for it.
  • Select this boot entry to enter UEFI.

To re-flash UEFI, simply place new UEFI.elf in WP EFIESP root directory.

TZ Implementation Notes

Qualcomm Snapdragon MSM8992/MSM8994 implements a subset of PSCI interface for multi-processor startup. However, required commands like PSCI_SYSTEM_OFF and PSCI_SYSTEM_RESET are not implemented. Hence we use PMIC to shutdown platform (there's a bug in RT that will be fixed) instead of PSCI. Additionally, 8992/8994 uses HVC call for PSCI commands instead of SMC call.

Linux Notes

The ACPI tables are copied from stock Windows Phone FFU, hence these device IDs are likely not be recognized by Linux.

To get started, starts with the device tree of Qualcomm MSM8994 MTP. The repository devicetree-rebasing with DT content from Android Linux Kernel is sufficient for DT development. To boot with device tree, add it in your GRUB configuration:

devicetree /lumia-950-xl.dtb
linux /vmlinuz ..... acpi=no

PSCI partially works. If you want to use PSCI for multi-processor startup, add the following code to your DT:

psci {
	compatible	= "arm,psci-0.2";
	method		= "hvc";

And use psci for core-enable method.

For MSM8994, PCI Express Root Port 1 is firmware-initialized. Similarly, MSM8992 have PCI Express Root Port 0 initialized. Hence it is not necessary to supply qcom,pcie in device tree. Instead, supply a firmware-initialized PCI bus device pci-host-cam-generic. ACPI MCFG table is supplied for your reference.



All code except drivers in GPLDriver directory are licensed under BSD 2-Clause. GPL Drivers are licensed under GPLv2 license.

You can’t perform that action at this time.