Lines Matching refs:bytes

12     fn to_aml_bytes(&self, bytes: &mut Vec<u8>);  in to_aml_bytes()
80 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
81 bytes.append(&mut vec![ZEROOP]); in to_aml_bytes()
90 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
91 bytes.append(&mut vec![ONEOP]); in to_aml_bytes()
100 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
101 bytes.append(&mut vec![ONESOP]); in to_aml_bytes()
113 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
115 bytes.push(b'\\'); in to_aml_bytes()
122 bytes.push(DUALNAMEPREFIX); in to_aml_bytes()
125 bytes.push(MULTINAMEPREFIX); in to_aml_bytes()
126 bytes.push(n as u8); in to_aml_bytes()
131 bytes.append(&mut part.to_vec()); in to_aml_bytes()
163 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
164 bytes.push(BYTEPREFIX); in to_aml_bytes()
165 bytes.push(*self); in to_aml_bytes()
172 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
173 bytes.push(WORDPREFIX); in to_aml_bytes()
174 bytes.append(&mut self.to_le_bytes().to_vec()); in to_aml_bytes()
181 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
182 bytes.push(DWORDPREFIX); in to_aml_bytes()
183 bytes.append(&mut self.to_le_bytes().to_vec()); in to_aml_bytes()
190 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
191 bytes.push(QWORDPREFIX); in to_aml_bytes()
192 bytes.append(&mut self.to_le_bytes().to_vec()); in to_aml_bytes()
198 bytes: Vec<u8>, field
202 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
203 bytes.append(&mut self.bytes.clone()); in to_aml_bytes()
213 let mut bytes = Vec::new(); in new() localVariable
214 bytes.push(NAMEOP); in new()
215 path.to_aml_bytes(&mut bytes); in new()
216 inner.to_aml_bytes(&mut bytes); in new()
217 Name { bytes } in new()
228 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
229 bytes.push(self.children.len() as u8); in to_aml_bytes()
231 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
234 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
237 bytes.insert(0, byte); in to_aml_bytes()
240 bytes.insert(0, PACKAGEOP); in to_aml_bytes()
242 aml.append(&mut bytes); in to_aml_bytes()
336 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
337 self.value.to_aml_bytes(bytes); in to_aml_bytes()
341 fn create_integer(v: usize, bytes: &mut Vec<u8>) { in create_integer()
343 (v as u8).to_aml_bytes(bytes); in create_integer()
345 (v as u16).to_aml_bytes(bytes); in create_integer()
347 (v as u32).to_aml_bytes(bytes); in create_integer()
349 (v as u64).to_aml_bytes(bytes); in create_integer()
356 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
357 create_integer(*self, bytes); in to_aml_bytes()
373 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
374 bytes.append(&mut create_aml_string(self)); in to_aml_bytes()
382 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
383 bytes.append(&mut create_aml_string(self)); in to_aml_bytes()
394 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
398 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
402 bytes.push(ENDTAG); in to_aml_bytes()
403 bytes.push(0); /* zero checksum byte */ in to_aml_bytes()
408 bytes.len().to_aml_bytes(&mut buffer_length); in to_aml_bytes()
411 bytes.insert(0, byte); in to_aml_bytes()
415 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
418 bytes.insert(0, byte); in to_aml_bytes()
421 bytes.insert(0, BUFFEROP); in to_aml_bytes()
423 aml.append(&mut bytes); in to_aml_bytes()
453 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
454 bytes.push(MEMORY32FIXEDDESC); /* 32bit Fixed Memory Range Descriptor */ in to_aml_bytes()
455 bytes.append(&mut 9u16.to_le_bytes().to_vec()); in to_aml_bytes()
458 bytes.push(self.read_write as u8); in to_aml_bytes()
459 bytes.append(&mut self.base.to_le_bytes().to_vec()); in to_aml_bytes()
460 bytes.append(&mut self.length.to_le_bytes().to_vec()); in to_aml_bytes()
520 fn push_header(&self, bytes: &mut Vec<u8>, descriptor: u8, length: usize) { in push_header()
521 bytes.push(descriptor); /* Word Address Space Descriptor */ in push_header()
522 bytes.append(&mut (length as u16).to_le_bytes().to_vec()); in push_header()
523 bytes.push(self.type_ as u8); /* type */ in push_header()
525 bytes.push(generic_flags); in push_header()
526 bytes.push(self.type_flags); in push_header()
531 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
533 bytes, in to_aml_bytes()
538 bytes.append(&mut 0u16.to_le_bytes().to_vec()); /* Granularity */ in to_aml_bytes()
539 bytes.append(&mut self.min.to_le_bytes().to_vec()); /* Min */ in to_aml_bytes()
540 bytes.append(&mut self.max.to_le_bytes().to_vec()); /* Max */ in to_aml_bytes()
541 bytes.append(&mut 0u16.to_le_bytes().to_vec()); /* Translation */ in to_aml_bytes()
543 bytes.append(&mut len.to_le_bytes().to_vec()); /* Length */ in to_aml_bytes()
548 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
550 bytes, in to_aml_bytes()
555 bytes.append(&mut 0u32.to_le_bytes().to_vec()); /* Granularity */ in to_aml_bytes()
556 bytes.append(&mut self.min.to_le_bytes().to_vec()); /* Min */ in to_aml_bytes()
557 bytes.append(&mut self.max.to_le_bytes().to_vec()); /* Max */ in to_aml_bytes()
558 bytes.append(&mut 0u32.to_le_bytes().to_vec()); /* Translation */ in to_aml_bytes()
560 bytes.append(&mut len.to_le_bytes().to_vec()); /* Length */ in to_aml_bytes()
565 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
567 bytes, in to_aml_bytes()
572 bytes.append(&mut 0u64.to_le_bytes().to_vec()); /* Granularity */ in to_aml_bytes()
573 bytes.append(&mut self.min.to_le_bytes().to_vec()); /* Min */ in to_aml_bytes()
574 bytes.append(&mut self.max.to_le_bytes().to_vec()); /* Max */ in to_aml_bytes()
575 bytes.append(&mut 0u64.to_le_bytes().to_vec()); /* Translation */ in to_aml_bytes()
577 bytes.append(&mut len.to_le_bytes().to_vec()); /* Length */ in to_aml_bytes()
602 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
603 bytes.push(IOPORTDESC); /* IO Port Descriptor */ in to_aml_bytes()
604 bytes.push(1); /* IODecode16 */ in to_aml_bytes()
605 bytes.append(&mut self.min.to_le_bytes().to_vec()); in to_aml_bytes()
606 bytes.append(&mut self.max.to_le_bytes().to_vec()); in to_aml_bytes()
607 bytes.push(self.alignment); in to_aml_bytes()
608 bytes.push(self.length); in to_aml_bytes()
641 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
642 bytes.push(EXTIRQDESC); /* Extended IRQ Descriptor */ in to_aml_bytes()
643 bytes.append(&mut 6u16.to_le_bytes().to_vec()); in to_aml_bytes()
648 bytes.push(flags); in to_aml_bytes()
649 bytes.push(1u8); /* count */ in to_aml_bytes()
650 bytes.append(&mut self.number.to_le_bytes().to_vec()); in to_aml_bytes()
662 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
663 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
665 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
668 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
671 bytes.insert(0, byte); in to_aml_bytes()
674 bytes.insert(0, DEVICEOP); /* DeviceOp */ in to_aml_bytes()
675 bytes.insert(0, EXTOPPREFIX); /* ExtOpPrefix */ in to_aml_bytes()
676 aml.append(&mut bytes) in to_aml_bytes()
695 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
696 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
698 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
701 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
704 bytes.insert(0, byte); in to_aml_bytes()
707 bytes.insert(0, SCOPEOP); in to_aml_bytes()
708 aml.append(&mut bytes) in to_aml_bytes()
741 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
742 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
744 bytes.push(flags); in to_aml_bytes()
746 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
749 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
752 bytes.insert(0, byte); in to_aml_bytes()
755 bytes.insert(0, METHODOP); in to_aml_bytes()
756 aml.append(&mut bytes) in to_aml_bytes()
773 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
774 bytes.push(RETURNOP); in to_aml_bytes()
775 self.value.to_aml_bytes(bytes); in to_aml_bytes()
832 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
833 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
836 bytes.push(flags); in to_aml_bytes()
841 bytes.extend_from_slice(name); in to_aml_bytes()
842 bytes.append(&mut create_pkg_length(&vec![0; *length], false)); in to_aml_bytes()
845 bytes.push(0x0); in to_aml_bytes()
846 bytes.append(&mut create_pkg_length(&vec![0; *length], false)); in to_aml_bytes()
851 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
854 bytes.insert(0, byte); in to_aml_bytes()
857 bytes.insert(0, FIELDOP); in to_aml_bytes()
858 bytes.insert(0, EXTOPPREFIX); in to_aml_bytes()
859 aml.append(&mut bytes) in to_aml_bytes()
900 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
901 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
902 bytes.push(self.space as u8); in to_aml_bytes()
903 self.offset.to_aml_bytes(&mut bytes); /* RegionOffset */ in to_aml_bytes()
904 self.length.to_aml_bytes(&mut bytes); /* RegionLen */ in to_aml_bytes()
905 bytes.insert(0, OPREGIONOP); in to_aml_bytes()
906 bytes.insert(0, EXTOPPREFIX); in to_aml_bytes()
907 aml.append(&mut bytes) in to_aml_bytes()
929 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
930 self.predicate.to_aml_bytes(&mut bytes); in to_aml_bytes()
932 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
935 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
938 bytes.insert(0, byte); in to_aml_bytes()
941 bytes.insert(0, IFOP); in to_aml_bytes()
942 aml.append(&mut bytes) in to_aml_bytes()
960 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
961 bytes.push(LEQUALOP); in to_aml_bytes()
962 self.left.to_aml_bytes(bytes); in to_aml_bytes()
963 self.right.to_aml_bytes(bytes); in to_aml_bytes()
981 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
982 bytes.push(LLESSOP); in to_aml_bytes()
983 self.left.to_aml_bytes(bytes); in to_aml_bytes()
984 self.right.to_aml_bytes(bytes); in to_aml_bytes()
994 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
996 bytes.push(ARG0OP + self.0); in to_aml_bytes()
1006 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1008 bytes.push(LOCAL0OP + self.0); in to_aml_bytes()
1027 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1028 bytes.push(STOREOP); in to_aml_bytes()
1029 self.value.to_aml_bytes(bytes); in to_aml_bytes()
1030 self.name.to_aml_bytes(bytes); in to_aml_bytes()
1048 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1049 bytes.push(EXTOPPREFIX); in to_aml_bytes()
1050 bytes.push(MUTEXOP); in to_aml_bytes()
1051 self.path.to_aml_bytes(bytes); in to_aml_bytes()
1052 bytes.push(self.sync_level); in to_aml_bytes()
1070 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1071 bytes.push(EXTOPPREFIX); in to_aml_bytes()
1072 bytes.push(ACQUIREOP); in to_aml_bytes()
1073 self.mutex.to_aml_bytes(bytes); in to_aml_bytes()
1074 bytes.extend_from_slice(&self.timeout.to_le_bytes()); in to_aml_bytes()
1091 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1092 bytes.push(EXTOPPREFIX); in to_aml_bytes()
1093 bytes.push(RELEASEOP); in to_aml_bytes()
1094 self.mutex.to_aml_bytes(bytes); in to_aml_bytes()
1112 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1113 bytes.push(NOTIFYOP); in to_aml_bytes()
1114 self.object.to_aml_bytes(bytes); in to_aml_bytes()
1115 self.value.to_aml_bytes(bytes); in to_aml_bytes()
1138 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
1139 self.predicate.to_aml_bytes(&mut bytes); in to_aml_bytes()
1141 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
1144 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
1147 bytes.insert(0, byte); in to_aml_bytes()
1150 bytes.insert(0, WHILEOP); in to_aml_bytes()
1151 aml.append(&mut bytes) in to_aml_bytes()
1172 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) {
1173 bytes.push($opcode); /* Op for the binary operator */
1174 self.a.to_aml_bytes(bytes);
1175 self.b.to_aml_bytes(bytes);
1176 self.target.to_aml_bytes(bytes);
1212 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1213 self.name.to_aml_bytes(bytes); in to_aml_bytes()
1215 arg.to_aml_bytes(bytes); in to_aml_bytes()
1234 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
1235 self.data.len().to_aml_bytes(&mut bytes); in to_aml_bytes()
1236 bytes.extend_from_slice(&self.data); in to_aml_bytes()
1238 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
1241 bytes.insert(0, byte); in to_aml_bytes()
1244 bytes.insert(0, BUFFEROP); in to_aml_bytes()
1246 aml.append(&mut bytes) in to_aml_bytes()