From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::244; helo=mail-io0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6E5E821F3B41E for ; Sat, 28 Oct 2017 06:02:56 -0700 (PDT) Received: by mail-io0-x244.google.com with SMTP id 189so18111982iow.10 for ; Sat, 28 Oct 2017 06:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ngT8S7EYXMAxliIVih4re+AdxYps8Kw4d7g33ehd2Mc=; b=jBjNZm66uLvcdm7kNMBfsRS1/TuV5zZBkC8VFyFXMOSjcn/+ZFuiSRy7WqKpxvoHJ6 W/TEY763+0xSSlJMUc7vqKzFNC97BcO19fOfwPRPqlSJM8gpbpXe5cuOKtw2ncp/VyvL MrHuobCJX+O+Pva/qfilXOenTJ81s4RaTWmmc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ngT8S7EYXMAxliIVih4re+AdxYps8Kw4d7g33ehd2Mc=; b=T6Fw5a8tTQEUddKInikI8recTbyd9tlltNZnQ364luNpigV2J/5+in1RNlWWKnZ8tF 4N0hRI32z4s7XY1vX03SYWfG0OMA1vwQDAalgd5xr6zf3xl+aJ8EPMqPzkqMLM5FHjOZ ZabzW2UPJmMtxoKTkS/pjA2IJ9FRJcpV0Q/6y3NjpH4hq0ZlB742EffU/jzVebxOjDaG OKRilyOPMlqhp5kmTcj8lPxbYFCf1kdYWO9jsh9Iw0izitNrEJ8nBNR6jWZ/InWqHUGF xCrPWDRE3FzH6yURI2UUGwfzWwrerMSo4N+GZ3RdFgz5sMB84uOEJa8tbquYAZTLcPuH GhPA== X-Gm-Message-State: AMCzsaWuLYPGCud9Mi4iAs3lwFKqNbGeA8LBYZViDLmpMq6NCl79TZQ2 zlh91VdZUHFxKmJ2vdQcQUuZ7lBzCBMV9pVFNLzQzg== X-Google-Smtp-Source: ABhQp+SOr0ol3DRpxlzLap1qj8VZ4l9pI4fNN4pqkWkyN7zu3B+JN5+3k/cnz+6Vw3GJy+/O8etjHAUgpKRAx66yVaQ= X-Received: by 10.36.141.70 with SMTP id w67mr4395278itd.58.1509196003431; Sat, 28 Oct 2017 06:06:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.131.167 with HTTP; Sat, 28 Oct 2017 06:06:42 -0700 (PDT) In-Reply-To: <20170911161201.y3lhr3rq5vz433nz@bivouac.eciton.net> References: <20170908182315.9591-1-ard.biesheuvel@linaro.org> <20170908182315.9591-9-ard.biesheuvel@linaro.org> <20170911161201.y3lhr3rq5vz433nz@bivouac.eciton.net> From: Ard Biesheuvel Date: Sat, 28 Oct 2017 14:06:42 +0100 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" , =?UTF-8?B?UGlwYXQv44Oh44K/44Ov44OL44OD44OI44Od44OzIOODlOODkeODg+ODiA==?= , Masahisa Kojima , Masami Hiramatsu Subject: Re: [PATCH edk2-platforms 08/14] Silicon/Socionext: add driver for NETSEC network controller X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Oct 2017 13:02:56 -0000 Content-Type: text/plain; charset="UTF-8" On 11 September 2017 at 17:12, Leif Lindholm wrote: > On Fri, Sep 08, 2017 at 07:23:09PM +0100, Ard Biesheuvel wrote: >> This adds the NetSecDxe driver provided by Socionext, but reworked >> extensively to improve compliance with the SimpleNetworkProtocol API, >> and to avoid uncached allocations for streaming DMA. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> --- >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/NetsecDxe.c | 1000 ++++++++++++++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/NetsecDxe.dec | 47 + >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/NetsecDxe.h | 88 ++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/NetsecDxe.inf | 69 + >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/include/ogma_api.h | 736 ++++++++++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/include/ogma_basic_type.h | 45 + >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/include/ogma_version.h | 24 + >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_basic_access.c | 88 ++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_basic_access.h | 52 + >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_desc_ring_access.c | 1391 +++++++++++++++++++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_desc_ring_access_internal.h | 111 ++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_gmac_access.c | 1454 ++++++++++++++++++++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_internal.h | 210 +++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_misc.c | 1385 +++++++++++++++++++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_misc_internal.h | 38 + >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_reg.h | 219 +++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_reg_f_gmac_4mt.h | 222 +++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/netsec_sdk/src/ogma_reg_netsec.h | 368 +++++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/ogma_config.h | 25 + >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep.h | 265 ++++ >> Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c | 176 +++ >> 21 files changed, 8013 insertions(+) >> >> diff --git a/Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/NetsecDxe.c b/Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/NetsecDxe.c >> new file mode 100644 >> index 000000000000..7c3f12362f14 >> --- /dev/null >> +++ b/Silicon/Socionext/Synquacer/Drivers/Net/NetsecDxe/NetsecDxe.c >> @@ -0,0 +1,1000 @@ >> +/** @file >> + >> + Copyright (c) 2016 Socionext Inc. All rights reserved.
>> + Copyright (c) 2017, Linaro, Ltd. All rights reserved.
>> + >> + This program and the accompanying materials >> + are licensed and made available under the terms and conditions of the BSD License >> + which accompanies this distribution. The full text of the license may be found at >> + http://opensource.org/licenses/bsd-license.php >> + >> + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, >> + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. >> + >> +**/ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include > > Sorted alphabetically, please? > >> + >> +#include "NetsecDxe.h" >> +#include "netsec_for_uefi/pfdep.h" > > Hmm, could that be folded into NetsecDxe.h? > Yes, but I would have to modify all the 'platform independent' source files, and not having to modify them is kind of the point. ... >> + >> + ogma_disable_desc_ring_irq (LanDriver->Handle, OGMA_DESC_RING_ID_NRM_TX, >> + OGMA_CH_IRQ_REG_EMPTY); >> + >> + // ##### configure_mac > > In general, it feels like each of these comment headers indicate a > good place to break a block out into a helper function. > Meh. This function is not complex at all, it just does a bunch of steps in sequence. Don't see the point really. ... Apologies for snipping the context - my edit window became intolerably slow due to the size of the email. I /think/ I incorporated all other feedback you gave to this patch.