[CDG5] HID1 Bit 9
Jd Lyons
lyons_dj at yahoo.com
Fri Mar 1 23:01:05 AWST 2019
Not sure the question, but OS X power management sets bit 9 of HID1 to enter Dramatic Frequency Switching to reduce the cpu speed by 50%, some of the other bits of HID1 also change when we set this bit with ReggieSE, but the system should set these PLL bits automatically depending on the state of bit 9.
DFS doesn’t support 1/4 multipliers, this is why the Emac, iMac and the Mini don’t use DFS. As all models but the 1.5Ghz Mini use x.5 x bus.
Something in the boot rom for portable systems must set DFS mode for early boot, to conserve power. Not really an issue for OS X as the power manager preference file will set the proper mode early in OS X booting, depending on the settings in the energy saver.
I also noted with the iBook G3 750FX by disabling bit 17 in the PRIM_INFO, that it also boots in reduced frequency mode.
> On Mar 1, 2019, at 8:46 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>
> I’ll have a look. Under what circumstances does this bit get set by the architecture?
>
>> On 1 Mar 2019, at 7:46 pm, Jd Lyons <lyons_dj at yahoo.com> wrote:
>>
>> The code I have now is:
>>
>>
>> ; We do this for Apple portable systems to disable DFS mode.
>>
>> mfspr r31, 1009
>> rlwinm r31, r31, 0, 10, 8
>> mtspr 1009, 31
>>
>> But I can’t seem to find a place to insert it that changes anything, seems a good place would be in the NKPowerCalls.s, but I’m unsure where to put it to have it do what we want?
>>
>> BTW, on another note, I was able to insert the ATY,VIA ‘NDRV’ into the Mac OS ROM and get it to load, not really useful, or more useful than the one in the Extension folder, but I also tried it for the NVDA ‘NDRV’ with no success. The NVDA ‘NDRV’ seems to rely on the ResMan, sadly I haven’t figured that all out yet for OS 9.
>>
>>> On Feb 24, 2019, at 9:49 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>>>
>>> Yeah, my reversed sources are a bit average there. This is a better
>>> reversal of an earlier version of the same code:
>>>
>>> https://github.com/elliotnunn/NanoKernel/blob/master/ProcessorInfo.s#L601
>>>
>>> In this much nicer version, are no macros to obscure the purpose of
>>> those bytes: they are a lookup table, to decide which HID0 bit to set
>>> when the upper OS makes a "power" call. They don't affect HID1. In fact,
>>> it's been a while, but I'm pretty sure no version of the NanoKernel ever
>>> touched HID1. You know the history better, but it seems to be a very
>>> late-G4 thing.
>>>
>>> I suspect that you want to slip this into the init code somewhere:
>>>
>>> mfspr r31, 1009 ; HID1
>>> oris r31, r31, 0x0400 ; bit 9
>>> mtspr 1009, r31
>>>
>>> I am seeing a similar error with empw quite frequently. Try trashing
>>> your SourceForEmulator *and* your MPW-VM.dmg, and then running `empw -b`
>>> with no other arguments. If the second disk is mounted in the emulator,
>>> just run `:EasyBuild` (you need to type command-return) from the MPW
>>> window.
>>>
>>> I'm sorry, that repo is a mess. I am progressively reversing every known
>>> NK version in a separate repo that builds much more reliably, but
>>> process is slow.
>>>
>>>> On 24 Feb 2019, at 10:27 pm, Jd Lyons <lyons_dj at yahoo.com> wrote:
>>>>
>>>> Thanks Elliot, still getting some errors trying to get the build going:
>>>>
>>>> + NanoKernel/NanoKernel.s
>>>> ### Set - Too many parameters were specified.
>>>> # Usage - Set [name [value]]
>>>> ### MPW Shell - Execution of EasyBuild terminated.
>>>> ### MPW Shell - Execution of MPW-VM:AutoGenInner terminated.
>>>>
>>>> Please explain what this bit of code does?
>>>>
>>>> It looks like 0x23 is setting bit 10(sleep) bit 14(XAEN) and bit 15(NHR), then something is done with the L2CR.
>>>>
>>>> PflgTblEnt 0x23, HID0_NHR_and_sleep, 1<< hasL2CR | 1<< hasPLRUL1 | 1<< hasTAU | 1<< hasVMX | 1<< hasMSSregs ; 8**3 like 7450 but better
>>>>
>>>> If I wanted to set bit 9 of the HID1 my code would need to be something like:
>>>>
>>>> PflgTblEnt 0x04, HID1_DFS_only, 0
>>>>
>>>> ???
>>>>> On Feb 23, 2019, at 9:08 PM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
>>>>>
>>>>> git show 4f95ec6
>>>>
>>>
>>
>
More information about the cdg5
mailing list