Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Smile Which is the actual console driver used by printk function? (x86, 32bit)


    Hi All:
    Which is the actual console driver used by printk function? (x86, 32bit)

    When boot the kernel, the printk output message on the monitor,
    printk function will run to struct console->write, consw-> con_putcs,
    but con_putcs of the vga_con, dummy_con is DUMMY (empty deal).

    I want to look for the basic output and input implement of linux kernel,
    But confuse on which is the actual console driver used?

    Can anybody help me? Thanks.

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    If I remember correctly, Linux uses a preliminary output driver during boot first, then later switches to the more sophisticated one. So at some point the dummy entry should get replaced by a pointer to the actual driver.
    Debian GNU/Linux -- You know you want it.

  3. #3

    Smile

    Thank you, GNU-Fan.
    I' ll try to find it.

  4. $spacer_open
    $spacer_close
  5. #4
    I trace the process by log.

    I found before call console_init() func, the console_drivers
    is empty list.
    But before console_init(), there is also other message
    print on the monitor, is printk function has other method
    to output on monitor? Not only by console driver?
    But I really did't found other output on monitor deal...

  6. #5
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Have you checked the /boot directory. There is a low level printf routine. Most probably somewhere a few bios calls are made in order to put characters on the screen. Maybe a int in the assembler (.S) files.
    Debian GNU/Linux -- You know you want it.

  7. #6
    Hi, GNU-Fan:
    Thanks for answer.

    I checked it, Before console_drivers initialized,
    the message kept in log_buf,when registered the vt_console,
    it will output all the message kept in log_buf one tile.
    It's really good.

    Now, still a question exist, "vt_console" used "vga_con" as "consw" ,
    but vga_con->out_putcs is DUMMY. I'll try to resolve it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •