Dear #NetBSD people:

The reason that the spinners do not work in your boot loader when booted on TianoCore firmware is that, very unusually, #TianoCore has made back space (BS) consistent with forward space (SPC). They are *both* destructive spaces.

https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c#L1013

You need to print the BS before printing the spinner character. And do an initial SPC and a final BS.

https://github.com/NetBSD/src/blob/trunk/sys/lib/libsa/twiddle.c#L58

Or drop BS and save and restore the cursor position.

https://uefi.org/specs/UEFI/2.10/12_Protocols_Console_Support.html#efi-simple-text-output-protocol

#EFI #UEFI

edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c at master · tianocore/edk2

EDK II. Contribute to tianocore/edk2 development by creating an account on GitHub.

GitHub
@JdeBP thanks, this always bugged me, will fix it

You're welcome. I cottoned on when there was a very brief flicker of a character at one point, and went looking.

#TianoCore doing that self-recursion for backspace and #NetBSD calling OutputString twice makes enough of a window that the character not being erased yet, can synchronize with the display refresh on rare occasion.

So I expect that some sort of putchar_twiddle() that calls OutputString then SetCursorPosition would likely also cut down twiddling overhead.

#FreeBSD #DragonFlyBSD