linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* implementation of boot-time kernel parameters
@ 2007-06-18 11:25 Robert P. J. Day
  2007-06-18 16:00 ` H. Peter Anvin
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2007-06-18 11:25 UTC (permalink / raw)
  To: Linux Kernel Mailing List


  (i asked about this on the KJ list but didn't get much in the way of
response, so i'll try here.)

  the short form:  as a lead-in to trying to clean up some obsolete
content in Documentation/kernel-parameters.txt (and there appears to
be a lot of it), i can see how boot-time kernel parms are defined
these days -- with "__setup()" or "early_param()".

  i'm also aware of an older and (apparently) LILO-specific way to do
it -- using something like "pas16=" where the appropriate driver code
has to parse the value string (eg., in drivers/scsi/pas16.c):

/*
 * Function : pas16_setup(char *str, int *ints)
 *
 * Purpose : LILO command line initialization of the overrides array,
 *
 * Inputs : str - unused, ints - array of integer parameters with ints[0]
 *      equal to the number of ints.
 *
 */

void __init pas16_setup(char *str, int *ints)
{
    static int commandline_current = 0;
    int i;
    if (ints[0] != 2)
        printk("pas16_setup : usage pas16=io_port,irq\n");
    else
        if (commandline_current < NO_OVERRIDES) {
            overrides[commandline_current].io_port = (unsigned short) ints[1];
            overrides[commandline_current].irq = ints[2];
            for (i = 0; i < NO_BASES; ++i)
                if (bases[i].io_port == (unsigned short) ints[1]) {
                    bases[i].noauto = 1;
                    break;
                }
            ++commandline_current;
        }
}

  now, the pas16 driver also handles setting those values as module
parameters:

#ifdef MODULE
module_param(pas16_addr, ushort, 0);
module_param(pas16_irq, int, 0);
#endif

  but there are definitely drivers that support *only* the LILO form
for boot-time parms, which would seem to suggest that, unless you're
using LILO, you don't get some of those kernel parameters, no?

  in situations like that, is it even accurate to say that those are
supported kernel parameters if they're not supported on non-LILO
systems?  and how should stuff like this be brought up to date, if at
all?

rday

p.s.  note that the comment at the top of the doc file reads:

                          Kernel Parameters
                          ~~~~~~~~~~~~~~~~~

The following is a consolidated list of the kernel parameters as
implemented (mostly) by the __setup() macro ...

  which, as i'm sure you can appreciate, is somewhat misleading since
some of the parms are relevant only for LILO-based systems.  anyway,
is there a standard for all of this?
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: implementation of boot-time kernel parameters
  2007-06-18 11:25 implementation of boot-time kernel parameters Robert P. J. Day
@ 2007-06-18 16:00 ` H. Peter Anvin
  0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2007-06-18 16:00 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Linux Kernel Mailing List

Robert P. J. Day wrote:
> 
>   i'm also aware of an older and (apparently) LILO-specific way to do
> it -- using something like "pas16=" where the appropriate driver code
> has to parse the value string (eg., in drivers/scsi/pas16.c):
> 

Utter nonsense.  The only reason these older drivers mention "LILO" is
because some of these driver authors thought LILO was the only native
Linux bootloader.

	-hpa

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-18 16:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-18 11:25 implementation of boot-time kernel parameters Robert P. J. Day
2007-06-18 16:00 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).