Comments

We get called here upon panic()s to save the kernel log buffer.
First, switch from 64-bit long mode to 16-bit real mode. Afterwards, save the
log buffer to disk using extended INT 0x13 BIOS services. The user has given
us an absolute LBA disk address to save the log buffer to.
By x86 design, this code is mandated to run on a single identity-mapped page.
- How to initialize the disk hardware to its POST state (thus making the
BIOS code work reliably) while keeping system RAM unmodified?
- Is it guaranteed that '0x80' will always be the boot disk drive number?
If not, we need to be passed the boot drive number from the bootloader.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
---
arch/x86/kernel/saveoops-rmode.S | 483 ++++++++++++++++++++++++++++++++++++++
1 files changed, 483 insertions(+), 0 deletions(-)
--
Darwish
http://darwish.07.googlepages.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

On 01/25/2011 05:51 AM, Ahmed S. Darwish wrote:
> > We get called here upon panic()s to save the kernel log buffer.> > First, switch from 64-bit long mode to 16-bit real mode. Afterwards, save the> log buffer to disk using extended INT 0x13 BIOS services. The user has given> us an absolute LBA disk address to save the log buffer to.> > By x86 design, this code is mandated to run on a single identity-mapped page.> > - How to initialize the disk hardware to its POST state (thus making the> BIOS code work reliably) while keeping system RAM unmodified?
You can't safely do so, really.
> - Is it guaranteed that '0x80' will always be the boot disk drive number?> If not, we need to be passed the boot drive number from the bootloader.
It's not, and we may not even be booting from disk.
This code seems extremely dangerous, in the "may eat your data" kind of
way. Using the BIOS once the kernel has run is cantankerous, using it
to *write* is potentially lethal.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html