From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-m974.mail.163.com (mail-m974.mail.163.com [123.126.97.4]) by mx.groups.io with SMTP id smtpd.web12.19392.1637894269284726020 for ; Thu, 25 Nov 2021 18:37:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@163.com header.s=s110527 header.b=eoxm70WH; spf=pass (domain: 163.com, ip: 123.126.97.4, mailfrom: bibo_mao@163.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Subject:From:Message-ID:Date:MIME-Version; bh=l5soU DIuB06wiiEjQXoKey2mnPF7U90YlTVC7aFDdeg=; b=eoxm70WHQL82lo00l28tj Rcm+VaandZeYV4K6BiyIgzPaL8vJVZQp1DHIEWBWF5vgOdhG/Ba9yOnZvV4TYhtG Wy29UGVXDa/iuaeG2P9xeH75fPGcgKn1T3qrXBB9RZwn58iVaca+EUZvFNjmZw9Z 18PCQ8zbHg0E8EWTa1XxJw= Received: from [10.20.42.25] (unknown [114.242.206.180]) by smtp4 (Coremail) with SMTP id HNxpCgCXEjV4SKBhO8olNA--.24932S2; Fri, 26 Nov 2021 10:37:45 +0800 (CST) Subject: Re: [edk2-devel] one possible issue with ovmf fvb To: devel@edk2.groups.io, kraxel@redhat.com References: <444f3f42-cc2c-f255-389e-504b31789fcd@loongson.cn> <20211125103810.qtydjqvysuvak5c4@sirius.home.kraxel.org> From: "maobibo" Message-ID: <477f7ae6-37af-8a9f-ac4b-273eaa03f138@163.com> Date: Fri, 26 Nov 2021 10:37:44 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20211125103810.qtydjqvysuvak5c4@sirius.home.kraxel.org> X-CM-TRANSID: HNxpCgCXEjV4SKBhO8olNA--.24932S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrury5CrW3KFy7WF1fZw13Arb_yoWkCrgEgw sxurW7JwsrJwn2gF4rtwn8Kr4kKws7Zw1aq3sxtw4xCFWUAanxJF45Gw1F9F1rC3yIvrn8 WryFvryjyF1FgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU5WT5PUUUUU== X-Originating-IP: [114.242.206.180] X-CM-SenderInfo: 5ele0sxpdrqiywtou0bp/1tbi3xpXO2B0IUmt5wAAsf Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/25/2021 06:38 PM, Gerd Hoffmann wrote: > Hi, > >> PcdStatus = PcdSet64S (PcdFlashNvStorageVariableBase64, (UINT32)(UINTN) Ptr); >> ASSERT_RETURN_ERROR (PcdStatus); > > I guess you are referring to that UINT32 cast? > Not sure why it is there. I think you can just drop it. Yes, it is. There will be problem if the loongarch bios uses ovmf fvb dxe and there is only one flat memory hob. UEFI bios memory may be allocated with 64bit address, so there will be problem. I will submit one patch to fix this in order to use these common code. regards bibo, mao > >> Can uefi bios manage memory beyond 4G? > > The X64 builds can do that just fine, although they usually store > everything below 4G, so issues like the one above go unnoticed. > > HTH, > Gerd > > > > >