]>
git.proxmox.com Git - qemu.git/blob - hw/block-common.h
2 * Common code for block device models
4 * Copyright (C) 2012 Red Hat, Inc.
5 * Copyright (c) 2003-2008 Fabrice Bellard
7 * This work is licensed under the terms of the GNU GPL, version 2 or
8 * later. See the COPYING file in the top-level directory.
11 #ifndef HW_BLOCK_COMMON_H
12 #define HW_BLOCK_COMMON_H
14 #include "qemu-common.h"
16 /* Hard disk geometry */
18 #define BIOS_ATA_TRANSLATION_AUTO 0
19 #define BIOS_ATA_TRANSLATION_NONE 1
20 #define BIOS_ATA_TRANSLATION_LBA 2
21 #define BIOS_ATA_TRANSLATION_LARGE 3
22 #define BIOS_ATA_TRANSLATION_RECHS 4
24 void hd_geometry_guess(BlockDriverState
*bs
,
25 uint32_t *pcyls
, uint32_t *pheads
, uint32_t *psecs
,
27 int hd_bios_chs_auto_trans(uint32_t cyls
, uint32_t heads
, uint32_t secs
);