From owner-freebsd-hardware@FreeBSD.ORG Mon Sep 19 11:07:05 2011 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E46231065673 for ; Mon, 19 Sep 2011 11:07:05 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B8C528FC21 for ; Mon, 19 Sep 2011 11:07:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p8JB75F2073509 for ; Mon, 19 Sep 2011 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p8JB75Kl073507 for freebsd-hardware@FreeBSD.org; Mon, 19 Sep 2011 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 19 Sep 2011 11:07:05 GMT Message-Id: <201109191107.p8JB75Kl073507@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-hardware@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-hardware@FreeBSD.org X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2011 11:07:06 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/156241 hardware [mfi] 'zfs send' does not prevents disks to suspend if 1 problem total. From owner-freebsd-hardware@FreeBSD.ORG Mon Sep 19 13:49:52 2011 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C61C106564A for ; Mon, 19 Sep 2011 13:49:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9B60E8FC18 for ; Mon, 19 Sep 2011 13:49:51 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA11825; Mon, 19 Sep 2011 16:39:43 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4E77461E.4050001@FreeBSD.org> Date: Mon, 19 Sep 2011 16:39:42 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.2) Gecko/20110907 Thunderbird/6.0.2 MIME-Version: 1.0 To: freebsd-hardware@FreeBSD.org X-Enigmail-Version: undefined Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: John Baldwin Subject: magic constants in btxldr/btxcsu X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2011 13:49:52 -0000 I was looking at how btx works and in particular how arguments are passed from boot2-ish to loader. It seems that the code that implements that logic uses a few integer literals which make the code not quite obvious. For example: movl $0x48,%ecx # Allocate space subl %ecx,%ebp # for bootinfo movl 0x18(%esp,1),%esi # Source: bootinfo cmpl $0x0, %esi # If the bootinfo pointer je start_null_bi # is null, don't copy it movl %ebp,%edi # Destination rep # Copy movsb # it movl %ebp,0x18(%esp,1) # Update pointer #ifdef BTXLDR_VERBOSE movl $m_rel_bi,%esi # Display movl %ebp,%eax # bootinfo call hexout # relocation call putstr # message #endif start_null_bi: movl $0x18,%ecx # Allocate space subl %ecx,%ebp # for arguments leal 0x4(%esp,1),%esi # Source movl %ebp,%edi # Destination rep # Copy movsb # them Once I looked at this code I was able to understand how things work, but finding this code was not easy. So, apparently 0x48 should be a size of bootinfo; 0x18(%esp,1) should be a magic offset of bootinfo pointer in the args on the stack; 0x18 should be a combined size of arguments; 0x4(%esp,1),%esi should be a start of the arguments. Then, there is this: .set ARGADJ,0xfa0 # Argument adjustment It seems that the magic value is constructed as 0x1000 - (0x48 + 0x18), where 0x48 and 0x18 come from the previous snippet. But this is not obvious again. I am not fluent with that code at all to suggest any changes. But maybe these constants could be defined more prominently and somehow bound together. -- Andriy Gapon From owner-freebsd-hardware@FreeBSD.ORG Wed Sep 21 12:30:58 2011 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F385106566C for ; Wed, 21 Sep 2011 12:30:58 +0000 (UTC) (envelope-from kkv@insysnet.ru) Received: from insysnet.ru (cadillac2.insysnet.ru [77.72.138.216]) by mx1.freebsd.org (Postfix) with SMTP id AA6458FC17 for ; Wed, 21 Sep 2011 12:30:57 +0000 (UTC) Received: (qmail 92724 invoked from network); 21 Sep 2011 16:04:15 +0400 Received: from frog.insysnet.ru (HELO ?192.168.100.21?) (77.72.142.1) by mail.insysnet.ru with SMTP; 21 Sep 2011 16:04:15 +0400 Message-ID: <4E79D2BE.7070307@insysnet.ru> Date: Wed, 21 Sep 2011 16:04:14 +0400 From: "Konstantin V. Krotov" Organization: InSys User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-hardware@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: support for Oxford Semiconductor OXPCIe952 UARTs X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2011 12:30:58 -0000 hello. i'm have on fbsd RELENG_8 pci-e card with 1 rs-232 port. and this card don't support. (after patch) pciconf -lv puc0@pci0:5:0:0: class=0x070002 card=0xc1381415 chip=0xc1381415 rev=0x00 hdr=0x00 vendor = 'Oxford Semiconductor Ltd - now part of PLX Technology' class = simple comms subclass = UART i wrote fast-hack patch: --- pucdata.c 2011-08-22 22:46:02.000000000 +0400 +++ pucdata.c_ 2011-09-06 13:27:23.000000000 +0400 @@ -739,6 +739,13 @@ PUC_PORT_NONSTANDARD, 0x10, 0, -1, .config_function = puc_config_oxford_pcie }, + + { 0x1415, 0xc138, 0xffff, 0, + "Oxford Semiconductor OXPCIe952 UARTs", + DEFAULT_RCLK * 0x22, + PUC_PORT_NONSTANDARD, 0x10, 0, -1, + .config_function = puc_config_oxford_pcie + }, { 0x1415, 0xc15d, 0xffff, 0, "Oxford Semiconductor OXPCIe952 UARTs (function 1)", -- WBR, Konstantin V. Krotov CJSs "Information Systems" mailto: kkv@insysnet.ru phone: +7 (8332) 51-35-95 From owner-freebsd-hardware@FreeBSD.ORG Wed Sep 21 19:48:55 2011 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2B3C1065672 for ; Wed, 21 Sep 2011 19:48:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 349388FC16 for ; Wed, 21 Sep 2011 19:48:54 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA03227; Wed, 21 Sep 2011 22:48:51 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1R6Smp-000Odn-5a; Wed, 21 Sep 2011 22:48:51 +0300 Message-ID: <4E7A3FA2.9090600@FreeBSD.org> Date: Wed, 21 Sep 2011 22:48:50 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.2) Gecko/20110907 Thunderbird/6.0.2 MIME-Version: 1.0 To: "Konstantin V. Krotov" References: <4E79D2BE.7070307@insysnet.ru> In-Reply-To: <4E79D2BE.7070307@insysnet.ru> X-Enigmail-Version: undefined Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: freebsd-hardware@FreeBSD.org Subject: Re: support for Oxford Semiconductor OXPCIe952 UARTs X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2011 19:48:56 -0000 on 21/09/2011 15:04 Konstantin V. Krotov said the following: > hello. > i'm have on fbsd RELENG_8 pci-e card with 1 rs-232 port. > and this card don't support. > > (after patch) > pciconf -lv > puc0@pci0:5:0:0: class=0x070002 card=0xc1381415 chip=0xc1381415 rev=0x00 > hdr=0x00 > vendor = 'Oxford Semiconductor Ltd - now part of PLX Technology' > class = simple comms > subclass = UART > > i wrote fast-hack patch: Does the device work correctly with this patch? If yes, could you please submit the patch in a PR and also send a message about the PR to either current@ or stable@ mailing list depending on what version of FreeBSD you used? Thank you! > --- pucdata.c 2011-08-22 22:46:02.000000000 +0400 > +++ pucdata.c_ 2011-09-06 13:27:23.000000000 +0400 > @@ -739,6 +739,13 @@ > PUC_PORT_NONSTANDARD, 0x10, 0, -1, > .config_function = puc_config_oxford_pcie > }, > + > + { 0x1415, 0xc138, 0xffff, 0, > + "Oxford Semiconductor OXPCIe952 UARTs", > + DEFAULT_RCLK * 0x22, > + PUC_PORT_NONSTANDARD, 0x10, 0, -1, > + .config_function = puc_config_oxford_pcie > + }, > > { 0x1415, 0xc15d, 0xffff, 0, > "Oxford Semiconductor OXPCIe952 UARTs (function 1)", > > -- Andriy Gapon