1 //
2 // Copyright (c) 2010-2024 Antmicro
3 //
4 // This file is licensed under the MIT License.
5 // Full license text is available in 'licenses/MIT.txt'.
6 //
7 
8 using Antmicro.Renode.Peripherals.CPU;
9 
10 namespace Antmicro.Renode.Hooks
11 {
12     public static class PSCIHookExtensions
13     {
AddCustomPSCIStub(this ICPUWithPSCI cpu, ulong functionIdentifier, string pythonScript)14         public static void AddCustomPSCIStub(this ICPUWithPSCI cpu, ulong functionIdentifier, string pythonScript)
15         {
16             var engine = new PSCIPythonEngine(cpu, pythonScript, functionIdentifier);
17             cpu.AddCustomPSCIStub(functionIdentifier, engine.Hook);
18         }
19     }
20 }
21 
22