return NULL;
}
+boolean_t
+PE_consistent_debug_lookup_entry(uint64_t record_id, uint64_t *phys_addr, uint64_t *length)
+{
+ assert(phys_addr != NULL);
+ assert(length != NULL);
+
+ for (unsigned int i = 0; i < consistent_debug_registry->top_level_header.num_records; i++) {
+ if (consistent_debug_registry->records[i].record_id == record_id) {
+ *phys_addr = consistent_debug_registry->records[i].physaddr;
+ *length = consistent_debug_registry->records[i].length;
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
int
PE_consistent_debug_inherit(void)
{
DTEntry entryP;
- uintptr_t *prop_data;
+ uintptr_t const *prop_data;
uintptr_t root_pointer = 0;
uint32_t size;
- if ((DTLookupEntry(NULL, "/chosen", &entryP) == kSuccess)) {
- if (DTGetProperty(entryP, "consistent-debug-root", (void **)&prop_data, &size) == kSuccess) {
+ if ((SecureDTLookupEntry(NULL, "/chosen", &entryP) == kSuccess)) {
+ if (SecureDTGetProperty(entryP, "consistent-debug-root", (void const **)&prop_data, &size) == kSuccess) {
root_pointer = prop_data[0];
}
}