Patent ID: 8041742

Claim:
A computer-implemented method for providing generic database services within an extensible firmware interface environment, the method comprising computer-implemented operations for: loading one or more programs at computer boot time within the extensible firmware interface environment, the programs configured to provide boot and runtime services for a computer, the extensible firmware interface environment providing an interface between an operating system and system firmware; providing, during the boot time, database functions via the generic database services to the programs by executing a database engine within the extensible firmware interface environment, the database functions configured to index and search records having arbitrary data types, the programs configured to create a database with records having the arbitrary data types through the database functions; wherein the database engine is configured to utilize a database structure to store data regarding content of the database, the database structure comprising an initial count field for storing data indicating an initial number of records to be stored in the database, a record count field for storing data indicating a current number of records stored in the database, a key count field for storing data indicating a number of key fields in a stored data record, a key field for storing a pointer to a data field that includes a pointer to a particular database function of the database functions for providing a direction to an index key, and an index array field for storing a pointer to an index array, the index array comprising a number of columns equal to the number of key fields and a number of rows equal to the current number of records in the database; determining the initial number of records to be stored in the database based on the initial count field; allocating memory space for the index array according to the initial number of records; determining whether the record count field is equal to contents of the index array minus one; upon determining that the record count field is equal to the contents of the index array minus one, enlarging the index array; sorting the contents of the index array based on the key fields in the stored data record; determining a size of the index array based on the key fields in the stored data record; and determining the direction of the index key based on the particular database function.