Skip to content

Commit

Permalink
OcAppleKernelLib: Fixed PowerTimeoutKernelPanic on 10.15.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Mar 29, 2020
1 parent f6b4ac5 commit e984dc7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ OpenCore Changelog
- Renamed `FwRuntimeServices` driver to `OpenRuntime`
- Renamed `AppleUsbKbDxe` driver to `OpenUsbKbDxe`
- Update builtin firmware
- Fixed `PowerTimeoutKernelPanic` on 10.15.4

#### v0.5.6
- Various improvements to builtin text renderer
Expand Down
29 changes: 29 additions & 0 deletions Debug/Scripts/lldb_uefi.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,35 @@ def usage (self):
def __call__(self, debugger, command, exe_ctx, result):
self.debugger = debugger


category = debugger.GetDefaultCategory()
FormatBool = lldb.SBTypeFormat(lldb.eFormatBoolean)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("BOOLEAN"), FormatBool)

FormatHex = lldb.SBTypeFormat(lldb.eFormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("UINT64"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("INT64"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("UINT32"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("INT32"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("UINT16"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("INT16"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("UINT8"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("INT8"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("UINTN"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("INTN"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("CHAR8"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("CHAR16"), FormatHex)

category.AddTypeFormat(lldb.SBTypeNameSpecifier("EFI_PHYSICAL_ADDRESS"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("PHYSICAL_ADDRESS"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("EFI_STATUS"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("EFI_TPL"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("EFI_LBA"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("EFI_BOOT_MODE"), FormatHex)
category.AddTypeFormat(lldb.SBTypeNameSpecifier("EFI_FV_FILETYPE"), FormatHex)



args = shlex.split(command)
try:
opts, args = getopt.getopt(args, "o", ["offset-by-headers"])
Expand Down
8 changes: 4 additions & 4 deletions Library/OcAppleKernelLib/CommonPatches.c
Original file line number Diff line number Diff line change
Expand Up @@ -1438,15 +1438,15 @@ PatchLapicKernelPanic (
STATIC
UINT8
mPowerStateTimeoutPanicFind[] = {
// com.apple\0__kernel__\0
0x63, 0x6F, 0x6D, 0x2E, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x00, 0x5F, 0x5F, 0x6B, 0x65, 0x72, 0x6E, 0x65, 0x6C, 0x5F, 0x5F, 0x00
// com.apple\0
0x63, 0x6F, 0x6D, 0x2E, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x00
};

STATIC
UINT8
mPowerStateTimeoutPanicReplace[] = {
// not.apple\0__kernel__\0
0x6E, 0x6F, 0x74, 0x2E, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x00, 0x5F, 0x5F, 0x6B, 0x65, 0x72, 0x6E, 0x65, 0x6C, 0x5F, 0x5F, 0x00
// not.apple\0
0x6E, 0x6F, 0x74, 0x2E, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x00
};

STATIC
Expand Down

0 comments on commit e984dc7

Please sign in to comment.