2

I have created a BIOS password. I use the Dvorak keyboard layout. When I switch my keyboard layout to Qwerty and restart, and then type password in with the different layout, there is no change. However, when I'm logged into my OS, having a different keyboard layout matters. What's going on here?

3
  • The BIOS doesn't know/care about the keyboard layout you may or may not use in your OS. Commented Nov 8, 2013 at 18:20
  • @frostschutz Then how does it work? Commented Nov 8, 2013 at 18:22
  • @Habi The BIOS has a fixed keyboard layout. Commented Nov 8, 2013 at 21:49

2 Answers 2

2

Many people get confused because they see the computer as a single entity when in actuality a computer is several systems working together to give the illusion that it's one cohesive object.

Multiple subsystems

The BIOS is one of of these such subsystems. The BIOS is exactly what its name describes. A Basic Input and Output System. Its job is to provide basic functionality to the system so that it can detect peripherals (such as: HDDs, keyboards, monitors, etc.). The other major function that the BIOS provides is in boot strap loading the Operating System from the designated medium (CD, DVD, USB, HDD, etc.).

The functionality to provide access to these peripherals provides an API which the OS and software can make use of if they so choose, but the operating systems and software don't have to make use of these APIs and often times do not, for a variety of reasons.

The major reason is that the device manufacturer knows best and will often times provide a low level driver themselves which can deal with the hardware in a more intimate way than the general purpose BIOS is able to.

Your question is exactly this scenario. The BIOS is able to detect the keyboard and deal with it using its own software/drivers, whereas the OS is not able to.

There's really nothing more to this than that.

MS-DOS API

If you'd like a more concrete example then you don't have to look any further than the interrupt 21 facility that was popularized by MS-DOS. MS-DOS provided its own screen services that sat along side the BIOS' because Microsoft wanted to have either richer features or a different API altogether.

See the wikipedia page: MSDOS API.

3
  • @Kevin - thanks for cleaning up my poor grammar 8-) Commented Nov 8, 2013 at 20:14
  • DOS functions are not alongside BIOS functions, they are on top of BIOS functions. The BIOS provides the machine-dependent part of the OS (CP/M, PC-DOS, MS-DOS), and the BDOS/DOS part provides the machine-independent part, built on top of what the BIOS provides. Commented Nov 11, 2013 at 16:56
  • @ninjalj - for the sake of the conversation it's doesn't really matter, only highlighting it so that the OP understands that a computer system is just that, a system, not a monolithic thing. Commented Nov 11, 2013 at 17:27
2

Modern BIOSes take any detected USB keyboard and do some SMM trickery to make it look like an original IBM AT or PS/2 keyboard to the BIOS and any programs that use the BIOS for keyboard I/O, which would MS-DOS, Memtest86+ and some bootloaders.

This old interface delivers scan codes to the PC when a key is pressed and released. Scan codes are dependent on the position of the key and are unaware of what position the qwerty/dvorak switch on your keyboard is. They do not line up with any ASCII or Unicode points.

enter image description here

The Wikipedia article on scancodes can provide some insight.

Most if not all BIOSes should understand these scancodes, whether from a real AT or PS/2 keyboard or a PS/2-emulated USB keyboard. Extra keys, switches, etc. would have additional or nonstandard scancodes and the BIOS would ignore them.

When you are logged into your OS, a driver has an opportunity to take control. I'm not sure exactly how this interface would work or what drivers are involved (maybe the switch is a nonstandard scancode that a driver picks up and causes a change in the keymap or something... If this is a USB keyboard, which it likely is, it's possible the qwerty/dvorak switch is another HID input device or something else as well.)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.