tree: drop last paragraph of GPL copyright header
[coreboot.git] / payloads / libpayload / arch / mips / coreboot.c
blobe2b5557cbaccec0d29dbd4e6e3297d06442d44a6
1 /*
2 * This file is part of the libpayload project.
4 * Copyright (C) 2014 Imagination Technologies
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #include <libpayload-config.h>
17 #include <libpayload.h>
18 #include <coreboot_tables.h>
20 /* This pointer gets set in head.S and is passed in from coreboot. */
21 void *cb_header_ptr;
23 static void cb_parse_dma(void *ptr)
25 struct lb_range *dma = (struct lb_range *)ptr;
26 init_dma_memory(bus_to_virt(dma->range_start), dma->range_size);
29 /* Architecture specific */
30 int cb_parse_arch_specific(struct cb_record *rec, struct sysinfo_t *info)
32 switch (rec->tag) {
33 case CB_TAG_DMA:
34 cb_parse_dma(rec);
35 break;
36 default:
37 return 0;
39 return 1;
43 int get_coreboot_info(struct sysinfo_t *info)
45 return cb_parse_header(cb_header_ptr, 1, info);
48 void *get_cb_header_ptr(void)
50 return cb_header_ptr;