~ubuntu-branches/ubuntu/trusty/grub2/trusty

« back to all changes in this revision

Viewing changes to debian/grub-extras/disabled/gpxe/src/include/gpxe/isa.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-16 15:18:04 UTC
  • mfrom: (17.6.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140116151804-3foouk7fpqcq3sxx
Tags: 2.02~beta2-2
* Convert patch handling to git-dpm.
* Add bi-endian support to ELF parser (Tomohiro B Berry).
* Adjust restore_mkdevicemap.patch to mark get_kfreebsd_version as static,
  to appease "gcc -Werror=missing-prototypes".
* Cherry-pick from upstream:
  - Change grub-macbless' manual page section to 8.
* Install grub-glue-efi, grub-macbless, grub-render-label, and
  grub-syslinux2cfg.
* grub-shell: Pass -no-pad to xorriso when building floppy images.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef ISA_H
 
2
#define ISA_H
 
3
 
 
4
FILE_LICENCE ( GPL2_OR_LATER );
 
5
 
 
6
#include <stdint.h>
 
7
#include <gpxe/isa_ids.h>
 
8
#include <gpxe/device.h>
 
9
#include <gpxe/tables.h>
 
10
 
 
11
/** An ISA device */
 
12
struct isa_device {
 
13
        /** Generic device */
 
14
        struct device dev;
 
15
        /** I/O address */
 
16
        uint16_t ioaddr;
 
17
        /** Driver for this device */
 
18
        struct isa_driver *driver;
 
19
        /** Driver-private data
 
20
         *
 
21
         * Use isa_set_drvdata() and isa_get_drvdata() to access
 
22
         * this field.
 
23
         */
 
24
        void *priv;
 
25
        /** Driver name */
 
26
        const char *driver_name;
 
27
};
 
28
 
 
29
/*
 
30
 * An individual ISA device, identified by probe address
 
31
 *
 
32
 */
 
33
typedef uint16_t isa_probe_addr_t;
 
34
 
 
35
/** An ISA driver */
 
36
struct isa_driver {
 
37
        /** Name */
 
38
        const char *name;
 
39
        /** Probe address list */
 
40
        isa_probe_addr_t *probe_addrs;
 
41
        /** Number of entries in probe address list */
 
42
        unsigned int addr_count;
 
43
        /** Manufacturer ID to be assumed for this device */
 
44
        uint16_t vendor_id;
 
45
        /** Product ID to be assumed for this device */
 
46
        uint16_t prod_id;
 
47
        /**
 
48
         * Probe device
 
49
         *
 
50
         * @v isa       ISA device
 
51
         * @v id        Matching entry in ID table
 
52
         * @ret rc      Return status code
 
53
         */
 
54
        int ( * probe ) ( struct isa_device *isa );
 
55
        /**
 
56
         * Remove device
 
57
         *
 
58
         * @v isa       ISA device
 
59
         */
 
60
        void ( * remove ) ( struct isa_device *isa );
 
61
};
 
62
 
 
63
/** ISA driver table */
 
64
#define ISA_DRIVERS __table ( struct isa_driver, "isa_drivers" )
 
65
 
 
66
/** Declare an ISA driver */
 
67
#define __isa_driver __table_entry ( ISA_DRIVERS, 01 )
 
68
 
 
69
/**
 
70
 * Set ISA driver-private data
 
71
 *
 
72
 * @v isa               ISA device
 
73
 * @v priv              Private data
 
74
 */
 
75
static inline void isa_set_drvdata ( struct isa_device *isa, void *priv ) {
 
76
        isa->priv = priv;
 
77
}
 
78
 
 
79
/**
 
80
 * Get ISA driver-private data
 
81
 *
 
82
 * @v isa               ISA device
 
83
 * @ret priv            Private data
 
84
 */
 
85
static inline void * isa_get_drvdata ( struct isa_device *isa ) {
 
86
        return isa->priv;
 
87
}
 
88
 
 
89
/*
 
90
 * ISA_ROM is parsed by parserom.pl to generate Makefile rules and
 
91
 * files for rom-o-matic.
 
92
 *
 
93
 */
 
94
#define ISA_ROM( IMAGE, DESCRIPTION )
 
95
 
 
96
#endif /* ISA_H */
 
97