1. Joined
    11 Nov '05
    Moves
    43938
    04 Apr '15 18:19
    I have understood it like this:

    A BIOS is basically a ROM memory. It is read by the CPU of the PC to bring up the first instructions how to do a test of the hardware on the motherboard, aka POST. Then it brings up instructions so the CPU is able to access the boot sector of the harddrive (typically of a homecomputer), and then bring in the operationg system. Now it can leave the control to the user and the computer is operative.

    Am I right so far? (I have follow up questions if I have got this part right.)

    I hope that this Science Forum is the right forum for this kind of question. I know that there are a bunch of skilled people here, so I think that I will get fruitful and accurate answers.
  2. Standard memberDeepThought
    Losing the Thread
    Quarantined World
    Joined
    27 Oct '04
    Moves
    87415
    04 Apr '15 19:47
    Originally posted by FabianFnas
    I have understood it like this:

    A BIOS is basically a ROM memory. It is read by the CPU of the PC to bring up the first instructions how to do a test of the hardware on the motherboard, aka POST. Then it brings up instructions so the CPU is able to access the boot sector of the harddrive (typically of a homecomputer), and then bring in the operationg s ...[text shortened]... re are a bunch of skilled people here, so I think that I will get fruitful and accurate answers.
    You've got the right idea, but there's something you said that isn't quite right. BIOS is a program or collection of programs it is software. ROM is read only memory and is a piece of hardware. BIOS stands for Basic Input Output System, and is stored in ROM or EPROM or some sort of flash memory. When the CPU initializes itself then when it's ready for code it starts loading what it interprets as instructions from a location in memory. That location is where BIOS is stored. It provides a collection of interrupt handlers, it may or may not do a hardware test, and as you said it does the things needed so the user can specify which operating system to load or just go ahead and load it if there's only one.
  3. Joined
    11 Nov '05
    Moves
    43938
    04 Apr '15 20:23
    Originally posted by DeepThought
    You've got the right idea, but there's something you said that isn't quite right. BIOS is a program or collection of programs it is software. ROM is read only memory and is a piece of hardware. BIOS stands for Basic Input Output System, and is stored in ROM or EPROM or some sort of flash memory. When the CPU initializes itself then when it's ready for ...[text shortened]... ser can specify which operating system to load or just go ahead and load it if there's only one.
    I thank you, best DeepThought.

    My teacher said something that it is BIOS itself that starts up all the hardware and initialize everything and test all the hardware for malfunction. When all seems correct it gives control to the CPU. I didn't believe that and therefore I had to find anyone who knows.

    So you say that BIOS has nothing of its own processing abilities? Not a tiny processor that lurks inside the chip, getting its instructions from itself?

    One thing that BIOS 'can do' is to check if the CPU is of a known kind. How does it do that? Does the BIOS provide instructions to the CPU to check itself?

    The instructions in the BIOS also checks the memory for errors. If there are errors, how can the CPU operate at all?

    I look forward to learn from your answers. Thank you, I appreciate your effort a lot!
  4. Standard memberDeepThought
    Losing the Thread
    Quarantined World
    Joined
    27 Oct '04
    Moves
    87415
    04 Apr '15 21:51
    Originally posted by FabianFnas
    I thank you, best DeepThought.

    My teacher said something that it is BIOS itself that starts up all the hardware and initialize everything and test all the hardware for malfunction. When all seems correct it gives control to the CPU. I didn't believe that and therefore I had to find anyone who knows.

    So you say that BIOS has nothing of its own proces ...[text shortened]... at all?

    I look forward to learn from your answers. Thank you, I appreciate your effort a lot!
    I suppose it would be possible to do it that way, have a special purpose processor to check the hardware and then start up the CPU, but it's not how it's done on any over-the-shelf hardware I know of. You can think of BIOS as being a default operating system. The old home computers like the Commdore Atari, BBC micro, the ZX Spectum, et al. had an operating system on ROM, so basically all there was was BIOS. The problem is that if the Operating System needs upgrading you have to take the computer apart and swap chips. So having a minimal OS whose job is to get the machine up and running an then load the main operating system is the way it's done now that computers have a decent amount of memory.

    I can't remember what the separation between the processors reset mode (which could do some sort of memory check) and the BIOS checks are. I'd have to find it in the manual which is 3000+ pages long.

    On Intel machines where a particular register can be written to there is an instruction CPUID. This returns CPU specific information, the vendor, processor type, what features are enabled and so forth. So BIOS can just check the register is writable and if it is issue the CPUID instruction and the CPU will identify itself.

    To check memory what it will do is write to each memory location and attempt to read back. If it doesn't get back what it wrote there is a problem with that memory location. If it affects all of memory the machine can't operate, but if it's only one or two locations then it will set up a table with the bad pages listed. The main operating system can then simply avoid allocating those pages (1 page = 4096 bytes) to offsets in the virtual memory space - whether is is what the OS does I don't know but that is a possible behaviour.
  5. Joined
    11 Nov '05
    Moves
    43938
    05 Apr '15 05:33
    Originally posted by DeepThought
    I suppose it would be possible to do it that way, have a special purpose processor to check the hardware and then start up the CPU, but it's not how it's done on any over-the-shelf hardware I know of. You can think of BIOS as being a default operating system. The old home computers like the Commdore Atari, BBC micro, the ZX Spectum, et al. had an opera ...[text shortened]... ual memory space - whether is is what the OS does I don't know but that is a possible behaviour.
    Thank you very much, DeepThought, for you're taking up time to explain for me.

    Some more follow up questions...

    So if I take out the processor altogether, then nothing will happen, no beeps, no BIOS execution, no nothing, dead as a rock? (I would guess the rock.)

    When we hear the beep or a series of beeps if something is wrong, is it the CPU that activates the loudspeaker or it is some hardware doing it for itself? (I would guess that CPU does it itself, or take help from a beep-circuit.)

    In my old Zilog Z80 processor, when the board got its voltage, an automatic device issued a 5V impulse to the Reset pin on the CPU chip. Then the computer started to execute the first instruction at memory cell 0000:0000, that was on the EPROM and then everything started. Is the 0000:0000 the first instruction even at the latest Intel processor as well? Is this memory location on the BIOS ROM?

    And I suppose this was all the follow up questions I had.

    A teacher has normally some kind of authority. If his knowledge differs from mine, and he says 'how it really is', then I have to decide who to believe, my own experience or his knowledge. This time I wanted to know more about the subject in order to know 'how it really is'. Now I have confirmed how it is, and it makes all sense. Unless a question about this comes in the exam, I will not challenge him, certainly not in front of other students, but it feels good to know how it really is, and his authority has decreased a bit in my eyes. But I like his teachings anyway.
  6. Standard memberDeepThought
    Losing the Thread
    Quarantined World
    Joined
    27 Oct '04
    Moves
    87415
    05 Apr '15 07:262 edits
    Originally posted by FabianFnas
    Thank you very much, DeepThought, for you're taking up time to explain for me.

    Some more follow up questions...

    So if I take out the processor altogether, then nothing will happen, no beeps, no BIOS execution, no nothing, dead as a rock? (I would guess the rock.)

    When we hear the beep or a series of beeps if something is wrong, is it the CPU that ...[text shortened]... it really is, and his authority has decreased a bit in my eyes. But I like his teachings anyway.
    Assuming it's a standard set up the various fans will turn, but without the CPU it's a pile of electronics generating heat. With the CPU it's still a pile of electronics generating heat, but you'll get some usefulness as a side effect of the heat generation.

    Whether you get beeps or not with a missing CPU depends on the motherboard hardware. I doubt it, but I've never done that experiment.

    Intel didn't make the Z80 (except possibly under licence), Zilog was formed by a former Intel employee, but it's not an Intel product. On ARM the first instruction is loaded from memory location 0x0 and I think that's a common choice, but Intel do it differently. The first instruction loaded is away from physical memory location zero on all Intel processors, certainly since the 286 and probably all of them since the 8086. I couldn't remember the address so I googled the question and got three different answers...

    According to the Wikipedia page [1] I looked at it's location FFFF:0000 for all Intel processors, according to the Dr Dobbs page it's FFFF:FFF0 16 bytes away from the top of memory. The Dr Dobbs page is quite detailed and explains the issues about the processor set up well. However the third page I got from google [3] which is rutgers.edu gives F000:FFF0, so take your pick.

    The processor has that location built in, when it starts up it clears its registers and then sets its instruction pointer to a built in value and starts loading from there. Since the early machines had 16 bit address buses I'd imagine that for them the starting location was FFF0.

    [1] http://en.wikipedia.org/wiki/Booting
    [2] http://www.drdobbs.com/parallel/booting-an-intel-architecture-system-par/232300699
    [3] https://www.cs.rutgers.edu/~pxk/416/notes/02-boot.html

    Edit: I've forgotten how segment offset adressing works, I think Wikipedia and Rutgers are saying the same thing. I'm abit suspicious of the Dr Dobbs location but it's looking like a typo. The Dr Dobbs article gets the 32 bit addressing mode address the same as the other two articles 0x000FFFF0.

    Edit 2: The memory location I was failing to remember is 07c0 but that is where the operating system is loaded to later on. I never knew the BIOS load point, but do now. Both the Dr. Dobbs and Rudgers articles are worth reading.
  7. Cape Town
    Joined
    14 Apr '05
    Moves
    52945
    05 Apr '15 11:47
    In summary, the BIOS is software stored on a chip on the motherboard with usually the following functions:
    1. A bit of code to get the boot process going.
    2. Various settings to do with the hardware such as what devices/RAM are connected, clock speeds etc.
    3. A program that allows you to view and modify theses settings.
    4. Some code that allows the operating system to communicate with the hardware (drivers), some interrupt management and power management - although all these are carried out in cooperation with the operating system.
    5. Some basic hardware tests to be optionally carried out before boot up.
    6. Provide a system clock, or access to one.

    I had to upgrade the BIOS of my PC (download a new image) to get a new graphics card to work.
  8. Joined
    11 Nov '05
    Moves
    43938
    05 Apr '15 13:48
    Originally posted by twhitehead
    In summary, the BIOS is software stored on a chip on the motherboard with usually the following functions:
    1. A bit of code to get the boot process going.
    2. Various settings to do with the hardware such as what devices/RAM are connected, clock speeds etc.
    3. A program that allows you to view and modify theses settings.
    4. Some code that allows the op ...[text shortened]...

    I had to upgrade the BIOS of my PC (download a new image) to get a new graphics card to work.
    Everything is clear. Thank you very much for your clear and crisp answers. You're the best! 🙂
Back to Top

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.I Agree