summaryrefslogtreecommitdiffstats
path: root/sys/boot/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-04-03 03:26:12 +0000
committermarcel <marcel@FreeBSD.org>2011-04-03 03:26:12 +0000
commit169dc8483702bcd1282f81e04a397b5bf75dd7d5 (patch)
treea6d2724a6a8a05ccb898884be326c899cfb2aa34 /sys/boot/ia64
parentf31f8adf99a6b94f4ba76e98633b2c3c4944cb09 (diff)
downloadFreeBSD-src-169dc8483702bcd1282f81e04a397b5bf75dd7d5.zip
FreeBSD-src-169dc8483702bcd1282f81e04a397b5bf75dd7d5.tar.gz
Make the ski loader functional again after the previous set of changes.
Diffstat (limited to 'sys/boot/ia64')
-rw-r--r--sys/boot/ia64/ski/efi_stub.c54
-rw-r--r--sys/boot/ia64/ski/skimd.c8
2 files changed, 31 insertions, 31 deletions
diff --git a/sys/boot/ia64/ski/efi_stub.c b/sys/boot/ia64/ski/efi_stub.c
index 3c7a099..53b3867 100644
--- a/sys/boot/ia64/ski/efi_stub.c
+++ b/sys/boot/ia64/ski/efi_stub.c
@@ -223,39 +223,37 @@ ResetSystem(enum efi_reset type, efi_status status, u_long datasz,
void
efi_stub_init(struct bootinfo *bi)
{
- struct efi_md *memp;
+ static struct efi_md memmap[4];
/* Describe the SKI memory map. */
- bi->bi_memmap = (u_int64_t)(bi + 1);
- bi->bi_memmap_size = 4 * sizeof(struct efi_md);
+ bi->bi_memmap = (uintptr_t)(void *)memmap;
+ bi->bi_memmap_size = sizeof(memmap);
bi->bi_memdesc_size = sizeof(struct efi_md);
bi->bi_memdesc_version = 1;
- memp = (struct efi_md *)bi->bi_memmap;
-
- memp[0].md_type = EFI_MD_TYPE_PALCODE;
- memp[0].md_phys = 0x100000;
- memp[0].md_virt = NULL;
- memp[0].md_pages = (4L*1024*1024)>>12;
- memp[0].md_attr = EFI_MD_ATTR_WB | EFI_MD_ATTR_RT;
-
- memp[1].md_type = EFI_MD_TYPE_FREE;
- memp[1].md_phys = 5L*1024*1024;
- memp[1].md_virt = NULL;
- memp[1].md_pages = (128L*1024*1024)>>12;
- memp[1].md_attr = EFI_MD_ATTR_WB;
-
- memp[2].md_type = EFI_MD_TYPE_FREE;
- memp[2].md_phys = 4L*1024*1024*1024;
- memp[2].md_virt = NULL;
- memp[2].md_pages = (64L*1024*1024)>>12;
- memp[2].md_attr = EFI_MD_ATTR_WB;
-
- memp[3].md_type = EFI_MD_TYPE_IOPORT;
- memp[3].md_phys = 0xffffc000000;
- memp[3].md_virt = NULL;
- memp[3].md_pages = (64L*1024*1024)>>12;
- memp[3].md_attr = EFI_MD_ATTR_UC;
+ memmap[0].md_type = EFI_MD_TYPE_PALCODE;
+ memmap[0].md_phys = 0x100000;
+ memmap[0].md_virt = NULL;
+ memmap[0].md_pages = (1L*1024*1024)>>12;
+ memmap[0].md_attr = EFI_MD_ATTR_WB | EFI_MD_ATTR_RT;
+
+ memmap[1].md_type = EFI_MD_TYPE_FREE;
+ memmap[1].md_phys = 4L*1024*1024;
+ memmap[1].md_virt = NULL;
+ memmap[1].md_pages = (128L*1024*1024)>>12;
+ memmap[1].md_attr = EFI_MD_ATTR_WB;
+
+ memmap[2].md_type = EFI_MD_TYPE_FREE;
+ memmap[2].md_phys = 4L*1024*1024*1024;
+ memmap[2].md_virt = NULL;
+ memmap[2].md_pages = (64L*1024*1024)>>12;
+ memmap[2].md_attr = EFI_MD_ATTR_WB;
+
+ memmap[3].md_type = EFI_MD_TYPE_IOPORT;
+ memmap[3].md_phys = 0xffffc000000;
+ memmap[3].md_virt = NULL;
+ memmap[3].md_pages = (64L*1024*1024)>>12;
+ memmap[3].md_attr = EFI_MD_ATTR_UC;
bi->bi_systab = (u_int64_t)&efi_systab;
}
diff --git a/sys/boot/ia64/ski/skimd.c b/sys/boot/ia64/ski/skimd.c
index 8db358c..baa3138 100644
--- a/sys/boot/ia64/ski/skimd.c
+++ b/sys/boot/ia64/ski/skimd.c
@@ -43,9 +43,9 @@ ia64_platform_alloc(vm_offset_t va, vm_size_t sz __unused)
vm_paddr_t pa;
if (va == 0)
- pa = 1024 * 1024;
+ pa = 2 * 1024 * 1024;
else
- pa = (va - IA64_PBVM_BASE) + (64 * 1024 * 1024);
+ pa = (va - IA64_PBVM_BASE) + (32 * 1024 * 1024);
return (pa);
}
@@ -65,7 +65,9 @@ ia64_platform_bootinfo(struct bootinfo *bi, struct bootinfo **res)
sal_stub_init();
acpi_stub_init();
- *res = &bootinfo;
+ if (IS_LEGACY_KERNEL())
+ *res = &bootinfo;
+
return (0);
}
OpenPOWER on IntegriCloud