X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cpu%2Fi386%2Fcpu.c;h=5fd37c72a6078fd8b1db611c47af7a275d933826;hb=f060054dadbbe7027ca088eed806a3ef1f82fdb7;hp=669823f946edb1e93086522f5bab6674ea32473e;hpb=2262cfeef91458b01a1bfe3812ccbbfdf8b82807;p=u-boot diff --git a/cpu/i386/cpu.c b/cpu/i386/cpu.c index 669823f946..5fd37c72a6 100644 --- a/cpu/i386/cpu.c +++ b/cpu/i386/cpu.c @@ -1,7 +1,7 @@ /* * (C) Copyright 2002 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se. - * + * * (C) Copyright 2002 * Sysgo Real-Time Solutions, GmbH * Marius Groeger @@ -38,13 +38,18 @@ int cpu_init(void) { + /* initialize FPU, reset EM, set MP and NE */ + asm ("fninit\n" \ + "movl %cr0, %eax\n" \ + "andl $~0x4, %eax\n" \ + "orl $0x22, %eax\n" \ + "movl %eax, %cr0\n" ); + return 0; } int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - extern void reset_cpu(ulong addr); - printf ("resetting ...\n"); udelay(50000); /* wait 50 ms */ disable_interrupts(); @@ -59,4 +64,3 @@ void flush_cache (unsigned long dummy1, unsigned long dummy2) asm("wbinvd\n"); return; } -