HalTranslateBusAddress() always fails for I/O Ports
I can't get HalTranslateBusAddress() to work on Apple systems when my code works well on my Motorola PowerStack. My initial code is:
#ifdef _M_PPC // _M_PPC
pad.QuadPart = 0x0000; // set I/O Port Address 0x0000
uax = 0x01; // set I/O Port Address Space
if( ( HalTranslateBusAddress( Isa, // ISA Bus / I/O Port and
0, // ISA BusNumber 0
pad, // ISA BusAddress
addrof( uax ), // AddressSpace
addrof( pad ) ) ) && //
( 0x00 == uax ) && // Memory AddressSpace and
( pab = sik_io_map( pdx, // Mapped OK ?
pad, //
BIT16, //
TRUE ) ) ) // Add to Cache
sik_io_unmap( pdx, // yes, done for now
pab, //
BIT16 ); //
#endif // _M_PPC
I also added a panel to SIV to clearly show what happens on both systems. Why do you think it works on my PowerStack and fails on Apple please?
I also noticed that the HAL Name is not reported when it is on my PowerStack and every other Windows NT system I have.
I suspect there being no HAL name is down to it not being in the registry, see https://www.vogons.org/viewtopic.php?p=1370618#p1370618
I also feel the CPU Description being Power Macintosh is less than ideal. Were it my code I would lookup the PVR in such as https://gist.github.com/gnzlbg/f4ccfb304b97708c142fd7004df8c761 and set the actual name of the PowerPC CPU.
There is no ISA bus exposed by the HAL, due to there not being one in the actual hardware.
CPU Description being Power Macintosh
this was a placeholder that I never ended up fixing, it comes from the ARC device tree.
Oh! I had expected an ISA bus, is this the case for all Power Macs or just some?
OK about Power Macintosh, after pondering this how about you change it to PowerPC PVR <8 digit PVR> ? With recent Intel CPUs it's such as Intel64 Family 6 Model 85 Stepping 4 so having the PVR seems sensible to me.
What about the missing HAL name? Is Mac99 really the HAL? I feel the Identifier should be the model of the PC, so one of the models listed in https://en.wikipedia.org/wiki/List_of_Mac_models_grouped_by_CPU_type#PowerPC.
Is this the case for all Power Macs
Yes.
Is Mac99 really the HAL?
System name comes from the ARC device tree again and is currently set to "Gossamer" or "Mac99" (chipset names) as placeholder.
System name comes from the ARC device tree again and is currently set to "Gossamer" or "Mac99" (chipset names) as placeholder.
OK, so they are the HAL names and the one being used should be a sub-key of HKLM\HARDWARE\RESOURCEMAP\Hardware Abstraction Layer, do you plan to add it? I suspect once you do it will me reported as the HAL name by Windows NT Diagnostics.