From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mx.groups.io with SMTP id smtpd.web11.52255.1681732411966588267 for ; Mon, 17 Apr 2023 04:53:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm1 header.b=QsXWr09O; spf=pass (domain: bsdio.com, ip: 66.111.4.27, mailfrom: rebecca@bsdio.com) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 35A3D5C0165; Mon, 17 Apr 2023 07:53:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 17 Apr 2023 07:53:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1681732411; x=1681818811; bh=OBvEoqFtya3nlunvGZFZNpCQdEp6rbZJAt8 UJAg7i3c=; b=QsXWr09Os1uOYpVsnC3p0OL+j9PmNk+bVRREQcpUY3pakhHsKYz qCdUYOwssTJWWQDAYRg/8qMIe4br1GBcpJaVA0Cgez6Q51cdFndsTcz4ehV6GV4z yewRrLbxRUtYy+pW6sfiS9MGUV58v4+EnQ2o4dUgrq9kNczX74ge9Rf7nE0j8fQH 7G4+tFA1V5QGag8tsW3XGButjKp/P4MU33upeke63yL4GI0dfxfEJpiwP8zXl7G+ aZeU1CGh5Is07v+eGdgsZAbqqSEowZr25qdHoAzodmyjJ49ngwbb3gKpKe2U5b2N vh/L4tNL135loEdH9nzVKQjsLu5IM0CTruA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1681732411; x=1681818811; bh=OBvEoqFtya3nlunvGZFZNpCQdEp6rbZJAt8 UJAg7i3c=; b=b1hy3HrsrKRDNSa9XoSblSJl6Nr8t/6sDwg6RS8OUmKy/dHkgaZ kVywJV8vvHMr393hkXufuSF1trPypq7trMaGLR3I0qrpa1sa7nYt+O8/3PZ1II2v JxaFL0XED7UFQtF9WrY3IWAbgs69X9KMa/iQ7zJ7zNT2WYQ4OX9Lqs+XoKmvzN+t 4Y7PAC9RbxOq1pTH6C6bMnbm3E9ZNXkqZ4M+oTp04oP9GOxxk/0OpBwWdYIrhVo0 dZ1yGm+Xtqb/Bc6JQQ1+S7viYP+ucdKbwrDMzF3rYQxQ5RRaFP7Qb3LAsrdoX4xx JzyAUUkGmZKzOYoAVYDm8PFs5ely49Wq6PQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeliedggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftvggs vggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrg htthgvrhhnpeegfeegveduheejgfduffefhfehleehiefghfetvdejvdelhfeukefhhfdv geehveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hrvggsvggttggrsegsshguihhordgtohhm X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Apr 2023 07:53:28 -0400 (EDT) Message-ID: Date: Mon, 17 Apr 2023 05:53:27 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 1/1] OvmfPkg/BhyveBhf: install bhyve's ACPI tables To: =?UTF-8?Q?Corvin_K=c3=b6hne?= , devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Peter Grehan References: <20230417114601.398383-1-corvink@FreeBSD.org> From: "Rebecca Cran" In-Reply-To: <20230417114601.398383-1-corvink@FreeBSD.org> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/17/23 5:46 AM, Corvin Köhne wrote: > + > +/** > + Get the address of bhyve's ACPI Root System Description Pointer (RSDP). > + > + @param RsdpPtr Return pointer to RSDP. > + > + @return EFI_SUCCESS Bhyve's RSDP successfully found. > + @return EFI_NOT_FOUND Couldn't find bhyve's RSDP. > + @return EFI_UNSUPPORTED Revision is lower than 2. > + @return EFI_PROTOCOL_ERROR Invalid RSDP found. I think these should be @retval instead of @return ? > + if (Rsdp->Revision < 2) { > + DEBUG ((DEBUG_INFO, "%a: unsupported RSDP found\n", __FUNCTION__)); You missed converting this __FUNCTION__ to __func__. > + // > + // For ACPI 1.0/2.0/3.0 the checksum of first 20 bytes should be 0. > + // For ACPI 2.0/3.0 the checksum of the entire table should be 0. > + // > + UINT8 Sum = CalculateCheckSum8 ( > + (CONST UINT8 *)Rsdp, > + sizeof (EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER) > + ); Variables should be declared at the top of the function, and initialized separately. > + if (Sum != 0) { > + DEBUG (( > + DEBUG_INFO, > + "%a: RSDP header checksum not valid: 0x%02x\n", > + __func__, > + Sum > + )); > + return EFI_PROTOCOL_ERROR; > + } > + > + Sum = CalculateCheckSum8 ( > + (CONST UINT8 *)Rsdp, > + sizeof (EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER) > + ); > + if (Sum != 0) { > + DEBUG (( > + DEBUG_INFO, > + "%a: RSDP table checksum not valid: 0x%02x\n", > + __func__, > + Sum > + )); > + return EFI_PROTOCOL_ERROR; > + } > + > + // > + // RSDP was found and is valid > + // > + *RsdpPtr = Rsdp; > + > + return EFI_SUCCESS; > + } > + > + DEBUG ((DEBUG_INFO, "%a: RSDP not found\n", __func__)); Should these DEBUG_INFO messages which appear to be warnings/errors use DEBUG_WARN or DEBUG_ERROR, instead? -- Rebecca Cran