Date: Sun, 6 Apr 2003 11:37:47 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 28345 for review Message-ID: <200304061837.h36IblQ2058614@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=28345 Change 28345 by peter@peter_overcee on 2003/04/06 11:36:54 connect up the x86-64 trampoline to elf64_freebsd Affected files ... .. //depot/projects/hammer/sys/boot/i386/libi386/elf64_freebsd.c#4 edit Differences ... ==== //depot/projects/hammer/sys/boot/i386/libi386/elf64_freebsd.c#4 (text+ko) ==== @@ -53,6 +53,8 @@ u_int32_t entry_hi; u_int32_t entry_lo; +extern x86_64_tramp(); + /* * There is an a.out kernel and one or more a.out modules loaded. * We wish to start executing the kernel image, so make such @@ -98,12 +100,12 @@ bzero(PT2, PAGE_SIZE); /* single PML4 entry */ - PT4[0] = (p4_entry_t)&PT3[0]; + PT4[0] = (p4_entry_t)(uintptr_t)&PT3[0]; PT4[0] |= PG_V | PG_RW | PG_U; /* four PDP entries, 1G each */ for (i = 0; i < 4; i++) { - PT3[i] = (p3_entry_t)&PT2[i * 512]; + PT3[i] = (p3_entry_t)(uintptr_t)&PT2[i * 512]; PT3[i] |= PG_V | PG_RW | PG_U; } @@ -113,10 +115,12 @@ PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; } - printf("Start @ 0x%lx ...\n", entry); + printf("entry_hi: %#x \n", entry_hi); + printf("entry_lo: %#x \n", entry_lo); + printf("Start @ %#llx ...\n", entry); dev_cleanup(); - __exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop, modulep, bi->bi_kernend); + __exec((void *)x86_64_tramp, boothowto, bootdev, 0, 0, 0, bootinfop, modulep, bi->bi_kernend); panic("exec returned"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304061837.h36IblQ2058614>