Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
745 B

#define IcacheLineSize 32
void __fc (__int64);
#pragma intrinsic (__fc)
void
PioICacheFlush (
unsigned char *BaseAddress,
unsigned int Length
)
{
unsigned char *EndAddress;
unsigned long NumberOfLines;
if (Length < IcacheLineSize) {
Length = IcacheLineSize;
}
NumberOfLines = Length / IcacheLineSize;
if (Length % IcacheLineSize != 0) {
NumberOfLines = NumberOfLines+1;
}
EndAddress = (unsigned char *)(BaseAddress)+(NumberOfLines * IcacheLineSize);
do {
__fc((__int64)BaseAddress);
BaseAddress += IcacheLineSize;
} while (BaseAddress < EndAddress);
__synci();
__isrlz();
}