Deleted Added
full compact
efi_fdt.c (281028) efi_fdt.c (293724)
1/*-
2 * Copyright (c) 2014 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Andrew Turner under
6 * sponsorship from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2014 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Andrew Turner under
6 * sponsorship from the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/boot/efi/fdt/efi_fdt.c 281028 2015-04-03 15:47:48Z andrew $");
31__FBSDID("$FreeBSD: head/sys/boot/efi/fdt/efi_fdt.c 293724 2016-01-12 02:17:39Z smh $");
32
33#include <sys/param.h>
34#include <stand.h>
35#include <efi.h>
36#include <efilib.h>
37#include <fdt_platform.h>
38
39#include "bootstrap.h"
40
41static EFI_GUID fdtdtb = FDT_TABLE_GUID;
42
43int
44fdt_platform_load_dtb(void)
45{
46 struct fdt_header *hdr;
32
33#include <sys/param.h>
34#include <stand.h>
35#include <efi.h>
36#include <efilib.h>
37#include <fdt_platform.h>
38
39#include "bootstrap.h"
40
41static EFI_GUID fdtdtb = FDT_TABLE_GUID;
42
43int
44fdt_platform_load_dtb(void)
45{
46 struct fdt_header *hdr;
47 int err;
48
49 hdr = efi_get_table(&fdtdtb);
50 if (hdr != NULL) {
51 if (fdt_load_dtb_addr(hdr) == 0) {
52 printf("Using DTB provided by EFI at %p.\n", hdr);
53 return (0);
54 }
55 }
56
47
48 hdr = efi_get_table(&fdtdtb);
49 if (hdr != NULL) {
50 if (fdt_load_dtb_addr(hdr) == 0) {
51 printf("Using DTB provided by EFI at %p.\n", hdr);
52 return (0);
53 }
54 }
55
57 return (err);
56 return (1);
58}
59
60void
61fdt_platform_fixups(void)
62{
63}
57}
58
59void
60fdt_platform_fixups(void)
61{
62}