Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hello, I'm interesting about linux kernel architecture and there's something i don't understand despite of all reserach i did on the net. So i hope someone here could give me ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2014
    Posts
    2

    How it works?


    Hello,

    I'm interesting about linux kernel architecture and there's something i don't understand despite of all reserach i did on the net.
    So i hope someone here could give me more informations ...

    The cpu and the devices are not connected directly.
    There is always a bus controller (PCI, USB, IDE etc ...) connected to the cpu bus.

    But how the kernel know what controller is connected and what is the physical adress of the controller?

    I mean, when the kernel boot, how it determine that at a certain adress he will find a pci controller wich will be driven by the pci driver?

    Linux can be installed on various system so how the kernel do to know when it boot to know what controller are present?

    I don't find on the net enough informations about this process.

    Thank u for all your information.

  2. #2
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,290
    There is a PCI BIOS specification for systems that use a BIOS. Linux fires up a PCI driver that searches through a know address range for information on the devices and bridges on the system and gets a structure that is defined in the specification that contains the information needed.

  3. #3
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,217
    This might help you. There's a section on how the kernel finds its way around the pci buses.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  4. #4
    Just Joined!
    Join Date
    Jul 2014
    Posts
    2
    Thanks for these quic answer. Very interesting doc !!!!

    So if i understand good the kernel ask to the bios at universal adress if pci controller is present and different informations to load the correct pci driver?

    For USB controller is the same is with BIOS?

    Thanks.

  5. #5
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,290
    Linux reads through the PCI address space space and finds the devices that are present. A USB controller would have a header there as well.

  6. #6
    Linux User
    Join Date
    Mar 2013
    Posts
    354
    Quote Originally Posted by gregm View Post
    Linux reads through the PCI address space space and finds the devices that are present. A USB controller would have a header there as well.
    How is this done exactly?


    And, I thought the Linux kernel was (currently) 64-bit, and the BIOS still hasn't changed from 16-bit, and Linux isn't reliant on it in any way....? Wassup?

  7. #7
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,290
    The BIOS is an interface to the hardware - Basic Input Output System. There are other systems - the newer EFI (Extensible Firmware Interface) but there has to be a means for all OS to communicate with the hardware.

    There are, I believe, some 32 bit PCI BIOS calls but it's really irrelevant. The fact that a system can use 64 bit registers doesn't preclude it from using 8 bit ones or having larger data sizes (floating point registers are 80 bit). The common char data type is 8 bit on most surviving systems. Integers come in a wide variety of sizes.

  8. #8
    Linux User
    Join Date
    Mar 2013
    Posts
    354
    But does Linux USE the BIOS? Why? And if it IS, then why do we need hardware drivers for it?

  9. #9
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,290
    If your system has a BIOS it uses it. Without a BIOS (or EFI etc.) Linux wouldn't know what drivers to load.

  10. #10
    Linux User
    Join Date
    Mar 2013
    Posts
    354
    I really wish you'd expand on that. There's far more to the whole story than that doc hazel posted. (which was 15 years old, btw!)


    Also, I'd really like a clear explanation of all this UEFI business, since you brought it up. Exactly what it is, and how it differs from the BIOS we've known all this time, etc. .....

Page 1 of 2 1 2 LastLast

Posting Permissions

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