node = fdt_path_offset((void *)dtb_pa, "/chosen"); if (node < 0) return0;
prop = fdt_getprop_w((void *)dtb_pa, node, "kaslr-seed", &len); if (!prop || len != sizeof(u64)) return0;
ret = fdt64_to_cpu(*prop);
*prop = 0; return ret;
}
/** *fdt_device_is_available-checkifadeviceisavailableforuse * *@fdt:pointertothedevicetreeblob *@node:offsetofthenodewhosepropertytofind * *Returnstrueifthestatuspropertyisabsentorsetto"okay"or"ok", *falseotherwise
*/ staticbool fdt_device_is_available(constvoid *fdt, int node)
{ constchar *status; int statlen;
status = fdt_getprop(fdt, node, "status", &statlen); if (!status) returntrue;
if (statlen > 0) { if (!strcmp(status, "okay") || !strcmp(status, "ok")) returntrue;
}
returnfalse;
}
/* Copy of fdt_nodename_eq_ */ staticint fdt_node_name_eq(constvoid *fdt, int offset, constchar *s)
{ int olen; int len = strlen(s); constchar *p = fdt_get_name(fdt, offset, &olen);
/* Error must contain rv32/64 */ if (strlen(isa_str) < 4) returnfalse;
if (len == 1) {
single_end = strcspn(isa_str, "sSxXzZ"); /* Search for single chars between rv32/64 and multi-letter extensions */ for (i = 4; i < single_end; i++) { if (tolower(isa_str[i]) == ext_name[0]) returntrue;
} returnfalse;
}
/* Skip to start of multi-letter extensions */
isa_str = strpbrk(isa_str, "sSxXzZ"); while (isa_str) { if (strncasecmp(isa_str, ext_name, len) == 0) {
ext_end = isa_str[len]; /* Check if matches the whole extension. */ if (ext_end == '\0' || ext_end == '_') returntrue;
} /* Multi-letter extensions must be split from other multi-letter *extensionswithan"_",theendofamulti-letterextensionwill *eitherbethenullcharacterorthe"_"atthestartofthenext *multi-letterextension.
*/
isa_str = strchr(isa_str, '_'); if (isa_str)
isa_str++;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.