From lyons_dj at yahoo.com Fri Mar 1 19:46:07 2019 From: lyons_dj at yahoo.com (Jd Lyons) Date: Fri, 1 Mar 2019 06:46:07 -0500 Subject: [CDG5] HID1 Bit 9 In-Reply-To: <8986C37F-B812-42A3-BD0D-FBC53E3A27CA@fastmail.com> References: <7A13020C-5FE0-4EE9-8B0E-EF509ADA525A@yahoo.com> <650C0EC8-52C6-4DD7-8A3D-2933938F1CDE@yahoo.com> <6FE933A3-363C-4129-9D11-EDC947D5939A@fastmail.com> <16A7711A-AD49-465C-BC14-4896D514F5A8@yahoo.com> <24ED10B4-5996-470A-9537-0A65A27C8649@fastmail.com> <8FE5D4C9-511A-41ED-946F-248E50D849C6@yahoo.com> <8986C37F-B812-42A3-BD0D-FBC53E3A27CA@fastmail.com> Message-ID: <4B7C7A12-47F9-460A-B8D0-18A53908226E@yahoo.com> 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 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 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 wrote: >>> >>> git show 4f95ec6 >> > From lyons_dj at yahoo.com Fri Mar 1 23:01:05 2019 From: lyons_dj at yahoo.com (Jd Lyons) Date: Fri, 1 Mar 2019 10:01:05 -0500 Subject: [CDG5] HID1 Bit 9 In-Reply-To: <78B0B99A-A669-4E77-9732-FD5E867805F4@fastmail.com> References: <7A13020C-5FE0-4EE9-8B0E-EF509ADA525A@yahoo.com> <650C0EC8-52C6-4DD7-8A3D-2933938F1CDE@yahoo.com> <6FE933A3-363C-4129-9D11-EDC947D5939A@fastmail.com> <16A7711A-AD49-465C-BC14-4896D514F5A8@yahoo.com> <24ED10B4-5996-470A-9537-0A65A27C8649@fastmail.com> <8FE5D4C9-511A-41ED-946F-248E50D849C6@yahoo.com> <8986C37F-B812-42A3-BD0D-FBC53E3A27CA@fastmail.com> <4B7C7A12-47F9-460A-B8D0-18A53908226E@yahoo.com> <78B0B99A-A669-4E77-9732-FD5E867805F4@fastmail.com> Message-ID: <79E61EEA-ED30-427F-974A-A0BCCFE6CA1B@yahoo.com> 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 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 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 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 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 wrote: >>>>> >>>>> git show 4f95ec6 >>>> >>> >> > From donots2006 at yahoo.com.br Tue Mar 5 14:16:56 2019 From: donots2006 at yahoo.com.br (donots donots) Date: Tue, 5 Mar 2019 06:16:56 +0000 (UTC) Subject: [CDG5] Just joined the mailing list References: <840079247.9449210.1551766616052.ref@mail.yahoo.com> Message-ID: <840079247.9449210.1551766616052@mail.yahoo.com> Greetings to everyone. I'm Jubadub, a passionate developer & OS 9 user with close to no knowledge on Classic Mac coding or even overall low-level programming, although I'm here precisely to change that. My current goal is to set up a good environment for compiling the Mac mini G4's newworld Mac OS ROM from Elliot's Github source. Afterwards, I'd like to try tinkering with it. On the side, I have been reading this delicious-tasting guide on PowerPC Assembly...:?http://afturgurluk.org/mirrors/macintosh/www.lightsoft.co.uk_Fantasm/Beginners/begin1.html I'll try asking questions only if they are somehow constructive to everyone, or if I can't figure out something even after a week of banging my head against a wall. Hopefully only the former will take place. :) Nice to join y'all! -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.ucc.gu.uwa.edu.au/pipermail/cdg5/attachments/20190305/262f4307/attachment.htm From elliotnunn at fastmail.com Wed Mar 20 23:16:17 2019 From: elliotnunn at fastmail.com (Elliot Nunn) Date: Wed, 20 Mar 2019 23:16:17 +0800 Subject: [CDG5] BlueBox docs Message-ID: <411223D2-251D-4EBF-92F2-B814A1B0A901@fastmail.com> Hi all, Sorry I've been a bit quiet lately. Things got very busy at uni! The NewWorld, System 7.1 and NanoKernel work will all get some attention eventually. Thought I'd share a bit of fun with you. I have catalogued all the functions in the Blue Abstraction Layer (of the BlueBox), and started to determine their prototypes. https://github.com/elliotnunn/BlueBoxDocs How do you all rate the possibility of hacking together a full-screen BlueBox for G5 machines? Elliot From elliotnunn at fastmail.com Wed Mar 20 23:19:22 2019 From: elliotnunn at fastmail.com (Elliot Nunn) Date: Wed, 20 Mar 2019 23:19:22 +0800 Subject: [CDG5] BlueBox docs In-Reply-To: <411223D2-251D-4EBF-92F2-B814A1B0A901@fastmail.com> References: <411223D2-251D-4EBF-92F2-B814A1B0A901@fastmail.com> Message-ID: <0DF068E8-D72D-4227-BDD7-AB3E08709D60@fastmail.com> I will spend the next month on a General Practice term in rural Western Australia, so there should be some time for quiet contemplation and productive hacking. :D > On 20 Mar 2019, at 11:16 pm, Elliot Nunn wrote: > > Sorry I've been a bit quiet lately. Things got very busy at uni! From elliotnunn at fastmail.com Tue Mar 26 23:28:06 2019 From: elliotnunn at fastmail.com (Elliot Nunn) Date: Tue, 26 Mar 2019 23:28:06 +0800 Subject: [CDG5] Linked patches Message-ID: https://github.com/elliotnunn/lpch They've been harder than I thought. This is a lot like reversing the NewWorld ROM. I need to insert a lot of NOPs and create many placeholder symbols in assembly just to get something I can feed into vbindiff. I expect to make some progress, but even one all the code lines up I do anticipate terrible trouble getting the jump table offsets to build identically. In an analogous situation, with the Process Manager and DAHandler, I got one to match but not (quite) the other. Wish me luck! From elliotnunn at fastmail.com Thu Mar 28 12:53:39 2019 From: elliotnunn at fastmail.com (Elliot Nunn) Date: Thu, 28 Mar 2019 12:53:39 +0800 Subject: [CDG5] Musings on v2 NanoKernel Message-ID: When we get back to reversing the "alternate" Virtual Memory API exposed by the v2 NanoKernel, this might be informative: https://patents.google.com/patent/US5590334 The entire External Reference Specification for NuKernel (c 1993) is included as an appendix. It seems that the later additions to the kernel, which were under-utilised by Mac OS 9, were an increasingly faithful replication of NuKernel mechanisms. From jason.duerstock at gmail.com Thu Mar 28 17:49:28 2019 From: jason.duerstock at gmail.com (Jason Duerstock) Date: Thu, 28 Mar 2019 05:49:28 -0400 Subject: [CDG5] Musings on v2 NanoKernel In-Reply-To: References: Message-ID: Oh wow. That's quite a find. On Thu, Mar 28, 2019 at 12:54 AM Elliot Nunn wrote: > When we get back to reversing the "alternate" Virtual Memory API exposed > by the v2 NanoKernel, this might be informative: > > https://patents.google.com/patent/US5590334 > > The entire External Reference Specification for NuKernel (c 1993) is > included as an appendix. It seems that the later additions to the > kernel, which were under-utilised by Mac OS 9, were an increasingly > faithful replication of NuKernel mechanisms. > _______________________________________________ > cdg5 mailing list > cdg5 at ucc.asn.au > https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5 > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.ucc.gu.uwa.edu.au/pipermail/cdg5/attachments/20190328/1b7627f0/attachment.htm From maximumspatium at googlemail.com Fri Mar 29 20:47:22 2019 From: maximumspatium at googlemail.com (Max Poliakovski) Date: Fri, 29 Mar 2019 13:47:22 +0100 Subject: [CDG5] Musings on v2 NanoKernel In-Reply-To: References: Message-ID: Hi Elliot, I already suspected that Nanokernel v2 could include ideas/pieces from the abandoned NuKernel. It's interesting that the first modernization ideas for the OS/kernel date back to 1994, just right after the official release of the first Power Macs (6100, 7100 and 8100). Another interesting point is that NuKernel working group doesn't include Gary Davidian that wrote the NK v1. What is this "alternate" Virtual Memory API? Anything that goes though "sc" and not through the 68k-ish _VMDispatch (0xFE0A)? BTW: the server http://toddp.com/ that hosted the leaked "System 7.1" source code (that's actually the ROM source for the pre-TNT machines) is down. I hope you've managed to save its content... Cheers Max Am Do., 28. M?rz 2019 um 05:54 Uhr schrieb Elliot Nunn < elliotnunn at fastmail.com>: > When we get back to reversing the "alternate" Virtual Memory API exposed > by the v2 NanoKernel, this might be informative: > > https://patents.google.com/patent/US5590334 > > The entire External Reference Specification for NuKernel (c 1993) is > included as an appendix. It seems that the later additions to the > kernel, which were under-utilised by Mac OS 9, were an increasingly > faithful replication of NuKernel mechanisms. > _______________________________________________ > cdg5 mailing list > cdg5 at ucc.asn.au > https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5 > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.ucc.gu.uwa.edu.au/pipermail/cdg5/attachments/20190329/967c0df7/attachment.htm From elliotnunn at fastmail.com Sat Mar 30 11:34:15 2019 From: elliotnunn at fastmail.com (Elliot Nunn) Date: Sat, 30 Mar 2019 11:34:15 +0800 Subject: [CDG5] Musings on v2 NanoKernel In-Reply-To: References: Message-ID: <4EFBC7DD-00A9-4D2C-AFCE-E62209381257@fastmail.com> I think that Apple's "microkernel phase" might have started even earlier. The ERS appendix in that patent application seems to have a revision history dating back to 1992, and it discusses NuKernel on 68k as well as PowerPC. By the way, has anyone on our list ever *seen* a working NuKernel system? Either Copland, or something more exotic like the early BlueBox. Calling MPFindVictimPage with (r3 | r4) != 0 zeroes KDP.VMMaxVirtualPages. This enables an alternative page fault resolution code path in NKInterrupts.s, and enables the alternative VM call table. (These refer to the powermac-rom tree, which I *still* intend to replace with an improved NanoKernel tree.) To me toddp.com seems to be up still. But fear not, the SuperMario sources are ineradicable. > On 29 Mar 2019, at 8:47 pm, Max Poliakovski wrote: > > Hi Elliot, > > I already suspected that Nanokernel v2 could include ideas/pieces from the abandoned NuKernel. It's interesting that the first modernization ideas for the OS/kernel date back to 1994, just right after the official release of the first Power Macs (6100, 7100 and 8100). Another interesting point is that NuKernel working group doesn't include Gary Davidian that wrote the NK v1. > > What is this "alternate" Virtual Memory API? Anything that goes though "sc" and not through the 68k-ish _VMDispatch (0xFE0A)? > > BTW: the server http://toddp.com/ that hosted the leaked "System 7.1" source code (that's actually the ROM source for the pre-TNT machines) is down. I hope you've managed to save its content... > > Cheers > Max > > Am Do., 28. M?rz 2019 um 05:54 Uhr schrieb Elliot Nunn : > When we get back to reversing the "alternate" Virtual Memory API exposed > by the v2 NanoKernel, this might be informative: > > https://patents.google.com/patent/US5590334 > > The entire External Reference Specification for NuKernel (c 1993) is > included as an appendix. It seems that the later additions to the > kernel, which were under-utilised by Mac OS 9, were an increasingly > faithful replication of NuKernel mechanisms. > _______________________________________________ > cdg5 mailing list > cdg5 at ucc.asn.au > https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5 > _______________________________________________ > cdg5 mailing list > cdg5 at ucc.asn.au > https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5 From fredrikandersson at mac.com Sat Mar 30 16:47:07 2019 From: fredrikandersson at mac.com (Fredrik Andersson) Date: Sat, 30 Mar 2019 09:47:07 +0100 Subject: [CDG5] Musings on v2 NanoKernel In-Reply-To: <4EFBC7DD-00A9-4D2C-AFCE-E62209381257@fastmail.com> References: <4EFBC7DD-00A9-4D2C-AFCE-E62209381257@fastmail.com> Message-ID: <2913A51C-04E6-4D0D-9A91-9D3A2210B8DF@mac.com> Hi, Just to answer the first question- never seen a working Copland installation in person (although I attempted get numerous ?leaks? properly installed none actually successfully booted- believe all of them booted into Mac OS 7.x but all crashed quickly when attempting the Copland boot using caps lock or whatever key required to be held down was depressed) However to add to the discussion, regarding microkernels- keep in mind that Copland was only one of several attempts Apple had to modernize Mac OS and as for microkernels they were a hot topic in the 80s, nukernel was clearly inspired by mach 3 and ironically an mach 3 derative is what powers macOS today :) > 30 mars 2019 kl. 04:34 skrev Elliot Nunn : > > I think that Apple's "microkernel phase" might have started even > earlier. The ERS appendix in that patent application seems to have a > revision history dating back to 1992, and it discusses NuKernel on 68k > as well as PowerPC. > > By the way, has anyone on our list ever *seen* a working NuKernel > system? Either Copland, or something more exotic like the early BlueBox. > > Calling MPFindVictimPage with (r3 | r4) != 0 zeroes > KDP.VMMaxVirtualPages. This enables an alternative page fault resolution > code path in NKInterrupts.s, and enables the alternative VM call table. > (These refer to the powermac-rom tree, which I *still* intend to replace > with an improved NanoKernel tree.) > > To me toddp.com seems to be up still. But fear not, the SuperMario > sources are ineradicable. > >> On 29 Mar 2019, at 8:47 pm, Max Poliakovski wrote: >> >> Hi Elliot, >> >> I already suspected that Nanokernel v2 could include ideas/pieces from the abandoned NuKernel. It's interesting that the first modernization ideas for the OS/kernel date back to 1994, just right after the official release of the first Power Macs (6100, 7100 and 8100). Another interesting point is that NuKernel working group doesn't include Gary Davidian that wrote the NK v1. >> >> What is this "alternate" Virtual Memory API? Anything that goes though "sc" and not through the 68k-ish _VMDispatch (0xFE0A)? >> >> BTW: the server http://toddp.com/ that hosted the leaked "System 7.1" source code (that's actually the ROM source for the pre-TNT machines) is down. I hope you've managed to save its content... >> >> Cheers >> Max >> >> Am Do., 28. M?rz 2019 um 05:54 Uhr schrieb Elliot Nunn : >> When we get back to reversing the "alternate" Virtual Memory API exposed >> by the v2 NanoKernel, this might be informative: >> >> https://patents.google.com/patent/US5590334 >> >> The entire External Reference Specification for NuKernel (c 1993) is >> included as an appendix. It seems that the later additions to the >> kernel, which were under-utilised by Mac OS 9, were an increasingly >> faithful replication of NuKernel mechanisms. >> _______________________________________________ >> cdg5 mailing list >> cdg5 at ucc.asn.au >> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5 >> _______________________________________________ >> cdg5 mailing list >> cdg5 at ucc.asn.au >> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5 > > _______________________________________________ > cdg5 mailing list > cdg5 at ucc.asn.au > https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5