1 /*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
6 *
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
10 */
11
12 /*
13 * Copyright (c) 2014 Joyent, Inc. All rights reserved.
14 */
15
16 #include "fakeloader.h"
17
18 #include <sys/types.h>
19 #include <sys/param.h>
20 #include <sys/elf.h>
21 #include <sys/atag.h>
22 #include <sys/sysmacros.h>
23 #include <sys/machparam.h>
24
25 #include <vm/pte.h>
26
27 /*
28 * This is the stock ARM fake uniboot loader.
29 *
30 * Here's what we have to do:
31 * o Read the atag header and find the combined archive header
32 * o Determine the set of mappings we need to add for the following:
33 * - unix
690 armv6_dcache_inval();
691 armv6_icache_disable();
692 armv6_icache_inval();
693
694 /* Program the page tables */
695 FAKELOAD_DPRINTF("programming cp15 regs\n");
696 fakeload_pt_setup((uintptr_t)pt_addr);
697
698
699 /* MMU Enable */
700 FAKELOAD_DPRINTF("see you on the other side\n");
701 fakeload_mmu_enable();
702
703 FAKELOAD_DPRINTF("why helo thar\n");
704
705 /* Renable caches */
706 armv6_dcache_enable();
707 armv6_icache_enable();
708
709 /* we should never come back */
710 fakeload_exec(unix_start);
711 fakeload_panic("hit the end of the world\n");
712 }
|
1 /*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
6 *
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
10 */
11
12 /*
13 * Copyright (c) 2014 Joyent, Inc. All rights reserved.
14 * Copyright (c) 2015 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
15 */
16
17 #include "fakeloader.h"
18
19 #include <sys/types.h>
20 #include <sys/param.h>
21 #include <sys/elf.h>
22 #include <sys/atag.h>
23 #include <sys/sysmacros.h>
24 #include <sys/machparam.h>
25
26 #include <vm/pte.h>
27
28 /*
29 * This is the stock ARM fake uniboot loader.
30 *
31 * Here's what we have to do:
32 * o Read the atag header and find the combined archive header
33 * o Determine the set of mappings we need to add for the following:
34 * - unix
691 armv6_dcache_inval();
692 armv6_icache_disable();
693 armv6_icache_inval();
694
695 /* Program the page tables */
696 FAKELOAD_DPRINTF("programming cp15 regs\n");
697 fakeload_pt_setup((uintptr_t)pt_addr);
698
699
700 /* MMU Enable */
701 FAKELOAD_DPRINTF("see you on the other side\n");
702 fakeload_mmu_enable();
703
704 FAKELOAD_DPRINTF("why helo thar\n");
705
706 /* Renable caches */
707 armv6_dcache_enable();
708 armv6_icache_enable();
709
710 /* we should never come back */
711 fakeload_exec(ident, ident2, chain, unix_start);
712 fakeload_panic("hit the end of the world\n");
713 }
|