Implement HlpGetCpuApicId() routine
This commit is contained in:
parent
2c5b680426
commit
2e7793dc2b
@ -133,6 +133,26 @@ HlpCheckX2ApicSupport(VOID)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the local APIC ID of the current processor.
|
||||||
|
*
|
||||||
|
* @return This routine returns the current processor's local APIC ID.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTAPI
|
||||||
|
ULONG
|
||||||
|
HlpGetCpuApicId(VOID)
|
||||||
|
{
|
||||||
|
ULONG ApicId;
|
||||||
|
|
||||||
|
/* Read APIC ID register */
|
||||||
|
ApicId = HlReadApicRegister(APIC_ID);
|
||||||
|
|
||||||
|
/* Return logical CPU ID depending on current APIC mode */
|
||||||
|
return (HlpApicMode == APIC_MODE_COMPAT) ? ((ApicId & 0xFFFFFFFF) >> APIC_XAPIC_LDR_SHIFT) : ApicId;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows an APIC spurious interrupts to end up.
|
* Allows an APIC spurious interrupts to end up.
|
||||||
*
|
*
|
||||||
|
@ -34,6 +34,10 @@ XTAPI
|
|||||||
BOOLEAN
|
BOOLEAN
|
||||||
HlpCheckX2ApicSupport(VOID);
|
HlpCheckX2ApicSupport(VOID);
|
||||||
|
|
||||||
|
XTAPI
|
||||||
|
ULONG
|
||||||
|
HlpGetCpuApicId(VOID);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlpHandleApicSpuriousService(VOID);
|
HlpHandleApicSpuriousService(VOID);
|
||||||
|
@ -34,6 +34,10 @@ XTAPI
|
|||||||
BOOLEAN
|
BOOLEAN
|
||||||
HlpCheckX2ApicSupport(VOID);
|
HlpCheckX2ApicSupport(VOID);
|
||||||
|
|
||||||
|
XTAPI
|
||||||
|
ULONG
|
||||||
|
HlpGetCpuApicId(VOID);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlpHandleApicSpuriousService(VOID);
|
HlpHandleApicSpuriousService(VOID);
|
||||||
|
Loading…
Reference in New Issue
Block a user