[ros-diffs] [sir_richard] 49735: [ARMLLB]: Add support for ATAG_REVISION. [ARMLLB]: Fix support of ATAG_MEM: there can be multiple tags, one per DRAM bank. [ARMLLB]: Fix the default case not to "return": it sh...

sir_richard at svn.reactos.org sir_richard at svn.reactos.org
Tue Nov 23 16:42:01 UTC 2010


Author: sir_richard
Date: Tue Nov 23 16:42:00 2010
New Revision: 49735

URL: http://svn.reactos.org/svn/reactos?rev=49735&view=rev
Log:
[ARMLLB]: Add support for ATAG_REVISION.
[ARMLLB]: Fix support of ATAG_MEM: there can be multiple tags, one per DRAM bank.
[ARMLLB]: Fix the default case not to "return": it should "Break" instead.
[ARMLLB]: Only apply the RAMDisk hack on Beagle for now.

Modified:
    trunk/reactos/boot/armllb/envir.c

Modified: trunk/reactos/boot/armllb/envir.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/envir.c?rev=49735&r1=49734&r2=49735&view=diff
==============================================================================
--- trunk/reactos/boot/armllb/envir.c [iso-8859-1] (original)
+++ trunk/reactos/boot/armllb/envir.c [iso-8859-1] Tue Nov 23 16:42:00 2010
@@ -9,10 +9,11 @@
 #include "precomp.h"
 
 ULONG LlbEnvHwPageSize;
-ULONG LlbEnvHwMemStart;
-ULONG LlbEnvHwMemSize;
-ULONG LlbEnvRamDiskStart;
-ULONG LlbEnvRamDiskSize;
+ULONG LlbEnvHwMemStart = 0;
+ULONG LlbEnvHwMemSize = 0;
+ULONG LlbEnvRamDiskStart = 0;
+ULONG LlbEnvRamDiskSize = 0;
+ULONG LlbEnvHwRevision;
 CHAR LlbEnvCmdLine[256];
 CHAR LlbValueData[32];
     
@@ -35,11 +36,17 @@
                 LlbEnvHwPageSize = Atag->u.Core.PageSize;
                 break;
                 
+            case ATAG_REVISION:
+
+                /* Save page size */
+                LlbEnvHwRevision = Atag->u.Revision.Rev;
+                break;
+                
             case ATAG_MEM:
             
                 /* Save RAM start and size */
-                LlbEnvHwMemStart = Atag->u.Mem.Start;
-                LlbEnvHwMemSize = Atag->u.Mem.Size;
+                if (!LlbEnvHwMemStart) LlbEnvHwMemStart = Atag->u.Mem.Start;
+                LlbEnvHwMemSize += Atag->u.Mem.Size;
                 break;
                 
             case ATAG_INITRD2:
@@ -48,6 +55,7 @@
                 LlbEnvRamDiskStart = Atag->u.InitRd2.Start;
                 LlbEnvRamDiskSize = Atag->u.InitRd2.Size;
                 
+#ifdef _BEAGLE_
                 /* Make sure it's 16MB-aligned */
                 LlbEnvRamDiskSize = (LlbEnvRamDiskSize + (16 * 1024 * 1024) - 1) 
                                     &~ ((16 * 1024 * 1024) - 1);
@@ -55,6 +63,7 @@
                 /* The RAMDISK actually starts 16MB later */
                 LlbEnvRamDiskStart += 16 * 1024 * 1024;
                 LlbEnvRamDiskSize  -= 16 * 1024 * 1024;
+#endif
                 break;
                 
             case ATAG_CMDLINE:
@@ -68,7 +77,7 @@
             /* Nothing left to handle */
             case ATAG_NONE:
             default:
-                return;
+                break;
         }
         
         /* Next tag */
@@ -76,8 +85,11 @@
     }
     
     /* For debugging */
-    DbgPrint("[BOOTROM] PageSize: %dKB RAM: %dMB CMDLINE: %s\n",
-             LlbEnvHwPageSize / 1024, LlbEnvHwMemSize / 1024 / 1024, LlbEnvCmdLine);
+    DbgPrint("[BOOTROM] Board Revision: %lx PageSize: %dKB RAM: %dMB CMDLINE: %s\n"
+             "[RAMDISK] Base: %lx Size: %dMB\n",
+             LlbEnvHwRevision,
+             LlbEnvHwPageSize / 1024, LlbEnvHwMemSize / 1024 / 1024, LlbEnvCmdLine,
+             LlbEnvRamDiskStart, LlbEnvRamDiskSize / 1024 / 1024);
 }
 
 VOID




More information about the Ros-diffs mailing list