Initialize MXCSR register
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
5eaf7d63a3
commit
c6cadbd655
@ -44,6 +44,10 @@ XTCDECL
|
|||||||
VOID
|
VOID
|
||||||
ArLoadInterruptDescriptorTable(IN PVOID Source);
|
ArLoadInterruptDescriptorTable(IN PVOID Source);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
ArLoadMxcsrRegister(IN ULONG Source);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
ArLoadSegment(IN USHORT Segment,
|
ArLoadSegment(IN USHORT Segment,
|
||||||
|
@ -141,6 +141,25 @@ ArLoadInterruptDescriptorTable(IN PVOID Source)
|
|||||||
: "memory");
|
: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads the value in the source operand into the MXCSR register
|
||||||
|
*
|
||||||
|
* @param Source
|
||||||
|
* Supplies a source value to be loaded into the MXCSR register.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
ArLoadMxcsrRegister(IN ULONG Source)
|
||||||
|
{
|
||||||
|
asm volatile("ldmxcsr %0"
|
||||||
|
:
|
||||||
|
: "m" (Source));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads source data into specified segment.
|
* Loads source data into specified segment.
|
||||||
*
|
*
|
||||||
|
@ -66,6 +66,9 @@ ArInitializeProcessor(VOID)
|
|||||||
|
|
||||||
/* Initialize processor registers */
|
/* Initialize processor registers */
|
||||||
ArpInitializeProcessorRegisters();
|
ArpInitializeProcessorRegisters();
|
||||||
|
|
||||||
|
/* Identify processor */
|
||||||
|
ArpIdentifyProcessor();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -254,6 +257,9 @@ ArpInitializeProcessorRegisters(VOID)
|
|||||||
PatAttributes = (PAT_TYPE_WB << 0) | (PAT_TYPE_USWC << 8) | (PAT_TYPE_WEAK_UC << 16) | (PAT_TYPE_STRONG_UC << 24) |
|
PatAttributes = (PAT_TYPE_WB << 0) | (PAT_TYPE_USWC << 8) | (PAT_TYPE_WEAK_UC << 16) | (PAT_TYPE_STRONG_UC << 24) |
|
||||||
(PAT_TYPE_WB << 32) | (PAT_TYPE_USWC << 40) | (PAT_TYPE_WEAK_UC << 48) | (PAT_TYPE_STRONG_UC << 56);
|
(PAT_TYPE_WB << 32) | (PAT_TYPE_USWC << 40) | (PAT_TYPE_WEAK_UC << 48) | (PAT_TYPE_STRONG_UC << 56);
|
||||||
ArWriteModelSpecificRegister(X86_MSR_PAT, PatAttributes);
|
ArWriteModelSpecificRegister(X86_MSR_PAT, PatAttributes);
|
||||||
|
|
||||||
|
/* Initialize MXCSR register */
|
||||||
|
ArLoadMxcsrRegister(INITIAL_MXCSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user