Using PEPs for ACPI services

Hi
Dear my friends
Please have a look at
https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/using-peps-for-acpi-services
It is said that PEPs can be used to provide or override any arbitrary ACPI runtime method.
And a sample project can be found at
https://github.com/microsoft/Windows-driver-samples/tree/master/pofx/PEP
I succeeded in overloading ACPI table with ACPIGenFx. But the overload can be active only when testsigning is on.
The used ssdt is attached.
I wish to do the same thing with PEPs in order to make my driver be able to run when testsigning is off.
But I even failed to test the sample project mentioned above.
After I installed the sample driver, it could be seen in device manager. However when the computer restarts, the computer failed and could startup by recovery.
Even when I modified the source code to a nearly blank device, the computer crashed in the same way.
(Deleted all source code except those for ROOT and SPBD).
The modified code are attached too.
Who can tell me what is the problem? or
Where I can find a tutorial (reference materials) about PEPs?

Thanks a lot.

Tatuo

You very emphatically do not want to write PEP.

Writing a PEP to load your ACPI overrides would be like building a car so you can have a place to sit down. The car comes with a seat… but the seat isn’t the point of having a car and it’s relatively huge cost and complexity.

With all due respect: You aight recall that some of us tried to explain to you, back when you started this project, that what you were doing was not a good idea and that making these ACPI changes is not likely to work. You’re seeing now what we were talking about.

I’m afraid that unless you’re willing to run the systems that have your ACPI changes in test signing mode, or you have the ability to change your BIOS permanently… your plan will not work. At least, I don’t know any way to make it work. And, while not a BIOS expert, I do have some experience with designing and writing product-level ACPI code.

Peter

Also, please note that a PEP can only be used for adding or overriding ACPI methods. I believe your change overrides one of the ACPI declarations to fool PnP into assigning your driver an IRQ. A PEP can’t do that.

Who can tell me what is the problem?

In the head, apparently…

First of all, why are you trying to override ACPI tables, in the first place? Judging from your previous posts, there may be 2 distinct possibilities here

A. You want to assign an IRQ to your driver so that your driver for a VIRTUAL device can handle the physical interrupts

B. You want to claim HPET for your own use so that you can submit NDIS packets at high-precision intervals

We have already explained to you on multiple occasions that

A. Virtual devices just don’t handle interrupts. Full stop

B. Claiming HPET for your own use is not going to lead you anywhere because Windows is not an RTOS, and hence, you cannot do anything
about the jitter that my possibly be introduced by the miniport driver and NDIS library - even if your packet submission timing precision is perfect there is still the possibility of a jitter as far as the network interface is concerned. Furthermore, even if you could work around this part you still would not get a solution to your actual problem because Ethernet is naturally unsuitable for the real-time requirements (unless we are speaking about the Industrial Ethernet protocols that provide hard RT guarantees, of course), so that the entire network infrastructure is just designed for introducing a jitter

Is it so hard to get the above? Which is the part that you cannot understand?

Anton Bassov

Dear Mr. Bassov

Thank you very much.
I would like to explain my work as for the points you fingered out.
A. After I overloaded the SSDT in testsigning mode, my “virtual device” really handles interrupt. It is a fact without doubt.
B. There are Industrial Ethernet protocols which provide hard RT guarantees, at least, for example, EtherCAT.
C. It is said PEP(Power Engin Plugin) can override arbitrary ACPI runtime method. But when I test the sample project, the computer crashes. I wish to know the reason. If it is possible, I wish to find out more about PEPs. That is all.
Is it enough?

Yours sincerely.

Tatuo

After I overloaded the SSDT in testsigning mode, my “virtual device” really handles interrupt. It is a fact without doubt.

I guess anyone who considers helping the OP any further should pay a special attention to the above line, and think carefully whether the whole thing is worth an effort - after all, the OP does not seem to be speaking about the interrupt that is virtualised by XEN/Hyper-V/etc hypervisor, does he. Instead, he seems to be claiming to create a PHYSICAL interrupt source out of absolutely nothing simply by overriding the ACPI tables.

I am out of it for sure…

Anton Bassov

Dear Mr. Bassov

