~ubuntu-branches/debian/sid/grub2/sid-200907171840

« back to all changes in this revision

Viewing changes to include/grub/i386/pc/biosdisk.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Millan
  • Date: 2009-07-02 13:23:51 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702132351-tanpn0ryyijp93gu
Tags: 1.96+20090702-1
* New SVN snapshot.
* rules: Remove duplicated files in sparc64-ieee1275 port.
* rules: Comment out -DGRUB_ASSUME_LINUX_HAS_FB_SUPPORT=1 setting.  We'll
  re-evaluate using it when it's more mature.  (Closes: #535026).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  GRUB  --  GRand Unified Bootloader
3
 
 *  Copyright (C) 2002,2005,2007  Free Software Foundation, Inc.
 
3
 *  Copyright (C) 2002,2005,2007,2008  Free Software Foundation, Inc.
4
4
 *
5
5
 *  GRUB is free software: you can redistribute it and/or modify
6
6
 *  it under the terms of the GNU General Public License as published by
25
25
#define GRUB_BIOSDISK_FLAG_LBA  1
26
26
#define GRUB_BIOSDISK_FLAG_CDROM 2
27
27
 
28
 
#define GRUB_BIOSDISK_MACHINE_CDROM_START       0xe0
29
 
#define GRUB_BIOSDISK_MACHINE_CDROM_END         0xf0
 
28
#define GRUB_BIOSDISK_CDTYPE_NO_EMUL    0
 
29
#define GRUB_BIOSDISK_CDTYPE_1_2_M      1
 
30
#define GRUB_BIOSDISK_CDTYPE_1_44_M     2
 
31
#define GRUB_BIOSDISK_CDTYPE_2_88_M     3
 
32
#define GRUB_BIOSDISK_CDTYPE_HARDDISK   4
 
33
 
 
34
#define GRUB_BIOSDISK_CDTYPE_MASK       0xF
30
35
 
31
36
struct grub_biosdisk_data
32
37
{
67
72
  grub_uint8_t device_path[8];
68
73
  grub_uint8_t reserved2;
69
74
  grub_uint8_t checksum;
70
 
  
 
75
 
71
76
  /* XXX: This is necessary, because the BIOS of Thinkpad X20
72
77
     writes a garbage to the tail of drive parameters,
73
78
     regardless of a size specified in a caller.  */
74
79
  grub_uint8_t dummy[16];
75
80
} __attribute__ ((packed));
76
81
 
 
82
struct grub_biosdisk_cdrp
 
83
{
 
84
  grub_uint8_t size;
 
85
  grub_uint8_t media_type;
 
86
  grub_uint8_t drive_no;
 
87
  grub_uint8_t controller_no;
 
88
  grub_uint32_t image_lba;
 
89
  grub_uint16_t device_spec;
 
90
  grub_uint16_t cache_seg;
 
91
  grub_uint16_t load_seg;
 
92
  grub_uint16_t length_sec512;
 
93
  grub_uint8_t cylinders;
 
94
  grub_uint8_t sectors;
 
95
  grub_uint8_t heads;
 
96
  grub_uint8_t dummy[16];
 
97
} __attribute__ ((packed));
 
98
 
77
99
/* Disk Address Packet.  */
78
100
struct grub_biosdisk_dap
79
101
{
90
112
int EXPORT_FUNC(grub_biosdisk_check_int13_extensions) (int drive);
91
113
int EXPORT_FUNC(grub_biosdisk_get_diskinfo_int13_extensions) (int drive,
92
114
           void *drp);
 
115
int EXPORT_FUNC(grub_biosdisk_get_cdinfo_int13_extensions) (int drive,
 
116
           void *cdrp);
93
117
int EXPORT_FUNC(grub_biosdisk_get_diskinfo_standard) (int drive,
94
118
                                         unsigned long *cylinders,
95
119
                                         unsigned long *heads,