[coreboot] r50 - in trunk/filo-0.5: i386 main

svn at coreboot.org svn at coreboot.org
Mon Aug 4 22:19:53 CEST 2008


Author: stepan
Date: 2008-08-04 22:19:53 +0200 (Mon, 04 Aug 2008)
New Revision: 50

Modified:
   trunk/filo-0.5/i386/linux_load.c
   trunk/filo-0.5/main/elfload.c
Log:
see what's lying around in my old filo tree... Clear out Epia-M PCMCIA
registers so Linux can properly use the onboard CF as a hot plug disk instead
of IDE emulation.


Modified: trunk/filo-0.5/i386/linux_load.c
===================================================================
--- trunk/filo-0.5/i386/linux_load.c	2008-06-22 01:53:33 UTC (rev 49)
+++ trunk/filo-0.5/i386/linux_load.c	2008-08-04 20:19:53 UTC (rev 50)
@@ -15,6 +15,9 @@
 #include <arch/stdint.h>
 #include "context.h"
 #include "segment.h"
+#ifdef PCMCIA_CF
+#include <pci.h>
+#endif
 
 #define DEBUG_THIS DEBUG_LINUXLOAD
 #include <debug.h>
@@ -568,6 +571,10 @@
 #ifdef VGA_CONSOLE
     extern int cursor_x, cursor_y;
 #endif
+#ifdef PCMCIA_CF
+    uint32_t cf_bar;
+    int i;
+#endif
 
     ctx = init_context(phys_to_virt(STACK_LOC), 4096, 0);
 
@@ -607,7 +614,12 @@
     params->orig_x = cursor_x;
     params->orig_y = cursor_y;
 #endif
-    
+#ifdef PCMCIA_CF
+    cf_bar = phys_to_virt(pci_read32(PCI_ADDR(0, 0xa, 1)));
+    for( i = 0x836 ; i < 0x840 ; i++){
+        *(unsigned char *)(cf_bar+i) = 0;
+    }
+#endif
     /* Go... */
     ctx = switch_to(ctx);
 

Modified: trunk/filo-0.5/main/elfload.c
===================================================================
--- trunk/filo-0.5/main/elfload.c	2008-06-22 01:53:33 UTC (rev 49)
+++ trunk/filo-0.5/main/elfload.c	2008-08-04 20:19:53 UTC (rev 50)
@@ -12,6 +12,9 @@
 #include <sys_info.h>
 #include <ipchecksum.h>
 #include <fs.h>
+#ifdef PCMCIA_CF
+#include <pci.h>
+#endif
 #define DEBUG_THIS DEBUG_ELFBOOT
 #include <debug.h>
 
@@ -284,6 +287,10 @@
     Elf_Bhdr *boot_notes = NULL;
     int retval = -1;
     int image_retval;
+#ifdef PCMCIA_CF
+    uint32_t cf_bar;
+    int i;
+#endif
 
     image_name = image_version = 0;
 
@@ -340,6 +347,13 @@
 
     boot_notes = build_boot_notes(info, cmdline);
 
+#if PCMCIA_CF
+    cf_bar = phys_to_virt(pci_read32(PCI_ADDR(0, 0xa, 1)));
+    for( i = 0x836 ; i < 0x840 ; i++){
+        *(unsigned char *)(cf_bar+i) = 0;
+    }
+#endif
+
     debug("current time: %lu\n", currticks());
 
     debug("entry point is %#x\n", ehdr.e_entry);





More information about the coreboot mailing list