Преглед на файлове

isa.c uses the new table infrastructure.

tags/v0.9.3
Michael Brown преди 19 години
родител
ревизия
282b6f1a1a
променени са 3 файла, в които са добавени 4 реда и са изтрити 13 реда
  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 Целия файл

@@ -140,15 +140,7 @@ SECTIONS {
140 140
 	__data = .;
141 141
 	*(.data)
142 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 144
 	_progbits_end = .;
153 145
     }
154 146
 

+ 2
- 2
src/drivers/bus/isa.c Целия файл

@@ -44,8 +44,8 @@ static isa_probe_addr_t isa_extra_probe_addrs[] = {
44 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 51
  * Increment a bus_loc structure to the next possible ISA location.

+ 1
- 2
src/include/isa.h Целия файл

@@ -48,14 +48,13 @@ struct isa_driver {
48 48
 	uint16_t mfg_id;
49 49
 	uint16_t prod_id;
50 50
 };
51
-#define __isa_driver __attribute__ (( section ( ".drivers.isa" ) ))
52 51
 
53 52
 /*
54 53
  * Define an ISA driver
55 54
  *
56 55
  */
57 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 58
 	.probe_addrs = _probe_addrs,					    \
60 59
 	.addr_count = sizeof ( _probe_addrs ) / sizeof ( _probe_addrs[0] ), \
61 60
 	.probe_addr = _probe_addr,					    \

Loading…
Отказ
Запис