Re: [RFT PATCH 0/2] arm64: efi: Call SetVaMap() with a 1:1 mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 17 Jan 2023 at 15:27, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
>
> Linux on arm64 is now in the same boat as x86, where supporting laptops
> that were built to run Windows and never tested beyond what is required
> for the Windows Logo certification need workarounds for all kinds of
> bizarre behaviors.
>
> On Snapdragon laptops, we cannot call SetVirtualAddressMap() from the
> stub, because the firmware will crash while trying to access memory via
> the virtual addresses being installed, which is explicitly unsupported
> by the EFI spec.
>
> However, not calling SetVirtualAddressMap() results in other problems:
> on Ampere Altra, it causes SetTime() to crash. On Surface and Flex5g
> Windows-on-ARM laptops, it causes ResetSystem() to crash.
>
> So let's try to work around this while not making too much of a mess.
>
> First of all, install a 1:1 mapping instead of avoiding SetVaMap()
> altogether - from the EFI spec pov, this should amount to the same
> thing.
>
> Then, given that we already use a SMBIOS based hack for Altra to force
> the use of SetVirtualAddressMap(), let's check for Surface systems in
> the same way.
>
> Please test, and please report the SMBIOS type 1 family field for which
> this workaround is needed.
>
> Also, note that these changes will not make a difference if the
> EFI_RT_PROPERTIES_TABLE lists SetVirtualAddressMap() as not implemented.
>
> Nathan, I would appreciate it if you could give this a spin on your
> Altra box (only patch #1 should make a difference), and for good
> measure, double check that hwclock still works as it should.
>
> Cc: Johan Hovold <johan+linaro@xxxxxxxxxx>
> Cc: Maximilian Luz <luzmaximilian@xxxxxxxxx>
> Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
> Cc: Steev Klimaszewski <steev@xxxxxxxx>
> Cc: Shawn Guo <shawn.guo@xxxxxxxxxx>
>
> Ard Biesheuvel (2):
>   arm64: efi: Prefer a flat virtual mapping of the runtime services
>   arm64: efi: Force use of SetVirtualAddressMap() on MS Surface
>

Bah this does not even work on Yoga C630, so this is not going to help us.

If we want ResetSystem() on these machines, we'll have to retain other
memory ranges and map the in the EFI runtime map. Yuck.

Nathan - still interested in whether patch #1 works on Altra,



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux