Browse Source

isa.c uses the new table infrastructure.

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
282b6f1a1a
3 changed files with 4 additions and 13 deletions
  1. 1
    9
      src/arch/i386/scripts/i386.lds
  2. 2
    2
      src/drivers/bus/isa.c
  3. 1
    2
      src/include/isa.h

+ 1
- 9
src/arch/i386/scripts/i386.lds View File

140
 	__data = .;
140
 	__data = .;
141
 	*(.data)
141
 	*(.data)
142
 	*(.data.*)
142
 	*(.data.*)
143
-
144
-	/* Various tables.  See include/tables.h for an explanation. */
145
-	*(SORT(.tbl.*))	
146
-
147
-
148
-	isa_drivers = . ;
149
-	*(.drivers.isa)
150
-	isa_drivers_end = .;
151
-
143
+	*(SORT(.tbl.*))		/* Various tables.  See include/tables.h */
152
 	_progbits_end = .;
144
 	_progbits_end = .;
153
     }
145
     }
154
 
146
 

+ 2
- 2
src/drivers/bus/isa.c View File

44
  * Symbols defined by linker
44
  * Symbols defined by linker
45
  *
45
  *
46
  */
46
  */
47
-extern struct isa_driver isa_drivers[];
48
-extern struct isa_driver isa_drivers_end[];
47
+static struct isa_driver isa_drivers[0] __table_start ( isa_driver );
48
+static struct isa_driver isa_drivers_end[0] __table_end ( isa_driver );
49
 
49
 
50
 /*
50
 /*
51
  * Increment a bus_loc structure to the next possible ISA location.
51
  * Increment a bus_loc structure to the next possible ISA location.

+ 1
- 2
src/include/isa.h View File

48
 	uint16_t mfg_id;
48
 	uint16_t mfg_id;
49
 	uint16_t prod_id;
49
 	uint16_t prod_id;
50
 };
50
 };
51
-#define __isa_driver __attribute__ (( section ( ".drivers.isa" ) ))
52
 
51
 
53
 /*
52
 /*
54
  * Define an ISA driver
53
  * Define an ISA driver
55
  *
54
  *
56
  */
55
  */
57
 #define ISA_DRIVER( _name, _probe_addrs, _probe_addr, _mfg_id, _prod_id )   \
56
 #define ISA_DRIVER( _name, _probe_addrs, _probe_addr, _mfg_id, _prod_id )   \
58
-static struct isa_driver _name __isa_driver = {				    \
57
+static struct isa_driver _name __table(isa_driver,01 ) = {		    \
59
 	.probe_addrs = _probe_addrs,					    \
58
 	.probe_addrs = _probe_addrs,					    \
60
 	.addr_count = sizeof ( _probe_addrs ) / sizeof ( _probe_addrs[0] ), \
59
 	.addr_count = sizeof ( _probe_addrs ) / sizeof ( _probe_addrs[0] ), \
61
 	.probe_addr = _probe_addr,					    \
60
 	.probe_addr = _probe_addr,					    \

Loading…
Cancel
Save