diff options
Diffstat (limited to 'bootloader/main-pp.c')
-rw-r--r-- | bootloader/main-pp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index a2562f8a9d..4f1fe2a4e1 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c | |||
@@ -391,8 +391,8 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | |||
391 | unsigned long sum; | 391 | unsigned long sum; |
392 | 392 | ||
393 | /* Read header to find out how long the mi4 file is. */ | 393 | /* Read header to find out how long the mi4 file is. */ |
394 | storage_read_sectors(0, pinfo->start + PPMI_SECTOR_OFFSET, | 394 | storage_read_sectors(pinfo->start + PPMI_SECTOR_OFFSET, |
395 | PPMI_SECTORS, &ppmi_header); | 395 | PPMI_SECTORS, &ppmi_header); |
396 | 396 | ||
397 | /* The first four characters at 0x80000 (sector 1024) should be PPMI*/ | 397 | /* The first four characters at 0x80000 (sector 1024) should be PPMI*/ |
398 | if( memcmp(ppmi_header.magic, "PPMI", 4) ) | 398 | if( memcmp(ppmi_header.magic, "PPMI", 4) ) |
@@ -401,7 +401,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | |||
401 | printf("BL mi4 size: %x", ppmi_header.length); | 401 | printf("BL mi4 size: %x", ppmi_header.length); |
402 | 402 | ||
403 | /* Read mi4 header of the OF */ | 403 | /* Read mi4 header of the OF */ |
404 | storage_read_sectors(0, pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS | 404 | storage_read_sectors(pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS |
405 | + (ppmi_header.length/512), MI4_HEADER_SECTORS, &mi4header); | 405 | + (ppmi_header.length/512), MI4_HEADER_SECTORS, &mi4header); |
406 | 406 | ||
407 | /* We don't support encrypted mi4 files yet */ | 407 | /* We don't support encrypted mi4 files yet */ |
@@ -424,7 +424,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | |||
424 | printf("Binary type: %.4s", mi4header.type); | 424 | printf("Binary type: %.4s", mi4header.type); |
425 | 425 | ||
426 | /* Load firmware */ | 426 | /* Load firmware */ |
427 | storage_read_sectors(0, pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS | 427 | storage_read_sectors(pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS |
428 | + (ppmi_header.length/512) + MI4_HEADER_SECTORS, | 428 | + (ppmi_header.length/512) + MI4_HEADER_SECTORS, |
429 | (mi4header.mi4size-MI4_HEADER_SIZE)/512, buf); | 429 | (mi4header.mi4size-MI4_HEADER_SIZE)/512, buf); |
430 | 430 | ||
@@ -443,9 +443,9 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | |||
443 | 443 | ||
444 | printf("Disabling database rebuild"); | 444 | printf("Disabling database rebuild"); |
445 | 445 | ||
446 | storage_read_sectors(0, pinfo->start + 0x3c08, 1, block); | 446 | storage_read_sectors(pinfo->start + 0x3c08, 1, block); |
447 | block[0xe1] = 0; | 447 | block[0xe1] = 0; |
448 | storage_write_sectors(0, pinfo->start + 0x3c08, 1, block); | 448 | storage_write_sectors(pinfo->start + 0x3c08, 1, block); |
449 | } | 449 | } |
450 | #else | 450 | #else |
451 | (void) disable_rebuild; | 451 | (void) disable_rebuild; |