[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Issue with XHDI
- To: firstname.lastname@example.org
- Subject: Re: [MiNT] Issue with XHDI
- From: David Gálvez <email@example.com>
- Date: Tue, 2 Nov 2010 22:48:17 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=nLsHeXRjkvCkiNdaqSwQTPh3RZgXHmZ3OPKEChfZ1Nk=; b=xwPryIn5BbOtvxXsq7kalc4PudqtuGvCiegOiYk8hP7BS/Fu2njYijF+/tkk9lTN+W 8gSmnDEivKGcpMiyjHO7TASs59gjGeO7lg4DqJrf4B9PcAXAjg+xJT+AGej1ozUddkwk cBnCUdPFmaC+NcCzngTvLpSFArPjaZcZkkMuE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=b7q6zm0J4Adoejfi7dYgRoV9hzS+08+c8bQ/bbb2Q2szEs+uQiHL+KegLFeatMbOcL PMxWrM4LOzBl7hAUXZ1GwZ3142D0z29CEzuN2KEJv8x1e3jemuAT48EoM3qOOBfEn/2h llRXlMS/G6WB/EJyeWgSRe8smdO5/GX3A4cSY=
- In-reply-to: <AANLkTi=dvw8ZQu2v8A1gSAP0KcdaRtopeXjG2pUxGLST@mail.gmail.com>
- List-help: <mailto:firstname.lastname@example.org?Subject=help>
- List-id: <mint.lists.fishpool.fi>
- List-owner: <mailto:email@example.com>
- List-post: <mailto:firstname.lastname@example.org>
- List-subscribe: <mailto:email@example.com?Subject=subscribe>
- List-unsubscribe: <mailto:firstname.lastname@example.org?Subject=unsubscribe>
- References: <AANLkTikBgqAVqw8GrNUKYnDdk7wVuSqgFa2=t1SyEsSd@mail.gmail.com> <AANLkTi=dvw8ZQu2v8A1gSAP0KcdaRtopeXjG2pUxGLST@mail.gmail.com>
- Sender: email@example.com
2010/9/27 David Gálvez <firstname.lastname@example.org>:
> I think the call XHNewCookie is the solution, this call would allow
> the MiNT handle to be on the top of the XHDI chain, unlike the cookie
> substitution method. The XHDI specification says that this call have
> to be tried before changing the cookie.
> Although this call is optional is supported by HDDriver, that sure is
> the most used hard disk driver for Atari, and it could be implemented
> in EmuTOS.
> It could be explained in the documentation that MiNT only allows
> multiple hardisk drivers if they support XHNewCookie.
> Right now the kernel handle doesn't pass this call to the driver.
> This is taken from the sources:
> "/* XHNewCookie and XHMiNTInfo are never allowed */
> if (op == 9 || op == 16)
> return ENOSYS;"
> The best would be to clarify why before modifying this.
I've looked again into this and the reason it looks now very obvious,
MiNT isn't allowing XHNewCookie in his XHDI handle because calls that
go through this handle could come from user application and from the
MiNT point of view none user application should try to install itself
as a driver, so i forget about modifying the code above.
Then to install another XHDI driver with MiNT, i have two options:
1) create a TSR and put it before the kernel in the auto folder.
2) from a kernel module calling XHNewCookie but not through the kernel
XHDI handle but directly as the kernel does with other XHDI functions
in block_io.c, i must see how this can be done from a module.
> 2010/9/24 David Gálvez <email@example.com>:
>> I would like to write about an issue i'm having being not able to
>> install more than one XHDI driver with MiNT.
>> Doing some investigation through the sources i found that MiNT doesn't
>> check if the XHDI cookie has changed like the XHDI specification
>> I have also seen that MiNT installs his own XHDI handler, so it can
>> catch the XHDI calls and emulate them as system calls.
>> Here i found some explanations about why this is done (the links is
>> where this comments come from):
>> "xhdi_emu.spp, xhdi_emu.h, xhdi.c,
>> scsidrv_emu.spp, scsidrv_emu.h, scsidrv.c, scsidrv.h (new):
>> - emulation of these non system call interfaces through systemcalls;
>> necessary for nonblocking DMA operations
>> - added sys_XHDOSLimits for system calls
>> - some enhancements"
>> This is from a virtual memory discussion in this list:
>> "> 1. Disk drivers
>>> Atm. disk drivers (XHDI) live outside the kernel. That means the are hard to
>>> be put into virtual address space.
>> That's why the kernel overwrite the XHDI handler by a system call wrapper.
>> XHDI calls from user space applications are redirected to a system call
>> and handled inside the kernel (privilege checking, restricted to root). So
>> XHDI is no problem."
>> So i would like to ask if there is a method to install a second XHDI
>> device driver that i'm not aware of.
>> I'm trying to install it in a "dirty" way (TSR program) not with a XDD
>> module (may be this is the answer)
>> And if it's not possible discus how can we solve this inconvenient.
>> Sorry for the long post