From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.22307.1675256580059447311 for ; Wed, 01 Feb 2023 05:03:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XvjFlGg/; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675256579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jZRXn0yTNN8F+Jw9nK5CdfTkSLIqYoVbSzkWQQMcmkY=; b=XvjFlGg/smapNTU5XuqaI/ImwjhpU2yZQBwkN4umz8S6SJ/zOeElkS7n1wzs9T19gTepqj rMX/Ku04jUhcICgrPqYqjvoO30svcvT8CeGbs2OtB5EkzqSH603sItQoieaBMGLtb3blMb 7/WbCrxZQZEx0n451RTVNEWRGLXoRBU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-607-V-Ryfh2tMwi8OIKs9B2dig-1; Wed, 01 Feb 2023 08:02:58 -0500 X-MC-Unique: V-Ryfh2tMwi8OIKs9B2dig-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4AA9D1C04196; Wed, 1 Feb 2023 13:02:57 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.85]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E468C15BAE; Wed, 1 Feb 2023 13:02:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E3B7618000A9; Wed, 1 Feb 2023 14:02:55 +0100 (CET) Date: Wed, 1 Feb 2023 14:02:55 +0100 From: "Gerd Hoffmann" To: "Wu, Jiaxin" Cc: "Ni, Ray" , "devel@edk2.groups.io" , "Dong, Eric" , "Zeng, Star" , Laszlo Ersek , "Kumar, Rahul R" , "Kinney, Michael D" , "Zimmer, Vincent" Subject: Re: [PATCH v3 1/5] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data Message-ID: <20230201130255.q6xu4vv6vqovqkb7@sirius.home.kraxel.org> References: <20230118095620.9860-1-jiaxin.wu@intel.com> <20230118095620.9860-2-jiaxin.wu@intel.com> <20230118111913.xgjlxdhngzwhvf76@sirius.home.kraxel.org> <20230119071324.4xvry2vvvfdr5m5y@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jan 29, 2023 at 05:08:49AM +0000, Wu, Jiaxin wrote: > > > > For the smbase case it might also be possible to store the base > > address and the per-cpu entry size, then use > > > > smbase = base + size * cpuindex > > > > to calculate the per-cpu base address. Puts some restrictions on the > > memory allocation (must be one big block), not sure this is possible, > > that part of the code is not (yet?) posted for review. > > > It's not a good idea that only store the start address of smbase and > the per-cpu entry size. There are multiple algorithms to calculate > each cpu's smbase, if hob producer (any peim) & consumer (SMM CPU > driver) use different algorithm for each cpu's smbase, then there will > be a big problem. The algorithm needs to be part of the HOB specification of course. take care, Gerd