Deleted Added
full compact
copy.c (281156) copy.c (281526)
1/*-
2 * Copyright (c) 2013 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Benno Rice under sponsorship from
6 * the FreeBSD Foundation.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

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

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

22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/boot/efi/loader/copy.c 281156 2015-04-06 15:50:20Z andrew $");
30__FBSDID("$FreeBSD: head/sys/boot/efi/loader/copy.c 281526 2015-04-14 13:55:01Z andrew $");
31
32#include <sys/param.h>
33
34#include <stand.h>
35#include <bootstrap.h>
36
37#include <efi.h>
38#include <efilib.h>

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

56 STAGE_PAGES, &staging);
57 if (EFI_ERROR(status)) {
58 printf("failed to allocate staging area: %lu\n",
59 (unsigned long)(status & EFI_ERROR_MASK));
60 return (status);
61 }
62 staging_end = staging + STAGE_PAGES * 4096;
63
31
32#include <sys/param.h>
33
34#include <stand.h>
35#include <bootstrap.h>
36
37#include <efi.h>
38#include <efilib.h>

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

56 STAGE_PAGES, &staging);
57 if (EFI_ERROR(status)) {
58 printf("failed to allocate staging area: %lu\n",
59 (unsigned long)(status & EFI_ERROR_MASK));
60 return (status);
61 }
62 staging_end = staging + STAGE_PAGES * 4096;
63
64#ifdef __arm__
65 /* Round the kernel load address to a 2MiB value */
64#if defined(__aarch64__) || defined(__arm__)
65 /*
66 * Round the kernel load address to a 2MiB value. This is needed
67 * because the kernel builds a page table based on where it has
68 * been loaded in physical address space. As the kernel will use
69 * either a 1MiB or 2MiB page for this we need to make sure it
70 * is correctly aligned for both cases.
71 */
66 staging = roundup2(staging, 2 * 1024 * 1024);
67#endif
68
69 return (0);
70}
71
72void *
73efi_translate(vm_offset_t ptr)

--- 60 unchanged lines hidden ---
72 staging = roundup2(staging, 2 * 1024 * 1024);
73#endif
74
75 return (0);
76}
77
78void *
79efi_translate(vm_offset_t ptr)

--- 60 unchanged lines hidden ---