Welcome, Guest. Please login or register.

Author Topic: Device unloading from memory  (Read 4316 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline fiat1100dTopic starter

  • Full Member
  • ***
  • Join Date: Nov 2006
  • Posts: 140
    • Show only replies by fiat1100d
    • http://www.gratteri.tk
Device unloading from memory
« on: December 20, 2007, 12:59:01 PM »
Hello!

Is there a software for unloading devices from memory?
I mean, my Apollo 4060 board, even if it has SCSI autoboot disabled, still loads its SCSI device in memory, so software looking at those devices hangs (e.g. MakeCD).

Thanks!
 

Offline meega

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 952
    • Show only replies by meega
Re: Device unloading from memory
« Reply #1 on: December 20, 2007, 01:34:28 PM »
"Assign ?"

It has a DISMOUNT option that can do exactly that to a system-compliant device...
:)
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Device unloading from memory
« Reply #2 on: December 20, 2007, 01:38:38 PM »
assign dismount doesn't remove the device from memory.

Scout (aminet) might (can't check right now) have it, so try that. If it helps, then it is trivial to hack a program that does it at user-startup for example.
 

Offline meega

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 952
    • Show only replies by meega
Re: Device unloading from memory
« Reply #3 on: December 20, 2007, 01:43:08 PM »
Quote

meega wrote:
"Assign ?"

It has a DISMOUNT option that can do exactly that to a system-compliant device...


FLUSH ?
:)
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Device unloading from memory
« Reply #4 on: December 20, 2007, 01:46:19 PM »
@meega
Quote
FLUSH ?

Assign doesn't have a FLUSH option.

Assign can only unlink dosnode from dos.library internal list  (DISMOUNT). It doesn't quit the filesystem, free any memory, and it does not unlink the exec device from exec devicelist.

 

Offline meega

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 952
    • Show only replies by meega
Re: Device unloading from memory
« Reply #5 on: December 20, 2007, 01:47:38 PM »
Beg pardon there, I am getting confused again... I've just booted the A12 and checked on Assign.. No FLUSH.

Ed: it's Avail FLUSH

So Assign to remove it from the system, and then Avail to free the memory.

You know more about the Exec side though Piru. I know little of that.
:)
 

Offline Vulture

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 310
    • Show only replies by Vulture
Re: Device unloading from memory
« Reply #6 on: December 20, 2007, 01:54:04 PM »
Like Piru said and I confirm, Scout will let you see the loaded devices and remove them from mem at will.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Device unloading from memory
« Reply #7 on: December 20, 2007, 01:55:36 PM »
Well, assign is pointless exercise as there is no dos device or volume (as far as I understood). The problem is the lame apollo scsi device-driver that barfs when programs try to probe it for (non-existant) devices.

Well behaving .device does indeed flush out of memory with Avail FLUSH, so that might work. Then again it might fail aswell, as many ROM based devices ignore expunge requests.

If it fails to remove with avail flush, then manual removal is the only option. IIRC Scout can do that. If removing with Scout works, it's rather trivial to hack a program that does the removal automagically. Something along the lines:

Code: [Select]

#include <exec/execbase.h>
#include <proto/exec.h>

extern struct ExecBase *SysBase;

int main(void)
{
  struct Node *device;
  Forbid();
  device = FindName(&SysBase->DeviceList, &quot;whatever.device&quot;);
  if (device)
  {
    Remove(device);
  }
  Permit();
  return 0;
}

The above is rather crude bruteforce solution and it doesn't free any resources taken by the driver, but it does prevent programs from seeing the device, and thus prevent them from attempting to use it.
 

Offline fiat1100dTopic starter

  • Full Member
  • ***
  • Join Date: Nov 2006
  • Posts: 140
    • Show only replies by fiat1100d
    • http://www.gratteri.tk
Re: Device unloading from memory
« Reply #8 on: December 20, 2007, 03:25:31 PM »
Tried with Scout "Remove" option but the device is still there :-(

Will have to try to program an EPROM without the SCSI-Apollo.device code and check if it will boot without the device or won't boot at all.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Device unloading from memory
« Reply #9 on: December 20, 2007, 03:36:30 PM »
What is the device called exactly?
 

Offline fiat1100dTopic starter

  • Full Member
  • ***
  • Join Date: Nov 2006
  • Posts: 140
    • Show only replies by fiat1100d
    • http://www.gratteri.tk
Re: Device unloading from memory
« Reply #10 on: December 20, 2007, 03:57:27 PM »
That is, scsi-apollo.device

If there was the ability of having a ROM with only 68060 compatibility code, without SCSI crap, probably most of my problems would go away.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Device unloading from memory
« Reply #11 on: December 20, 2007, 04:01:07 PM »
 

Offline fiat1100dTopic starter

  • Full Member
  • ***
  • Join Date: Nov 2006
  • Posts: 140
    • Show only replies by fiat1100d
    • http://www.gratteri.tk
Re: Device unloading from memory
« Reply #12 on: December 20, 2007, 04:16:06 PM »
Nothing happens, the device is still there.
Could you try with SCSI-Apollo.device?

This is because I can issue, for example
version scsi-apollo.device
but then the output gives the device name as
SCSI-Apollo.device
with capital letters.
 

Offline fiat1100dTopic starter

  • Full Member
  • ***
  • Join Date: Nov 2006
  • Posts: 140
    • Show only replies by fiat1100d
    • http://www.gratteri.tk
Re: Device unloading from memory
« Reply #13 on: December 20, 2007, 04:23:36 PM »
Tried to program an EPROM without a part of code which seemed to contain the SCSI device... Well the system booted but without Fast RAM too :-o

However by booting with no startup-sequence I was able to check that
version scsi-apollo.device
gives
object not found

so by having a better look at the ROM code I may be able to locate the SCSI device... Having some programming knowledge would be of some help :-D
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Device unloading from memory
« Reply #14 on: December 20, 2007, 05:03:15 PM »
Get the exact name with Scout (ln_Name).