Changes

Jump to navigation Jump to search
38 bytes added ,  19:33, 5 September 2020
m
Fix FALCON_HWCFG MMIO names
Line 230: Line 230:  
<pre>
 
<pre>
 
     // Read data segment size from IO space
 
     // Read data segment size from IO space
     u32 data_seg_size = *(u32 *)UC_CAPS;
+
     u32 data_seg_size = *(u32 *)FALCON_HWCFG;
 
     data_seg_size >>= 0x09;
 
     data_seg_size >>= 0x09;
 
     data_seg_size &= 0x1FF;
 
     data_seg_size &= 0x1FF;
Line 496: Line 496:  
   
 
   
 
     // Read data segment size from IO space
 
     // Read data segment size from IO space
     u32 data_seg_size = *(u32 *)UC_CAPS;
+
     u32 data_seg_size = *(u32 *)FALCON_HWCFG;
 
     data_seg_size >>= 0x09;
 
     data_seg_size >>= 0x09;
 
     data_seg_size &= 0x1FF;
 
     data_seg_size &= 0x1FF;
Line 695: Line 695:  
     // Swap halves (b16, b32 and b16 again) and store it as the last word
 
     // Swap halves (b16, b32 and b16 again) and store it as the last word
 
     *(u32 *)(buf + 0x0C) = (
 
     *(u32 *)(buf + 0x0C) = (
         ((size & 0x000000FF) << 0x08 | (size & 0x0000FF00) >> 0x08) << 0x10
+
         ((size & 0x000000FF) << 0x08
 +
        | (size & 0x0000FF00) >> 0x08) << 0x10
 
         | ((size & 0x00FF0000) >> 0x10) << 0x08
 
         | ((size & 0x00FF0000) >> 0x10) << 0x08
 
         | (size & 0xFF000000) >> 0x18
 
         | (size & 0xFF000000) >> 0x18
Line 960: Line 961:  
The main function takes '''key_addr''' and '''key_type''' as arguments from [[#KeygenLdr|KeygenLdr]].
 
The main function takes '''key_addr''' and '''key_type''' as arguments from [[#KeygenLdr|KeygenLdr]].
 
<pre>
 
<pre>
     u32 falcon_rev = *(u32 *)UC_CAPS2 & 0x0F;
+
     u32 falcon_rev = *(u32 *)FALCON_HWCFG2 & 0x0F;
    
     // Falcon hardware revision must be 5
 
     // Falcon hardware revision must be 5
Line 1,261: Line 1,262:  
<pre>
 
<pre>
 
     // Read data segment size from IO space
 
     // Read data segment size from IO space
     u32 data_seg_size = *(u32 *)UC_CAPS;
+
     u32 data_seg_size = *(u32 *)FALCON_HWCFG;
 
     data_seg_size >>= 0x01;
 
     data_seg_size >>= 0x01;
 
     data_seg_size &= 0xFF00;
 
     data_seg_size &= 0xFF00;
Line 1,387: Line 1,388:  
      
 
      
 
     // Read data segment size from IO space
 
     // Read data segment size from IO space
     u32 data_seg_size = *(u32 *)UC_CAPS;
+
     u32 data_seg_size = *(u32 *)FALCON_HWCFG;
 
     data_seg_size >>= 0x01;
 
     data_seg_size >>= 0x01;
 
     data_seg_size &= 0xFF00;
 
     data_seg_size &= 0xFF00;
Line 1,519: Line 1,520:  
      
 
      
 
     // Read data segment size from IO space
 
     // Read data segment size from IO space
     u32 data_seg_size = *(u32 *)UC_CAPS;
+
     u32 data_seg_size = *(u32 *)FALCON_HWCFG;
 
     data_seg_size >>= 0x01;
 
     data_seg_size >>= 0x01;
 
     data_seg_size &= 0xFF00;
 
     data_seg_size &= 0xFF00;
6

edits

Navigation menu