Author: marcel
Date: Sun Apr  3 03:26:12 2011
New Revision: 220283
URL: http://svn.freebsd.org/changeset/base/220283

Log:
  Make the ski loader functional again after the previous set of changes.

Modified:
  head/sys/boot/ia64/ski/efi_stub.c
  head/sys/boot/ia64/ski/skimd.c

Modified: head/sys/boot/ia64/ski/efi_stub.c
==============================================================================
--- head/sys/boot/ia64/ski/efi_stub.c   Sat Apr  2 21:52:58 2011        
(r220282)
+++ head/sys/boot/ia64/ski/efi_stub.c   Sun Apr  3 03:26:12 2011        
(r220283)
@@ -223,39 +223,37 @@ ResetSystem(enum efi_reset type, efi_sta
 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;
 }

Modified: head/sys/boot/ia64/ski/skimd.c
==============================================================================
--- head/sys/boot/ia64/ski/skimd.c      Sat Apr  2 21:52:58 2011        
(r220282)
+++ head/sys/boot/ia64/ski/skimd.c      Sun Apr  3 03:26:12 2011        
(r220283)
@@ -43,9 +43,9 @@ ia64_platform_alloc(vm_offset_t va, vm_s
        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 *
        sal_stub_init();
        acpi_stub_init();
 
-       *res = &bootinfo;
+       if (IS_LEGACY_KERNEL())
+               *res = &bootinfo;
+
        return (0);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to