debuggers.hg

view xen/include/asm-x86/edd.h @ 22855:1d1eec7e1fb4

xl: Perform minimal validation of virtual disk file while parsing config file

This patch performs some very basic validation on the virtual disk
file passed through the config file. This validation ensures that we
don't go too far with the initialization like spawn qemu and more
while there could be some potentially fundamental issues.

[ Patch fixed up to work with PHYSTYPE_EMPTY 22808:6ec61438713a -iwj ]

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Kamala Narasimhan <kamala.narasimhan@gmail.com>
date Tue Jan 25 18:09:49 2011 +0000 (2011-01-25)
parents 296fd2598e00
children
line source
1 /******************************************************************************
2 * edd.h
3 *
4 * Copyright (C) 2002, 2003, 2004 Dell Inc.
5 * by Matt Domsch <Matt_Domsch@dell.com>
6 *
7 * structures and definitions for the int 13h, ax={41,48}h
8 * BIOS Enhanced Disk Drive Services
9 * This is based on the T13 group document D1572 Revision 0 (August 14 2002)
10 * available at http://www.t13.org/docs2002/d1572r0.pdf. It is
11 * very similar to D1484 Revision 3 http://www.t13.org/docs2002/d1484r3.pdf
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License v2.0 as published by
15 * the Free Software Foundation
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 */
23 #ifndef __XEN_EDD_H__
24 #define __XEN_EDD_H__
26 struct edd_info {
27 /* Int13, Fn48: Check Extensions Present. */
28 u8 device; /* %dl: device */
29 u8 version; /* %ah: major version */
30 u16 interface_support; /* %cx: interface support bitmap */
31 /* Int13, Fn08: Legacy Get Device Parameters. */
32 u16 legacy_max_cylinder; /* %cl[7:6]:%ch: maximum cylinder number */
33 u8 legacy_max_head; /* %dh: maximum head number */
34 u8 legacy_sectors_per_track; /* %cl[5:0]: maximum sector number */
35 /* Int13, Fn41: Get Device Parameters (as filled into %ds:%esi). */
36 struct {
37 u16 length;
38 u8 data[72];
39 } edd_device_params;
40 } __attribute__ ((packed));
42 struct mbr_signature {
43 u8 device;
44 u8 pad[3];
45 u32 signature;
46 } __attribute__ ((packed));
48 /* These all reside in the boot trampoline. Access via bootsym(). */
49 extern struct mbr_signature boot_mbr_signature[];
50 extern u8 boot_mbr_signature_nr;
51 extern struct edd_info boot_edd_info[];
52 extern u8 boot_edd_info_nr;
54 #endif /* __XEN_EDD_H__ */