david/ipxe
Archived
1
0

isa.c uses the new table infrastructure.

This commit is contained in:
Michael Brown 2005-04-27 12:24:38 +00:00
parent f37e0a06d7
commit 282b6f1a1a
3 changed files with 4 additions and 13 deletions

View File

@ -140,15 +140,7 @@ SECTIONS {
__data = .; __data = .;
*(.data) *(.data)
*(.data.*) *(.data.*)
*(SORT(.tbl.*)) /* Various tables. See include/tables.h */
/* Various tables. See include/tables.h for an explanation. */
*(SORT(.tbl.*))
isa_drivers = . ;
*(.drivers.isa)
isa_drivers_end = .;
_progbits_end = .; _progbits_end = .;
} }

View File

@ -44,8 +44,8 @@ static isa_probe_addr_t isa_extra_probe_addrs[] = {
* Symbols defined by linker * Symbols defined by linker
* *
*/ */
extern struct isa_driver isa_drivers[]; static struct isa_driver isa_drivers[0] __table_start ( isa_driver );
extern struct isa_driver isa_drivers_end[]; static struct isa_driver isa_drivers_end[0] __table_end ( isa_driver );
/* /*
* Increment a bus_loc structure to the next possible ISA location. * Increment a bus_loc structure to the next possible ISA location.

View File

@ -48,14 +48,13 @@ struct isa_driver {
uint16_t mfg_id; uint16_t mfg_id;
uint16_t prod_id; uint16_t prod_id;
}; };
#define __isa_driver __attribute__ (( section ( ".drivers.isa" ) ))
/* /*
* Define an ISA driver * Define an ISA driver
* *
*/ */
#define ISA_DRIVER( _name, _probe_addrs, _probe_addr, _mfg_id, _prod_id ) \ #define ISA_DRIVER( _name, _probe_addrs, _probe_addr, _mfg_id, _prod_id ) \
static struct isa_driver _name __isa_driver = { \ static struct isa_driver _name __table(isa_driver,01 ) = { \
.probe_addrs = _probe_addrs, \ .probe_addrs = _probe_addrs, \
.addr_count = sizeof ( _probe_addrs ) / sizeof ( _probe_addrs[0] ), \ .addr_count = sizeof ( _probe_addrs ) / sizeof ( _probe_addrs[0] ), \
.probe_addr = _probe_addr, \ .probe_addr = _probe_addr, \