]> git.sur5r.net Git - u-boot/blobdiff - arch/x86/cpu/cpu.c
x86: ivybridge: Move LPC and PCH init into northbridge probe()
[u-boot] / arch / x86 / cpu / cpu.c
index 1b76ca117ee3df339d981bfe3cde74cbd4a9ee9d..381d83526fbf63612f0fa8d27197a8e8af2fed6a 100644 (file)
@@ -142,7 +142,12 @@ void arch_setup_gd(gd_t *new_gd)
 
        gdt_addr = new_gd->arch.gdt;
 
-       /* CS: code, read/execute, 4 GB, base 0 */
+       /*
+        * CS: code, read/execute, 4 GB, base 0
+        *
+        * Some OS (like VxWorks) requires GDT entry 1 to be the 32-bit CS
+        */
+       gdt_addr[X86_GDT_ENTRY_UNUSED] = GDT_ENTRY(0xc09b, 0, 0xfffff);
        gdt_addr[X86_GDT_ENTRY_32BIT_CS] = GDT_ENTRY(0xc09b, 0, 0xfffff);
 
        /* DS: data, read/write, 4 GB, base 0 */
@@ -394,6 +399,11 @@ int x86_cpu_init_f(void)
                }
        }
 
+#ifdef CONFIG_I8254_TIMER
+       /* Set up the i8254 timer if required */
+       i8254_init();
+#endif
+
        return 0;
 }
 
@@ -636,24 +646,6 @@ int cpu_jump_to_64bit(ulong setup_base, ulong target)
 
 void show_boot_progress(int val)
 {
-#if MIN_PORT80_KCLOCKS_DELAY
-       /*
-        * Scale the time counter reading to avoid using 64 bit arithmetics.
-        * Can't use get_timer() here becuase it could be not yet
-        * initialized or even implemented.
-        */
-       if (!gd->arch.tsc_prev) {
-               gd->arch.tsc_base_kclocks = rdtsc() / 1000;
-               gd->arch.tsc_prev = 0;
-       } else {
-               uint32_t now;
-
-               do {
-                       now = rdtsc() / 1000 - gd->arch.tsc_base_kclocks;
-               } while (now < (gd->arch.tsc_prev + MIN_PORT80_KCLOCKS_DELAY));
-               gd->arch.tsc_prev = now;
-       }
-#endif
        outb(val, POST_PORT);
 }