Rev 2079 | Rev 2697 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2079 | Rev 2692 | ||
|---|---|---|---|
| Line 101... | Line 101... | ||
| 101 | ); |
101 | ); |
| 102 | } |
102 | } |
| 103 | 103 | ||
| 104 | void arch_pre_mm_init(void) |
104 | void arch_pre_mm_init(void) |
| 105 | { |
105 | { |
| 106 | cpu_info_t cpuid_s; |
- | |
| 107 | - | ||
| 108 | cpuid(AMD_CPUID_EXTENDED,&cpuid_s); |
- | |
| 109 | if (! (cpuid_s.cpuid_edx & (1<<AMD_EXT_NOEXECUTE))) |
- | |
| 110 | panic("Processor does not support No-execute pages.\n"); |
- | |
| 111 | - | ||
| 112 | cpuid(INTEL_CPUID_STANDARD,&cpuid_s); |
- | |
| 113 | if (! (cpuid_s.cpuid_edx & (1<<INTEL_FXSAVE))) |
- | |
| 114 | panic("Processor does not support FXSAVE/FXRESTORE.\n"); |
- | |
| 115 | - | ||
| 116 | if (! (cpuid_s.cpuid_edx & (1<<INTEL_SSE2))) |
- | |
| 117 | panic("Processor does not support SSE2 instructions.\n"); |
- | |
| 118 | - | ||
| 119 | /* Enable No-execute pages */ |
106 | /* Enable no-execute pages */ |
| 120 | set_efer_flag(AMD_NXE_FLAG); |
107 | set_efer_flag(AMD_NXE_FLAG); |
| 121 | /* Enable FPU */ |
108 | /* Enable FPU */ |
| 122 | cpu_setup_fpu(); |
109 | cpu_setup_fpu(); |
| 123 | 110 | ||
| 124 | /* Initialize segmentation */ |
111 | /* Initialize segmentation */ |
| 125 | pm_init(); |
112 | pm_init(); |
| 126 | 113 | ||
| 127 | /* Disable I/O on nonprivileged levels |
114 | /* Disable I/O on nonprivileged levels |
| 128 | * clear the NT(nested-thread) flag |
115 | * clear the NT (nested-thread) flag |
| 129 | */ |
116 | */ |
| 130 | clean_IOPL_NT_flags(); |
117 | clean_IOPL_NT_flags(); |
| 131 | /* Disable alignment check */ |
118 | /* Disable alignment check */ |
| 132 | clean_AM_flag(); |
119 | clean_AM_flag(); |
| 133 | 120 | ||