Lines Matching refs:cstr
32 use cstr::cstr;
84 let addr = cstr!("kernel-address"); in read_kernel_range_from()
85 let size = cstr!("kernel-size"); in read_kernel_range_from()
87 if let Some(config) = fdt.node(cstr!("/config"))? { in read_kernel_range_from()
102 let start = cstr!("linux,initrd-start"); in read_initrd_range_from()
103 let end = cstr!("linux,initrd-end"); in read_initrd_range_from()
119 node.setprop(cstr!("linux,initrd-start"), &start.to_be_bytes())?; in patch_initrd_range()
120 node.setprop(cstr!("linux,initrd-end"), &end.to_be_bytes())?; in patch_initrd_range()
126 if let Some(bootargs) = chosen.getprop_str(cstr!("bootargs"))? { in read_bootargs_from()
141 node.setprop(cstr!("bootargs"), bootargs.to_bytes_with_nul()) in patch_bootargs()
184 fdt.node_mut(cstr!("/memory"))? in patch_memory_range()
186 .setprop_inplace(cstr!("reg"), [addr.to_be(), size.to_be()].as_bytes()) in patch_memory_range()
205 let prop = subnode.getprop_u64(cstr!("opp-hz"))?.ok_or(FdtError::NotFound)?;
237 let Some(cpu_map) = fdt.node(cstr!("/cpus/cpu-map"))? else { in read_cpu_map_from()
252 let cpu = core.getprop_u32(cstr!("cpu"))?.ok_or(FdtError::NotFound)?; in read_cpu_map_from()
271 let mut cpu_nodes = fdt.compatible_nodes(cstr!("arm,armv8"))?;
273 let cpu_capacity = cpu.getprop_u32(cstr!("capacity-dmips-mhz"))?;
274 let opp_phandle = cpu.getprop_u32(cstr!("operating-points-v2"))?;
311 let mut nodes = fdt.compatible_nodes(cstr!("virtual,android-v-only-cpufreq"))?; in read_vcpufreq_info()
349 let oppcompat = cstr!("operating-points-v2");
360 subnode.setprop_inplace(cstr!("opp-hz"), &entry.to_be_bytes())?;
389 const COMPAT: &CStr = cstr!("arm,armv8"); in patch_cpus()
396 cur.setprop_inplace(cstr!("capacity-dmips-mhz"), &cpu_capacity.to_be_bytes())?; in patch_cpus()
416 core_node.setprop_inplace(cstr!("cpu"), &value)?; in patch_cpus()
428 fdt.node_mut(cstr!("/cpus/cpu-map"))?.unwrap().nop()?; in patch_cpus()
438 if let Some(node) = fdt.node(cstr!("/avf/untrusted"))? { in parse_untrusted_props()
455 if let Some(avf_node) = fdt.node(cstr!("/avf"))? { in parse_vm_ref_dt()
470 &[cstr!("compatible"), cstr!("linux,phandle"), cstr!("phandle")]; in validate_untrusted_props()
489 let mut avf_vm_dt = root_vm_dt.add_subnode(cstr!("avf"))?; in validate_vm_ref_dt()
491 let avf_node = vm_ref_dt.node(cstr!("/avf"))?.ok_or(FdtError::NotFound)?; in validate_vm_ref_dt()
550 fdt.compatible_nodes(cstr!("pci-host-cam-generic"))?.next().ok_or(FdtError::NotFound)?; in read_pci_info_from()
556 let irq_masks = node.getprop_cells(cstr!("interrupt-map-mask"))?.ok_or(FdtError::NotFound)?; in read_pci_info_from()
565 let irq_maps = node.getprop_cells(cstr!("interrupt-map"))?.ok_or(FdtError::NotFound)?; in read_pci_info_from()
724 fdt.root_mut().next_compatible(cstr!("pci-host-cam-generic"))?.ok_or(FdtError::NotFound)?; in patch_pci_info()
727 node.trimprop(cstr!("interrupt-map-mask"), irq_masks_size)?; in patch_pci_info()
730 node.trimprop(cstr!("interrupt-map"), irq_maps_size)?; in patch_pci_info()
733 cstr!("ranges"), in patch_pci_info()
750 let mut serial_nodes = fdt.compatible_nodes(cstr!("ns16550a"))?; in read_serial_info_from()
764 let name = cstr!("ns16550a"); in patch_serial_info()
813 fdt.root_mut().next_compatible(cstr!("restricted-dma-pool"))?.ok_or(FdtError::NotFound)?; in patch_swiotlb_info()
817 cstr!("reg"), in patch_swiotlb_info()
821 node.nop_property(cstr!("size"))?; in patch_swiotlb_info()
822 node.nop_property(cstr!("alignment"))?; in patch_swiotlb_info()
824 node.nop_property(cstr!("reg"))?; in patch_swiotlb_info()
825 node.setprop_inplace(cstr!("size"), &swiotlb_info.size.to_be_bytes())?; in patch_swiotlb_info()
826 node.setprop_inplace(cstr!("alignment"), &swiotlb_info.align.unwrap().to_be_bytes())?; in patch_swiotlb_info()
833 let node = fdt.compatible_nodes(cstr!("arm,gic-v3"))?.next().ok_or(FdtError::NotFound)?; in patch_gic()
852 fdt.root_mut().next_compatible(cstr!("arm,gic-v3"))?.ok_or(FdtError::NotFound)?; in patch_gic()
853 node.setprop_inplace(cstr!("reg"), flatten(&value)) in patch_gic()
859 let node = fdt.compatible_nodes(cstr!("arm,armv8-timer"))?.next().ok_or(FdtError::NotFound)?; in patch_timer()
860 let interrupts = node.getprop_cells(cstr!("interrupts"))?.ok_or(FdtError::NotFound)?; in patch_timer()
876 fdt.root_mut().next_compatible(cstr!("arm,armv8-timer"))?.ok_or(FdtError::NotFound)?; in patch_timer()
877 node.setprop_inplace(cstr!("interrupts"), value.as_bytes()) in patch_timer()
881 let avf_node = if let Some(node) = fdt.node_mut(cstr!("/avf"))? { in patch_untrusted_props()
884 fdt.root_mut().add_subnode(cstr!("avf"))? in patch_untrusted_props()
888 let mut node = avf_node.add_subnode(cstr!("untrusted"))?; in patch_untrusted_props()
904 let mut node = fdt.node_mut(cstr!("/cpufreq"))?.unwrap(); in patch_vcpufreq()
906 node.setprop_addrrange_inplace(cstr!("reg"), info.addr, info.size) in patch_vcpufreq()
1209 empty_or_delete_prop(&mut chosen, cstr!("avf,strict-boot"), strict_boot)?; in modify_for_next_stage()
1210 empty_or_delete_prop(&mut chosen, cstr!("avf,new-instance"), new_instance)?; in modify_for_next_stage()
1211 chosen.setprop_inplace(cstr!("kaslr-seed"), &kaslr_seed.to_be_bytes())?; in modify_for_next_stage()
1228 let node = fdt.node_mut(cstr!("/reserved-memory"))?.ok_or(libfdt::FdtError::NotFound)?; in patch_dice_node()
1230 let mut node = node.next_compatible(cstr!("google,open-dice"))?.ok_or(FdtError::NotFound)?; in patch_dice_node()
1234 node.setprop_inplace(cstr!("reg"), flatten(&[addr.to_be_bytes(), size.to_be_bytes()])) in patch_dice_node()
1281 if let Some(node) = fdt.node(cstr!("/avf/guest/common"))? { in has_common_debug_policy()
1290 let has_crashkernel = has_common_debug_policy(fdt, cstr!("ramdump"))?; in filter_out_dangerous_bootargs()
1291 let has_console = has_common_debug_policy(fdt, cstr!("log"))?; in filter_out_dangerous_bootargs()
1322 node.setprop(cstr!("bootargs"), new_bootargs.as_slice()) in filter_out_dangerous_bootargs()