@@ -58,6 +58,8 @@ impl<H> Interpreter<H>
5858where
5959 H : Handler ,
6060{
61+ // TODO: new_from_tables helper that does `new` and then loads the DSDT + any SSDTs
62+
6163 pub fn new ( handler : H , dsdt_revision : u8 ) -> Interpreter < H > {
6264 info ! ( "Initializing AML interpreter v{}" , env!( "CARGO_PKG_VERSION" ) ) ;
6365 Interpreter {
@@ -272,6 +274,11 @@ where
272274 | Opcode :: LLess => {
273275 self . do_logical_op ( & mut context, op) ?;
274276 }
277+ Opcode :: ToBuffer
278+ | Opcode :: ToDecimalString
279+ | Opcode :: ToHexString
280+ | Opcode :: ToInteger
281+ | Opcode :: ToString => todo ! ( ) ,
275282 Opcode :: Mid => self . do_mid ( & mut context, op) ?,
276283 Opcode :: Concat => self . do_concat ( & mut context, op) ?,
277284 Opcode :: ConcatRes => {
@@ -412,7 +419,6 @@ where
412419 else {
413420 panic ! ( )
414421 } ;
415-
416422 let predicate = predicate. as_integer ( ) ?;
417423 let remaining_then_length = then_length - ( context. current_block . pc - start_pc) ;
418424
@@ -697,6 +703,9 @@ where
697703 */
698704 assert ! ( context. block_stack. len( ) > 0 ) ;
699705
706+ // TODO: I think we can handle VarPackage here as well because by the
707+ // time the block finishes, the first arg should be resolvable (the var
708+ // length) and so can be updated here...
700709 if let Some ( package_op) = context. in_flight . last_mut ( )
701710 && package_op. op == Opcode :: Package
702711 {
@@ -872,6 +881,7 @@ where
872881 Opcode :: Signal => todo ! ( ) ,
873882 Opcode :: Wait => todo ! ( ) ,
874883 Opcode :: Reset => todo ! ( ) ,
884+ Opcode :: Notify => todo ! ( ) ,
875885 Opcode :: FromBCD | Opcode :: ToBCD => context. start_in_flight_op ( OpInFlight :: new ( opcode, 2 ) ) ,
876886 Opcode :: Revision => {
877887 context. contribute_arg ( Argument :: Object ( Arc :: new ( Object :: Integer ( INTERPRETER_REVISION ) ) ) ) ;
@@ -1108,10 +1118,16 @@ where
11081118 context. start_in_flight_op ( OpInFlight :: new ( opcode, 2 ) )
11091119 }
11101120 Opcode :: DerefOf => context. start_in_flight_op ( OpInFlight :: new ( opcode, 1 ) ) ,
1111- Opcode :: Notify => todo ! ( ) ,
11121121 Opcode :: ConcatRes => context. start_in_flight_op ( OpInFlight :: new ( opcode, 3 ) ) ,
11131122 Opcode :: SizeOf => context. start_in_flight_op ( OpInFlight :: new ( opcode, 1 ) ) ,
11141123 Opcode :: Index => context. start_in_flight_op ( OpInFlight :: new ( opcode, 3 ) ) ,
1124+ /*
1125+ * TODO
1126+ * Match is a difficult opcode to parse, as it interleaves dynamic arguments and
1127+ * random bytes that need to be extracted as you go. I think we'll need to use 1+
1128+ * internal in-flight ops to parse the static bytedatas as we go, and then retire
1129+ * the real op at the end.
1130+ */
11151131 Opcode :: Match => todo ! ( ) ,
11161132
11171133 Opcode :: CreateBitField
0 commit comments