All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Travis <travis@sgi.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] x86: Add config option to setup early serial console
Date: Thu, 12 Jun 2008 15:54:45 -0700	[thread overview]
Message-ID: <4851A935.3010705@sgi.com> (raw)
In-Reply-To: <4851A639.6040405@zytor.com>

H. Peter Anvin wrote:
> Mike Travis wrote:
>>  * Add config option EARLY_SERIAL_CONSOLE to enable early
>>    printk's to be directed to the serial console.
>>
>> Based on linux-next
>>
>> Signed-off-by: Mike Travis <travis@sgi.com>
> 
> Is there any reason this can't be done dynamically, via a command-line
> option instead?
> 
> We can get to the command line extremely early if need be.
> 
>     -hpa

We could.  My current debugging is in x86_64_start_kernel() almost at
the start of the function (before the "Kernel alive" message).  The
code is below.  (cut and pasted so no tabs)

One benefit of a startup option instead of a config option  is we rely
on the standard distribution for the kernel and unless they set this
option it won't do us much good.

(Maybe the failed attempts was trying to tell me something? ;-)

Thanks,
Mike

        /* Cleanup the over mapped high alias */
        cleanup_highmap();

... my debugging is here ...

        for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
#ifdef CONFIG_EARLY_PRINTK
                set_intr_gate(i, &early_idt_handlers[i]);
#else
                set_intr_gate(i, early_idt_handler);
#endif
        }
        load_idt((const struct desc_ptr *)&idt_descr);

        early_printk("Kernel alive\n");

        for (i = 0; i < NR_CPUS; i++)
                cpu_pda(i) = &boot_cpu_pda[i];

        pda_init(0);
        copy_bootdata(__va(real_mode_data));

... startup params available here ...

        reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS");

#ifdef CONFIG_BLK_DEV_INITRD
        /* Reserve INITRD */
        if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
                unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;
                unsigned long ramdisk_size  = boot_params.hdr.ramdisk_size;
                unsigned long ramdisk_end   = ramdisk_image + ramdisk_size;
                reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
        }
#endif






  reply	other threads:[~2008-06-12 22:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080612223802.528617000@polaris-admin.engr.sgi.com>
2008-06-12 22:38 ` [PATCH 1/1] x86: Add config option to setup early serial console Mike Travis
2008-06-12 22:42   ` H. Peter Anvin
2008-06-12 22:54     ` Mike Travis [this message]
2008-06-12 22:59       ` H. Peter Anvin
2008-06-12 22:42   ` Mike Travis
2008-06-12 22:46   ` Andrew Morton
2008-06-12 22:58     ` Mike Travis
2008-06-12 23:10       ` Andrew Morton
2008-06-12 23:18         ` Yinghai Lu
2008-06-12 23:19         ` Yinghai Lu
     [not found] <20080612224247.486614000@polaris-admin.engr.sgi.com>
2008-06-12 22:42 ` Mike Travis
2008-06-12 22:48   ` Yinghai Lu
2008-06-12 23:01     ` Mike Travis
2008-06-18 12:13       ` Ingo Molnar
     [not found] <20080612223343.257409000@polaris-admin.engr.sgi.com>
2008-06-12 22:33 ` Mike Travis
2008-06-12 22:37   ` Mike Travis

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=4851A935.3010705@sgi.com \
    --to=travis@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.