Download  Print this page

A-1. Programming Local Apic For Virtual Wire Mode - Intel MultiProcessor Specification

Intel multiprocessor specification
Hide thumbs

Advertisement

;-----------------------------------------------------------------------;
; InitLocalAPIC( )
;-----------------------------------------------------------------------;
;
;
Initialize the local APIC to virtual wire mode.
;
;-----------------------------------------------------------------------;
SVR
equ
LVT1
equ
LVT2
equ
APIC_ENABLED
equ
public
InitLocalAPIC
InitLocalAPIC
proc
push
ds
push
es
push
esi
mov
al,080h
out
070h,al
in
al,021h
push
ax
mov
al,0ffh
out
021h,al
in
al,0a1h
push
ax
mov
al,0ffh
out
0a1h,al
extrn
pmode_on : near
call
pmode_on
;
; The APIC spurious interrupt must point to a vector whose lower
; nibble is 0F, that is 0xF, where x is 0 - F. Here we use Int 00FH,
; which handles spurious interrupts and supplies the necessary IRET.
; This vector is assumed to have already been initialized in memory.
;
; Enable the APIC via SVR and set the spurious interrupt to use Int 00F
;
mov
esi,SVR
mov
eax,[esi]
and
eax,0FFFFFF0FH
or
eax,APIC_ENABLED
mov
[esi],eax
;
; Program LVT1 as ExtInt, which delivers the signal to the INTR signal of all
; processors' cores listed in the destination as an interrupt that originated
; in an externally-connected interrupt controller.
;
Example A-1. Programming Local APIC for Virtual Wire Mode
Version 1.4
0FEE000F0H
0FEE00350H
0FEE00360H
000000100H
near
; save regs used for APIC init
; ensure NMI disabled
; read primary imr
; save settings
; mask all off
; read secondary imr
; save settings
; mask all off
; switch into real big mode
; read SVR
; clear spurious vector (use vector
00FH)
; bit 8 = 1
; write SVR
System BIOS Programming Guidelines
;
;
;
;
A-3

Advertisement

loading

  Related Manuals for Intel MultiProcessor