summaryrefslogtreecommitdiff
path: root/src/northbridge/intel
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-01-12 14:12:15 +0100
committerVladimir Serbinenko <phcoder@gmail.com>2014-01-12 17:41:58 +0100
commit128741682250e196ccc9ff0bf9e7a5db5dfcdbd3 (patch)
tree77f3adb8046d81cacd650ad77aa4aaf18cc6d3a7 /src/northbridge/intel
parent0af61b6c82d7ff02426a26bf435b7c6ee768a602 (diff)
CBFS: use cbfs_get_file_content whenever possible rather than cbfs_get_file
Number one reason to use cbfs_get_file was to get file length. With previous patch no more need for this. Change-Id: I330dda914d800c991757c5967b11963276ba9e00 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/4674 Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r--src/northbridge/intel/i82830/vga.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/northbridge/intel/i82830/vga.c b/src/northbridge/intel/i82830/vga.c
index 49bfa34965..40f23ccd94 100644
--- a/src/northbridge/intel/i82830/vga.c
+++ b/src/northbridge/intel/i82830/vga.c
@@ -32,21 +32,9 @@
static void vga_init(device_t dev)
{
printk(BIOS_INFO, "Starting Graphics Initialization\n");
- struct cbfs_file *file = cbfs_get_file(CBFS_DEFAULT_MEDIA, "mbi.bin");
- void *mbi = NULL;
- unsigned int mbi_len = 0;
-
- if (file) {
- if (ntohl(file->type) != CBFS_TYPE_MBI) {
- printk(BIOS_INFO, "CBFS: MBI binary is of type %x instead of"
- "type %x\n", file->type, CBFS_TYPE_MBI);
- } else {
- mbi = (void *) CBFS_SUBHEADER(file);
- mbi_len = ntohl(file->len);
- }
- } else {
- printk(BIOS_INFO, "Could not find MBI.\n");
- }
+ size_t mbi_len;
+ void *mbi = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, "mbi.bin",
+ CBFS_TYPE_MBI, &mbi_len);
if (mbi && mbi_len) {
/* The GDT or coreboot table is going to live here. But