25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_le.c,v 1.44 2005/10/26 14:37:04 debug Exp $ |
* $Id: dev_le.c,v 1.46 2005/11/13 00:14:09 debug Exp $ |
29 |
* |
* |
30 |
* LANCE ethernet, as used in DECstations. |
* LANCE ethernet, as used in DECstations. |
31 |
* |
* |
801 |
/* ROM (including the MAC address): */ |
/* ROM (including the MAC address): */ |
802 |
net_generate_unique_mac(machine, &d->rom[0]); |
net_generate_unique_mac(machine, &d->rom[0]); |
803 |
|
|
|
/* |
|
|
* NOTE: According to the Lance documentation, the low order bit of |
|
|
* a physical MAC address should be clear. However, NetBSD and |
|
|
* Linux drop packets if the _first_ byte's lowest bit is not zero. |
|
|
*/ |
|
|
d->rom[0] &= ~1; |
|
|
d->rom[5] &= ~1; |
|
|
|
|
804 |
/* Copies of the MAC address and a test pattern: */ |
/* Copies of the MAC address and a test pattern: */ |
805 |
d->rom[10] = d->rom[21] = d->rom[5]; |
d->rom[10] = d->rom[21] = d->rom[5]; |
806 |
d->rom[11] = d->rom[20] = d->rom[4]; |
d->rom[11] = d->rom[20] = d->rom[4]; |
817 |
|
|
818 |
memory_device_register(mem, "le_sram", baseaddr, |
memory_device_register(mem, "le_sram", baseaddr, |
819 |
SRAM_SIZE, dev_le_sram_access, (void *)d, |
SRAM_SIZE, dev_le_sram_access, (void *)d, |
820 |
MEM_DYNTRANS_OK | MEM_DYNTRANS_WRITE_OK |
DM_DYNTRANS_OK | DM_DYNTRANS_WRITE_OK |
821 |
| MEM_READING_HAS_NO_SIDE_EFFECTS, d->sram); |
| DM_READS_HAVE_NO_SIDE_EFFECTS, d->sram); |
822 |
|
|
823 |
name2 = malloc(nlen); |
name2 = malloc(nlen); |
824 |
if (name2 == NULL) { |
if (name2 == NULL) { |
829 |
d->rom[0], d->rom[1], d->rom[2], d->rom[3], d->rom[4], d->rom[5]); |
d->rom[0], d->rom[1], d->rom[2], d->rom[3], d->rom[4], d->rom[5]); |
830 |
|
|
831 |
memory_device_register(mem, name2, baseaddr + 0x100000, |
memory_device_register(mem, name2, baseaddr + 0x100000, |
832 |
len - 0x100000, dev_le_access, (void *)d, MEM_DEFAULT, NULL); |
len - 0x100000, dev_le_access, (void *)d, DM_DEFAULT, NULL); |
833 |
|
|
834 |
machine_add_tickfunction(machine, dev_le_tick, d, LE_TICK_SHIFT); |
machine_add_tickfunction(machine, dev_le_tick, d, LE_TICK_SHIFT); |
835 |
|
|