Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info. |
Difference between revisions of "NVRAM patch for PowerSurge"
Jump to navigation
Jump to search
(Created page with "<pre> Here is a patch to get NVRAM reads & writes working on PowerSurge again. Index: AppleNVRAM.cpp =================================================================== RCS f...") |
|||
Line 37: | Line 37: | ||
</pre> | </pre> | ||
− | [[Category: | + | [[Category:Troubleshooting]] |
Latest revision as of 22:19, 25 September 2020
Here is a patch to get NVRAM reads & writes working on PowerSurge again. Index: AppleNVRAM.cpp =================================================================== RCS file: /cvs/Darwin/System/xnu/iokit/Drivers/platform/drvAppleNVRAM/AppleNVRAM.cpp, v retrieving revision 1.1.1.2 diff -u -d -b -w -r1.1.1.2 AppleNVRAM.cpp --- AppleNVRAM.cpp 2000/11/30 01:31:47 1.1.1.2 +++ AppleNVRAM.cpp 2001/03/21 01:13:06 @@ -91,9 +91,10 @@ case kNVRAMTypePort: for (cnt = 0; cnt < length; cnt++) { - *_nvramPort = (offset + length) >> 5; + *_nvramPort = (offset + cnt) >> 5; eieio(); - buffer[cnt] = _nvramData[((offset + length) & 0x1F) << 4]; + buffer[cnt] = _nvramData[((offset + cnt) & 0x1F) << 4]; + eieio(); } break; @@ -130,9 +131,9 @@ case kNVRAMTypePort: for (cnt = 0; cnt < length; cnt++) { - *_nvramPort = (offset + length) >> 5; + *_nvramPort = (offset + cnt) >> 5; eieio(); - _nvramData[((offset + length) & 0x1F) << 4] = buffer[cnt]; + _nvramData[((offset + cnt) & 0x1F) << 4] = buffer[cnt]; eieio(); } break;