From owner-freebsd-ia64@FreeBSD.ORG Tue Jul 13 03:06:10 2004 Return-Path: Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2EA8816A4CE for ; Tue, 13 Jul 2004 03:06:10 +0000 (GMT) Received: from hotmail.com (bay19-f8.bay19.hotmail.com [64.4.53.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14C0743D45 for ; Tue, 13 Jul 2004 03:06:10 +0000 (GMT) (envelope-from youngdream8039@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 12 Jul 2004 19:54:59 -0700 Received: from 61.187.16.2 by by19fd.bay19.hotmail.msn.com with HTTP; Tue, 13 Jul 2004 02:54:59 GMT X-Originating-IP: [61.187.16.2] X-Originating-Email: [youngdream8039@hotmail.com] X-Sender: youngdream8039@hotmail.com From: "Yang M.M." To: freebsd-ia64@freebsd.org Date: Tue, 13 Jul 2004 02:54:59 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed Message-ID: X-OriginalArrivalTime: 13 Jul 2004 02:54:59.0879 (UTC) FILETIME=[C97FE370:01C46884] X-Mailman-Approved-At: Tue, 13 Jul 2004 11:58:33 +0000 Subject: does FreeBSD have "per-CPU page" ? X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2004 03:06:10 -0000 Hi all, Linux/ia64 has a "per-CPU page" in region 5 just after "gate page". The per-CPU page provides one page of CPU-local data,which is useful on MP machines. My question is : does FreeBSD have such a page? If so, where is it? Regards, Annie _________________________________________________________________ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn From owner-freebsd-ia64@FreeBSD.ORG Tue Jul 13 15:57:55 2004 Return-Path: Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55CC216A4CE for ; Tue, 13 Jul 2004 15:57:55 +0000 (GMT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E66043D2F for ; Tue, 13 Jul 2004 15:57:55 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from dhcp50.pn.xcllnt.net (dhcp50.pn.xcllnt.net [192.168.4.250]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i6DFvsIa090808; Tue, 13 Jul 2004 08:57:55 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp50.pn.xcllnt.net (localhost [127.0.0.1]) i6DFvsri008434; Tue, 13 Jul 2004 08:57:54 -0700 (PDT) (envelope-from marcel@dhcp50.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp50.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i6DFvsps008433; Tue, 13 Jul 2004 08:57:54 -0700 (PDT) (envelope-from marcel) Date: Tue, 13 Jul 2004 08:57:54 -0700 From: Marcel Moolenaar To: "Yang M.M." Message-ID: <20040713155754.GB8277@dhcp50.pn.xcllnt.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: freebsd-ia64@freebsd.org Subject: Re: does FreeBSD have "per-CPU page" ? X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2004 15:57:55 -0000 On Tue, Jul 13, 2004 at 02:54:59AM +0000, Yang M.M. wrote: > Hi all, > Linux/ia64 has a "per-CPU page" in region 5 just after "gate page". The > per-CPU page provides one page of CPU-local data,which is useful on MP > machines. > My question is : does FreeBSD have such a page? If so, where is it? Yes and no. There is per-CPU data, but it's not necessarily a page and definitely is not wired at a fixed virtual address. The address of the per-CPU data is in pcpup. This happens to be register 13 (TP). It is saved in ar.k4, from which pcpup (=r13) is restored on entry into the kernel. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-ia64@FreeBSD.ORG Thu Jul 15 21:57:06 2004 Return-Path: Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 789AF16A4CE for ; Thu, 15 Jul 2004 21:57:06 +0000 (GMT) Received: from oak.newevolutions.net (oak.newevolutions.net [207.44.186.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1853043D41 for ; Thu, 15 Jul 2004 21:57:06 +0000 (GMT) (envelope-from jbriggs@lumarc.com) Received: (qmail 28384 invoked from network); 15 Jul 2004 21:57:05 -0000 Received: from unknown (HELO JBRIGGS) (64.80.58.238) by oak.newevolutions.net with SMTP; 15 Jul 2004 21:57:05 -0000 From: "Jerry Briggs" To: Date: Thu, 15 Jul 2004 17:52:25 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal Subject: Zx2000 workstations X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2004 21:57:06 -0000 We have a Enterprise customer that Is looking to sell a few used HP Zx2000 workstations. Would any one have a interest in the config below ? Used excellent condition HP zx2000 Complete with media & accessories Dual OS for HP Ux 11.i & Windows 64bit Itanium 1.4ghz Processor 1.5Mb cache 2 x 40gb IDE drives 2gb Hp Ecc PC2100 Ram ATI Fire GL Z1 DVD Rom 10/100/1000 Regards Jerry Briggs HP-Compaq Account Manager Lumarc Computer Corp. Phone 585-295-6000 X 47 Fax 585-295-6001 www.lumarc.com Jbriggs@lumarc.com AOL IM Lumarc67 From owner-freebsd-ia64@FreeBSD.ORG Thu Jul 15 22:35:24 2004 Return-Path: Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E247016A4CE for ; Thu, 15 Jul 2004 22:35:24 +0000 (GMT) Received: from caduceus.sc.intel.com (fmr04.intel.com [143.183.121.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB0EA43D1F for ; Thu, 15 Jul 2004 22:35:24 +0000 (GMT) (envelope-from arun.sharma@intel.com) Received: from talaria.sc.intel.com (talaria.sc.intel.com [10.3.253.5]) major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i6FMbq2W031811; Thu, 15 Jul 2004 22:37:52 GMT Received: from [143.183.130.155] (adsharma-desk.amr.corp.intel.com [143.183.130.155]) major-inner.mc,v 1.10 2004/03/01 19:21:36 root Exp $) with ESMTP id i6FMaqZu031241; Thu, 15 Jul 2004 22:36:52 GMT Message-ID: <40F706AB.5070701@intel.com> Date: Thu, 15 Jul 2004 15:35:23 -0700 From: Arun Sharma User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dietmar.hahn@fujitsu-siemens.com References: <200406181402.32212.dietmar.hahn@fujitsu-siemens.com> <40E5EAD5.6060405@intel.com> In-Reply-To: <40E5EAD5.6060405@intel.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) cc: freebsd-ia64@freebsd.org Subject: Re: SMP on 5.2-20040531-SNAP-ia64 X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2004 22:35:25 -0000 On 7/2/2004 4:08 PM, Arun Sharma wrote: > On 6/18/2004 5:02 AM, Dietmar Hahn wrote: > >> result = ia64_sal_entry(SAL_SET_VECTORS, >> SAL_OS_BOOT_RENDEZ, >> ia64_tpa(FDESC_FUNC(os_boot_rendez)), >> ia64_tpa(FDESC_GP(os_boot_rendez)), >> 0, 0, 0, 0); > > [...] > Sorry, I need to leave for a vacation now, but this looks like a > linker/relocation issue to me. > Turned out to be a compiler bug. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16559 The attached work around works for me and takes it all the way to /sbin/init. -Arun Index: sal.c =================================================================== RCS file: /ncvs/src/sys/ia64/ia64/sal.c,v retrieving revision 1.12 diff -u -r1.12 sal.c --- sal.c 1 Feb 2003 22:50:09 -0000 1.12 +++ sal.c 15 Jul 2004 22:11:31 -0000 @@ -152,12 +152,16 @@ ipi_vector[IPI_AP_WAKEUP] = dp->sale_vector; setup_ipi_vectors(dp->sale_vector & 0xf0); -#ifdef SMP - result = ia64_sal_entry(SAL_SET_VECTORS, - SAL_OS_BOOT_RENDEZ, - ia64_tpa(FDESC_FUNC(os_boot_rendez)), - ia64_tpa(FDESC_GP(os_boot_rendez)), - 0, 0, 0, 0); +#ifdef SMP + { + struct ia64_fdesc *f = + (struct ia64_fdesc *) os_boot_rendez; + result = ia64_sal_entry(SAL_SET_VECTORS, + SAL_OS_BOOT_RENDEZ, + ia64_tpa(f->func), + ia64_tpa(f->gp), + 0, 0, 0, 0); + } #endif break; From owner-freebsd-ia64@FreeBSD.ORG Fri Jul 16 15:22:43 2004 Return-Path: Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBE7D16A4CE for ; Fri, 16 Jul 2004 15:22:43 +0000 (GMT) Received: from door.intbel.ru (boos.intbel.ru [62.76.203.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D63243D1D for ; Fri, 16 Jul 2004 15:22:43 +0000 (GMT) (envelope-from breath@unix.net) Received: from [62.76.203.4] by door.intbel.ru (NTMail 7.00.0018/FR8724.21.ec44b0ca) with ESMTP id ezneuaaa for freebsd-ia64@freebsd.org; Fri, 16 Jul 2004 00:36:56 +0400 To: freebsd-ia64@freebsd.org Message-ID: From: breath Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Fri, 16 Jul 2004 00:33:11 +0400 User-Agent: Opera M2/7.50 (FreeBSD, build 673) Subject: Reboots after "OR AL,1 MOV CR0, EAX" on some computers. X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2004 15:22:44 -0000 Hi. I need some help. I think you'll be interested. I develop a little OS that will boot from floppy. It's still under construction and has about five thousand lines of assembly source now. I use Bochs emulator to debug it and after that I test it on my real computer. I have all working correctly on my compter. But I started to test it around other machines recently and encountered a problem I can't solve. But I'm sure there are lot of minds in FreeBSD world who know how to help me. I can't figure out what happens because on my computer I get all things well, but I can't conduct test of this kind on other computers. Here is the problem. My OS's boot loader (after loading the main module) switches CPU to very limited protected mode and jumps to module's entry point. After it, main module reloads all tables like GDT etc to make a good free environment for initialization and further running. Shortly: ON SOME COMPUTERS (MAYBE CPUS) I GET REBOOTING JUST ON 'JMP' INSTRUCTION AFTER PE BIT IS ENABLED. I've got no reboots on all i386, i486, i586 computers that I tryed to boot from. I have a Pentium III Celeron (Coppermine) 900MHz - no reboots. Also tested on some Pentium II 400MHz - no reboots. But on other side Pentium IV (don't remember speed) gave me a reboot. And other computer I was not able to see processor model (maybe PentiumIV !?) gave me a reboot too. Using endless loop stop points I figured out that reboot is before any instruction pointed by 'protected' label and that reboot happens after setting the PE bit. Here's very diminished boot sector code that reflects the error. It must be compiled with nasm as a binary so that result will be a floppy disk image file. Then it must be written to a floppy from scratch (from boot sector). Created floppy is expected to be bootable disk. Normal: When you boot from the floppy you get something like black screen and computer hangs up (but not reboots) Abnormal: When you boot from the floppy you get a screen splash and then back to reboot POST procedure. Here goes the code. PLEASE, even if you're not interested in this 'puzzle':( MAKE AND TEST IT ON YOUR COMPUTER. EMAIL ME RESULTS AND COMPUTER MODEL. It was HARD work to make this OS. I believe that some people understand me and will give me a clue. From my side I'll show them the full version. ;--------------------------------------------------------------------- ; Compile: %nasm thisfile.asm -o fd ; Insert a floppy ; Write (as root): #dd if=fd of=/dev/fd0 org 0x7C00 ; Expecting to be loaded at 7C00 by BIOS bits 16 real: cli xor ax, ax mov ss, ax mov sp, 0x7C00 ; Temp stack just under myself call real_open_A20 ; For 32 bit address space call real_init_gdt ; Load GDTR mov eax, cr0 or al, 0x1 ; cr0 |= PE mov cr0, eax ; If I place 'jmp $' here all computers stop here normally jmp 0x10: protected real_open_A20: .l1: in al, 0x64 test al, 0x2 jnz .l1 mov al, 0xD1 out 0x64, al .l2: in al, 0x64 test al, 0x2 jnz .l2 mov al, 0xDF out 0x60, al ret real_init_gdt: lgdt [.gdtr] ret .gdt0 dw 0x0000, 0x0000, 0x0000, 0x0000 .data dw 0xFFFF, 0x0000, 0x9200, 0x00CF .code dw 0xFFFF, 0x0000, 0x9800, 0x00CF .gdtr dw $ - .gdt0 - 1 dd .gdt0 bits 32 protected: ; Wherever I place 'jmp $' after the 'protected' label, ; on some computers I get reboot to hell. ; (In that case CS:IP is never points to 'jmp $' ; - something happens before) mov ax, 0x8 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax mov esp, 0x7C00 jmp $ times 512 - 2 - ($ - $$) db 0 ; Fill the rest of sector dw 0xAA55 ; Bootable sector sign times 1474560 - ($ - $$) db 0 ; Fill the rest of floppy ;--------------------------------------------------------------------- Best regards, Yuri Grebenkin breath@unix.net