From: Oliver Tennert <O.Tennert@science-computing.de>
To: linux-kernel@vger.kernel.org
Subject: IDE disk and HPA
Date: Fri, 22 Jul 2005 14:17:04 +0200 [thread overview]
Message-ID: <200507221417.04640.tennert@science-computing.de> (raw)
Hello,
I have a question concerning the handling of HPA (Host-protected areas) in
current Linux kernels.
Have a look at drivers/ide/ide-disk.c:
static inline void idedisk_check_hpa(ide_drive_t *drive)
{
unsigned long long capacity, set_max;
int lba48 = idedisk_supports_lba48(drive->id);
capacity = drive->capacity64;
if (lba48)
set_max = idedisk_read_native_max_address_ext(drive);
else
set_max = idedisk_read_native_max_address(drive);
if (set_max <= capacity)
return;
printk(KERN_INFO "%s: Host Protected Area detected.\n"
"\tcurrent capacity is %llu sectors (%llu MB)\n"
"\tnative capacity is %llu sectors (%llu MB)\n",
drive->name,
capacity, sectors_to_MB(capacity),
set_max, sectors_to_MB(set_max));
if (lba48)
set_max = idedisk_set_max_address_ext(drive, set_max);
else
set_max = idedisk_set_max_address(drive, set_max);
if (set_max) {
drive->capacity64 = set_max;
printk(KERN_INFO "%s: Host Protected Area disabled.\n",
drive->name);
}
}
Do I interpret it right that the following is done in the above function:
1.) The current capacity of the disk is detected.
2.) The "native max. address size" of the disk is detected and stored in
set_max.
3.) If capacity < set_max then it is rightly stated that an HPA is detected.
4.) If an HPA is detected, then that HPA is disabled, i.e. the maximum address
size is set to the "native max. address size". Afterwards, the HPA is no
more!
My question is now: why is an HPA disabled i.e. disprotected when detected?
Why not let the HPA alone, because a certain set of disk sectors shall not be
accessible by the OS?
Best regards
Oliver
--
Acid -- better living through chemistry.
--
__
________________________________________creating IT solutions
Dr. Oliver Tennert
Senior Solutions Engineer
CAx Professional Services
science + computing ag
phone +49(0)7071 9457-598 Hagellocher Weg 71-75
fax +49(0)7071 9457-411 D-72070 Tuebingen, Germany
O.Tennert@science-computing.de www.science-computing.de
next reply other threads:[~2005-07-22 12:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-22 12:17 Oliver Tennert [this message]
2005-07-22 14:47 ` IDE disk and HPA Alan Cox
2005-08-04 7:14 ` Oliver Tennert
2005-08-04 11:41 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2005-08-04 12:11 Etienne Lorrain
2005-08-04 21:45 ` Gustavo Guillermo Pérez
2005-08-05 10:15 ` Etienne Lorrain
2005-08-04 17:15 Aleksey Gorelov
2005-08-05 9:50 ` Etienne Lorrain
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=200507221417.04640.tennert@science-computing.de \
--to=o.tennert@science-computing.de \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.