@@ -616,6 +616,25 @@ impl Interpreter {
616
616
let old_scope = mem:: replace ( & mut context. current_scope , new_scope) ;
617
617
context. start_new_block ( BlockKind :: Scope { old_scope } , remaining_length) ;
618
618
}
619
+ Opcode :: Processor => {
620
+ let start_pc = context. current_block . pc ;
621
+ let pkg_length = context. pkglength ( ) ?;
622
+ let name = context. namestring ( ) ?;
623
+ let proc_id = context. next ( ) ?;
624
+ let pblk_address = context. next_u32 ( ) ?;
625
+ let pblk_length = context. next ( ) ?;
626
+
627
+ let remaining_length = pkg_length - ( context. current_block . pc - start_pc) ;
628
+
629
+ let new_scope = name. resolve ( & context. current_scope ) ?;
630
+ let object = Object :: Processor { proc_id, pblk_address, pblk_length } ;
631
+ let mut namespace = self . namespace . lock ( ) ;
632
+ namespace. add_level ( new_scope. clone ( ) , NamespaceLevelKind :: Processor ) ?;
633
+ namespace. insert ( new_scope. clone ( ) , Arc :: new ( object) ) ?;
634
+
635
+ let old_scope = mem:: replace ( & mut context. current_scope , new_scope) ;
636
+ context. start_new_block ( BlockKind :: Scope { old_scope } , remaining_length) ;
637
+ }
619
638
Opcode :: PowerRes => {
620
639
let start_pc = context. current_block . pc ;
621
640
let pkg_length = context. pkglength ( ) ?;
@@ -626,9 +645,10 @@ impl Interpreter {
626
645
let remaining_length = pkg_length - ( context. current_block . pc - start_pc) ;
627
646
628
647
let new_scope = name. resolve ( & context. current_scope ) ?;
648
+ let object = Object :: PowerResource { system_level, resource_order } ;
629
649
let mut namespace = self . namespace . lock ( ) ;
630
650
namespace. add_level ( new_scope. clone ( ) , NamespaceLevelKind :: PowerResource ) ?;
631
- namespace. insert ( new_scope. clone ( ) , Arc :: new ( Object :: PowerResource ) ) ?;
651
+ namespace. insert ( new_scope. clone ( ) , Arc :: new ( object ) ) ?;
632
652
633
653
let old_scope = mem:: replace ( & mut context. current_scope , new_scope) ;
634
654
context. start_new_block ( BlockKind :: Scope { old_scope } , remaining_length) ;
@@ -982,6 +1002,7 @@ impl MethodContext {
982
1002
0x5b80 => Opcode :: OpRegion ,
983
1003
0x5b81 => Opcode :: Field ,
984
1004
0x5b82 => Opcode :: Device ,
1005
+ 0x5b83 => Opcode :: Processor ,
985
1006
0x5b84 => Opcode :: PowerRes ,
986
1007
0x5b85 => Opcode :: ThermalZone ,
987
1008
0x5b86 => Opcode :: IndexField ,
@@ -1232,6 +1253,7 @@ enum Opcode {
1232
1253
OpRegion ,
1233
1254
Field ,
1234
1255
Device ,
1256
+ Processor ,
1235
1257
PowerRes ,
1236
1258
ThermalZone ,
1237
1259
IndexField ,
0 commit comments