LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   linux kernel and BIOS --hardware interaction (http://www.linuxquestions.org/questions/linux-software-2/linux-kernel-and-bios-hardware-interaction-948682/)

beyond 06-05-2012 02:34 PM

linux kernel and BIOS --hardware interaction
 
hello experts,
I am just starting out with writing the bootloader...so I have to use the "traps" given by the embedded bios only like that of 0x10(video) n 0x16(keyboard) etc... so the point is
when the real operating system i.e. linux kernel boots up...how does it ultimately interacts with the hardware???

does it finally use the bios interrupts to communicate with the hardware??
or
it does something else..i mean when i issue an int 0x80 trap in the linux assemly i.e. make a system call..what next happens???


hope, m clear about my point...

TobiSGD 06-05-2012 03:03 PM

The Linux kernel doesn't use the BIOS, since it has to function on many architectures that don't have a BIOS (in the x86 sense).

beyond 06-06-2012 01:22 AM

thanks for the reply,,

my reference to BIOS means that any of the BSP sort of thing...like in the embedded devices...
just like the bios which provide with the traps to interacts with the hardware..so are the BSP, they also provide the APIs for the same...
am I right?

so, how does the kernel adjusts itself with so many different architectures and different motherboard setups???
I googled out and gt something like "HAL" ..hardware abstraction layer....
but
I am still not getting the part where the kernel adjusts with all the motherboads out there in the market...i mean normally we simply install the linux, dont care about the board n all for pc...

TobiSGD 06-06-2012 02:02 AM

The kernel doesn't adapt for any motherboard out there. In fact, the kernel doesn't care about the motherboard at all. The kernel looks for hardware devices it knows, like video chips, sound chips, disk controllers, ... .
These devices can be simply determined using their PCI ID or USB ID.

sundialsvcs 06-06-2012 07:07 AM

You probably need to spend about a solid week reading all of the documentation in the Linux kernel "arch" directories, and the source-code thereof. Grab the source of an existing loader such as LILO or Grub and systematically read through everything. You're repeating prior work here, not re-inventing it.

beyond 06-06-2012 10:52 AM

yeah,, sure sir,, i have download the source code of GRUB.."trying" to understand it....:(

resetreset 06-07-2012 02:35 AM

OK, I have a big interest in things like this.... beyond, when you issue an int 80, it jumps into the Linux kernel, which will have the code to do whatever that system call does.

I'm in India too, do you want to be friends? :)

beyond 06-07-2012 04:07 AM

beyond.hack@gmail.com
my email-id...

@resetreset: I will be very much happy....i will be learning a lot from you, i guess...
hope u don't mine sharing ur id??
I need help regarding some of the bootloader concepts....


Regards

resetreset 06-07-2012 10:00 AM

I'm sending you an email, read it :)


All times are GMT -5. The time now is 09:38 PM.