[CDG5] HID1 Bit 9(Solved)
Elliot Nunn
elliotnunn at fastmail.com
Sun Jul 28 17:30:40 AWST 2019
Jd and others,
I have rejigged my Mac mini patches into a Python script can apply them to several different ROM versions (with varying degrees of success).
https://github.com/elliotnunn/tbxi-patches
Has anybody got any info/documentation on the prim-info property? The value that I insert is lifted from (I think) a Power Mac, and should almost certainly be changed to reflect the mini’s capabilities. This might fix some of the ongoing irritations in mini power management.
There was some interest in running set-dfs-high on certain 7447a X-only notebooks to get better performance. (Just to be sure, today I confirmed that this makes no difference on the mini.) Anyone interested in writing a patch for these machines?
Elliot
> On 13 Mar 2019, at 3:19 am, Jd Lyons <lyons_dj at yahoo.com> wrote:
>
> Seems there is an easy way to do this from open firmware.
>
> dev /cpus/@0
> set-dfs-high
>
> That’s it, now spd reports
>
> Trying 10.1.2.3...
> Connected to 10.1.2.3.
> Escape character is '^]'.
> ok
> 0 > dev /cpus/@0 ok
> 0 > spd 139 pll-ratio*2 = 10 HID1 = 80416c80 DelayAACK = 0 GPIO1 = 4 BusClk = 133173483 ok
> 0 > set-dfs-high ok
> 0 > spd 70 pll-ratio*2 = 20 HID1 = 80015c80 DelayAACK = 0 GPIO1 = 7 BusClk = 133173483 ok
> 0 >
>
> So we can call this solved, no need to fix it via the Mac OS ROM, as an nvram script will give use better results.
>
> Thanks for your help Elliot, maybe one day we can figure how to access HID1 from user space in OS 9, so users of 7447a portables can switch on the fly, but for now, set-dos-high or works just fine.
>
> All CPU benchmarks are now 50% faster;-)
>
>
>> 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