Welcome, Guest. Please login or register.

Author Topic: Local slot autoconfig - how?  (Read 4380 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Local slot autoconfig - how?
« on: August 11, 2011, 06:05:43 AM »
I've got a question about A3000/A4000 local slot autoconfig.

There is no CFGIN/OUT on the 200 pin slot as far as I can tell, so how does the SCSI, etc on CPU cards autoconfig?

It would seem that if you responded to the Z3 autoconfig address as if you were the card currently configuring, then the actual first zorro card would conflict and respond as well.

How is it done?
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: Local slot autoconfig - how?
« Reply #1 on: August 11, 2011, 07:41:30 AM »
There's no AutoConfig since resources are reserved statically, no Z3 involved. CPU card resources outside memory (128 MB) are not visible from the mainboard - there's simply no way to select them. (RAM is required for Z3 DMA to work.)
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: Local slot autoconfig - how?
« Reply #2 on: August 11, 2011, 02:56:50 PM »
Almost every non-Commodore A3000/A4000 CPU card has bootable SCSI so there is a way to do this, I just don't know how Expansion.library picks up on it.

Even if the SCSI was mapped to some reserved static location, how does Expansion.library know where to find the ROM?  To autoboot, Expansion has to be aware of its existence.

Anyone?
 

Offline mongo

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 964
    • Show only replies by mongo
Re: Local slot autoconfig - how?
« Reply #3 on: August 11, 2011, 03:42:02 PM »
CFGIN is just a chip select line mapped to the Zorro II or Zorro III configuration space. You can generate it locally and not pass through access to the configuration space on the motherboard until all of your local devices are configured.
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: Local slot autoconfig - how?
« Reply #4 on: August 11, 2011, 04:08:54 PM »
That's what I'm starting to think as well.

Respond to the autoconfig address locally until my device is configured, then act like the device has been told to shut up and let the motherboard respond instead.
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: Local slot autoconfig - how?
« Reply #5 on: August 11, 2011, 07:02:19 PM »
Actually it's pretty easy.

A Z2/3 SCSI board has two autoconfig components: the logic and the boot ROM. Zorro passes over all boards present and configures them. Then it picks up the boot ROM and lets it link the driver into the system.

A local slot board misses the autoconfig logic (hence no CFGIN / CFGOUT) and just presents the boot ROM to the system (after configuring its hardware through some magic of its own - there's no bus / address space sharing with any other hardware it has to care about).
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: Local slot autoconfig - how?
« Reply #6 on: August 11, 2011, 08:29:37 PM »
It's easy in theory, but there are no documented details on how to do it.  It's easy to say "just add a ROM", but how the heck does it get run?

After talking to Toni Wilen on EAB I'm looking at possibly putting a resident module at 0x00F00000.

Either that or just responding as if its the first zorro card long enough to initialize my ROM.
 

Offline psxphill

Re: Local slot autoconfig - how?
« Reply #7 on: August 11, 2011, 08:55:03 PM »
Quote from: Heiroglyph;654103
It's easy in theory, but there are no documented details on how to do it. It's easy to say "just add a ROM", but how the heck does it get run?

You can either overlay your bootrom so it gets run before kickstart or put rom at 0x00F00000 (I think). From here you can add resident modules in ram that will get picked up later on.
 
It's possible to overlay the autoconfig space with your own hardware until it's configured and then pass the reads/writes on to the main board. It's probably harder to do this though.
 
You could get the board to write resident modules to chip ram.
 
If you're really crazy you can temporarily overlay part of kickstart rom so that when it scans for resident modules then it finds yours too. However you may have compatibility issues with different versions of kickstart.
« Last Edit: August 11, 2011, 09:02:57 PM by psxphill »
 

Offline billt

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 910
    • Show only replies by billt
    • http://www.billtoner.net
Re: Local slot autoconfig - how?
« Reply #8 on: August 11, 2011, 09:08:17 PM »
Quote from: mongo;654073
CFGIN is just a chip select line mapped to the Zorro II or Zorro III configuration space. You can generate it locally and not pass through access to the configuration space on the motherboard until all of your local devices are configured.


I hadn't realized the CPU slot didn't have a CFGOUT. Weird and surprising.

I do think Mongo's solution is easiest. If you have an FPGA sitting between the slot and your CPU, then this is easy to do. If the CPU would be going direct to the slot, you may need some enabled buffer or something in between to prevent the first autoconfig accesses from reaching the motherboard and the first Zorro card. (The FPGA if between slot and CPU would be this enabled buffer in that case) I'm not sure if that would be an enable buffer on the address lines out of the accelerator or some other signal.
Bill T
All Glory to the Hypnotoad!
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: Local slot autoconfig - how?
« Reply #9 on: August 11, 2011, 09:22:29 PM »
There will be an FPGA, so it's pretty flexible.  Id rather not eat into Z3 config space unless I have to, but I absolutely don't want compatibility problems.

It's funny to me that we use CPU cards like this every day for 20 years and we're still not sure how they configure themselves.

You'd think it would be documented somewhere as to what works well and what is a hack.
 

Offline billt

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 910
    • Show only replies by billt
    • http://www.billtoner.net
Re: Local slot autoconfig - how?
« Reply #10 on: August 11, 2011, 09:26:59 PM »
Quote from: Heiroglyph;654078
That's what I'm starting to think as well.

Respond to the autoconfig address locally until my device is configured, then act like the device has been told to shut up and let the motherboard respond instead.


You wouldn't even need to "act like shutup". You could have an accelerator with however many local Autoconfig devices on it, and use the usual CFGOUT/CFGIN chain between them, masking this from the motherboard until the accelerator is done.  Once a device is Autoconfigured, it no longer responds to the Autoconfigure accesses. The first local device is done, and then it ignores Autoconfig accesses. The second local device is given CFGIN signal from the first, and it is the one to respond to Autoconfig, then third, forth, on to whatever N devices are local to the accelerator. All this time Autoconfig needs to be hidden from the motherboard, since the Zorro bus won't know that the accelerator has devices to autoconfig.

Only after all autoconfig devices known on the accelerator are done does the accelerator allow Autoconfig accesses to reach the motherboard, at which point the motherboard thinks it's the first Autoconfig to happen. Accelerator devices are done now, so they ignore all Autoconfig accesses happening with the motherboard.

Before a device is Autoconfigged, the base address of all devices is the Autoconfig base address. There are two of these Autoconfig base addresses, one for Zorro2 devices and one for Zorro3 devices.

As there are two Autoconfig runs, one for Zorro2 and another for Zorro3, choose which your accelerator will be part of. Or which one each of your local accelerator devices will be part of. Theoretically you could have some of each, but that'd probably be an odd thing to do. Choose the one that makes most sense. If you do have some of each, you'll have to trap Zorro2 Autoconfig local until done then pass that one on to the motherboard, and separately trap Zorro3 Autoconfig until done and then pass that on to the motherboard.

After a device has completed Autoconfig, it's base address to respond to changes to that assigned by the OS, so any Autoconfig access won't fit into the device's assigned address range. Nothing terribly special to do here in ignoring an access that doesn't belong to this device.

The CFGOUT/CFGIN chain tells the devices which one is currently up for Autoconfig. If a device is not yet done, and sees it's CFGIN valid, this device knows it's time for it to respond to Autoconfig. All other devices not yet done see their CFGIN as off, and continue waiting for their turn, ignoring Autoconfig accesses until it's their turn to go. At the end of an Autoconfig run for a device, the device turns on its CFGOUT so the next device knows to go on the next Autoconfig access.

The problem at hand is the chain is broken between the Accelerator and the motherboard. Perhaps Commodore didn't intend CPU cards to have local devices to Autoconfig. A strange notion as there had been A2000 Accelerators with Autoconfig memory, or at least hard-coded memory by then. You'd think they'd have seen that as a big hint that Autoconfig on the CPU board is important.

And thus we must trap and mask Autoconfig, keeping it away from the motherboard until the Accelerator knows that everything local is done. The last CFGOUT in the local Accelerator chain means you can now allow Autoconfig to go onto the motherboard.
Bill T
All Glory to the Hypnotoad!
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: Local slot autoconfig - how?
« Reply #11 on: August 11, 2011, 09:40:53 PM »
I'd have thought there's a fast slot device address space select line of some kind (there's _RAMSLOT for the 128 MB expansion) - _RMC? - that selects the devices you bring with you, possibly useful for activating a ROM somewhere up high. Where are those Cyberstorm/whatever ROMs located at?
If it isn't done that way mongo's suggestion sounds nice as long as you don't pass anything serious to the mobo until your stuff is configured. May be a bit of a pain to have that logic dragging along all the time but you can short-circuit it once you're done.

@billt
There's no need to fake Zorro III devices. You'll just have to make sure your ROM 'located up high' is temporarily mapped into Zorro space and initialized. The 'fake' ROM sets up the real one and you have no need to compete for Zorro I/O space at all.
« Last Edit: August 11, 2011, 09:47:29 PM by Zac67 »
 

Offline billt

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 910
    • Show only replies by billt
    • http://www.billtoner.net
Re: Local slot autoconfig - how?
« Reply #12 on: August 11, 2011, 11:07:26 PM »
Quote from: Zac67;654120
I'd have thought there's a fast slot device address space select line of some kind (there's _RAMSLOT for the 128 MB expansion) - _

Is RAMSLOT limited to 128MB? Couldn't faking a Zorro3 Autoconfig give you a couple gigs of local Accelerator RAM mapped to Zorro memory area, and have Autoconfig know about it when doing real Zorro3 boards? Wouldn't that be a useful thing to do? Though I think there's undefined address space above Zorro3 that wouldn't be able to be used this way. (If RAMSLOT is NOT limited to 128MB, then maybe not useful)

I need to find time to actually read through the slot spec. I've looked at bits and pieces, butg that's been a while too.

I think the A2000 has a CFGOUT didn't it? Or do I remember wrong? My service manuals are buried in storage, I'm limited to what my feeble memory gives me. :(
Bill T
All Glory to the Hypnotoad!
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: Local slot autoconfig - how?
« Reply #13 on: August 11, 2011, 11:30:34 PM »
Quote from: billt;654127
Is RAMSLOT limited to 128MB? Couldn't faking a Zorro3 Autoconfig give you a couple gigs of local Accelerator RAM mapped to Zorro memory area, and have Autoconfig know about it when doing real Zorro3 boards? Wouldn't that be a useful thing to do? Though I think there's undefined address space above Zorro3 that wouldn't be able to be used this way. (If RAMSLOT is NOT limited to 128MB, then maybe not useful)

I need to find time to actually read through the slot spec. I've looked at bits and pieces, butg that's been a while too.


The change log for KS3.1 says they expanded the memory check to add an additional 3x256MB, but I haven't tested it on hardware yet.

I'm not planning to use RAMSLOT though, I'd rather decode it myself.

From what I've seen, the Zorro 3 area is actually placed higher than the original spec says anyway, so there is room for 896MB like the changelog says.

Quote

I think the A2000 has a CFGOUT didn't it? Or do I remember wrong? My service manuals are buried in storage, I'm limited to what my feeble memory gives me. :(


Yeah, it did.  Not sure why they removed it on the 3000 other than trying to enforce the suggestion of "storage goes in Zorro, RAM and CPU's go on the local slot".
 

Offline HeiroglyphTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 1100
    • Show only replies by Heiroglyph
Re: Local slot autoconfig - how?
« Reply #14 on: August 12, 2011, 03:25:19 AM »
Interestingly, the Warp Engine 040 seems to be faking Z3 for the SCSI.

It's mapped as the first Zorro3 card in the Z3 address space and its configuration information looks just like a Zorro3 card.

I guess that validates one way of doing it.

Looks like the Cyberstorm MK3 uses the diagnostic ROM area to configure like Toni suggested.

Since pretty much everything has to work with the Cyberstorms and it doesn't take up zorro 3 space, that sounds like the direct, easy way to go.

No weird address changes needed either.
« Last Edit: August 12, 2011, 05:00:41 AM by Heiroglyph »