On Sat, Mar 12, 2022, 2:27 AM Paul Menzel <pmenzel@molgen.mpg.de> wrote:

Dear Karl,


Thank you for your patch.

Thanks for your review.



Am 12.03.22 um 02:04 schrieb Karl Semich:

One nit: Could you please remove the dot/period from the end of the summary.

Will do soon, once I further learn git-send-email.

> Only available if threads are disabled.

Could you please elaborate, why it does not work with enabled threads.

Honestly, I just get panic("call16 with invalid stack\n") immediately after the first thread is created, if these are both enabled.

I'm still learning seabios, and it doesn't yet seem to make sense for me to diagnose this in depth. I still have basic things to do like find non-vga ways to see debug output.

I note that threads have mutated stack pointers, and the panic happens in response to a check against the stack pointer. I disabled the panic and experienced a crash instead.

Do you have any thoughts around it?

> Only displays after the console has been loaded and from within 32bit
> flat regions of code.

How did you test this?

I'm running seabios as part of setting up a kfsn4 board with coreboot, and am trying changes live on the board.

No text displays before the vga console is loaded, but there can be crashes if screenc is called too early in boot, so I added the vga_console_active() check in the patch to prevent early calls.

Regarding 32bit flat, the code is guarded by !MODESEGMENT, but I can add ASSERT32FLAT() to __screen_putc() to test it.

I'll also see how reasonable it is to do a test run in qemu on my raspberry pi or kfsn4.

Kind regards,

Paul

Thanks Paul.