Statistics
| Branch: | Revision:

root / hw / hd-geometry.c @ a1e47211

History | View | Annotate | Download (5.5 kB)

# Date Author Comment
2adc99b2 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Compute BIOS CHS translation in one place

Currently, it is split between hd_geometry_guess() and
pc_cmos_init_late(). Confusing. info qtree shows the result of the
former. Also confusing.

Fold the part done in pc_cmos_init_late() into hd_geometry_guess()....

2b584959 07/17/2012 05:48 pm Markus Armbruster

block: Geometry and translation hints are now useless, purge them

There are two producers of these hints: drive_init() on behalf of
-drive, and hd_geometry_guess().

The only consumer of the hint is hd_geometry_guess().

The callers of hd_geometry_guess() call it only when drive_init()...

9db1c0f7 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Move disk geometry guessing back from block.c

Commit f3d54fc4 factored it out of hw/ide.c for reuse. Sensible,
except it was put into block.c. Device-specific functionality should
be kept in device code, not the block layer. Move it to
hw/hd-geometry.c, and make stylistic changes required to keep...

31f7eedf 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Add tracepoints

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

c06aaf01 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Unnest conditional in hd_geometry_guess()

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

2fa5008f 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Factor out guess_chs_for_size()

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

82b11662 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Clean up gratuitous goto in hd_geometry_guess()

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

dc28c0cd 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Clean up confusing use of prior translation hint

When hd_geometry_guess() picks a geometry, it also picks the
appropriate translation, but only when the prior translation hint is
BIOS_ATA_TRANSLATION_AUTO. Looks wrong, because such a prior
translation would be passed to the BIOS whether it's suitable for the...

e2f3dc2b 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Cut out block layer translation middleman

hd_geometry_guess() picks geometry and translation. Callers can get
the geometry directly, via parameters, but for translation they need
to go through the block layer.

Add a parameter for translation, so it can optionally be gotten just...

1f24d7b4 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Switch to uint32_t to match BlockConf

Best to use the same type, to avoid unwanted truncation or sign
extension.

BlockConf can't use plain int for cyls, heads and secs, because
integer properties require an exact width.

Signed-off-by: Markus Armbruster <>...