Browse Source

3A2H: Fix up the smbios uuid

Fill the uuid's last six bytes with the mac address.

Change-Id: I606745b2a5bda413d39c5ab2d3c6fc3b44fb3f9b
Signed-off-by: Liu Shaozong <liushaozong@loongson.cn>
master
Liu Shaozong 11 years ago
parent
commit
4a5b6955c4
  1. 8
      pmon/common/smbios/uuid.c
  2. 3
      sys/dev/gmac/synopGMAC_network_interface.c

8
pmon/common/smbios/uuid.c

@ -31,6 +31,7 @@
unsigned char smbios_uuid_rtl8168_mac[6];
unsigned char smbios_uuid_e1000e_mac[6];
unsigned char smbios_uuid_mac[6];
static void read_node(uint8_t *node)
{
@ -38,9 +39,9 @@ static void read_node(uint8_t *node)
for(i = 0; i < 6; i++){
#if defined(LOONGSON_3BSINGLE)
#if defined(LOONGSON_3B1500)
node[i + 10] = smbios_uuid_e1000e_mac[i];
node[i + 10] = smbios_uuid_e1000e_mac[i];
#else
node[i + 10] = smbios_uuid_rtl8168_mac[i];
node[i + 10] = smbios_uuid_rtl8168_mac[i];
#endif
#endif
#if defined(LOONGSON_3ASINGLE)
@ -48,6 +49,9 @@ static void read_node(uint8_t *node)
#endif
#if defined(LOONGSON_3ASERVER) || defined(LOONGSON_3BSERVER)
node[i + 10] = smbios_uuid_e1000e_mac[i];
#endif
#ifdef LOONGSON_3A2H
node[i + 10] = smbios_uuid_mac[i];
#endif
}
node[0] |= 0x01;

3
sys/dev/gmac/synopGMAC_network_interface.c

@ -2457,6 +2457,7 @@ void set_phyled(struct synopGMACNetworkAdapter *synopGMACadapter)
s32 synopGMAC_init_network_interface(char* xname, struct device *sc )
{
struct ifnet* ifp;
extern unsigned char smbios_uuid_mac[6];
u8 mac_addr0[6];
int i,v;
@ -2466,7 +2467,7 @@ s32 synopGMAC_init_network_interface(char* xname, struct device *sc )
struct synopGMACNetworkAdapter *synopGMACadapter;
ls2h_i2c1_init();
eeprom_read_seq(eeprom_addr, mac_addr0, 6);
memcpy(smbios_uuid_mac, mac_addr0, 6);
TR("Now Going to Call register_netdev to register the network interface for GMAC core\n");
synopGMACadapter = (struct synopGMACNetworkAdapter * )plat_alloc_memory(sizeof (struct synopGMACNetworkAdapter));
//sw: should i put sync_cache here?

Loading…
Cancel
Save