|
@@ -248,19 +248,19 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
|
|
#ifdef CONFIG_PARAVIRT
|
|
#ifdef CONFIG_PARAVIRT
|
|
/* This is can only trip for a broken bootloader... */
|
|
/* This is can only trip for a broken bootloader... */
|
|
cmpw $0x207, pa(boot_params + BP_version)
|
|
cmpw $0x207, pa(boot_params + BP_version)
|
|
- jb default_entry
|
|
|
|
|
|
+ jb .Ldefault_entry
|
|
|
|
|
|
/* Paravirt-compatible boot parameters. Look to see what architecture
|
|
/* Paravirt-compatible boot parameters. Look to see what architecture
|
|
we're booting under. */
|
|
we're booting under. */
|
|
movl pa(boot_params + BP_hardware_subarch), %eax
|
|
movl pa(boot_params + BP_hardware_subarch), %eax
|
|
cmpl $num_subarch_entries, %eax
|
|
cmpl $num_subarch_entries, %eax
|
|
- jae bad_subarch
|
|
|
|
|
|
+ jae .Lbad_subarch
|
|
|
|
|
|
movl pa(subarch_entries)(,%eax,4), %eax
|
|
movl pa(subarch_entries)(,%eax,4), %eax
|
|
subl $__PAGE_OFFSET, %eax
|
|
subl $__PAGE_OFFSET, %eax
|
|
jmp *%eax
|
|
jmp *%eax
|
|
|
|
|
|
-bad_subarch:
|
|
|
|
|
|
+.Lbad_subarch:
|
|
WEAK(lguest_entry)
|
|
WEAK(lguest_entry)
|
|
WEAK(xen_entry)
|
|
WEAK(xen_entry)
|
|
/* Unknown implementation; there's really
|
|
/* Unknown implementation; there's really
|
|
@@ -270,14 +270,14 @@ WEAK(xen_entry)
|
|
__INITDATA
|
|
__INITDATA
|
|
|
|
|
|
subarch_entries:
|
|
subarch_entries:
|
|
- .long default_entry /* normal x86/PC */
|
|
|
|
|
|
+ .long .Ldefault_entry /* normal x86/PC */
|
|
.long lguest_entry /* lguest hypervisor */
|
|
.long lguest_entry /* lguest hypervisor */
|
|
.long xen_entry /* Xen hypervisor */
|
|
.long xen_entry /* Xen hypervisor */
|
|
- .long default_entry /* Moorestown MID */
|
|
|
|
|
|
+ .long .Ldefault_entry /* Moorestown MID */
|
|
num_subarch_entries = (. - subarch_entries) / 4
|
|
num_subarch_entries = (. - subarch_entries) / 4
|
|
.previous
|
|
.previous
|
|
#else
|
|
#else
|
|
- jmp default_entry
|
|
|
|
|
|
+ jmp .Ldefault_entry
|
|
#endif /* CONFIG_PARAVIRT */
|
|
#endif /* CONFIG_PARAVIRT */
|
|
|
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
@@ -317,7 +317,7 @@ ENTRY(startup_32_smp)
|
|
call load_ucode_ap
|
|
call load_ucode_ap
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-default_entry:
|
|
|
|
|
|
+.Ldefault_entry:
|
|
#define CR0_STATE (X86_CR0_PE | X86_CR0_MP | X86_CR0_ET | \
|
|
#define CR0_STATE (X86_CR0_PE | X86_CR0_MP | X86_CR0_ET | \
|
|
X86_CR0_NE | X86_CR0_WP | X86_CR0_AM | \
|
|
X86_CR0_NE | X86_CR0_WP | X86_CR0_AM | \
|
|
X86_CR0_PG)
|
|
X86_CR0_PG)
|
|
@@ -347,7 +347,7 @@ default_entry:
|
|
pushfl
|
|
pushfl
|
|
popl %eax # get EFLAGS
|
|
popl %eax # get EFLAGS
|
|
testl $X86_EFLAGS_ID,%eax # did EFLAGS.ID remained set?
|
|
testl $X86_EFLAGS_ID,%eax # did EFLAGS.ID remained set?
|
|
- jz enable_paging # hw disallowed setting of ID bit
|
|
|
|
|
|
+ jz .Lenable_paging # hw disallowed setting of ID bit
|
|
# which means no CPUID and no CR4
|
|
# which means no CPUID and no CR4
|
|
|
|
|
|
xorl %eax,%eax
|
|
xorl %eax,%eax
|
|
@@ -357,13 +357,13 @@ default_entry:
|
|
movl $1,%eax
|
|
movl $1,%eax
|
|
cpuid
|
|
cpuid
|
|
andl $~1,%edx # Ignore CPUID.FPU
|
|
andl $~1,%edx # Ignore CPUID.FPU
|
|
- jz enable_paging # No flags or only CPUID.FPU = no CR4
|
|
|
|
|
|
+ jz .Lenable_paging # No flags or only CPUID.FPU = no CR4
|
|
|
|
|
|
movl pa(mmu_cr4_features),%eax
|
|
movl pa(mmu_cr4_features),%eax
|
|
movl %eax,%cr4
|
|
movl %eax,%cr4
|
|
|
|
|
|
testb $X86_CR4_PAE, %al # check if PAE is enabled
|
|
testb $X86_CR4_PAE, %al # check if PAE is enabled
|
|
- jz enable_paging
|
|
|
|
|
|
+ jz .Lenable_paging
|
|
|
|
|
|
/* Check if extended functions are implemented */
|
|
/* Check if extended functions are implemented */
|
|
movl $0x80000000, %eax
|
|
movl $0x80000000, %eax
|
|
@@ -371,7 +371,7 @@ default_entry:
|
|
/* Value must be in the range 0x80000001 to 0x8000ffff */
|
|
/* Value must be in the range 0x80000001 to 0x8000ffff */
|
|
subl $0x80000001, %eax
|
|
subl $0x80000001, %eax
|
|
cmpl $(0x8000ffff-0x80000001), %eax
|
|
cmpl $(0x8000ffff-0x80000001), %eax
|
|
- ja enable_paging
|
|
|
|
|
|
+ ja .Lenable_paging
|
|
|
|
|
|
/* Clear bogus XD_DISABLE bits */
|
|
/* Clear bogus XD_DISABLE bits */
|
|
call verify_cpu
|
|
call verify_cpu
|
|
@@ -380,7 +380,7 @@ default_entry:
|
|
cpuid
|
|
cpuid
|
|
/* Execute Disable bit supported? */
|
|
/* Execute Disable bit supported? */
|
|
btl $(X86_FEATURE_NX & 31), %edx
|
|
btl $(X86_FEATURE_NX & 31), %edx
|
|
- jnc enable_paging
|
|
|
|
|
|
+ jnc .Lenable_paging
|
|
|
|
|
|
/* Setup EFER (Extended Feature Enable Register) */
|
|
/* Setup EFER (Extended Feature Enable Register) */
|
|
movl $MSR_EFER, %ecx
|
|
movl $MSR_EFER, %ecx
|
|
@@ -390,7 +390,7 @@ default_entry:
|
|
/* Make changes effective */
|
|
/* Make changes effective */
|
|
wrmsr
|
|
wrmsr
|
|
|
|
|
|
-enable_paging:
|
|
|
|
|
|
+.Lenable_paging:
|
|
|
|
|
|
/*
|
|
/*
|
|
* Enable paging
|
|
* Enable paging
|
|
@@ -419,7 +419,7 @@ enable_paging:
|
|
*/
|
|
*/
|
|
movb $4,X86 # at least 486
|
|
movb $4,X86 # at least 486
|
|
cmpl $-1,X86_CPUID
|
|
cmpl $-1,X86_CPUID
|
|
- je is486
|
|
|
|
|
|
+ je .Lis486
|
|
|
|
|
|
/* get vendor info */
|
|
/* get vendor info */
|
|
xorl %eax,%eax # call CPUID with 0 -> return vendor ID
|
|
xorl %eax,%eax # call CPUID with 0 -> return vendor ID
|
|
@@ -430,7 +430,7 @@ enable_paging:
|
|
movl %ecx,X86_VENDOR_ID+8 # last 4 chars
|
|
movl %ecx,X86_VENDOR_ID+8 # last 4 chars
|
|
|
|
|
|
orl %eax,%eax # do we have processor info as well?
|
|
orl %eax,%eax # do we have processor info as well?
|
|
- je is486
|
|
|
|
|
|
+ je .Lis486
|
|
|
|
|
|
movl $1,%eax # Use the CPUID instruction to get CPU type
|
|
movl $1,%eax # Use the CPUID instruction to get CPU type
|
|
cpuid
|
|
cpuid
|
|
@@ -444,7 +444,7 @@ enable_paging:
|
|
movb %cl,X86_MASK
|
|
movb %cl,X86_MASK
|
|
movl %edx,X86_CAPABILITY
|
|
movl %edx,X86_CAPABILITY
|
|
|
|
|
|
-is486:
|
|
|
|
|
|
+.Lis486:
|
|
movl $0x50022,%ecx # set AM, WP, NE and MP
|
|
movl $0x50022,%ecx # set AM, WP, NE and MP
|
|
movl %cr0,%eax
|
|
movl %cr0,%eax
|
|
andl $0x80000011,%eax # Save PG,PE,ET
|
|
andl $0x80000011,%eax # Save PG,PE,ET
|