HalSetSystemInformation - how to?

Hi all,

I’ve been trying to use HalSetSystemInformation for setting a PMI handler.
i’m using it like this:
HalSetSystemInformation(HalProfileSourceInterruptHandler, sizeof(void*), &PMIHandler);

the problem is that whenever i get this interrupt the OS BSOD with INTERRUPT_EXCEPTION_NOT_HANDLED.

The PMI handler does nothing (returns True).
The interrupt trigger mode is Edge, thus an empty handler should not BSOD.

The signature of the PMI is BOOLEAN PMIHandler(). but i’ve tried several more options… which all results in the same exception.

I also tried constructing an MCA_DRIVER_INFO as stated by MSDN, but the exception callback is called every time (and does NOT BSOD).

i really don’t know what to do, since this function is not well documented.
Would appreciate any help!

thank you!

This function was used on Windows XP and now MS says:

Note Windows Vista and later versions of Windows do not support the type of Machine Check Architecture (MCA) and Machine Check Exception (MCE) reporting that is described in this topic. MCA and MCE reporting are supported through Windows Hardware Error Architecture (WHEA) instead.

I don’t know exactly what it means, but can be these related to your issue ?

Thanks for your reply.

i guess it does solve the problem of not using MCA_DRIVER_INFO, but i still don’t know why using
HalSetSystemInformation(HalProfileSourceInterruptHandler, sizeof(void*),
&PMIHandler);
where PMIHandler is an address of a function (of type void PMIHandler(){}) BSOD…

do i need to register this interrupt handler? i thought that i shouldn’t but maybe i’m wrong.

I tried to reproduce your code, of using HalSetSystemInformation(…&PMIHandler), and I also got BSOD on INTERRUPT_EXCEPTION_NOT_HANDLED.

I imagined it could be the function type, so I changed to BOOL and returned TRUE to the system, but the result was the same.

For sure we`re missing information about how to use this and about function prototype. Does anyone know more about it ?