Black box flight recorder for Linux
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Andi Kleen
Quoted 2 lines · James Courtier-Dutton
Now, the question I have is, if I write values to RAM, do any of those values survive a reset?
They don't generally.
Some people used to write the oopses into video memory, but that is not portable.
I wouldn't think most BIOSes these days would bother to clear system RAM on a reboot. Certainly Microsoft was encouraging vendors not to do this because it slowed down system boot time.
Signature · 3 lines
Robert Hancock Saskatoon, SK, Canada To email, remove "nospam" from [email protected] Home Page: http://www.roberthancock.com/
Quoted 5 lines · Robert Hancock
Quoted 4 lines · Andi Kleen
Quoted 2 lines · James Courtier-Dutton
Now, the question I have is, if I write values to RAM, do any of those values survive a reset?
Quoted 8 lines
Quoted 4 lines
They don't generally.
Some people used to write the oopses into video memory, but that is not portable.
I wouldn't think most BIOSes these days would bother to clear system RAM on a reboot. Certainly Microsoft was encouraging vendors not to do this because it slowed down system boot time.to
Reset button is like a cold boot and it generally ends up with cleared RAM.
-Andi
Quoted 9 lines · Andi Kleen
Quoted 8 lines · Robert Hancock
Quoted 7 lines · Andi Kleen
Quoted 2 lines · James Courtier-Dutton
Now, the question I have is, if I write values to RAM, do any of those values survive a reset?
They don't generally.
Some people used to write the oopses into video memory, but that is not portable.
Quoted 7 lines
Quoted 3 lines
I wouldn't think most BIOSes these days would bother to clear system RAM on a reboot. Certainly Microsoft was encouraging vendors not to do this because it slowed down system boot time.to
Reset button is like a cold boot and it generally ends up with cleared RAM.
-Andi
Thank you. That saved me 30mins hacking. :-)
Quoted 6 lines · James Courtier-Dutton
Quoted 3 lines · Andi Kleen
Reset button is like a cold boot and it generally ends up with cleared RAM.
Thank you. That saved me 30mins hacking. :-)
How about Magic sysRq reboot?
Quoted 9 lines · JustFillBug
Quoted 5 lines · James Courtier-Dutton
Quoted 2 lines · Andi Kleen
Reset button is like a cold boot and it generally ends up with cleared RAM.
Thank you. That saved me 30mins hacking. :-)
How about Magic sysRq reboot?
Another alternative is that the motherboard in question has a PS2 mouse port, but not RS232 serial port. Can I connect the PS2 ports of two PCs together and get the console working through that?
James
Quoted 2 lines · James Courtier-Dutton
Now, the question I have is, if I write values to RAM, do any of those values survive a reset?
I suppose this hasn't been mentioned in the thread yet - apparently Philip Gladstone did such patch 7 years ago:
http://www.ussg.iu.edu/hypermail/linux/kernel/9906.3/1377.html
http://groups.google.com/groups?q=%22Utility+module+to+capture+OOPS+output+over+reboot%22&hl=en&selm=fa.fbd0l7v.14hau3n%40ifi.uio.no&rnum=1)
-- v --
Quoted 14 lines · James Courtier-Dutton
Quoted 13 lines · Andi Kleen
Quoted 11 lines · Robert Hancock
Quoted 7 lines · Andi Kleen
Quoted 2 lines · James Courtier-Dutton
Now, the question I have is, if I write values to RAM, do any of those values survive a reset?
They don't generally.
Some people used to write the oopses into video memory, but that is not portable.
I wouldn't think most BIOSes these days would bother to clear system RAM on a reboot. Certainly Microsoft was encouraging vendors not to do this because it slowed down system boot time.to
Quoted 6 lines
Quoted 4 lines
Reset button is like a cold boot and it generally ends up with cleared RAM.
-Andi
Thank you. That saved me 30mins hacking. :-)
Sorry for having discouraged you.
Actually there is a rare special case - triple fault - where you might be ok if the BIOS correctly supports the ACPI "bootflag" standard, but triple faults are relatively rare. They happen when the kernel screws up so badly that the CPU cannot even run exception handlers anymore. But I suspect it's too special for this.
First if you're not aware of this - the "official" way right now to solve this problem is kexec + kdump + a preloaded crash kernel. But in practice it still has many problems because a lot of drivers cannot reinitialize the hardware properly. And of course it will users need to load the crash kernel in advance and lose about 64MB of RAM.
My personal solution to the problem is firescope, but it also has its drawbacks (needs ohci1394 loaded first, requires a firewire cable)
What I would do for this if you want to hack.- define a generic interface that allows drivers to register memory storage handlers. Add a entry into the oops die and panic notifiers that saves the kernel log into these backends.
Then write some Documentation file for it and add a proof of comcept e.g. to the Nvidia/ATI frame buffer drivers. Then driver writers could expose this functionality if their hardware supports it or if someone has an embedded platform that guarantees it they could also use it.
For Nvidia/ATI it might be tricky to get the
X server to keep its hands off the memory, but I assume most graphic cards these days have more memory than the X server uses at least without 3d (?). If you're unlucky it will fill up everything with mozilla pixmaps over time though. In the worst case you would need to define a new interface between X server and kernel to tell the X server to leave some memory alone.
The generic driver could also do the high level work, like adding proper checksums and magic values to make sure the data is sane after reboot. You would also need another driver that allows the boot process to read that data.
Hope this helps,
-Andi
Quoted 15 lines · Andi Kleen
Quoted 14 lines · James Courtier-Dutton
Quoted 13 lines · Andi Kleen
Quoted 11 lines · Robert Hancock
Quoted 7 lines · Andi Kleen
Quoted 2 lines · James Courtier-Dutton
Now, the question I have is, if I write values to RAM, do any of those values survive a reset?
They don't generally.
Some people used to write the oopses into video memory, but that is not portable.
I wouldn't think most BIOSes these days would bother to clear system RAM on a reboot. Certainly Microsoft was encouraging vendors not to do this because it slowed down system boot time.to
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Reset button is like a cold boot and it generally ends up with cleared RAM.
-Andi
Thank you. That saved me 30mins hacking. :-)
Actually clearing the memory can be done at full memory bandwidth which can happen in seconds. On systems with ECC you need initialize all of the check bits so some kind of write to memory needs to happen.
In practice a reset does not clear the memory and only a few bits tend to get flipped. Unless you can get support from the BIOS/firmware developers it isn't a practical approach though.
Quoted 5 lines
First if you're not aware of this - the "official" way right now to solve this problem is kexec + kdump + a preloaded crash kernel. But in practice it still has many problems because a lot of drivers cannot reinitialize the hardware properly. And of course it will users need to load the crash kernel in advance and lose about 64MB of RAM.
Does a kernel really need 64M? That number seems insanely large to me. 8M should be more than sufficient if someone actually tried to be small. If you are aiming for a dedicated hardware solution you don't need even need a kernel in there and the amount reserved could be reduced to less than a meg.
The size etc becomes a trade off between what is expedient and maintainable.
Eric
Quoted 11 lines · Andi Kleen
Quoted 10 lines · Robert Hancock
Quoted 8 lines · Andi Kleen
Quoted 2 lines · James Courtier-Dutton
Now, the question I have is, if I write values to RAM, do any of those values survive a reset?
They don't generally.
Some people used to write the oopses into video memory, but that is not portable.
Quoted 8 lines
Quoted 3 lines
I wouldn't think most BIOSes these days would bother to clear system RAM on a reboot. Certainly Microsoft was encouraging vendors not to do this because it slowed down system boot time.to
Reset button is like a cold boot and it generally ends up with cleared RAM.
-Andi
Further, in a boot where the BIOS needs to initialize hardware, It will write all RAM before enabling NMI. This makes sure that the parity bit(s) are set properly. Most BIOS will attempt to preserve RAM on a 'warm' boot as a throw-back to the '286 days with their above-1MB-memory-manager paged RAM because the only way to get back from protected mode to 16-bit real mode was a hardware reset. When using a memory-manager like DOS's HIMEM.SYS, you might actually be rebooting the machine hundreds of times per second!
If you want to make a flight-data recorder, you need to use FAA specs and, as such, you can't rely on second-order effects. You will need write all the parameters to flash (or equivalent) at least 10 times per second. I would advise against putting a file-system on the flash because the file-system might get corrupt because of a bad write during a crash. Instead, I would write a large number of identical groups of parameters (a structure image) at a large number of raw offsets, each with the required time-stamp. This, done the required 10 times per second.
Note that the NTSB, in investigating some light airplane accidents, has been successful extracting data from hand-held GPS receivers and FADEC controllers, so using flash RAM for accident investigation has some successful history (useful for obtaining certification).
I once proposed a FDR for light aircraft that would cost the end-user under $2,000. This was to use a small embedded CPU, raw NAV inputs from the panel, a cheap accelerometer, and some pressure sensors for altimetry. This would be mounted in the tail, requiring no user (pilot) input at all. In the event of a crash, the last hour of flight could be retrieved.
Typical response; "There is no market for this...."
Good luck!
Cheers,
Dick Johnson
Penguin : Linux version 2.6.15.4 on an i686 machine (5589.42 BogoMips). Warning : 98.36% of all statistics are fiction, book release in April. _
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
Quoted 7 lines · linux-os \(Dick Johnson\)
Further, in a boot where the BIOS needs to initialize hardware, It will write all RAM before enabling NMI. This makes sure that the parity bit(s) are set properly. Most BIOS will attempt to preserve RAM on a 'warm' boot as a throw-back to the '286 days with their above-1MB-memory-manager paged RAM because the only way to get back from protected mode to 16-bit real mode was a hardware reset.
I think there is no distinction WRT RAM test between cold and warm boot anymore. If the BIOS clears the RAM is, I think, determined by the "fast POST" option in BIOS setup (it always checks the size so some bytes will be changed anyway).
Quoted 3 lines
When using a memory-manager like DOS's
HIMEM.SYS, you might actually be rebooting the machine hundreds of times per second!
Yes but it uses (or, rather, used) a CMOS flag to skip POST (not only the RAM test) and to go directly to the entry point in real mode.
IIRC (I may be wrong, that was 15+ years ago) only 286 required KBC reset to return to real mode (did LOADALL matter?), 386s have no such problem.
BTW I understand the idea have nothing to do with actual aircraft, so it would be the admin rather than NTSB looking at the data(?).
Signature · 1 line
Krzysztof Halasa
Quoted 27 lines · Krzysztof Halasa
Quoted 7 lines · linux-os \(Dick Johnson\)
Further, in a boot where the BIOS needs to initialize hardware, It will write all RAM before enabling NMI. This makes sure that the parity bit(s) are set properly. Most BIOS will attempt to preserve RAM on a 'warm' boot as a throw-back to the '286 days with their above-1MB-memory-manager paged RAM because the only way to get back from protected mode to 16-bit real mode was a hardware reset.
I think there is no distinction WRT RAM test between cold and warm boot anymore. If the BIOS clears the RAM is, I think, determined by the "fast POST" option in BIOS setup (it always checks the size so some bytes will be changed anyway).
Quoted 3 lines
When using a memory-manager like DOS's
HIMEM.SYS, you might actually be rebooting the machine hundreds of times per second!Yes but it uses (or, rather, used) a CMOS flag to skip POST (not only the RAM test) and to go directly to the entry point in real mode.
IIRC (I may be wrong, that was 15+ years ago) only 286 required KBC reset to return to real mode (did LOADALL matter?), 386s have no such problem.
Quoted 4 lines
BTW I understand the idea have nothing to do with actual aircraft, so it would be the admin rather than NTSB looking at the data(?). --
Krzysztof Halasa
Yes. After I responded and after reading other responses I noted that the idea was to review the reason for a PC crash. There are no good places to store things that can be counted upon to remain after a crash. Even though CMOS RAM goes to 0x7f and not all of it is needed for BIOS setup, many/(maybe all) BIOS checksum the whole thing with some hair-brained checksum routines so it's not a good place to store things. Many BIOS use 128k or more, which can be re-written in 64k pages. Certainly there is space available ...but... the BIOS would be trashed if a power-failure occurred during the write, so that's not a good place either. I did, at one time, use a "spare" page of screen memory (one that wasn't displayed) during the boot process (buffering for a bootable NVRAM disk). This is "available" RAM, but it isn't going to survive even as screen-card reset!
Cheers,
Dick Johnson
Penguin : Linux version 2.6.15.4 on an i686 machine (5589.42 BogoMips). Warning : 98.36% of all statistics are fiction, book release in April. _
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.