software/libbase/id: update code (length is now fixed to 256)
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 6 Jul 2019 15:18:34 +0000 (17:18 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 6 Jul 2019 15:18:34 +0000 (17:18 +0200)
litex/soc/software/libbase/id.c

index 6d1c334e1dbf3830f40374500ef202591914b8fe..d380f4976dd434467c194668cdcfff944f8c38e0 100644 (file)
@@ -8,12 +8,9 @@
 void get_ident(char *ident)
 {
 #ifdef CSR_IDENTIFIER_MEM_BASE
-    int len, i;
-    
-    len = MMPTR(CSR_IDENTIFIER_MEM_BASE);
-    for(i=0;i<len;i++)
+    int i;
+    for(i=0;i<256;i++)
         ident[i] = MMPTR(CSR_IDENTIFIER_MEM_BASE + 4*i);
-    ident[i] = 0;
 #else
     ident[0] = 0;
 #endif