I am sorry.
I do not agree with you.
My interrupt is based on PHYSICAL that is HPET.
I override the ACPI so that I can register an IRQ and get the software resources .
I appreciate your help based on your own kindness and willing.
And I would appreciate all other’s help and kindness too.
And I think this side is used by many and many people over the world. I think many of them have enough knowledge and experience and kindness to help me.

Yours sinceely

My interrupt is based on PHYSICAL that is HPET.
I override the ACPI so that I can register an IRQ and get the software resources .

In your previous post you were claiming that your device was virtual. However, now you claim that you are speaking about HPET (ownership of which can be, indeed, requested by overriding ACPI tables and writing a corresponding .INF file). In other words, how on Earth is one supposed to understand you???

In any case, once we are speaking about HPET, go and read once again why your “sole” ownership of it still does not (and cannot) solve your actual problem of egress packets satisfying your hard RT constraints.

BTW, once we are at it, are you somehow related to Mr.VinayKP? After all, he was (and,apparently,still is) working on a NDIS driver…

Anton Bassov

Dear Mr. Bassov

I am talking about HPET from the begin.
And I have gotten its interrupt when the computer is working in testsigning mode.(ACPI can be overrided using ASL when testsigning is ON.)
I want to make my driver work when testsigning is OFF. (The modified SSDT cannot be active when testsigning is OFF).
It seems that PEPs can override ACPI in runtime when testsigning is OFF.
Then I am searching for information about PEP.
That is all.

Thanks.

Yous Sincerely

You should ignore Anton. He’s just baiting you.

As the documentation clearly states, PEPs can only be used to override ACPI method. ACPI methods are functions that can be triggered through ACPI requests. What you need is not an ACPI method, you need to change an ACPI declaration. A PEP is not going to do it.

There are no Ethernet drivers in Windows that provide hard RT guarantees. It can’t be done, unless you write a hypervisor in which Windows simply runs as one task.

Dear Mr. Roberts

Thank you very much.
I see.

Sincerely yours

You should ignore Anton. He’s just baiting you.

Actually, I don’t . More on it below…

[begin quote]

There are no Ethernet drivers in Windows that provide hard RT guarantees. It can’t be done, unless you write a hypervisor in which Windows simply runs as one task.

[end quote]

If you claim that I am simply baiting the OP why on Earth are you repeating my argument then??? Look - this argument had been presented to the OP right on his original thread by both Mr.Tippet and myself few months ago. The OP seemed to agree with it back then …and still keeps on doing his stuff, despite having had been explained to why his actual problem simply does not have a solution.

I know we were all inexperienced once, but if someone simply does not want to listen he is just bound to stay inexperienced forever, don’t you think. I can assure you that you have simply wasted your post - although the OP says “Thank you for your help, Mr,Roberts; I understand what you mean;etc,etc,etc”, I can assure you that he will keep on repeating this question again and again and again. This is why I am comparing him with VinayKP…

Anton Bassov

Mr. Bassov… turn it down, please. It’s pretty clear to me that your posts aren’t aimed at helping Mr. tatuo… they’re aimed at scolding him. You’ve done that, so… take a deep breath followed by a vacation from this thread.

I do not know why Mr. tatuo has persisted in following the path he has. But I strongly suspect that if one of us could have sat down in a room with him and explained to him that what he wanted to do wouldn’t ever be workable Windows, we could have dissuaded him from his project. We tried to do that via the forum, multiple times, but due to matters of time, experience, culture, language and who knows what else we were not successful. I’m sure we can all learn from this. Somehow.

Peter

Peter,

… take a deep breath followed by a vacation from this thread.

OK, I am going to leave this thread, but what about the next one that Mr.Tatuo starts? I am pretty sure Mr.Tatuo is going to start the new one with exactly the same question pretty shortly. May I bash him a bit on a new thread and make some references to this one without provoking “The Hanging Judge’s” wrath ( as well as the disastrous consequences that this unwise move may potentially have for Mr.Bassov, taking into consideration the “functionality” that this particular hosting platform offers)?

But I strongly suspect that if one of us could have sat down in a room with him and explained to him that what he wanted
to do wouldn’t ever be workable Windows,

Well, something tells me that the only “result” that the"tutor" in question would get from the whole “experience” is the scenario that I described in my reply to Mr.Roberts, i.e. a a total “agreement” with every single word that he says that gets almost immediately followed by yet another thread with the same question…

Anton Bassov