• Re: ARM64 platform, very serious, UEFI hardware damage problem

    From Georg Gast@21:1/5 to All on Sat May 6 06:20:01 2023
    Hello,
    I would do a manual debootstrap/mmdebstrap installation. Partition manual the efi Partition and rootfs. If you add EFI/boot/bootaarch64.efi to the efi Partition it should be the fallback if every UEFI implementation. Thus way you don't need to write to
    the UEFI variables.
    Best regards
    Georg

    06.05.2023 05:19:14 chipo <gugudu@sina.com>:

    Hello, Debian Developers.

    I installed Debian 12 BookWorm on Phytium(飞腾)'s computer.
    These PCs are based on the ARM64 UEFI platform.
    After restarting, The motherboard cannot boot and keeps black screen.
    The motherboard has to be returned to the factory for repair to solve the problem.
    These UEFI firmware are made by Kunlun Tech(昆仑太科) or Byo software(百敖软件).
    After Debian operating system is installed, Debian installer will write Debian boot entries to the UEFI.
    However, the UEFI of the Phytium(飞腾)motherboard may have some kind of incompatibility with the installer.
    This write operation can cause UEFI damage.
    Some motherboard manufacturers have stopped maintaining the UEFI,
    so I would like to ask your advices on how to disable the installer writing boot entry to the UEFI.

    Some users with similar experiences have speculated on the reason for the damage.
    https://gitee.com/atzlinux/debian-cn/issues/I4RJDW

    The uefi boot entry should be on the nvram, and BIOS discharges should be useless.
    I guess it's a bug in uefi. When writing boot items to nvram, it breaks other places. And UEFI is damaged
    linux indirectly let uefi write data through uefi's runtime interface. It probably looks like this.
    Why would installing the system will damage the firmware? Could efibootmgr write variable to damage the firmware?
    Oh, that's possible, because /sys/firmware/efi/efivars/ is what the kernel reads out of the firmware for efibootmgr to use
    I don't think debian should be blamed for this. Even if debian calls the runtime interface in the wrong position,
    runtime can't write itself badly.
    efibootmgr installation of new boot entries and adjusting the order are handled by the kernel
    and firmware runtime to complete the deal
    That's because the kernel and firmware calls to runtime are not handled properly
    If you are debugging UEFI, all I can think of is to add printing to all the functions of the EFI_RUNTIME_SERVICES interface
    to see what interfaces the debian installer has tuned and what parameters it has passed. The focus is on SetXxx functions
    such as SetVariable(), SetVirutalAddressMap and other functions.
    I have also installed ubuntu 21.04 on d2000-8 and everything works fine. Coexisting with the original debian 11.
    My current practice is to go to the last step of the debian installation, when it says to remove the installation media,
    just power off, unplug the USB drive and then manually create boot entries in the bios, and then it's fine.

    <html>
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
    <span dir="ltr" style="margin-top:0; margin-bottom:0;">Hello,</span> <br> <span dir="ltr" style="margin-top:0; margin-bottom:0;">I would do a manual debootstrap/mmdebstrap installation. Partition manual the efi Partition and rootfs. If you add EFI/boot/
    bootaarch64.efi to the efi Partition it should be the fallback if every UEFI implementation. Thus way you don't need to write to the UEFI variables.</span> <br> <span dir="ltr" style="margin-top:0; margin-bottom:0;">Best regards</span> <br> <span dir="
    ltr" style="margin-top:0; margin-bottom:0;">Georg </span> <br>
    <div><br>
    <div>
    <p>06.05.2023 05:19:14 chipo &lt;gugudu@sina.com&gt;:</p>
    </div>
    <blockquote style="margin:0;border-left:3px solid #ccc; padding-left:10px">
    <div style="color:#000000;font-size:14px;line-height:1.7;font-family:Arial">
    <div>
    Hello, Debian Developers. <br>
    </div>
    <div><br>
    </div>
    <div>
    I installed Debian 12 BookWorm on Phytium(飞腾)'s computer. <br>
    </div>
    <div>
    These PCs are based on the ARM64 UEFI platform.
    </div>
    <div>
    After restarting, The motherboard cannot boot and keeps black screen.
    </div>
    <div>
    The motherboard has to be returned to the factory for repair to solve the problem.
    </div>
    <div>
    These UEFI firmware are made by Kunlun Tech(昆仑太科) or Byo software(百敖软件).
    </div>
    <div>
    After Debian operating system is installed, Debian installer will write Debian boot entries to the UEFI.
    </div>
    <div>
    However, the UEFI of the Phytium(飞腾)motherboard may have some kind of incompatibility with the installer.
    </div>
    <div>
    This write operation can cause UEFI damage.
    </div>
    <div>
    Some motherboard manufacturers have stopped maintaining the UEFI,
    </div>
    <div>
    so I would like to ask your advices on how to disable the installer writing boot entry to the UEFI.
    </div>
    <div><br>
    </div>
    <div>
    Some users with similar experiences have speculated on the reason for the damage.<br>
    </div>
    <div><a target="_blank" href="https://gitee.com/atzlinux/debian-cn/issues/I4RJDW">https://gitee.com/atzlinux/debian-cn/issues/I4RJDW</a>
    </div>
    <div><br>The uefi boot entry should be on the nvram, and BIOS discharges should be useless.<br>
    <div>
    I guess it's a bug in uefi. When writing boot items to nvram, it breaks other places. And UEFI is damaged
    </div>
    <div>
    linux indirectly let uefi write data through uefi's runtime interface. It probably looks like this.
    </div>Why would installing the system will damage the firmware? Could efibootmgr write variable to damage the firmware?<br>Oh, that's possible, because /sys/firmware/efi/efivars/ is what the kernel reads out of the firmware for efibootmgr to use<br>
    <div>
    I don't think debian should be blamed for this. Even if debian calls the runtime interface in the wrong position,
    </div>
    <div>
    runtime can't write itself badly.
    </div>
    <div>
    efibootmgr installation of new boot entries and adjusting the order are handled by the kernel
    </div>
    <div>
    and firmware runtime to complete the deal
    </div>That's because the kernel and firmware calls to runtime are not handled properly<br>
    <div>
    If you are debugging UEFI, all I can think of is to add printing to all the functions of the EFI_RUNTIME_SERVICES interface
    </div>
    <div>
    to see what interfaces the debian installer has tuned and what parameters it has passed. The focus is on SetXxx functions
    </div>
    <div>
    such as SetVariable(), SetVirutalAddressMap and other functions.
    </div>I have also installed ubuntu 21.04 on d2000-8 and everything works fine. Coexisting with the original debian 11.<br>
    <div>
    My current practice is to go to the last step of the debian installation, when it says to remove the installation media,
    </div>
    <div>
    just power off, unplug the USB drive and then manually create boot entries in the bios, and then it's fine.
    </div>
    </div>
    </div>
    </blockquote>
    </div>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)