From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 2D7F921A00AE6 for ; Wed, 15 Aug 2018 06:22:35 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id u12-v6so1124691wrr.4 for ; Wed, 15 Aug 2018 06:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=x6nnbFaUDNPruqXkHT+bU+mE7myhJGnJhZiqSNX/4hM=; b=gSsHPXumQK1xs1t6+ZIKFzHCkLrySKTG1B6+CEQzUoX/CCrMex41mQX/GMcFsqceT2 k91XnlQewxG/H/AVKvrf0Ntk+TyCz2plQUxvRJ3N7AGoqijhf+39dfYAn/suVc2H0U+0 WvA5IgqfB793QPmbRdOj+ThBVN7OleVfjeL3o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=x6nnbFaUDNPruqXkHT+bU+mE7myhJGnJhZiqSNX/4hM=; b=aYwYwsTKgL9nFmUNxndAq6+THtlMjnqriC3y9zi7tUfmc4l14RYi2FKgByJOGeaHmZ onkN08Jf4Wta6nlWHxZNwtELQ+gg4Auk0ihSkjP1vceYUuWJciCizH7JK6hWClrFdkDP Esxlnhdp0aj+j9mVd4EYHB+qwPGwnGO5jpx5JO95DRRZmCBwKoNWTNSoh7sdcDmBxqAh Dxo5nT0+OIEVMPkbPTf0C8KQkimDFXKckiJ9p/XtLK0PyCg9thdlyzigP544Wz08zJQ9 /ktp2MB3ntEN1GjCaHJ/L85P7Nh4VbaYvNmkoWzrcFlG98/ay/E720vPMxWjMJc9oJd9 tQzA== X-Gm-Message-State: AOUpUlE1G4SGtfbftTHQoVOJxpZc71IBfnt8H7X6FMI60UMnS1jWuVp2 c/0AHb++H/F/3uKre25fYn68Cg== X-Google-Smtp-Source: AA+uWPxoYiYgaugNZONjHwxnpgwVUi9IcKyGy2k5pirUNMq52fkIzjuDVayuD+DfPc2oD+bWQes9pA== X-Received: by 2002:adf:9261:: with SMTP id 88-v6mr15322617wrj.62.1534339354459; Wed, 15 Aug 2018 06:22:34 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id h83-v6sm1473808wmf.46.2018.08.15.06.22.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Aug 2018 06:22:32 -0700 (PDT) Date: Wed, 15 Aug 2018 14:22:31 +0100 From: Leif Lindholm To: Ming Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, Heyi Guo Message-ID: <20180815132231.phyy4bq6vk35pm52@bivouac.eciton.net> References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-23-ming.huang@linaro.org> <20180803143604.brqho43khtiwbs5i@bivouac.eciton.net> <9300682f-c86e-e9f2-4d25-4455c492a3ca@linaro.org> <20180809101936.q4cqhe6qncnghgtr@bivouac.eciton.net> <780640eb-44fb-1c44-2cdf-7ea4d38119f8@linaro.org> <20180814154812.c23f5ys4zobnwb5w@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v1 22/38] Platform/Hisilicon/D06: Add OemNicLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 13:22:36 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 15, 2018 at 07:08:33PM +0800, Ming wrote: > >>> Yes please. > >>> It would be good if we could have some (common) code to handle the > >>> fluke situation where you end up without your own MAC address. > >>> (So that the node can boot up and report that it is broken.) > >>> But it needs to be done in a reliable way, and that's too big a task > >>> for 18.08. > >> > >> I found some modules which invoke OemGetMac() don't judge the Status of > >> OemGetMac, so it may cause some issue now if changing to EFI_NOT_FOUND. > >> How about change it while we handle the fluke situation after 18.08 ? > > > > We cannot release 18.08 with known bugs. > > And not checking return value is a bug. > > > > I presume you mean that these calling functions are inside HwPkg? > > Yes. > > All D06 board will burn a Mac to eeprom before delivery and there is a > command (SetMac) to write a Mac. > > For handling the fluke situation, we think there are several ways: > 1 Initialize Mac to 0xFF; > Kernel seems will create a random Mac while the Mac is 0xFF. I have no objections to that, but it would prevent from netbooting. But being unable to read the eeprom is a serious hw failure. So my gut feeling is that this should prevent the system from booting completely. If you want to make it possible to boot at all, and don't mind giving up netbooting for systems with known hardware failure, I think that's acceptable. > 2 Make a Mac from ArmReadCntPct() and gTR->GetTime(); > 3 Make a locally administered Mac from ArmReadCntPct() and gTR->GetTime(); > > The 2nd is the way our product project use to handle the fluke situation. > What is your suggestion? 2 is not OK. 3 would be totally valid, but is basically just "do 2 properly". And doing 2 properly means doing ARP lookups to ensure we don't have any duplicate MACs on the current network segment. Which is more effort (and probably functionality we want to get into edk2 core). My recommendation for 18.08 would be doing 1. Then we have time to discuss nicer fallback options afterwards. / Leif