Damien Zammit, le dim. 18 janv. 2026 03:46:56 +0000, a ecrit: > +start64: > + xorl %eax, %eax > + movw %ax, %ds > + movw %ax, %es > + movw %ax, %fs > + movw %ax, %gs > + movw $KERNEL_DS, %ax > + movw %ax, %ds > + movw %ax, %es > + movw %ax, %ss > + > + /* Get CPU number into rbp */ > + movq $1, %rax
That can be a mere movl, to avoid diverging from the 32b version. (and movl clears the high part anyway) > + /* Enable local apic in xAPIC mode */ > + xorq %rax, %rax > + xorq %rdx, %rdx > + movq $APIC_MSR, %rcx > + rdmsr > + orq $APIC_MSR_ENABLE, %rax > + andq $(~(APIC_MSR_BSP | APIC_MSR_X2APIC)), %rax > + movq $APIC_MSR, %rcx > + wrmsr Just to align on the 32b version to avoid the two to diverge too much: this can all keep with l and %e versions, there is no reason to go 64b here, rd/wrmsr dont. Samuel
