tech-kern archive

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

Re: kernel goes dark on boot



On Wed, Apr 05, 2023 at 06:47:58AM +0000, Emmanuel Dreyfus wrote:
> On Tue, Apr 04, 2023 at 09:04:02PM +0200, Joerg Sonnenberger wrote:
> > Look for beep_on_reset in the ACPI wake code. If your machine has a PC
> > speaker emulated, that might be the easiest option:
> 
> This is brilliant! 
> 
> I moved the beep code at various places in startprog64 in
> src/sys/arch/i386/stand/efiboot/bootx64/startprog64.S
> 
> Bootstrap code looses ground on rep movsq or rep movsb 
> instructions. The beep code before the string copy 
> produces sound, it does not if inserted after the string
> copy.
> 
> startprog64 contains 5 flavor of kernel copy, each using
> string copy:
> - aligned copy forward
> - misaligned copy forward
> - aligned copy backward
> - byte by byte copy forward (with rep movsb)
> - byte by byte copy backward (with rep movsb)
> 
> Forcing code path to use any of them produces the same
> issue: loose control on rep movs[qb].

Curious: have you tried any other OSes? memtest?

Another unlikely thing comes to mind:
What's your CPU? Do you have the latest available BIOS? I happen to
know - and have tripped over - the fact that there have been various errata
from Intel surrounding "rep movs", resulting in interesting behaviours.

Can you try changing the code to a plain copy loop without a "rep" prefix?

-- 
Paul Ripke
"Great minds discuss ideas, average minds discuss events, small minds
 discuss people."
-- Disputed: Often attributed to Eleanor Roosevelt. 1948.


Home | Main Index | Thread Index | Old Index