Re: [Testers wanted] /dev/console cleanups



Jeremy Chadwick <koitsu@xxxxxxxxxxx> writes:
Peter Jeremy <peterjeremy@xxxxxxxxxxxxxxxx> writes:
This is deliberate. If the system panics, stuff that was in the
message buffer (and might not be on disk) can be read when the
system reboots. If there is no crashdump, this might be the only
record of what happened.
That doesn't sound deliberate at all -- it sounds like a quirk that
people (you?) are relying on.

No, it is deliberate. Just because you don't like it doesn't mean we're
morons.

You're under the mentality that the information is *always* available
after a panic/reboot -- it isn't. I have 4 different Supermicro
motherboards (all from different years) which will "most of the time"
lose the msgbuf after rebooting from single-user -- but sometimes the
msgbuf is retained. And no, bad hardware is not responsible for the
randomness of the problem.

We know there are systems where it doesn't work. That doesn't mean it's
not useful when it *does* work. There are also systems where it works
reliably, including most SoC and SFF systems.

I think it's been discussed in the past how/why this can happen. It has
to do with what each BIOS manufacturer chooses to do with some parts of
memory during start-up.

Mostly whether memory remains powered-on through the reset process.

Speaking only of i386 / amd64 systems, there are several ways to reboot
a computer:

- Return to real mode and call the BIOS reboot subroutine. This will
perform a cold boot (memory is cleared) or a warm boot (memory should
not be cleared, but the BIOS may do so anyway) depending on the value
stored at a specific location in memory.

- On systems with an i8042 keyboard controller, one of the controller's
output lines is usually wired to the CPU's reset pin. Writing a
specific value to one of the keyboard controller's control registers
causes it to pull that pin low.

- Triple fault: set up an empty interrupt descriptor table and trigger
an interrupt (e.g. divide by zero). The CPU will fail to invoke the
corresponding interrupt descriptor, causing a double fault interrupt,
which will fail to execute, causing a CPU reset.

The latter two techniques can be used (and *have* been used) to switch
back from protected mode to real mode, because they are faster than the
documented method. Memory is *not* cleared, and the CPU will start
executing whatever code is stored at 0xfffffff0 in real memory; this is
normally a far jump into the BIOS reboot subroutine, so if you don't
pull any tricks (e.g. jump to your own code that does whatever it was
you needed to do in real mode, then return to protected mode), they are
equivalent to the first technique.

- ACPI reset: store the value specified by RESET_VALUE in the FADT into
the register specified by RESET_REG in the FADT. According to the
ACPI spec, this results in a cold boot. However, this part of the
spec is optional, so not all motherboards support it. FreeBSD will
only use ACPI reset if the hw.acpi.handle_reboot sysctl is not zero,
which it is by default (mostly, if I recall correctly, because ACPI
reset is unreliable).

DES
--
Dag-Erling Smørgrav - des@xxxxxx
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Random reboots with M2N-E (even worse now)
    ... error that happens during the reboot, ... I've known memory beeps to be 3 short ones, but this is on the Award ... When I couldn't find the 2.1V setting in the BIOS to adjust the memory ... you should get the same beep code. ...
    (alt.comp.periphs.mainboard.asus)
  • Re: Gateway reset on reboot (was: xnptd insane after reboot) *SOLVED*
    ... TCP/IP with no physical memory available. ... The reboot would have scrubbed ... network came right back. ... Dave Stewart ...
    (AIX-L)
  • Re: Weird XP Start-Up Problem - Please help!
    ... but a while ago we built a number of PCs with gigabyte motherboards and I can't remember what memory but after XP was installed the following day a number of these PCs didn't boot, they blue screened but after that each PC started perfectly ran every test we could think of and nothing. ... Seems crazy and even telling the customer to hold the power button for a second longer when switching on they looked at me crazy but it worked.. ... CHECKING FILE SYSTEM ON D: ... reboot I get the standard "Sorry for the inconvenience" screen to ...
    (microsoft.public.windowsxp.general)
  • Re: Weird XP Start-Up Problem - Please help!
    ... Debi :-) ... problem with the memory starting up correctly. ... new memory in) to hold the power button for a second longer when switching ... reboot I get the standard "Sorry for the inconvenience" screen to ...
    (microsoft.public.windowsxp.general)
  • default home page
    ... I set my browser home deafult to ... Look under C:\Program Files for these folders. ... >4) Reboot your machine. ... >can reset your homepage or access the net. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)