View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000222 | EBoot_PM3 | EBoot | public | 2010-02-11 16:12 | 2010-02-19 18:34 |
Reporter | Assigned To | ||||
Priority | urgent | Severity | major | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | V1.43 | ||||
Target Version | V1.43 | Fixed in Version | V1.43 | ||
Summary | 0000222: MAC will be overwritten when uploading a PSD | ||||
Description | MAC will be overwritten when uploading a PSD | ||||
Forum Link | |||||
|
BOOL OEMWriteFlash(DWORD dwStartAddr, DWORD dwLength) { DWORD Addr1; // starting address DWORD Addr2; // ending address BOOL rc = FALSE; UINT8 *pSource = NULL; OALMSG(OAL_FUNC, (L"+OEMWriteFlash(0x%08x, 0x%08x\r\n", dwStartAddr, dwLength)); // Setup address range for comparison // Addr1 = dwStartAddr & ~CACHED_TO_UNCACHED_OFFSET; Addr2 = Addr1 + (dwLength - 1); if( Addr1 == (DWORD)&g_BootConfigNew ) { /* MAC Address should not be overwritten */ g_BootConfigNew.wWCE_MAC[0] = g_BootConfig.wWCE_MAC[0]; g_BootConfigNew.wWCE_MAC[1] = g_BootConfig.wWCE_MAC[1]; g_BootConfigNew.wWCE_MAC[2] = g_BootConfig.wWCE_MAC[2]; memcpy(&g_BootConfig, &g_BootConfigNew, sizeof(g_BootConfig)); Log("EBOOT: must format flash memory ...\r\n"); FMD_EraseAll(); Log("done\r\n"); FSBLFlashInit( &g_BootConfig , FALSE ); Log("EBOOT: write boot config ...\r\n"); rc = WriteBootConfig( &g_BootConfig, sizeof(BOOT_CFG) ); } else if( (Addr1 >= IMAGE_BOOT_CODE_CA_START) && (Addr2 <= IMAGE_BOOT_CODE_CA_END) ) { rc = FSBLWriteBootloader( (void*)(IMAGE_BOOT_B_CACHE_CA_START), dwLength); } else if( (Addr1 == IMAGE_BOOT_SPLASH_CA) && (Addr2 <= (IMAGE_BOOT_SPLASH_CA+IMAGE_BOOT_SPLASH_SIZE)) ) |
|
During transfer of PSD file we use g_BootConfigNew as memory. After transfer we copy MAC from g_BootConfig to g_BootConfigNew. For future we should try to move this to common code. |