Patent ID: 8341386

Claim:
A method for updating a basic input/output system (BIOS) of a computer system, the BIOS being stored in a non-volatile memory comprising a plurality of blocks, wherein the blocks comprise a first block used to store a part of program code of the BIOS, and a third block used to store a descriptor table comprising a plurality of sections, wherein an initial address and a length of each of the blocks are stored in a region section of the sections, the method comprising: reading the region section of the descriptor table to obtain an address data used to point to an address of the BIOS in the non-volatile memory; copying the part of the program code from the first block to a backup memory block of the blocks; changing the address data in the region section of the descriptor table so that the address data points to the backup memory block; clearing the first block; writing an updated program code in the first block; restoring the address data in the region section of the descriptor table so that the address data points to the first block; when the computer system is turned on, detecting if the computer system is in a descriptor mode; and repairing the BIOS according to the descriptor table if the computer system is in the descriptor mode.