From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::542; helo=mail-pg1-x542.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) (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 32F6621B02822 for ; Wed, 15 Aug 2018 07:16:35 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id z8-v6so571792pgu.8 for ; Wed, 15 Aug 2018 07:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=gNhLnsfkkfvhgWdvJ8b4iQNV9VrWYnfPsdpzgT6Vljg=; b=HOPK7obvO2o1MyP78KHBNuf5KTmExh3eFLBPC995b5eGvqjv8Aw0aeGBKjQfk95tW8 snWmZb5DmdS2mo6IiNWSU3OFQRkiONQ5Cm50ACgd+96ctX4FPMNXkKm7xsmut4pe8DkI q2OUFqZP+SggUkR8UTVuVstnwyKUe5WXhCB+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=gNhLnsfkkfvhgWdvJ8b4iQNV9VrWYnfPsdpzgT6Vljg=; b=fIUQ4uM/YkCeEL/r6vE81Q1AM2Fs45SuwqHLJJOHWGDpPt8QHFBMgo94dMEtgK/VMA HQfbYHtEBobDhky9OL4I1oJzfYmZ/EPPpHNyiUUpaJ3F4CClYvXIe9aLso25h9xt91pp cPOVRHwJiOsey6NilPITnXaes5n6ZymMaq0aDpVbOwDaae0fFW3/een9AWJTHeX+kXc+ PtBtt3tmUjN7q4mT9LjytyWxXdNJtaEcAwlK2JYfPSv9D7BKP7y7cA9zP6wHPdMAG94S BbeHmie0a/Xcmj/Tkf7EYL9px4ibLP+jLV0RiT2JlNTAfXpWeOdOe75bW+9hlo+YCq0W Iovw== X-Gm-Message-State: AOUpUlF5F2pf+nGoX7lv3rFnZ6Z4d0+Nd0r18CTwY0PVuN6C/Yq0ofdn zylMREqCwmqbDN0/YMXZQAtnvA== X-Google-Smtp-Source: AA+uWPx+SerxW1WHAMD5eILIt2VMfBNyM5lf9CvTYdjHKytWR1cKTYUCrDgekY02BidZVk5kzSy/BA== X-Received: by 2002:a63:a619:: with SMTP id t25-v6mr24906782pge.288.1534342595534; Wed, 15 Aug 2018 07:16:35 -0700 (PDT) Received: from [10.48.0.18] ([64.64.108.64]) by smtp.gmail.com with ESMTPSA id l10-v6sm36366653pfj.179.2018.08.15.07.16.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Aug 2018 07:16:34 -0700 (PDT) To: Leif Lindholm 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 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> <20180815132231.phyy4bq6vk35pm52@bivouac.eciton.net> From: Ming Message-ID: <21ffec2c-66ae-a813-5acc-52fe7a2f3c14@linaro.org> Date: Wed, 15 Aug 2018 22:16:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180815132231.phyy4bq6vk35pm52@bivouac.eciton.net> 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 14:16:36 -0000 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit ÔÚ 8/15/2018 9:22 PM, Leif Lindholm дµÀ: > 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. OK, doing 1 for 18.08. I will send v3 patch set ASAP. Thanks. > > / > Leif >