From: Tejun Heo <tj@kernel.org>
To: Vladimir Krivopalov <argenet@very-soft.com>
Cc: jgarzik@pobox.com, linux-ide@vger.kernel.org
Subject: Re: SATA II generation controllers reset problem
Date: Thu, 19 Feb 2009 18:19:44 +0900 [thread overview]
Message-ID: <499D2430.3080601@kernel.org> (raw)
In-Reply-To: <4993C535.10204@very-soft.com>
Hello, Vladmir.
Vladimir Krivopalov wrote:
> Greetings, Jeff!
>
> My name is Vladimir Krivopalov, and I work as software developer in
> VerySoft LLC, Russia.
> We currently develop a project containing Linux and Windows client-side
> parts and have to implement 'hot reboot' from Linux to Windows for our
> purposes. We use kexec application and grub4dos bootloader for this.
> There's a problem we discovered while developing our project in Linux
> part. It occurs when an effort to switch from protected mode to the real
> mode is taken and bootloader is started, but it fails while looking for
> the SATA II drives.
> As for normal booting with grub4dos, it has no probmels with detecting
> SATA drives. It also finds all IDE drives and SATA I (that have
> IDE-compartible interface) normally.
> We suppose the reason could be in that SATA II controllers aren't
> resetted properly. Could you please provide any explanations on how are
> they reset by default in libata library for Linux?
You need to provide more information to get better response but, in
general, that's not gonna work reliably in generic manner unless
whatever is being loaded after linux knows how to reconfigure all the
devices into a state BIOS code expects them to be.
If you confine the problem to ATA controllers, I can think of two
problems from the top of my head.
1. Some modern ATA controllers come with dual programming interfaces
which can be switched on the fly and when possible linux switches
them to the native mode to use various features. BIOSen are coded
expecting the controller to be in legacy mode, so it won't work.
2. There are BIOSen which can handle native interface. e.g. sil24 or
ahci BIOSen. However, these interfaces require a lot more
initialization than legacy IDE programming interface. For legacy
IDE, once the port addresses are determined, it's all peachy but
more modern interfaces need their address registers programmed at
the very least. Those registers of course won't contain values
that BIOS expects after such hot reboot.
If you're working on specific hardware, you can probably do specific
initialization stuff during the process and put things as the BIOS
expects them but if you're trying to come up with a general solution,
I'm a bit skeptical it's gonna fly very far.
Thanks.
--
tejun
prev parent reply other threads:[~2009-02-19 9:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-12 6:44 SATA II generation controllers reset problem Vladimir Krivopalov
2009-02-19 9:19 ` Tejun Heo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=499D2430.3080601@kernel.org \
--to=tj@kernel.org \
--cc=argenet@very-soft.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).