Revision 6cded3a4
b/hw/eepro100.c | ||
---|---|---|
20 | 20 |
* along with this program; if not, see <http://www.gnu.org/licenses/>. |
21 | 21 |
* |
22 | 22 |
* Tested features (i82559): |
23 |
* PXE boot (i386) no valid link
|
|
23 |
* PXE boot (i386) ok
|
|
24 | 24 |
* Linux networking (i386) ok |
25 | 25 |
* |
26 | 26 |
* Untested: |
... | ... | |
33 | 33 |
* Open Source Software Developer Manual |
34 | 34 |
*/ |
35 | 35 |
|
36 |
#if defined(TARGET_I386) |
|
37 |
# warning "PXE boot still not working!" |
|
38 |
#endif |
|
39 |
|
|
40 | 36 |
#include <stddef.h> /* offsetof */ |
41 | 37 |
#include <stdbool.h> |
42 | 38 |
#include "hw.h" |
... | ... | |
243 | 239 |
bool has_extended_tcb_support; |
244 | 240 |
} EEPRO100State; |
245 | 241 |
|
242 |
/* Word indices in EEPROM. */ |
|
243 |
typedef enum { |
|
244 |
EEPROM_CNFG_MDIX = 0x03, |
|
245 |
EEPROM_ID = 0x05, |
|
246 |
EEPROM_PHY_ID = 0x06, |
|
247 |
EEPROM_VENDOR_ID = 0x0c, |
|
248 |
EEPROM_CONFIG_ASF = 0x0d, |
|
249 |
EEPROM_DEVICE_ID = 0x23, |
|
250 |
EEPROM_SMBUS_ADDR = 0x90, |
|
251 |
} EEPROMOffset; |
|
252 |
|
|
246 | 253 |
/* Default values for MDI (PHY) registers */ |
247 | 254 |
static const uint16_t eepro100_mdi_default[] = { |
248 | 255 |
/* MDI Registers 0 - 6, 7 */ |
... | ... | |
632 | 639 |
uint16_t *eeprom_contents = eeprom93xx_data(s->eeprom); |
633 | 640 |
//~ eeprom93xx_reset(s->eeprom); |
634 | 641 |
memcpy(eeprom_contents, s->conf.macaddr.a, 6); |
635 |
eeprom_contents[0xa] = 0x4000;
|
|
642 |
eeprom_contents[EEPROM_ID] = 0x4000;
|
|
636 | 643 |
if (s->device == i82557B || s->device == i82557C) |
637 | 644 |
eeprom_contents[5] = 0x0100; |
645 |
eeprom_contents[EEPROM_PHY_ID] = 1; |
|
638 | 646 |
uint16_t sum = 0; |
639 | 647 |
for (i = 0; i < EEPROM_SIZE - 1; i++) { |
640 | 648 |
sum += eeprom_contents[i]; |
Also available in: Unified diff