From owner-freebsd-mips@FreeBSD.ORG Wed Jul 29 21:52:55 2009 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46EF51065670 for ; Wed, 29 Jul 2009 21:52:55 +0000 (UTC) (envelope-from enews@omegaworldclass.org) Received: from mailx1-10.csloxinfo.com (mailx1-10.csloxinfo.com [58.137.249.10]) by mx1.freebsd.org (Postfix) with ESMTP id B6FD18FC13 for ; Wed, 29 Jul 2009 21:52:54 +0000 (UTC) (envelope-from enews@omegaworldclass.org) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhI7ACJhcEp9GSWN/2dsb2JhbACBMnkSEgYhgl2BMymIfT6IDbsXhBEF X-IronPort-AV: E=Sophos;i="4.43,290,1246813200"; d="scan'208,217";a="100132738" Received: from 125.25.37.141.adsl.dynamic.totbb.net (HELO SERVER) ([125.25.37.141]) by smtpm-1.csloxinfo.com with ESMTP; 30 Jul 2009 04:52:52 +0700 From: Customer Insights To: Message-Id: <20090730045244.416770843@omegaworldclass.org> Date: Thu, 30 Jul 2009 04:52:44 +0700 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 'Mastering Customer Insights & Superior Marketing Strategies" Workshop 2009, 2 September @ Conrad Hotel, Bangkok X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: enews@omegaworldclass.org List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2009 21:52:55 -0000 From owner-freebsd-mips@FreeBSD.ORG Thu Jul 30 23:50:30 2009 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8340A106564A for ; Thu, 30 Jul 2009 23:50:30 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from core.tav.kiev.ua (tavex.colocall.com [62.149.10.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF818FC16 for ; Thu, 30 Jul 2009 23:50:29 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from [76.77.86.2] (helo=[10.80.5.136]) by core.tav.kiev.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.52 (FreeBSD)) id 1MWfOT-000KHM-O1; Fri, 31 Jul 2009 02:50:42 +0300 Message-ID: <4A7231BE.3090703@freebsd.org> Date: Thu, 30 Jul 2009 16:50:22 -0700 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Neelkanth Natu References: <681122.20462.qm@web34407.mail.mud.yahoo.com> In-Reply-To: <681122.20462.qm@web34407.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Core-Spam-Level: - X-Core-Spam-Report: Spam detection software, running on the system "core.tav.kiev.ua", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Neelkanth Natu wrote: > Hi, > > This diff fixes a problem I encountered with ddb backtrace. > > The problem with looking for just 'j ra' instruction to find out the > end of the previous function is that gcc does not emit that > instruction for functions that are not supposed to return (for e.g. > boot() or panic()). This is especially bad because the backtrace > generated by calling panic() is unusable because boot() is right > above panic() in the object file. > > This change looks for start of a function by looking for an instruction > of the form: addiu sp, sp, - > > It so happens that gcc emits this as the first instruction for all > functions that use the stack. We keep the 'j ra' method around for > functions that don't use the stack. [...] Content analysis details: (-1.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.5000] 0.8 AWL AWL: From: address is in the auto white-list Cc: freebsd-mips@freebsd.org Subject: Re: Diffs to fix ddb backtrace X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 23:50:30 -0000 Neelkanth Natu wrote: > Hi, > > This diff fixes a problem I encountered with ddb backtrace. > > The problem with looking for just 'j ra' instruction to find out the > end of the previous function is that gcc does not emit that > instruction for functions that are not supposed to return (for e.g. > boot() or panic()). This is especially bad because the backtrace > generated by calling panic() is unusable because boot() is right > above panic() in the object file. > > This change looks for start of a function by looking for an instruction > of the form: addiu sp,sp,- > > It so happens that gcc emits this as the first instruction for all > functions that use the stack. We keep the 'j ra' method around for > functions that don't use the stack. Thanks! This is something I've always wanted to do but never did :) commited to projects/mips From owner-freebsd-mips@FreeBSD.ORG Fri Jul 31 00:51:52 2009 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2FA2106566B for ; Fri, 31 Jul 2009 00:51:52 +0000 (UTC) (envelope-from neelnatu@yahoo.com) Received: from web34402.mail.mud.yahoo.com (web34402.mail.mud.yahoo.com [66.163.178.151]) by mx1.freebsd.org (Postfix) with SMTP id A3B9C8FC1E for ; Fri, 31 Jul 2009 00:51:52 +0000 (UTC) (envelope-from neelnatu@yahoo.com) Received: (qmail 15275 invoked by uid 60001); 31 Jul 2009 00:51:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1249001512; bh=zTJ9ZyifEWZcWdDdJvTLHS+ismpNUh6MuMyWlTnsTfY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=o+h28PDoy+zbPKmplubnwRy4/QetoF+rdQwc1kemw8EVU3ie8woPkswGVhyn0Fje5ABhHJQenejAjLrGsSqeCpWnQcqFztwIDWAkPbEaVdC+hvd1/THFyVAvMCuCHMguiKjfBSsXMTmrt8XWbpLyHjKQrp1TAizGoEvmjqcv5sI= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=ahNM8Y0tIl5xxxJLq+790tMBLL4NuBu3RJn6Ni0s0uc2vUHE7BNoinQfYUhze/7l0Hf7O2ej4I7eX8TbAWJYl65XTiMqeLQbxYrPbROePh2YkkwK0AcYFXPMAbcXQxpvkAvuGYSl6culHPiKyFJj0ERStXFSnhr8xVrmxll0axQ=; Message-ID: <153254.15259.qm@web34402.mail.mud.yahoo.com> X-YMail-OSG: jICHvsoVM1nxALgBtm6gtGmNG_PyEeTpF7Ka0UfwWg3USMTUV0QpE5OvvLFa9WNFGeZioLsTpmvCR.7RZPHFsu9ai5Zk3kF_kyQut9yfImllm9tekEPdWTYDYQGQZQ0Kfq5inn_2WUIm4rM3IOt35XQwPds5yXdeRP.Ceik_vTU2dMNUGUW1iKJBV7q4617c4KhlgKT5kyXP.dNdGCcskerFQg3t5vL9Bpmyx6a00ZRaNhwo2zJxA0DP8fKycea5LeyB4U1YDqWSbNoP6G5Fzj__wLcv.o.p_.o1Vp5XXPYjFued12eEXGRbYG2SWo244QhFiA-- Received: from [198.95.226.228] by web34402.mail.mud.yahoo.com via HTTP; Thu, 30 Jul 2009 17:51:51 PDT X-Mailer: YahooMailClassic/6.0.19 YahooMailWebService/0.7.289.15 Date: Thu, 30 Jul 2009 17:51:51 -0700 (PDT) From: Neelkanth Natu To: freebsd-mips@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Diffs to fix L1 cache flush problems X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jul 2009 00:51:53 -0000 Hi, This is a simple change that fixes problems invalidating L1 data/instruction caches. The problem is that the type of the variable that holds the size of the instruction/data caches is uint8_t. Clearly this is going to overflow. On the Sibyte with 32KB cache size the uint8_t was causing it to be truncated to 0. This in turn makes the cache flush routines turn into no-ops. I ran into this when testing kernel loadable modules and have verified that this change fixes the problem. best Neel ==== //depot/user/neelnatu/freebsd_sibyte/src/sys/mips/include/cpuinfo.h#2 (text) - //depot/user/neelnatu/freebsd_sibyte/src/sys/mips/include/cpuinfo.h#3 (text) ==== content @@ -57,11 +57,11 @@ u_int16_t tlb_nentries; u_int8_t icache_virtual; struct { - u_int8_t ic_size; + unsigned int ic_size; u_int8_t ic_linesize; u_int8_t ic_nways; u_int16_t ic_nsets; - u_int8_t dc_size; + unsigned int dc_size; u_int8_t dc_linesize; u_int8_t dc_nways; u_int16_t dc_nsets;