4 FIXME : backup stack in CACHE_AS_RAM into mmx and sse and after we get STACK up, we restore that.
5 It is only needed if we want to go back
8 /* We don't need cache as ram for now on */
11 "orl $(0x1<<30),%eax\n\t"
15 "movl $0x269, %ecx\n\t" /* fix4k_c8000*/
19 #if CONFIG_DCACHE_RAM_SIZE > 0x8000
20 "movl $0x268, %ecx\n\t" /* fix4k_c0000*/
24 /* Set the default memory type and disable fixed and enable variable MTRRs */
25 "movl $0x2ff, %ecx\n\t"
26 // "movl $MTRRdefType_MSR, %ecx\n\t"
28 /* Enable Variable and Disable Fixed MTRRs */
29 "movl $0x00000800, %eax\n\t"
32 #if defined(CLEAR_FIRST_1M_RAM)
33 /* enable caching for first 1M using variable mtrr */
34 "movl $0x200, %ecx\n\t"
36 "movl $(0 | 1), %eax\n\t"
37 // "movl $(0 | MTRR_TYPE_WRCOMB), %eax\n\t"
40 "movl $0x201, %ecx\n\t"
41 "movl $0x0000000f, %edx\n\t" /* AMD 40 bit 0xff*/
42 "movl $((~(( 0 + 0x100000) - 1)) | 0x800), %eax\n\t"
48 "andl $0x9fffffff,%eax\n\t"
50 #if defined(CLEAR_FIRST_1M_RAM)
51 /* clear the first 1M */
54 "movl $(0x100000>>2), %ecx\n\t"
60 "orl $(0x1<<30),%eax\n\t"
63 /* enable caching for first 1M using variable mtrr */
64 "movl $0x200, %ecx\n\t"
66 "movl $(0 | 6), %eax\n\t"
67 // "movl $(0 | MTRR_TYPE_WRBACK), %eax\n\t"
70 "movl $0x201, %ecx\n\t"
71 "movl $0x0000000f, %edx\n\t" /* AMD 40 bit 0xff*/
72 "movl $((~(( 0 + 0x100000) - 1)) | 0x800), %eax\n\t"
77 "andl $0x9fffffff,%eax\n\t"
82 FIXME: I hope we don't need to change esp and ebp value here, so we can restore value from mmx sse back
83 But the problem is the range is some io related, So don't go back