From: "Riley Williams" <Riley@Williams.Name>
To: JinuM <jinum@esntechnologies.co.in>
Cc: linux-8086@vger.kernel.org
Subject: RE: open file in kernel model
Date: Fri, 9 May 2003 08:35:50 +0100 [thread overview]
Message-ID: <BKEGKPICNAKILKJKMHCACEHGCLAA.Riley@Williams.Name> (raw)
In-Reply-To: <AF572D578398634881E52418B28925670EFF33@mail.esn.activedirectory>
Hi Jinu.
> Thanks for the early reply.
NP.
One thing though: Are we talking about the Linux kernel or the ELKS kernel?
I didn't realise originally, but you posted your query to the ELKS list. If
you are indeed referring to Linux, you may wish to remove ELKS from the CC.
> I am not sure of the legal issue you are talking about. We want to use
> it for our device, hence it will not be under public release.
If you don't plan on ever releasing either the device or the driver for
public sale, there's no legal problem whatsoever. However, if at any future
date that situation changes, you would need to deal with the same issues,
largely brought up by the SCO/IBM legal challenge. It is usually better to
assume that such is the case rather than having to scrap your work because
it suddenly becomes the case when you didn't expect such.
>> Are you assuming that there is only one piece of firmware to be loaded
>> in the entire system, or is this driver for a specific device?
> This firmware is for a specific device.
Nodz.
> What we plan to do is maintain the filename constant (say /home/firmware)
> so if there is a change in the firmware we would overwrite this file.
Probably more useful would be to have /home/firmware be a symlink to the
actual firmware, such that you can point it to a different file to see if
it works, and point it back if it doesn't, without risking losing the
original firmware. The file open/read/close routines follow symlinks
transparently to get to the actual file.
>> You may wish to consider such a scheme if you are working on a driver
>> for a particular device. From the driver's viewpoint, this basically
>> comes down to registering some means for a user mode program to supply
>> the driver with the relevant firmware. This could be an ioctl that the
>> user mode program can call with an open file handle as parameter, and
>> the driver then reads the contents of that file into the firmware, or
>> it could be a special node in the file system that the user mode program
>> writes to and the driver copies anything written to that file straight
>> into the firmware slot.
> we intended to load the firmware when our device is found. We will not
> want a user mode application talking to driver for this. The best
solution
> would be to have kernel mode file functions equivalent to open, read,
> write and close.
Those functions exist, but there are apparently problems using them from
kernel context as they expect to see a user mode process number for the
security checks they have to carry out, and no such process number exists
in kernel mode.
One thing you may wish to investigate is the "Firmware File System" that
recently appeared on the Linux Kernel mailing list, and the discussion that
followed, which Linus was quite an active participant in.
Best wishes from Riley.
---
* Nothing as pretty as a smile, nothing as ugly as a frown.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 6-May-2003
next prev parent reply other threads:[~2003-05-09 7:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-09 7:16 open file in kernel model JinuM
2003-05-09 7:35 ` Riley Williams [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-05-09 5:45 JinuM
2003-05-09 6:19 ` Riley Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BKEGKPICNAKILKJKMHCACEHGCLAA.Riley@Williams.Name \
--to=riley@williams.name \
--cc=jinum@esntechnologies.co.in \
--cc=linux-8086@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox