Fix address allocation from source to target during kext injection
@@ -590,7 +590,7 @@ PrelinkedInjectKext (
Context,
&ExecutableContext,
InfoPlistRoot,
- Context->PrelinkedLastAddress,
+ Context->PrelinkedLastLoadAddress,
KmodAddress
);
@@ -637,13 +637,15 @@ PrelinkedInjectKext (
return Status;
}
- if (XmlNodeAppend (Context->KextList, "dict", NULL, NewInfoPlist) == NULL) {
+ if (XmlNodePrepend (Context->KextList, "dict", NULL, NewInfoPlist) == NULL) {
if (PrelinkedKext != NULL) {
InternalFreePrelinkedKext (PrelinkedKext);
}
return EFI_OUT_OF_RESOURCES;
}
+ DEBUG ((DEBUG_WARN, "Result %u\n", XmlNodeChildren (Context->KextList)));
+
//
// Let other kexts depend on this one.
//
