• Home
  • Raw
  • Download

Lines Matching refs:bytes

12     fn to_aml_bytes(&self, bytes: &mut Vec<u8>);  in to_aml_bytes()
94 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
95 bytes.append(&mut vec![ZEROOP]); in to_aml_bytes()
104 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
105 bytes.append(&mut vec![ONEOP]); in to_aml_bytes()
114 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
115 bytes.append(&mut vec![ONESOP]); in to_aml_bytes()
127 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
129 bytes.push(b'\\'); in to_aml_bytes()
136 bytes.push(DUALNAMEPREFIX); in to_aml_bytes()
139 bytes.push(MULTINAMEPREFIX); in to_aml_bytes()
140 bytes.push(n as u8); in to_aml_bytes()
145 bytes.append(&mut part.to_vec()); in to_aml_bytes()
177 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
179 0 => ZERO.to_aml_bytes(bytes), in to_aml_bytes()
180 1 => ONE.to_aml_bytes(bytes), in to_aml_bytes()
182 bytes.push(BYTEPREFIX); in to_aml_bytes()
183 bytes.push(*self); in to_aml_bytes()
192 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
194 (*self as Byte).to_aml_bytes(bytes); in to_aml_bytes()
196 bytes.push(WORDPREFIX); in to_aml_bytes()
197 bytes.append(&mut self.to_le_bytes().to_vec()); in to_aml_bytes()
205 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
207 (*self as Word).to_aml_bytes(bytes); in to_aml_bytes()
209 bytes.push(DWORDPREFIX); in to_aml_bytes()
210 bytes.append(&mut self.to_le_bytes().to_vec()); in to_aml_bytes()
218 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
220 (*self as DWord).to_aml_bytes(bytes); in to_aml_bytes()
222 bytes.push(QWORDPREFIX); in to_aml_bytes()
223 bytes.append(&mut self.to_le_bytes().to_vec()); in to_aml_bytes()
230 bytes: Vec<u8>, field
234 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
235 bytes.append(&mut self.bytes.clone()); in to_aml_bytes()
245 let mut bytes = vec![NAMEOP]; in new() localVariable
246 path.to_aml_bytes(&mut bytes); in new()
247 inner.to_aml_bytes(&mut bytes); in new()
248 Name { bytes } in new()
255 let mut bytes: Vec<u8> = Vec::new(); in new_field_name() localVariable
256 bytes.extend_from_slice(field_name.as_bytes()); in new_field_name()
257 Name { bytes } in new_field_name()
268 let mut bytes = vec![self.children.len() as u8]; in to_aml_bytes() localVariable
270 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
273 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
276 bytes.insert(0, byte); in to_aml_bytes()
279 bytes.insert(0, PACKAGEOP); in to_aml_bytes()
281 aml.append(&mut bytes); in to_aml_bytes()
299 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
300 self.data.to_aml_bytes(&mut bytes); in to_aml_bytes()
302 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
305 bytes.insert(0, byte); in to_aml_bytes()
308 bytes.insert(0, VARPACKAGEOP); in to_aml_bytes()
310 aml.append(&mut bytes) in to_aml_bytes()
404 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
405 self.value.to_aml_bytes(bytes); in to_aml_bytes()
412 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
414 (*self as u16).to_aml_bytes(bytes); in to_aml_bytes()
416 (*self as u32).to_aml_bytes(bytes); in to_aml_bytes()
418 (*self as u64).to_aml_bytes(bytes); in to_aml_bytes()
433 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
434 bytes.append(&mut create_aml_string(self)); in to_aml_bytes()
442 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
443 bytes.append(&mut create_aml_string(self)); in to_aml_bytes()
454 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
458 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
462 bytes.push(ENDTAG); in to_aml_bytes()
463 bytes.push(0); /* zero checksum byte */ in to_aml_bytes()
468 bytes.len().to_aml_bytes(&mut buffer_length); in to_aml_bytes()
471 bytes.insert(0, byte); in to_aml_bytes()
475 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
478 bytes.insert(0, byte); in to_aml_bytes()
481 bytes.insert(0, BUFFEROP); in to_aml_bytes()
483 aml.append(&mut bytes); in to_aml_bytes()
513 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
514 bytes.push(MEMORY32FIXEDDESC); /* 32bit Fixed Memory Range Descriptor */ in to_aml_bytes()
515 bytes.append(&mut 9u16.to_le_bytes().to_vec()); in to_aml_bytes()
518 bytes.push(self.read_write as u8); in to_aml_bytes()
519 bytes.append(&mut self.base.to_le_bytes().to_vec()); in to_aml_bytes()
520 bytes.append(&mut self.length.to_le_bytes().to_vec()); in to_aml_bytes()
580 fn push_header(&self, bytes: &mut Vec<u8>, descriptor: u8, length: usize) { in push_header()
581 bytes.push(descriptor); /* Word Address Space Descriptor */ in push_header()
582 bytes.append(&mut (length as u16).to_le_bytes().to_vec()); in push_header()
583 bytes.push(self.type_ as u8); /* type */ in push_header()
585 bytes.push(generic_flags); in push_header()
586 bytes.push(self.type_flags); in push_header()
591 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
593 bytes, in to_aml_bytes()
598 bytes.append(&mut 0u16.to_le_bytes().to_vec()); /* Granularity */ in to_aml_bytes()
599 bytes.append(&mut self.min.to_le_bytes().to_vec()); /* Min */ in to_aml_bytes()
600 bytes.append(&mut self.max.to_le_bytes().to_vec()); /* Max */ in to_aml_bytes()
601 bytes.append(&mut 0u16.to_le_bytes().to_vec()); /* Translation */ in to_aml_bytes()
603 bytes.append(&mut len.to_le_bytes().to_vec()); /* Length */ in to_aml_bytes()
608 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
610 bytes, in to_aml_bytes()
615 bytes.append(&mut 0u32.to_le_bytes().to_vec()); /* Granularity */ in to_aml_bytes()
616 bytes.append(&mut self.min.to_le_bytes().to_vec()); /* Min */ in to_aml_bytes()
617 bytes.append(&mut self.max.to_le_bytes().to_vec()); /* Max */ in to_aml_bytes()
618 bytes.append(&mut 0u32.to_le_bytes().to_vec()); /* Translation */ in to_aml_bytes()
620 bytes.append(&mut len.to_le_bytes().to_vec()); /* Length */ in to_aml_bytes()
625 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
627 bytes, in to_aml_bytes()
632 bytes.append(&mut 0u64.to_le_bytes().to_vec()); /* Granularity */ in to_aml_bytes()
633 bytes.append(&mut self.min.to_le_bytes().to_vec()); /* Min */ in to_aml_bytes()
634 bytes.append(&mut self.max.to_le_bytes().to_vec()); /* Max */ in to_aml_bytes()
635 bytes.append(&mut 0u64.to_le_bytes().to_vec()); /* Translation */ in to_aml_bytes()
637 bytes.append(&mut len.to_le_bytes().to_vec()); /* Length */ in to_aml_bytes()
662 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
663 bytes.push(IOPORTDESC); /* IO Port Descriptor */ in to_aml_bytes()
664 bytes.push(1); /* IODecode16 */ in to_aml_bytes()
665 bytes.append(&mut self.min.to_le_bytes().to_vec()); in to_aml_bytes()
666 bytes.append(&mut self.max.to_le_bytes().to_vec()); in to_aml_bytes()
667 bytes.push(self.alignment); in to_aml_bytes()
668 bytes.push(self.length); in to_aml_bytes()
701 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
702 bytes.push(EXTIRQDESC); /* Extended IRQ Descriptor */ in to_aml_bytes()
703 bytes.append(&mut 6u16.to_le_bytes().to_vec()); in to_aml_bytes()
708 bytes.push(flags); in to_aml_bytes()
709 bytes.push(1u8); /* count */ in to_aml_bytes()
710 bytes.append(&mut self.number.to_le_bytes().to_vec()); in to_aml_bytes()
722 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
723 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
725 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
728 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
731 bytes.insert(0, byte); in to_aml_bytes()
734 bytes.insert(0, DEVICEOP); /* DeviceOp */ in to_aml_bytes()
735 bytes.insert(0, EXTOPPREFIX); /* ExtOpPrefix */ in to_aml_bytes()
736 aml.append(&mut bytes) in to_aml_bytes()
755 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
756 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
758 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
761 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
764 bytes.insert(0, byte); in to_aml_bytes()
767 bytes.insert(0, SCOPEOP); in to_aml_bytes()
768 aml.append(&mut bytes) in to_aml_bytes()
780 let mut bytes = Vec::new(); in raw() localVariable
781 path.to_aml_bytes(&mut bytes); in raw()
782 bytes.append(&mut children); in raw()
783 let mut pkg_length = create_pkg_length(&bytes, true); in raw()
786 bytes.insert(0, byte); in raw()
788 bytes.insert(0, SCOPEOP); in raw()
789 bytes in raw()
815 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
816 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
818 bytes.push(flags); in to_aml_bytes()
820 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
823 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
826 bytes.insert(0, byte); in to_aml_bytes()
829 bytes.insert(0, METHODOP); in to_aml_bytes()
830 aml.append(&mut bytes) in to_aml_bytes()
897 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
898 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
902 bytes.push(flags); in to_aml_bytes()
907 bytes.extend_from_slice(name); in to_aml_bytes()
908 bytes.append(&mut create_pkg_length(&vec![0; *length], false)); in to_aml_bytes()
911 bytes.push(0x0); in to_aml_bytes()
912 bytes.append(&mut create_pkg_length(&vec![0; *length], false)); in to_aml_bytes()
917 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
920 bytes.insert(0, byte); in to_aml_bytes()
923 bytes.insert(0, FIELDOP); in to_aml_bytes()
924 bytes.insert(0, EXTOPPREFIX); in to_aml_bytes()
925 aml.append(&mut bytes) in to_aml_bytes()
966 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
967 self.path.to_aml_bytes(&mut bytes); in to_aml_bytes()
968 bytes.push(self.space as u8); in to_aml_bytes()
969 self.offset.to_aml_bytes(&mut bytes); /* RegionOffset */ in to_aml_bytes()
970 self.length.to_aml_bytes(&mut bytes); /* RegionLen */ in to_aml_bytes()
971 bytes.insert(0, OPREGIONOP); in to_aml_bytes()
972 bytes.insert(0, EXTOPPREFIX); in to_aml_bytes()
973 aml.append(&mut bytes) in to_aml_bytes()
995 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
996 self.predicate.to_aml_bytes(&mut bytes); in to_aml_bytes()
998 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
1001 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
1004 bytes.insert(0, byte); in to_aml_bytes()
1007 bytes.insert(0, IFOP); in to_aml_bytes()
1008 aml.append(&mut bytes) in to_aml_bytes()
1026 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
1028 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
1031 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
1034 bytes.insert(0, byte); in to_aml_bytes()
1037 bytes.insert(0, ELSEOP); in to_aml_bytes()
1038 aml.append(&mut bytes) in to_aml_bytes()
1058 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) {
1060 bytes.push(LNOTOP);
1062 bytes.push($opcode);
1063 self.left.to_aml_bytes(bytes);
1064 self.right.to_aml_bytes(bytes);
1083 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1085 bytes.push(ARG0OP + self.0); in to_aml_bytes()
1095 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1097 bytes.push(LOCAL0OP + self.0); in to_aml_bytes()
1116 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1117 bytes.push(STOREOP); in to_aml_bytes()
1118 self.value.to_aml_bytes(bytes); in to_aml_bytes()
1119 self.name.to_aml_bytes(bytes); in to_aml_bytes()
1137 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1138 bytes.push(EXTOPPREFIX); in to_aml_bytes()
1139 bytes.push(MUTEXOP); in to_aml_bytes()
1140 self.path.to_aml_bytes(bytes); in to_aml_bytes()
1141 bytes.push(self.sync_level); in to_aml_bytes()
1159 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1160 bytes.push(EXTOPPREFIX); in to_aml_bytes()
1161 bytes.push(ACQUIREOP); in to_aml_bytes()
1162 self.mutex.to_aml_bytes(bytes); in to_aml_bytes()
1163 bytes.extend_from_slice(&self.timeout.to_le_bytes()); in to_aml_bytes()
1180 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1181 bytes.push(EXTOPPREFIX); in to_aml_bytes()
1182 bytes.push(RELEASEOP); in to_aml_bytes()
1183 self.mutex.to_aml_bytes(bytes); in to_aml_bytes()
1201 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1202 bytes.push(NOTIFYOP); in to_aml_bytes()
1203 self.object.to_aml_bytes(bytes); in to_aml_bytes()
1204 self.value.to_aml_bytes(bytes); in to_aml_bytes()
1227 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
1228 self.predicate.to_aml_bytes(&mut bytes); in to_aml_bytes()
1230 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
1233 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
1236 bytes.insert(0, byte); in to_aml_bytes()
1239 bytes.insert(0, WHILEOP); in to_aml_bytes()
1240 aml.append(&mut bytes) in to_aml_bytes()
1259 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) {
1260 bytes.push($opcode);
1261 self.a.to_aml_bytes(bytes);
1289 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) {
1290 bytes.push($opcode); /* Op for the binary operator */
1291 self.a.to_aml_bytes(bytes);
1292 self.b.to_aml_bytes(bytes);
1293 self.target.to_aml_bytes(bytes);
1333 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) {
1334 bytes.push($opcode); /* Op for the binary operator */
1335 self.a.to_aml_bytes(bytes);
1336 self.target.to_aml_bytes(bytes);
1370 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1371 bytes.push(EXTOPPREFIX); in to_aml_bytes()
1372 bytes.push(CREATEFIELDOP); in to_aml_bytes()
1373 self.source.to_aml_bytes(bytes); in to_aml_bytes()
1374 self.bit_index.to_aml_bytes(bytes); in to_aml_bytes()
1375 self.bit_num.to_aml_bytes(bytes); in to_aml_bytes()
1376 self.name_string.to_aml_bytes(bytes); in to_aml_bytes()
1405 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1406 bytes.push(MIDOP); in to_aml_bytes()
1407 self.source.to_aml_bytes(bytes); in to_aml_bytes()
1408 self.index.to_aml_bytes(bytes); in to_aml_bytes()
1409 self.length.to_aml_bytes(bytes); in to_aml_bytes()
1410 self.result.to_aml_bytes(bytes); in to_aml_bytes()
1428 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1429 self.name.to_aml_bytes(bytes); in to_aml_bytes()
1431 arg.to_aml_bytes(bytes); in to_aml_bytes()
1450 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
1451 self.data.to_aml_bytes(&mut bytes); in to_aml_bytes()
1453 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
1456 bytes.insert(0, byte); in to_aml_bytes()
1459 bytes.insert(0, BUFFEROP); in to_aml_bytes()
1461 aml.append(&mut bytes) in to_aml_bytes()
1479 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
1480 self.data.len().to_aml_bytes(&mut bytes); in to_aml_bytes()
1481 bytes.extend_from_slice(&self.data); in to_aml_bytes()
1483 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
1486 bytes.insert(0, byte); in to_aml_bytes()
1489 bytes.insert(0, BUFFEROP); in to_aml_bytes()
1491 aml.append(&mut bytes) in to_aml_bytes()
1565 fn to_aml_bytes(&self, bytes: &mut Vec<u8>) { in to_aml_bytes()
1566 self.name.to_aml_bytes(bytes) in to_aml_bytes()
1592 let mut bytes = Vec::new(); in to_aml_bytes() localVariable
1595 self.name.to_aml_bytes(&mut bytes); in to_aml_bytes()
1597 bytes.push(self.level); in to_aml_bytes()
1600 bytes.push(orders[0]); in to_aml_bytes()
1601 bytes.push(orders[1]); in to_aml_bytes()
1604 child.to_aml_bytes(&mut bytes); in to_aml_bytes()
1608 let mut pkg_length = create_pkg_length(&bytes, true); in to_aml_bytes()
1611 bytes.insert(0, byte); in to_aml_bytes()
1614 bytes.insert(0, POWERRESOURCEOP); in to_aml_bytes()
1615 bytes.insert(0, EXTOPPREFIX); in to_aml_bytes()
1617 aml.append(&mut bytes); in to_aml_bytes()