Deleted Added
full compact
skimd.c (164010) skimd.c (219691)
1/*-
2 * Copyright (c) 2006 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/boot/ia64/ski/skimd.c 164010 2006-11-05 22:03:04Z marcel $");
28__FBSDID("$FreeBSD: head/sys/boot/ia64/ski/skimd.c 219691 2011-03-16 03:53:18Z marcel $");
29
30#include <stand.h>
31
32#include <libia64.h>
33
34#include "libski.h"
35
29
30#include <stand.h>
31
32#include <libia64.h>
33
34#include "libski.h"
35
36#define PHYS_START (4L*1024*1024*1024)
37#define PHYS_SIZE (64L*1024*1024 - 4L*1024)
38
39extern void acpi_stub_init(void);
40extern void efi_stub_init(struct bootinfo *);
41extern void sal_stub_init(void);
42
36extern void acpi_stub_init(void);
37extern void efi_stub_init(struct bootinfo *);
38extern void sal_stub_init(void);
39
43uint64_t
44ldr_alloc(vm_offset_t va)
40vm_paddr_t
41ia64_platform_alloc(vm_offset_t va, vm_size_t sz __unused)
45{
42{
43 vm_paddr_t pa;
46
44
47 if (va >= PHYS_SIZE)
48 return (0);
49 return (va + PHYS_START);
45 if (va == 0)
46 pa = 1024 * 1024;
47 else
48 pa = (va - IA64_PBVM_BASE) + (64 * 1024 * 1024);
49
50 return (pa);
50}
51
51}
52
53void
54ia64_platform_free(vm_offset_t va __unused, vm_paddr_t pa __unused,
55 vm_size_t sz __unused)
56{
57}
58
52int
59int
53ldr_bootinfo(struct bootinfo *bi, uint64_t *bi_addr)
60ia64_platform_bootinfo(struct bootinfo *bi, struct bootinfo **res)
54{
55 static struct bootinfo bootinfo;
56
57 efi_stub_init(bi);
58 sal_stub_init();
59 acpi_stub_init();
60
61{
62 static struct bootinfo bootinfo;
63
64 efi_stub_init(bi);
65 sal_stub_init();
66 acpi_stub_init();
67
61 *bi_addr = (uint64_t)(&bootinfo);
62 bootinfo = *bi;
68 *res = &bootinfo;
63 return (0);
64}
65
66int
69 return (0);
70}
71
72int
67ldr_enter(const char *kernel)
73ia64_platform_enter(const char *kernel)
68{
69
70 while (*kernel == '/')
71 kernel++;
74{
75
76 while (*kernel == '/')
77 kernel++;
72 ssc(0, (uint64_t)kernel, 0, 0, SSC_LOAD_SYMBOLS);
78 ssc(0, (uint64_t)kernel, 0, 0, SSC_LOAD_SYMBOLS);
73 return (0);
74}
79 return (0);
80}