]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
authorchaac <chaac@localhost>
Sat, 29 Jul 2006 10:11:01 +0000 (10:11 +0000)
committerchaac <chaac@localhost>
Sat, 29 Jul 2006 10:11:01 +0000 (10:11 +0000)
        * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
        (struct grub_biosdisk_dap): Likewise.

        * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
        linkage settings for all functions.

ChangeLog
disk/i386/pc/biosdisk.c
include/grub/i386/pc/biosdisk.h

index c5a2c3493fb59db9cc0cf1d8c4e07360b849cd27..54c9cff5fca8adff36330990f4b28e1d1352c863 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
+
+       * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
+       (struct grub_biosdisk_dap): Likewise.
+
+       * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
+       linkage settings for all functions.
+
 2006-07-12  Marco Gerards  <marco@gnu.org>
 
        * configure.ac (--enable-mm-debug): Fix typo.
index 3382ab445170e455b9cd17b5b112adfdb8e21756..3b7ff39140eafece6f3305a437371c18f589dcd7 100644 (file)
 #include <grub/err.h>
 #include <grub/term.h>
 
-/* Drive Parameters.  */
-struct grub_biosdisk_drp
-{
-  grub_uint16_t size;
-  grub_uint16_t flags;
-  grub_uint32_t cylinders;
-  grub_uint32_t heads;
-  grub_uint32_t sectors;
-  grub_uint64_t total_sectors;
-  grub_uint16_t bytes_per_sector;
-  /* ver 2.0 or higher */
-  grub_uint32_t EDD_configuration_parameters;
-  /* ver 3.0 or higher */
-  grub_uint16_t signature_dpi;
-  grub_uint8_t length_dpi;
-  grub_uint8_t reserved[3];
-  grub_uint8_t name_of_host_bus[4];
-  grub_uint8_t name_of_interface_type[8];
-  grub_uint8_t interface_path[8];
-  grub_uint8_t device_path[8];
-  grub_uint8_t reserved2;
-  grub_uint8_t checksum;
-  
-  /* XXX: This is necessary, because the BIOS of Thinkpad X20
-     writes a garbage to the tail of drive parameters,
-     regardless of a size specified in a caller.  */
-  grub_uint8_t dummy[16];
-} __attribute__ ((packed));
-
-/* Disk Address Packet.  */
-struct grub_biosdisk_dap
-{
-  grub_uint8_t length;
-  grub_uint8_t reserved;
-  grub_uint16_t blocks;
-  grub_uint32_t buffer;
-  grub_uint64_t block;
-} __attribute__ ((packed));
-
-
 static int
 grub_biosdisk_get_drive (const char *name)
 {
index d6a5ee8e22d7f7cc9c80da52f246a147ce620fc6..302ec82fe125673f022271d5e4b17fec118be6c7 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef GRUB_BIOSDISK_MACHINE_HEADER
 #define GRUB_BIOSDISK_MACHINE_HEADER   1
 
+#include <grub/symbol.h>
+#include <grub/types.h>
+
 #define GRUB_BIOSDISK_FLAG_LBA 1
 
 struct grub_biosdisk_data
@@ -31,16 +34,64 @@ struct grub_biosdisk_data
   unsigned long flags;
 };
 
-int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap);
-int grub_biosdisk_rw_standard (int ah, int drive, int coff, int hoff,
+/* Drive Parameters.  */
+struct grub_biosdisk_drp
+{
+  grub_uint16_t size;
+  grub_uint16_t flags;
+  grub_uint32_t cylinders;
+  grub_uint32_t heads;
+  grub_uint32_t sectors;
+  grub_uint64_t total_sectors;
+  grub_uint16_t bytes_per_sector;
+  /* ver 2.0 or higher */
+
+  union
+  {
+    grub_uint32_t EDD_configuration_parameters;
+
+    /* Pointer to the Device Parameter Table Extension (ver 3.0+).  */
+    grub_uint32_t dpte_pointer;
+  };
+
+  /* ver 3.0 or higher */
+  grub_uint16_t signature_dpi;
+  grub_uint8_t length_dpi;
+  grub_uint8_t reserved[3];
+  grub_uint8_t name_of_host_bus[4];
+  grub_uint8_t name_of_interface_type[8];
+  grub_uint8_t interface_path[8];
+  grub_uint8_t device_path[8];
+  grub_uint8_t reserved2;
+  grub_uint8_t checksum;
+  
+  /* XXX: This is necessary, because the BIOS of Thinkpad X20
+     writes a garbage to the tail of drive parameters,
+     regardless of a size specified in a caller.  */
+  grub_uint8_t dummy[16];
+} __attribute__ ((packed));
+
+/* Disk Address Packet.  */
+struct grub_biosdisk_dap
+{
+  grub_uint8_t length;
+  grub_uint8_t reserved;
+  grub_uint16_t blocks;
+  grub_uint32_t buffer;
+  grub_uint64_t block;
+} __attribute__ ((packed));
+
+int EXPORT_FUNC(grub_biosdisk_rw_int13_extensions) (int ah, int drive, void *dap);
+int EXPORT_FUNC(grub_biosdisk_rw_standard) (int ah, int drive, int coff, int hoff,
                               int soff, int nsec, int segment);
-int grub_biosdisk_check_int13_extensions (int drive);
-int grub_biosdisk_get_diskinfo_int13_extensions (int drive, void *drp);
-int grub_biosdisk_get_diskinfo_standard (int drive,
+int EXPORT_FUNC(grub_biosdisk_check_int13_extensions) (int drive);
+int EXPORT_FUNC(grub_biosdisk_get_diskinfo_int13_extensions) (int drive,
+           void *drp);
+int EXPORT_FUNC(grub_biosdisk_get_diskinfo_standard) (int drive,
                                         unsigned long *cylinders,
                                         unsigned long *heads,
                                         unsigned long *sectors);
-int grub_biosdisk_get_num_floppies (void);
+int EXPORT_FUNC(grub_biosdisk_get_num_floppies) (void);
 
 void grub_biosdisk_init (void);
 void grub_biosdisk_fini (void);