Statistics
| Branch: | Revision:

root / hw / block-common.h @ 3871481c

History | View | Annotate | Download (2.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()....

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

hw/block-common: Move BlockConf & friends from block.h

This stuff doesn't belong to block layer, and was put there only
because a better home didn't exist then. Now it does.

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

911525db 07/17/2012 05:48 pm Markus Armbruster

hw/block-common: Factor out fall back to legacy -drive serial=...

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

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

hw/block-common: Factor out fall back to legacy -drive cyls=...

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

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...

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 <>...