Changeset 1298


Ignore:
Timestamp:
08/18/11 22:20:19 (22 months ago)
Author:
pixeldoc2000
Message:

ixus300_sd4000 FAT32 code fixed, exFat support added like SX30

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platform/ixus300_sd4000/sub/100d/boot.c

    r1297 r1298  
    765765        "B       loc_FF8713B0\n" 
    766766        "loc_FF8713E4:\n" 
    767        // "LDR     R1, [R5,#0x64]\n" 
     767        "LDR     R1, [R5,#0x64]\n" 
    768768        "MOV     R0, R9\n" 
    769         //"BLX     R1\n" 
    770         "BL      sub_mbr\n" 
    771  
    772         "sub_mbr:\n" 
    773         // FAT32 Partition support 
    774         "LDR     R1, =0x94AD0\n"                 // ROM:FF951C00 or ROM:FF951E78 
    775         "ADD     R0, R0, R0,LSL#3\n" 
    776         "ADD     R0, R1, R0,LSL#2\n" 
    777         "LDR     R0, [R0,#0x18]\n" 
    778         "BX      LR\n" 
     769        "BLX     R1\n" 
    779770 
    780771        "MOV   R1, R4\n"                     // pointer to MBR in R1 
    781772        "BL    mbr_read_dryos\n"             // total sectors count in R0 before and after call 
    782         // requires "define CAM_MULTIPART 1", else you get undefined reference compiler error ;-) 
    783773 
    784774        // Start of DataGhost's FAT32 autodetection code 
     
    801791        "CMP     R3, #0xB\n"                   // Is this a FAT32 partition? 
    802792        "CMPNE   R3, #0xC\n"                   // Not 0xB, is it 0xC (FAT32 LBA) then? 
     793        "CMPNE   R3, #0x7\n"                   // exFat? 
    803794        "BNE     dg_sd_fat32\n"                // No, it isn't. Loop again. 
    804795        "CMP     R2, #0x00\n"                  // It is, check the validity of the partition type 
     
    817808        "LDRB    R3, [R4,#0x1C7]\n" 
    818809        "LDRB    R2, [R4,#0x1BE]\n" 
    819         "LDRB    LR, [R4,#0x1FF]\n" 
     810 
     811        //"LDRB    LR, [R4,#0x1FF]\n"          // original 
     812 
    820813        "ORR     R1, R1, R3,LSL#8\n" 
    821814        "LDRB    R3, [R4,#0x1C6]\n" 
     
    830823        "LDRB    R12, [R4,#0x1CA]\n" 
    831824        "ORR     R3, R3, R12\n" 
    832  
    833825        //"LDRB    R12, [R4,#0x1FE]\n"       // original 
     826 
    834827        "LDRB    R12, [LR,#0x1FE]\n"         // + First MBR signature byte (0x55), LR is original offset. 
    835828        "LDRB    LR, [LR,#0x1FF]\n"          // + Last MBR signature byte (0xAA), LR is original offset. 
    836         "MOV     R4, #0\n"                   // ToDo: required ? 
    837829 
    838830        "BNE     loc_FF871470\n" 
Note: See TracChangeset for help on using the changeset viewer.