From: Michael Brown <mebrown@michaels-house.net>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Doug Warzecha <Douglas_Warzecha@dell.com>,
Jean Delvare <khali@linux-fr.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Matt Domsch <Matt_Domsch@dell.com>
Subject: Re: Class device namespaces
Date: Wed, 29 Apr 2009 12:00:29 -0500 [thread overview]
Message-ID: <437908170904291000s10fe6a92q8a595e0bbbd159a6@mail.gmail.com> (raw)
In-Reply-To: <ac3eb2510904290330r563f3717ue72029cbe24b39bb@mail.gmail.com>
On Wed, Apr 29, 2009 at 5:30 AM, Kay Sievers <kay.sievers@vrfy.org> wrote:
>> Overall, the interface is pretty pathetic because it doesnt fit our
>> use case *at all*, but way back in the day that is what we had to do
>> to get it reviewed and approved for merge upstream. At least it is
>> better than the earlier versions where we had to do a separate
>> request_firmware() for every 4k packet (and spin waiting for files to
>> disappear/reappear)
>
> It handles huge files just fine, since the beginning. The space is
> realloced in the kernel. I have a modem which loads 200kb files since
> years.
Sorry, to be brief in my email I probably didnt give quite enough
info. There are two types of bios update: monolithic and packetized.
The monolithic mode requires *physically* contiguous memory below the
4GB boundary, usually 1MB worth. This is unbelievably hard to get
normally, and is almost definitely different from your modem upload
which almost certainly just needs a virtually contiguous 200kB.
Packetized mode lifts the physically-contiguous restriction and just
has to have page-aligned packets.
>
>> All this code is in libsmbios(*) if you want to see the ugly details,
>> but the short version is this:
>>
>> 1) we poke the image_type file and packet_size files with appropriate
>> data, which causes the driver to do a request firmware
>> 2) spin until request_firmware creates the files we need
>
> This is totally insane!
Yes, that was the point. :)
>
>> 2) loop over our file packet_size bytes at a time writing data into
>> the data file
>> 3) set loading to 0 when done
>>
>> *) src/python/libsmbios_c/rbu_update.py
>>
>> The code basically "packetizes" the bios update into page-sized chunks
>> with a header so BIOS can find them and reassemble them for the final
>> update.
>>
>> For older systems (monolithic mode), the kernel code has to allocate
>> physically contiguous region to hold the entire firmware image.
>
> Yeah, maybe you can not use the in-kernel firmware-request filled
> memory. But you can copy it just fine, once it is in the kernel. There
> is no reason to fiddle around with chunks here in userspace.
Pretty much describes exactly what dell_rbu does, except that the
in-kernel packetizing code was rejected on our first submission, so we
moved it into userspace.
> How do you make sure udev does not handle the request at the same
> time? This interface is not public at all, on a general system. As
> long as udev is active you can not use it at all. Udev will run at the
> same time and write to the same files, and even cancel the request if
> the requested file is not found. How does your software cope with
> that?
That is a very interesting question, as I've never seen udev do
anything to interfere with our process. We dont do anything special to
disable udev. Like I said above, we scribble some values to one file,
wait for the request_firmware() files to appear and write stuff to
them when they do. Udev hasnt ever tried to handle this that I have
seen, especially since we dont have any appropriate files sitting
around that udev would ever have access to in order to feed
request_firmware().
--
Michael
next prev parent reply other threads:[~2009-04-29 17:03 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-29 15:48 Class device namespaces Jean Delvare
2009-03-29 16:36 ` Kay Sievers
2009-03-30 8:49 ` Jean Delvare
2009-03-30 11:24 ` Kay Sievers
2009-04-26 6:54 ` Jean Delvare
2009-04-26 12:44 ` Matt Domsch
2009-04-26 13:01 ` Matt Domsch
2009-04-27 15:30 ` Jean Delvare
2009-04-27 17:30 ` Matt Domsch
2009-04-26 13:42 ` Kay Sievers
2009-04-27 16:00 ` Jean Delvare
2009-04-27 21:57 ` Kay Sievers
2009-04-28 8:08 ` Jean Delvare
2009-04-28 12:36 ` Kay Sievers
2009-04-29 12:19 ` Jean Delvare
2009-04-27 13:20 ` Michael E Brown
2009-04-27 15:27 ` Jean Delvare
2009-04-27 17:23 ` Michael Brown
2009-04-28 8:10 ` Jean Delvare
2009-04-28 17:39 ` Doug Warzecha
2009-04-28 17:46 ` Kay Sievers
2009-04-28 21:58 ` Doug Warzecha
2009-04-29 1:42 ` Kay Sievers
2009-04-29 3:19 ` Michael Brown
2009-04-29 10:30 ` Kay Sievers
2009-04-29 17:00 ` Michael Brown [this message]
2009-04-29 19:10 ` Kay Sievers
2009-04-29 21:28 ` Michael Brown
2009-04-29 21:53 ` Kay Sievers
2009-04-30 15:18 ` David Dillow
2009-04-30 16:34 ` Kay Sievers
2009-04-28 19:06 ` Jean Delvare
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=437908170904291000s10fe6a92q8a595e0bbbd159a6@mail.gmail.com \
--to=mebrown@michaels-house.net \
--cc=Douglas_Warzecha@dell.com \
--cc=Matt_Domsch@dell.com \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.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