From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 68DAC941436 for ; Mon, 12 Feb 2024 11:53:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=MSGYq8Zt/25urpcAwpAik/BJrqCmf2tk/WR9sPQQZNw=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:Organization:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707738806; v=1; b=bKM/XZ4xf79ZYppxgRGvBWnbnCY5W2HChtS7D/6lb38TatCZsKfmJisal+CznJtWkrAGaYNr s15vy5r8aGjkCnS+uAABkPG4qyPaOgOI5wg3WLsHZ1fJLZOk5zKhRX8MlyXH9+QluRhHDlEAdKk E+LOMPnXAdoWvG6jEVUjF8tA= X-Received: by 127.0.0.2 with SMTP id EIz5YY7687511xOUwbKylxWi; Mon, 12 Feb 2024 03:53:26 -0800 X-Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by mx.groups.io with SMTP id smtpd.web10.4767.1707738806107848851 for ; Mon, 12 Feb 2024 03:53:26 -0800 X-Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a389ea940f1so321593566b.3 for ; Mon, 12 Feb 2024 03:53:25 -0800 (PST) X-Gm-Message-State: GCs3BeJwB7dgbXZLlYD95cJhx7686176AA= X-Google-Smtp-Source: AGHT+IG99jY9j+FBbdSjxoesXJMBluZauaQVnZhV12KspWzNDrIvLz/ItnxpAv0ZlpJ6jzKCfwZw1g== X-Received: by 2002:a17:906:55cd:b0:a3b:c04f:6475 with SMTP id z13-20020a17090655cd00b00a3bc04f6475mr5073388ejp.74.1707738804326; Mon, 12 Feb 2024 03:53:24 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXSx0Ru31pZMIw3eSNpTNED5Ui4T1FYDpARQ7T9jh1cE9aLkESpCXQHRvCX7YWJnd8yVhm5AR8ZpbggaAS79qBdVk3dXcRpKhbv1CU+uCnLDpO7AfjmpKj6oY4zDHE= X-Received: from [192.168.200.206] (83.11.29.216.ipv4.supernova.orange.pl. [83.11.29.216]) by smtp.gmail.com with ESMTPSA id kg5-20020a17090776e500b00a3bb5bc4705sm136492ejc.92.2024.02.12.03.53.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Feb 2024 03:53:23 -0800 (PST) Message-ID: <67c4cf96-70b7-4e24-a5b8-e30a1da36271@linaro.org> Date: Mon, 12 Feb 2024 12:53:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH edk2-platforms v2 1/4] Platform/SbsaQemu: add SbsaQemuHardwareInfoLib To: devel@edk2.groups.io, quic_llindhol@quicinc.com Cc: Ard Biesheuvel , Graeme Gregory References: <20240116-no-dt-for-cpu-v2-0-6cf078d9ab76@linaro.org> <20240116-no-dt-for-cpu-v2-1-6cf078d9ab76@linaro.org> From: "Marcin Juszkiewicz" Organization: Linaro In-Reply-To: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Language: pl-PL, en-GB, en-HK Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="bKM/XZ4x"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io W dniu 19.01.2024 o 20:18, Leif Lindholm pisze: >> +UINT64 >> +SbsaQemuGetCpuNumaNode ( >> + IN UINTN CpuId >> + ) >> +{ >> + UINTN SmcResult; >> + UINTN Arg0; >> + UINTN Arg1; >> + >> + Arg0 = CpuId; >> + >> + SmcResult = ArmCallSmc0 (SIP_SVC_GET_CPU_NODE, &Arg0, &Arg1, NULL); > It does seem a bit wasteful we're making the same call twice per core, > discarding one of the results. > Could we have an init function that allocates an array and > prepopulates it, with the Get-functions just returning values from the array? We have discussed it over IRC and decided to merge working version first. EDK2 statically links libraries into modules so "static struct" solution I tried to use does not work. Turning SbsaHardwareInfoLib into protocol would probably solve the problem but that's out of my knowledge of EDK2 internals. Also do not like idea of memory buffer with some DynamicPcd pointing to it. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115350): https://edk2.groups.io/g/devel/message/115350 Mute This Topic: https://groups.io/mt/103758014/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-