freebsd-dev/sys/arm64/include/machdep.h
Justin Hibbits 4694d573b4 Boot arm64 kernel using booti command from U-boot.
Summary:
Boot arm64 kernel using booti command from U-boot. booti can relocate initrd
image into higher ram addresses, therefore align the initrd load address to 1GiB
and create VA = PA map for it. Create L2 pagetable entries to copy the initrd
image into KVA.
(parts of the code in https://reviews.freebsd.org/D13861 was referred and used
as appropriate)

Submitted by:	Siddharth Tuli <siddharthtuli_gmail.com>
Reviewed by:	manu
Sponsored by:	Juniper Networks, Inc
Differential Revision: https://reviews.freebsd.org/D22255
2019-11-14 21:58:40 +00:00

57 lines
2.0 KiB
C

/*-
* Copyright (c) 2013 Andrew Turner <andrew@freebsd.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _MACHINE_MACHDEP_H_
#define _MACHINE_MACHDEP_H_
struct arm64_bootparams {
vm_offset_t modulep;
vm_offset_t kern_l1pt; /* L1 page table for the kernel */
uint64_t kern_delta;
vm_offset_t kern_stack;
vm_offset_t kern_l0pt; /* L1 page table for the kernel */
};
enum arm64_bus {
ARM64_BUS_NONE,
ARM64_BUS_FDT,
ARM64_BUS_ACPI,
};
extern enum arm64_bus arm64_bus_method;
void dbg_init(void);
void initarm(struct arm64_bootparams *);
extern void (*pagezero)(void *);
vm_offset_t linux_parse_boot_param(struct arm64_bootparams *);
#ifdef LINUX_BOOT_ABI
void parse_bootargs(vm_offset_t *, struct arm64_bootparams *);
#endif
#endif /* _MACHINE_MACHDEP_H_ */