Browse Source

Fixed some options about smbios for Bonito3b1500

1, fix the type 16 of Physical Memory Array and the type 17 of Memory Device.
2, fix the board name of Bonito3b1500 as "Loongson-3B-780E-1w-V0.9-demo".
3, fix the MAC address of uuid.
It pass test by dmidecode, now it is OK.

Target: Bonito3c780e
master
meiwenbin 12 years ago
committed by wanghongmei
parent
commit
a981858467
  1. 64
      Targets/Bonito3c780e/Bonito/start.S
  2. 8
      pmon/common/smbios/smbios.c
  3. 9
      pmon/common/smbios/uuid.c

64
Targets/Bonito3c780e/Bonito/start.S

@ -1753,6 +1753,8 @@ TM_over:
##########################################
bootnow:
bal spd_info_store
nop;
TTYDBG("Copy PMON to execute location...\r\n")
#ifdef DEBUG_LOCORE
TTYDBG(" start = 0x")
@ -2046,6 +2048,68 @@ TM_over:
nop
END(CPU_TLBInit)
LEAF(spd_info_store)
move t8,ra
TTYDBG("\r\n spd_info_store begain.\r\n")
dli t5, 0xffffffff8fffa000;
dli t7, 0xa1;
dli t6, 0xa9;
4:
move a0, t7
dli a1, 0x2;
//GET_I2C_NODE_ID_a2
bal i2cread;
nop;
dli t3, 0x80
bltu v0, t3, 2f
nop;
move t3, t5;
daddiu t3, 0x100;
move t4, t5;
1:
sb zero,0(t4);
daddiu t4, 0x1;
bltu t4, t3, 1b
nop;
b 3f
nop;
2:
move t4, t5;
dli t0, 0x0; //used as counter
1:
move a0, t7;
move a1, t0;
//GET_I2C_NODE_ID_a2
bal i2cread;
nop;
sb v0, 0(t4);
dli a1, 0x100
daddiu t4, 0x1;
daddiu t0, 0x1;
bne t0, a1, 1b;
nop
3:
daddiu t5, 0x100;
daddiu t7, 0x2;
bltu t7, t6, 4b
nop
TTYDBG("\r\n spd_info_store done.\r\n")
jr t8
nop
END(spd_info_store)
LEAF(stringserial)
move a2, ra
#ifdef ROM_EXCEPTION

8
pmon/common/smbios/smbios.c

@ -184,8 +184,12 @@ static void board_info(char *board_name)
strcpy(board_name, "Loongson-3A-2H-1w-V1.00-demo");
#endif
#ifdef LOONGSON_3BSINGLE
#ifdef LOONGSON_3B1500
strcpy(board_name, "Loongson-3B-780E-1w-V0.9-demo");
#else
strcpy(board_name, "Loongson-3B-780E-1w-V1.03-demo");
#endif
#endif
#ifdef LOONGSON_3BSERVER
strcpy(board_name, "Loongson-3B-780E-2w-V1.03-demo");
#endif
@ -416,6 +420,10 @@ smbios_type_4_init(void *start)
strcpy(cpu_version, "Loongson ICT Loongson-3B CPU @ 1.0GHz");
p->max_speed = 1000;
}
if(prid == 0x6307){
strcpy(cpu_version, "Loongson ICT Loongson-3B CPU @ 1.5GHz");
p->max_speed = 1500;
}
p->version_str = 2;
p->voltage = 0x02;

9
pmon/common/smbios/uuid.c

@ -36,7 +36,14 @@ static void read_node(uint8_t *node)
{
int i;
for(i = 0; i < 6; i++){
#if defined(LOONGSON_3ASINGLE) || defined(LOONGSON_3BSINGLE)
#if defined(LOONGSON_3BSINGLE)
#if defined(LOONGSON_3B1500)
node[i + 10] = smbios_uuid_e1000e_mac[i];
#else
node[i + 10] = smbios_uuid_rtl8168_mac[i];
#endif
#endif
#if defined(LOONGSON_3ASINGLE)
node[i + 10] = smbios_uuid_rtl8168_mac[i];
#endif
#if defined(LOONGSON_3ASERVER) || defined(LOONGSON_3BSERVER)

Loading…
Cancel
Save