From owner-p4-projects@FreeBSD.ORG Tue May 1 18:38:45 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CB75B16A408; Tue, 1 May 2007 18:38:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F08F16A406 for ; Tue, 1 May 2007 18:38:44 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.224]) by mx1.freebsd.org (Postfix) with ESMTP id 48AC913C484 for ; Tue, 1 May 2007 18:38:44 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so1838377wra for ; Tue, 01 May 2007 11:38:43 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=JgPUHJAcehHXphrNgcyRufr3mnydjhwwnLTtYsSUlWwF/wH/PzYHoVvIy90EB81Pwn0rTV4xd4kwAmiJyj0EqnRjkdEno2da9KkhdKcH0i2AP8W9vFIaTEykZSp+lxPDzD/iLMbnBsE/B9qpG0dGpDpHK7lMDgUPljGyVqDxRMQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=CVEGvSziAWsnOfZWojEPcamGs+vU4XqXs5avgU7uZt0/TBkRLbsv2G0qBIjNClkj0MQsXbrhDGYa8nOpCe6auTd/H+xSnLvgZJc+bWnZ26KFZuOlM42zHrkWNz+iDtLs8CFKWei8tjYwG/hIid8nXMiCE3+0CBQ9YsYySJBt1Uk= Received: by 10.78.204.20 with SMTP id b20mr2417105hug.1178044721602; Tue, 01 May 2007 11:38:41 -0700 (PDT) Received: by 10.78.97.12 with HTTP; Tue, 1 May 2007 11:38:41 -0700 (PDT) Message-ID: <3bbf2fe10705011138v46ef8d66ka8b9e232cd757025@mail.gmail.com> Date: Tue, 1 May 2007 20:38:41 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Garrett Cooper" In-Reply-To: <4633C67D.8010703@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200704271246.l3RCkoMJ051651@repoman.freebsd.org> <46326366.50907@FreeBSD.org> <4633C67D.8010703@gmail.com> X-Google-Sender-Auth: 38aa7117d4424f3b Cc: Perforce Change Reviews Subject: Re: PERFORCE change 118874 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2007 18:38:45 -0000 2007/4/29, Garrett Cooper : > Attilio Rao wrote: > > Alexey Tarasov wrote: > >> http://perforce.freebsd.org/chv.cgi?CH=118874 > >> > >> Change 118874 by taleks@taleks_th on 2007/04/27 12:46:48 > >> > >> added code from pxe.c. Now need to find way to install NIC irq > >> handler. > >> > >> Affected files ... > >> > >> .. //depot/projects/soc2007/taleks-pxe_http/pxe_core.c#3 edit > >> .. //depot/projects/soc2007/taleks-pxe_http/pxe_core.h#3 edit > >> > >> Differences ... > >> > >> ==== //depot/projects/soc2007/taleks-pxe_http/pxe_core.c#3 (text+ko) ==== > >> > >> @@ -1,8 +1,38 @@ > >> +#include > >> +#include > >> #include "pxe_core.h" > >> #include "pxe_mem.h" > >> #include "pxe_ip.h" > >> #include "pxe_mutex.h" > >> > >> +#include "btxv86.h" > >> +#include "pxe.h" > >> + > >> + > >> +/* PXE API calls here will be made in same way as in pxeboot. > >> + the only difference - installation of isr, that was not needed in > >> pxe.c. > >> + main problem is that, v86 monitors reflects interrupts, > >> + we need to change IDT, for correct irq and call pxe_core_isr() > >> from it. > >> +*/ > >> + > >> +/* NOTE: to think about using of this buffers */ > >> +#define PXE_BUFFER_SIZE 0x2000 > >> +#define PXE_TFTP_BUFFER_SIZE 512 > >> +static char scratch_buffer[PXE_BUFFER_SIZE]; > >> +static char data_buffer[PXE_BUFFER_SIZE]; > >> +static pxenv_t *pxenv_p = NULL; /* PXENV+ */ > >> +static pxe_t *pxe_p = NULL; /* !PXE */ > >> +static BOOTPLAYER bootplayer; /* PXE Cached information. */ > >> + > >> +/* defined in pxetramp.s */ > >> +extern u_int16_t __bangpxeseg; > >> +extern u_int16_t __bangpxeoff; > >> +extern void __bangpxeentry(void); > >> +extern u_int16_t __pxenvseg; > >> +extern u_int16_t __pxenvoff; > >> +extern void __pxenventry(void); > >> + > >> +/**/ > > > > Could you, please, use here uint16_t instead than u_int16_t as style(9) > > suggests? > > > > Attilio > > Just checking, but is this the same for other data types, i.e. > u_int_32_t => uint32_t? > > I'm asking because I'm working with the BDB code, and I think it's using > C99 or older format data elements / types. Following style(9), you should only use uintXX_t (where XX is a number of 8, 16, 32, etc.) since it follows ANSI C. Attilio -- Peace can only be achieved by understanding - A. Einstein