From aef78848afdc835730a52368e9cd1030dee2baaa Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Thu, 28 Nov 2002 03:25:51 +0000 Subject: [PATCH] Remove a left-over virtual mapping of uncached I/O port space. Previous kernels unwantingly depended on this mapping, but as of version 1.123 of src/sys/ia64/ia64/machdep.c this dependency has been removed. Consequently, one has to update the kernel before updating the loader. The documented/recommended upgrade will suffice in this case. Due to a visible (from the kernels point of view) change in behaviour, bump the loader version number from 0.3 to 1.0. Approved by: re (carte blanc) --- sys/boot/efi/libefi/elf_freebsd.c | 17 ----------------- sys/boot/efi/loader/version | 3 +++ sys/boot/ia64/common/exec.c | 17 ----------------- sys/boot/ia64/efi/version | 3 +++ 4 files changed, 6 insertions(+), 34 deletions(-) diff --git a/sys/boot/efi/libefi/elf_freebsd.c b/sys/boot/efi/libefi/elf_freebsd.c index 91736cc5211..7df9950bbce 100644 --- a/sys/boot/efi/libefi/elf_freebsd.c +++ b/sys/boot/efi/libefi/elf_freebsd.c @@ -217,23 +217,6 @@ elf_exec(struct preloaded_file *fp) :: "r"(0), "r"(*(u_int64_t*)&pte)); __asm __volatile("srlz.i;;"); - bzero(&pte, sizeof(pte)); - pte.pte_p = 1; - pte.pte_ma = PTE_MA_UC; - pte.pte_a = 1; - pte.pte_d = 1; - pte.pte_pl = PTE_PL_KERN; - pte.pte_ar = PTE_AR_RWX; - pte.pte_ppn = 0xffffc000000 >> 12; - - __asm __volatile("mov cr.ifa=%0" :: "r"(IA64_PHYS_TO_RR6(0xffffc000000))); - __asm __volatile("mov cr.itir=%0" :: "r"(26 << 2)); - //__asm __volatile("ptr.d %0,%1" :: "r"(IA64_PHYS_TO_RR6(0xffffc000000)), "r"(26<<2)); - __asm __volatile("srlz.i;;"); - __asm __volatile("itr.d dtr[%0]=%1;;" - :: "r"(1), "r"(*(u_int64_t*)&pte)); - __asm __volatile("srlz.i;;"); - enter_kernel(hdr->e_entry, bi); restore_ic(psr); diff --git a/sys/boot/efi/loader/version b/sys/boot/efi/loader/version index b1f04d7b6cd..9ef0fcb29c0 100644 --- a/sys/boot/efi/loader/version +++ b/sys/boot/efi/loader/version @@ -3,6 +3,9 @@ $FreeBSD$ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important. Make sure the current version number is on line 6. +1.0: Don't map the I/O port range. We expect the kernel to do it. It + was done in the loader as a debugging aid and not intended as a + service/feature. 0.3: Pass the physical address of the bootinfo block in register r8 to the kernel. Continue to put it at the fixed address for now. 0.2: Much improved version. Significant is the support for passing diff --git a/sys/boot/ia64/common/exec.c b/sys/boot/ia64/common/exec.c index 91736cc5211..7df9950bbce 100644 --- a/sys/boot/ia64/common/exec.c +++ b/sys/boot/ia64/common/exec.c @@ -217,23 +217,6 @@ elf_exec(struct preloaded_file *fp) :: "r"(0), "r"(*(u_int64_t*)&pte)); __asm __volatile("srlz.i;;"); - bzero(&pte, sizeof(pte)); - pte.pte_p = 1; - pte.pte_ma = PTE_MA_UC; - pte.pte_a = 1; - pte.pte_d = 1; - pte.pte_pl = PTE_PL_KERN; - pte.pte_ar = PTE_AR_RWX; - pte.pte_ppn = 0xffffc000000 >> 12; - - __asm __volatile("mov cr.ifa=%0" :: "r"(IA64_PHYS_TO_RR6(0xffffc000000))); - __asm __volatile("mov cr.itir=%0" :: "r"(26 << 2)); - //__asm __volatile("ptr.d %0,%1" :: "r"(IA64_PHYS_TO_RR6(0xffffc000000)), "r"(26<<2)); - __asm __volatile("srlz.i;;"); - __asm __volatile("itr.d dtr[%0]=%1;;" - :: "r"(1), "r"(*(u_int64_t*)&pte)); - __asm __volatile("srlz.i;;"); - enter_kernel(hdr->e_entry, bi); restore_ic(psr); diff --git a/sys/boot/ia64/efi/version b/sys/boot/ia64/efi/version index b1f04d7b6cd..9ef0fcb29c0 100644 --- a/sys/boot/ia64/efi/version +++ b/sys/boot/ia64/efi/version @@ -3,6 +3,9 @@ $FreeBSD$ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important. Make sure the current version number is on line 6. +1.0: Don't map the I/O port range. We expect the kernel to do it. It + was done in the loader as a debugging aid and not intended as a + service/feature. 0.3: Pass the physical address of the bootinfo block in register r8 to the kernel. Continue to put it at the fixed address for now. 0.2: Much improved version. Significant is the support for passing