i5000: halt second BSP
[coreboot.git] / src / northbridge / intel / i5000 / halt_second_bsp.S
1         /* Save BIST result */
2
3         movl    %eax, %ebp
4
5         /* Read the semaphore register of i5000 (BOFL0).
6            If it returns zero, it means there was already
7            another read by another CPU */
8
9         movl    $0x800080c0, %eax
10         movw    $0xcf8, %dx
11         outl    %eax, %dx
12
13         addw    $4, %dx
14         inl     %dx, %eax
15         cmp     $0, %eax
16         jne     1f
17
18         /* degrade BSP to AP */
19         mov     $0x1b, %ecx
20         rdmsr
21         andl $(~0x100), %eax
22         wrmsr
23
24         cli
25 loop:   hlt
26         jmp     loop
27
28 1:      /* Restore BIST */
29         mov     %ebp, %eax