From patchwork Sat Oct 3 10:07:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anirudh Srinivasan X-Patchwork-Id: 2315687 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=VVZXJv7w; dkim=pass (2048-bit key; unprotected) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=AYxu77I1; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.u-boot-project.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hxxXx6X4sz1yGr for ; Sun, 04 Oct 2026 07:08:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0FB508137A; Sat, 3 Oct 2026 20:08:15 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id x07SZ01VQ2yE; Sat, 3 Oct 2026 20:08:14 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp1.osuosl.org 32BDC81347 Authentication-Results: smtp1.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 ARC-Seal: i=2; d=osuosl.org; s=arc; a=rsa-sha256; cv=pass; t=1791058094; b=dezVlZKyFYc/l5ai6yIA4td+WuN1zjRbql/VJT/iudmdb3dZ8oTXWQu66rsOABp9A8FW IiWEX5vUO9NB1pp6ebOieAkFgAc4KLcmAzOf9hP6owkOrtqqyThSCj62mjG+0pbvirWIe AFNtJafReTizcjpIZsyldkwxJetT1Qycg26dCdyybJQs4MqTM3NHKFgp+Rk/p38kPTSpL oF2ZUMNMey2bRTTTflGyOmKBKkS32N7O8WgoNGtwBQwz6SEFp5IpQjogdvHBngJJmbua3 9OC4RIsZ/b0XhPKfpd9yssgeEb0xKrRCtGJ6boTHQyDV1m0/eC4mRp90eEhkUl3Y5bQ== ARC-Message-Signature: i=2; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058094; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:Received:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-BeenThere:X-Mailman-Version:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Errors-To; bh=XAKeBFd1ED1/No4mfls9iCxl1K6TuM7J0pa8TR23iaU=; b=ZnFKMw23wCY1ogZLKsGQvJdKhwFN+NgDjV4dLvHgI7IIRTPbCPuvmLjPgL8wYXDM32Kh E+ipbh9kzZnlEgifh9WifpbGmwrZ5/lC/MwbW7SSUUJWLwhKP8GcSLFn5AmPzs2a3zV1k DRg9Ok1D2FyrzP9B9hEyDdcsfCffrC9zLmb2fEkrf+c7d3znepzk9ECzI6fw7t/PivBfG /AqMkRrqyqjWDpSTgtG6e+pB+GmXcCxpyS2vkOon6SrPXURaBKBLAy1/jhK+4nJi0a52I lNJL4bRJb+27MA+hgjdVouNrngrJRGpK3xZfIpv/qJMWbCAbpqGcLit0tWhJfNYGi0A== ARC-Authentication-Results: i=2; smtp1.osuosl.org; dmarc=pass header.from=oss.tenstorrent.com; dkim=pass header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=AYxu77I1; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1791058094; bh=XAKeBFd1ED1/No4mfls9iCxl1K6TuM7J0pa8TR23iaU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VVZXJv7wGt6b9tOM9vRZSb1EhCffHkEd0HvR3gLECsu4BDTqhJp2f8HQlzsINIkzz 54nrbz/v6RRxM2N7jclMcHtd053VIfQtualXncTHJWsW6kEczsEIzzZhCBQ1zjDYym rSZzDnQYMp64EEa+9vUBp9svTZHFhO6W+Oe2EJx52IH2XcPbcHP3sSRNogtnPJd8bz u3A+5AqFlYvC4ehaRXiGXw+nplrYCF3k0swDG9kXb/kLGMh4vc7OVQ6oWxKGLjIQGE cPntNK5rl1/4tWqnMPDhz48UtYE+2R0tXhpki8OXAr6v91bYj4L89O0ZNUojTPJY4n ygXFhf4r+zUOg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 32BDC81347; Sat, 3 Oct 2026 20:08:14 +0000 (UTC) X-Original-To: u-boot@lists.u-boot-project.org Delivered-To: u-boot@lists.u-boot-project.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id BF522476 for ; Sat, 3 Oct 2026 20:08:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A542C8109E for ; Sat, 3 Oct 2026 20:08:10 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id fJ9Ww4yVXukd for ; Sat, 3 Oct 2026 20:08:09 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp1.osuosl.org 1E63A8101D Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip="2607:f8b0:4864:41::c" ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1791058089; b=YsjqIWr+xmIZ4nnjv/sfOXRsu0G2VTfvkC4FTUYJIy7RQJxWsSJQBWk/aBuzwund1hgp cMmYi12AgebkCcJ5PO0hHc6LIBd2XMzVCH2kDzNjY4/xBNd638bme+Bk316Qh5rgrwxIR RgMKz5T8nIQcqIUEVG4hypxuCKQmJqDTeTHmLetaTXQ2xLLtimcuCEqlCXV+3Y6C9tMCJ XUaxDf0u/v5rvTjUcUSp+VgTrjDQ00PO/QdJ9eEDeCHNL/EQQw74DC0e/2G9aMmovRWjM olGAa2ZXsAZq9mkrb5B5TDlg8dTe/QF092B92972Bm2rwa8GjgYMmGCoxMjuCix+Bqw== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058089; h=Received-SPF:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:Date:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id: References:In-Reply-To:To:Cc:X-Mailer; bh=XAKeBFd1ED1/No4mfls9iCxl1K6TuM7J0pa8TR23iaU=; b=OIVP4vSKX0o0Izy0DYt8VDaksENtHC3N8RzXMx5f7sBsxpGTo6ggHVn9XphOqT0pAlkL 35/feMWE5dPqzlNbn4V6LoV0xBeAF0cspGqOF7uyEadpsZg+c0VchpNv9wmt7GAg36mz+ ohq8eoUVrbL6InGzNYJe/gamL6U91H2A6hjCygd11PheF5YM89CCR1/XIjNqI5Q/2A3WI 80Qvd89E8a6Yq+nYu49FSXmn+MlAG6bTQ91uFxzQX3cfppTDv1hkSd9hhJKWLKkPwPqkz gSfl3LlXquVj0WgsBaO/AsVtw4htxDn1M4zwMs1x0XGROafI6CgVwQjatsyu11fRyvQ== ARC-Authentication-Results: i=1; smtp1.osuosl.org; dmarc=pass header.from=oss.tenstorrent.com; dkim=pass header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=AYxu77I1; arc=none smtp.remote-ip="2607:f8b0:4864:41::c" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:41::c; helo=mail-yx2-x0c.google.com; envelope-from=asrinivasan@tenstorrent.com; receiver= Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=reject dis=none) header.from=oss.tenstorrent.com Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=AYxu77I1 Received: from mail-yx2-x0c.google.com (mail-yx2-x0c.google.com [IPv6:2607:f8b0:4864:41::c]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1E63A8101D for ; Sat, 3 Oct 2026 20:08:08 +0000 (UTC) Received: by mail-yx2-x0c.google.com with SMTP id 00721157ae682-8ab46253999so4507307b3.2 for ; Sat, 03 Oct 2026 13:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1791058088; x=1791662888; darn=lists.u-boot-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=XAKeBFd1ED1/No4mfls9iCxl1K6TuM7J0pa8TR23iaU=; b=AYxu77I1xo4NPaANpeuqzpF1pxd3v0b7Ra8ds1ik58cf5+V+45nIuKb7IK40BdOe+0 qa0JiWGg1g4rWR55w3lgMWMRWGmPXdfW4gC89gXoKoepA21teb1N/6v+wFc22IkCd5lg 4MFGka+rxPO6109DUZC1BQi/xz242lUHVTzRrRnSil5x7zrHlTZS945ibe1bBN7m6SRt Ek6S+KDavwuI9cRBW4XxQ4YO7kvefkjzMoSj/09JgzFTnowoR5SvvyoCUS2DxA6spoaf FAokO5+TqQ7B+E9J0TDR9Gb4ybU7QSlXUtMKhu/PanDqRKMh1K4NmlGeUXAsb/ywoiZh fYTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791058088; x=1791662888; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=XAKeBFd1ED1/No4mfls9iCxl1K6TuM7J0pa8TR23iaU=; b=b+aDEh5qJ7rkB95+ooNYFAOoh6s2DLODkT4FwQdKgOMgySTXGnVMnH72DiCy1/uQlG OV/CPb9tk5xdxBqJNhICdTpkmWnyWdELYtreQhGCc/LhhEzJE0swMu+PDJl1MtoUDx4L 7OmZyzf3XRRY4POsp/EWtGz39uEgszBKWMvI2kE/IpnxfequeAzZoVDQHtU47R5OGpyr H9vT3ITUTIY8frUF8TSA6j05mSOWSTSR5eH37n6miI2wVewOTXyYt15Rw87+j/3jyFDM LYtdNjNxN1zRlra1kXx7CRxRKMRYybQOK9DhQlNqtQ8XiidDvaW9TDCYcWAlMf9Zjrsl sXxg== X-Gm-Message-State: AFq9FYLZLWZ6GrHReFU81+0WDlpD90S/zJxUFQoUUNutE1hfv5B0xKOh hetWNhHYAImK1tEvDG+MSWuDu+eHKAzduzhaaT0Gd3AfDZnoli5vahZMXjnHrKb0L1hmf/J+cwO 6PgfDxnQ= X-Gm-Gg: AYBFou19t1yGYe+fNkbQUXtvXRcsZgBLIyvEVEOPO1CLpwkWdh7sGUeHyzTTzkP/MxS lUQVqk+Fx/VfewFw8pJcd80zMwmcfQv0q7AeHpSHw4hc/MVNiwJonfxYSkHNRR9U62riXrXG9j5 o3gde4nS5jiy9nRK4RUu7oNr8gZAkL+zGE/gI5rZ41MvJ5XeWuQW3/cLzabXWcMpxW7wBlQuN9h iMZaNDssjp9h6gKtR0T8Lqs+hksmf3FLolcnlreWY0XDoFt4un4ciuMzj10i7EPOfzS0KETc57p ZuqDVvZNNC5k26DxDZYqWfsqe8BKFtl+KZ9ffdl0N9rbPdtkbfoqtOZXFyRNoWAdnJR3/qo7XAr B28B4rFj/PPyNnbFG+leXAQrH/678LClw5QMI3qWZP7DEhOMtjzs2eHYuZ05CQpd71uvjPZJCwK HN7rx9y31Ui7mrAKdyZ0jCMuzF0mvp8BG5H+5i9rp5b3yw3BAkrh0DZ8r15qYudQ38CKtCD08Du WqZlxUG2KB/32rqK5afgogkLbqg3Ij2lQYOYORuzKIAD/gvk7aGbA== X-Received: by 2002:a05:690e:140f:b0:677:ae83:c955 with SMTP id 956f58d0204a3-677ae83cf77mr2872808d50.45.1791058087926; Sat, 03 Oct 2026 13:08:07 -0700 (PDT) Received: from [192.168.2.129] ([2600:1700:220:59e0:e2e9:9d9a:5aeb:a046]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-677c16c243esm986048d50.0.2026.10.03.13.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2026 13:08:07 -0700 (PDT) From: Anirudh Srinivasan Date: Sat, 03 Oct 2026 15:07:55 -0500 Subject: [PATCH v2 1/5] bios_emulator: select X86EMU_RAW_IO only on x86 MIME-Version: 1.0 Message-Id: <20261003-aspeed_vbios_fixes-v2-1-f8e593f024ab@oss.tenstorrent.com> References: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> In-Reply-To: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> To: u-boot@lists.u-boot-project.org Cc: Tom Rini , Simon Glass , Anirudh Srinivasan X-Mailer: b4 0.15.1 X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.u-boot-project.org X86EMU_RAW_IO mode can only be used on architectures that support port I/O like x86, so don't select this for other architectures. This was also suggested by Tom Rini [1], but was never added in. [1] https://lore.kernel.org/u-boot/20241117025353.GA3151182@bill-the-cat/ Suggested-by: Tom Rini Reviewed-by: Simon Glass Signed-off-by: Anirudh Srinivasan --- drivers/bios_emulator/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bios_emulator/Kconfig b/drivers/bios_emulator/Kconfig index 3660576772d..5afea87a2e4 100644 --- a/drivers/bios_emulator/Kconfig +++ b/drivers/bios_emulator/Kconfig @@ -1,10 +1,10 @@ config BIOSEMU bool - select X86EMU_RAW_IO + select X86EMU_RAW_IO if X86 config SPL_BIOSEMU bool - select X86EMU_RAW_IO + select X86EMU_RAW_IO if X86 config X86EMU_RAW_IO bool From patchwork Sat Oct 3 10:07:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anirudh Srinivasan X-Patchwork-Id: 2315689 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=MAdkLbc3; dkim=pass (2048-bit key; unprotected) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=fdmp2H7M; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.u-boot-project.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hxxXz334Pz1xyX for ; Sun, 04 Oct 2026 07:08:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3FF1F6067F; Sat, 3 Oct 2026 20:08:17 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id OWL4jVBjVAfH; Sat, 3 Oct 2026 20:08:16 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp3.osuosl.org 6E0C660624 Authentication-Results: smtp3.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 ARC-Seal: i=2; d=osuosl.org; s=arc; a=rsa-sha256; cv=pass; t=1791058096; b=TohO/YbwTxlD999IPWSZh+GZIvs+Kkjuq585/3yznuN7Xc17HwmKxeTk22QU7Aapq/fA XTXqmNZ+Cw/j0rf0WXDZzLirs6T4YzmONuO1EZZDWYY2yr8fssMoP4+rwRtL0zdpXiU3Y pEprvOg07ceB8iNxWNOL669cuwJhsuwa15X2X1+tlidX8XN4Tdj1HyAGhUlNz9cXuhqjm l68tTvGrMuaXymH3YQw0bXq7NHKaTBfCqY9bB9JtPU7lVE79LZxmPXS8Fj+f+DBAqr3ew tE9Fp7GoB9i/xCNTa/kJgxHbtwxAzq5I5VAmYjHRrBoydyIiJb7CBQgxb06MyejYyaw== ARC-Message-Signature: i=2; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058096; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:Received:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-BeenThere:X-Mailman-Version:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Errors-To; bh=mytQ65x0k7iWkNsSRLPMajbRVGUGSVvwzzLLvDCwaMc=; b=UrVrooMojkPGvu7dXW645/femNdXAYUbfXoAajU1aJkY/VjZFsfQZr7JU8MvIcx/E9ZW NyOPvt3Co+aQsUfKS6Fj8xm8YcH+Dj4XepfnqAUxjv6wOWNpHff1xd6lQ9arOSi0QkNZl 41jS0Ga7Tu0S9S1Pj5xG9UBrBeFvVi+E3cBv6VBUh8mlAOF9TyBsPZKM57X/W4jQaSiF9 xAXXynoZbopJ//jW1UnfJToZg5N6ICj6t7pxru1nX/Znhsd04rKRHf3go8IagdapAWyiD 39AFoQcD4G+OhIfmk97ahLXIUDMIULS/zoRtY4drrmUKXe6t8FfT9K0ItWTtgHiL0IQ== ARC-Authentication-Results: i=2; smtp3.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1791058096; bh=mytQ65x0k7iWkNsSRLPMajbRVGUGSVvwzzLLvDCwaMc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MAdkLbc3jWvCOy+Gv60Zny4oP0rMy4VsPXNM/IqYJ/z0tUyNebuA+LJAeTlN/iY4C g1yXVk4kHUa5TY/7TBa/NUcyGwBhokR2fxu4T4Fo9p0yXSMLRRjPryLYd/Tun9D9Mo OijnfdA86F/bd/rPyxtsxnHbmfkosU/S/Bp6kOi7Tyht35wWaGcy1Mmz72HV8DA0pZ DAMSBcfC45b9/WNrzvA8ZADMlW0G3+mcPhfyl8UYDm8XztUFgIlx3/oosaJKoZvg5v a5AR+x5tOyDm+FEDZhPGRq+V9F5gEQXCCie8mrQ9LN/MjkOEo+wX1W4zyPj6K98eXJ rbTPqT1K0iutQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 6E0C660624; Sat, 3 Oct 2026 20:08:16 +0000 (UTC) X-Original-To: u-boot@lists.u-boot-project.org Delivered-To: u-boot@lists.u-boot-project.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id 5304A282 for ; Sat, 3 Oct 2026 20:08:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2B8A740064 for ; Sat, 3 Oct 2026 20:08:11 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id yp2VRX2TnA21 for ; Sat, 3 Oct 2026 20:08:10 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp2.osuosl.org 261BC4008E Authentication-Results: smtp2.osuosl.org; arc=none smtp.remote-ip="2607:f8b0:4864:41::11" ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1791058090; b=SKLs7jcsKBcBuSN8+t6OTG+hx3QdFLVdjWm4r+C9yHoeSso4ucyALZ45+rHVvPzt803S ss6kZsj9+J+m9gF1LbHPVTnraYn0UmTG0smaEW8cPeFHjHUS5F8NBW3ooS3MYEnsMcgRk O5CfV54BHUyAXfvjAOXRyxeD3mp80ld8Ku9eMEc9U//KUFMEFoCGaAdANN2NbIZPo9diu 2ng22xZ61Xo8QdS6L9BVJKfUeTSm2hK4cIx2RhmkQx8iLDrNrtuJ37By5q8svpg2JUNlU njvtn1+pfJnMQ6CwZE69a9ZFywz2RsrbyTfGPi2ROtxTS0FizG4e/PxLHEW9CGdkTlg== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058090; h=Received-SPF:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:Date:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id: References:In-Reply-To:To:Cc:X-Mailer; bh=mytQ65x0k7iWkNsSRLPMajbRVGUGSVvwzzLLvDCwaMc=; b=C/EzzCuUEzE6n20JvnUkRW5Kz2I2R4cowWIZzvQyrzgJYxzLVxAIDG5qy0xGrB3HFSeV iUo8f33LwGZzt9jvTAgiFPF48kBUjDtt3/K48PXfcsMv4rl1+nHWfxjR0KuSHPmaJ2h1I fdwO0Iaugiv6YaJyLZ5/khTqZIdTucqiEOKuMHwRqDRM1bJPwcxk/bJSRn3u7e7ZFOpwO 5vgisgEh62mDc2fvZzHKSpxXCLnfV54q1zf66Tt1N1k2hEicnMZPQ+ajmwwu24LrfBQTa 0i5so3E9/HqOS/ilHIUp48G4raO9UK7IgD6nB6zShqA/mYuCKkZBJWrBNf8frCZZo6A== ARC-Authentication-Results: i=1; smtp2.osuosl.org; dmarc=pass header.from=oss.tenstorrent.com; dkim=pass header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=fdmp2H7M; arc=none smtp.remote-ip="2607:f8b0:4864:41::11" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:41::11; helo=mail-yx2-x11.google.com; envelope-from=asrinivasan@tenstorrent.com; receiver= Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=reject dis=none) header.from=oss.tenstorrent.com Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=fdmp2H7M Received: from mail-yx2-x11.google.com (mail-yx2-x11.google.com [IPv6:2607:f8b0:4864:41::11]) by smtp2.osuosl.org (Postfix) with ESMTPS id 261BC4008E for ; Sat, 3 Oct 2026 20:08:09 +0000 (UTC) Received: by mail-yx2-x11.google.com with SMTP id 956f58d0204a3-66e4ab201ebso353734d50.3 for ; Sat, 03 Oct 2026 13:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1791058088; x=1791662888; darn=lists.u-boot-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=mytQ65x0k7iWkNsSRLPMajbRVGUGSVvwzzLLvDCwaMc=; b=fdmp2H7MCe+L/WFXufacfIM8/z/G69D5iCjv8Ke8fnN6j/q/2qxh+vbpcAQUc37T5a sIyN+C17xBVDFrwgnUiJGscHb/Z5UmtuMUUsY9KMHfonQ3V9txzzFaOO6HLC3TmM6CMM TraheupoxdQOd2CiLB0AUk9KKnGPs1PahDzHvrk4KB22pBnbTgkFTKE2KXVtub6oLMDL HBb3RvEnRLCOfp36SbcrfU/GU9wWVZvaw0x1gyzYDGuhS32IVlRvfxVOBWj3L4Rp7HMt 6LEMN4EmpPHS5s1JdNe0pm62WCB9+qSkBxRCcXzjtx5mKR34uSV9V94WA3yB3ek3d9Kq h+rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791058088; x=1791662888; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=mytQ65x0k7iWkNsSRLPMajbRVGUGSVvwzzLLvDCwaMc=; b=Rov77ZFsB5SQO1eJsgAekqc4jq/RSqJyqWG73MOyq+xl93GN7BpZo5bYJIXuF86Ay5 aGrtzWY7bga5xeCsT+iXoG4OsZ/5gR4CBzLfRsIxZfTljl5FoQcCaK38IurLeU0CKzTf 1gVzA3pQCVv8PbIQMBUXepgxNH4j29OWDETx4ugy1BMpM7EByDKZpua1SdFoDMMv61Ws Lv51klWviADIfXJNWCBeGNTA90oKSBSBefL4e/7rNJFEW/012knwljPo7tAR+TjsKL10 XCHJwrajnF9bHN/2Vqcu4ZwWSM+PDyg01hqyF/h30GWo9bFMgP/jV/JHaYnKo5mxDGcy P5Ow== X-Gm-Message-State: AFq9FYL5SEhwU5m3pIVv0KXs5vEJSzYxQI1LOOk9bpfzMlXlm+/vb/kQ BtuxHGjWELzLnhTwejsrzdpCgcnTVmgqyCgTpF1fMvHMufsJceTt5FbQc2FC0TjPgeAvG3gcjXw kj8/o/Vg= X-Gm-Gg: AYBFou0COUcVO1vGZ6TC1PE9TCbbnOipAk5s0B9JoZ5Ck4hVDBiFwrZE3LAyKKX3aky uKwK3h9s2lT+omny654w7OXgu6+9mBH/8TA+SSTkL5cvlj7sI5u222loHh040R6gr578+VFbS/j utrlBxgvzboS3W6ENN0MOPiZqBf11nac6xEII/hZdtDkK7Nm2A65het/eBUhy419owEE31IJrIn 79k1bV3c8nVWynT+ITv/FGjeILK/+LgOskbQC++nU1FYRJ5TxYixPdBCUicZbvpEH41cEhumeXl jFpvnE2lW0zboY2Rr6PB4JN03+cvo1dw1WAcTzIY0b/HfRpLPeuxpM5kanEvtvikuyZxXCnHupF nbp8CivVcGvq4BU1ElYqTYI4dvyH5RlGGgq/lxGy8arlM2XfEKd/oxKbA3Q0xjoOCPXpZ6m3sv/ 1bkr0sD9ZGqO7icyeDno/7ljFRl1fM62L/Fmn+9UcDt+nVjyX6j/UvriTcPLKXv24cxoE/GAZqY krk79DLXpiEoaUgX2yi83e+2PbtoO9vJNfTgmmxlXE5Z2hsPvE5fg== X-Received: by 2002:a53:ac94:0:b0:677:b45a:d5fe with SMTP id 956f58d0204a3-677b45adeb3mr1722490d50.61.1791058088550; Sat, 03 Oct 2026 13:08:08 -0700 (PDT) Received: from [192.168.2.129] ([2600:1700:220:59e0:e2e9:9d9a:5aeb:a046]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-677c16c243esm986048d50.0.2026.10.03.13.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2026 13:08:08 -0700 (PDT) From: Anirudh Srinivasan Date: Sat, 03 Oct 2026 15:07:56 -0500 Subject: [PATCH v2 2/5] bios_emulator: don't free a caller-supplied BIOS image in biosemu_run MIME-Version: 1.0 Message-Id: <20261003-aspeed_vbios_fixes-v2-2-f8e593f024ab@oss.tenstorrent.com> References: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> In-Reply-To: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> To: u-boot@lists.u-boot-project.org Cc: Tom Rini , Simon Glass , Anirudh Srinivasan X-Mailer: b4 0.15.1 X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.u-boot-project.org biosemu_run can be called with a BIOS image supplied by the caller (argument bios_rom is not NULL), or with no image so that it makes its own copy from the card's ROM (argument bios_rom is NULL). It subsequently calls PCI_postController, where the BIOS image it runs is stored in vga_info->BIOSImage. In the first case that pointer is the caller's buffer; in the second it is a buffer biosemu_run itself allocated. The clean_up path in biosemu_run always frees vga_info->BIOSImage. That is right for the second case, but in the first case it frees memory the caller still owns. This can cause a double free when the caller tries freeing this memory again. Only free vga_info->BIOSImage when biosemu_run made the copy itself (i.e bios_rom is NULL) Signed-off-by: Anirudh Srinivasan --- drivers/bios_emulator/atibios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c index e992a1aa822..ebeeb178b7f 100644 --- a/drivers/bios_emulator/atibios.c +++ b/drivers/bios_emulator/atibios.c @@ -509,7 +509,7 @@ int biosemu_run(struct udevice *pcidev, uchar *bios_rom, int bios_len, */ if (clean_up) { BE_exit(); - if (vga_info->BIOSImage && + if (!bios_rom && vga_info->BIOSImage && (ulong)(vga_info->BIOSImage) != 0xc0000) free(vga_info->BIOSImage); free(vga_info); From patchwork Sat Oct 3 10:07:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anirudh Srinivasan X-Patchwork-Id: 2315690 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=JGik6DP4; dkim=pass (2048-bit key; unprotected) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=LGt3/mgr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.u-boot-project.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hxxY04Fd1z1xyX for ; Sun, 04 Oct 2026 07:08:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 18C7340EC8; Sat, 3 Oct 2026 20:08:19 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id CHA4uqcpP7dW; Sat, 3 Oct 2026 20:08:18 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp4.osuosl.org 5C48F40EBE Authentication-Results: smtp4.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 ARC-Seal: i=2; d=osuosl.org; s=arc; a=rsa-sha256; cv=pass; t=1791058098; b=W9Itm7xn1hNjim0xbh8yBh2hLMU44JMEnRxWoZ1KGIU+bCIHmIc16O1uqTzCPbaZWDQh 0OugwDihxIbmEYIofK8TgWo71dbL+xMQXFDdjr9ekIDBsWhuHR9+XMoUAaUSA57UMuP74 Bh7wjMCNfr7uXFVTQCK0svvykPNJjno9gboStyMktw7oPBnBGCQa7jdVZFJ1u8V/GNVqo g9/j/og+y0+WnjpV29HV6Vr0HLaQ2QIUWtxh718kt58tEZ1PLczFOGyLzFg1JIM5rv+62 28u3T3XUdWiMecYg3W0GRuHDwwJkps0WZOO+256U/hzqYbxMcImZcszxJU+e80qnAgA== ARC-Message-Signature: i=2; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058098; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:Received:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-BeenThere:X-Mailman-Version:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Errors-To; bh=p9Lp+i4TTMjuQOuR1c6AiYrXgg60g+iH8r02mxRBhhc=; b=ObpQrd80A/MBK/p1/OfFVLyj41cfEZlF2R95iVB88GCkrcS0e2enl5DNNdFC7l8Y2MXE 5kGSvFB/Htac0W6QaA1QyH1FxzA9X1qLWB5Y3WzXVIFruXb+3dRVHCISQvUqj3NSmxsK0 dq20MBfDVGUf2zjJqGLAcseSieJ4gc76ExLka96zWP2npB14O8qJcJR3Kb8+p83IdTsJs c8Swlut0Olvi6IBhpFMptF0qi4ookF54XpWVwT6eHLyA8N0StZndJbElYxk0ON8K0XquZ 9L5nJKfZjwdiX5N3laVgfLk9d0cBUCAn3cZh5n1oZoEnL1a/7G7KvIhkc3rX8gVA94Q== ARC-Authentication-Results: i=2; smtp4.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1791058098; bh=p9Lp+i4TTMjuQOuR1c6AiYrXgg60g+iH8r02mxRBhhc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JGik6DP4w67dP9F1pR5DYaf38RP4O/kX9rYsPNl6MNpWsM4kMEL1KG0xlGmmPmzlH CkMYEVkwBpYzlIL0qlBMNlFElyiAKYgXUHSagbSG/+8XzG8GwUdLv39uhDcAnzK4Bq xtV7j2SbrUuuBBzED0/KC1gYTd5M/lfPLO8b3WocIE+LpQJhe4z3WenuRwDMJKPBJH oTPcTTNNvPVy/B3J3xvUlRsD+mvN6SXFyLJ/gQNc8tXdcp1mCTAM8ypoqYwYPTsAvl uD86sSvQNVw+kch7IWq4tFrBa0KTwJT9Ufc6rNWpNwF0AOTdKdQhQSP8VhEzQ5DYw7 QLIoXMjNygphQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 5C48F40EBE; Sat, 3 Oct 2026 20:08:18 +0000 (UTC) X-Original-To: u-boot@lists.u-boot-project.org Delivered-To: u-boot@lists.u-boot-project.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists1.osuosl.org (Postfix) with ESMTP id B2B17476 for ; Sat, 3 Oct 2026 20:08:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9540A605F5 for ; Sat, 3 Oct 2026 20:08:11 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Xa35gCk2pQYl for ; Sat, 3 Oct 2026 20:08:11 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp3.osuosl.org C5F4B60624 Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip="2607:f8b0:4864:20::b12a" ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1791058091; b=F2KRVl/pt+RePHOza2KXSCd5Lz7PgdcgxvuIe7Y1muubjNto5yGazGkFsRf3O4ox7e/4 sXZ8mLxP0Np2QLNTzX0wrptb/xFJZ0l7N0b0nI2tupq5GEDBTK4KIPZyCQx7zF0MEhV4O uk3vU37R7Y1JncdTI0bQ6ayuDokWlgKwhHl2VZ6+mQ6+N082mKjJWOvUzoihSVG1IaChs bZytM1UwAMfBLZD2wenL0jWZvWlcdoHVIBjjmAZ9RQa4RCyEzuPRL8Ph39NOKILOPzE5k k/HJ+maq+KWBKqI06gMuveaejdQ5C9u/H35NbP6ZZttusOE50WNBrC+EvOkJZRBfzqw== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058091; h=Received-SPF:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:Date:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id: References:In-Reply-To:To:Cc:X-Mailer; bh=p9Lp+i4TTMjuQOuR1c6AiYrXgg60g+iH8r02mxRBhhc=; b=e217DTrqOsSX7+Uemw/j8QMbjalp5b1WZEOCG/NhJm4BtgQMAncGntfJ5dI9vUFvZXW8 AAUb7S2NEtzhrA3W86KfbmoWzZWAG0Yf2Gf3PRAOcagEojJt2Tl+zcWavp+u5xCeMKaK/ Ig4+/3kBO11DYVo071weXr2bx2I81qE2WPNmLdkRpsYN2h+DyBk9CSd1ylejFb6deXi9+ GREcWIsBEmESdOW/ObTnCiV6v/7oMRbGwTAWg8qq/19TDD1B8T6dI9cI9Tj5jL0Vx9VOa OcNgGV+0Pb7EYtrfTn07YgSmLXagOa/qT8R6bp3oKKBnOkwpgPcpbYG6zv4T3sJDT5g== ARC-Authentication-Results: i=1; smtp3.osuosl.org; dmarc=pass header.from=oss.tenstorrent.com; dkim=pass header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b="LGt3/mgr"; arc=none smtp.remote-ip="2607:f8b0:4864:20::b12a" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::b12a; helo=mail-yx1-xb12a.google.com; envelope-from=asrinivasan@tenstorrent.com; receiver= Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=reject dis=none) header.from=oss.tenstorrent.com Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=LGt3/mgr Received: from mail-yx1-xb12a.google.com (mail-yx1-xb12a.google.com [IPv6:2607:f8b0:4864:20::b12a]) by smtp3.osuosl.org (Postfix) with ESMTPS id C5F4B60624 for ; Sat, 3 Oct 2026 20:08:10 +0000 (UTC) Received: by mail-yx1-xb12a.google.com with SMTP id 956f58d0204a3-67489c8202cso510450d50.3 for ; Sat, 03 Oct 2026 13:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1791058089; x=1791662889; darn=lists.u-boot-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=p9Lp+i4TTMjuQOuR1c6AiYrXgg60g+iH8r02mxRBhhc=; b=LGt3/mgrp2xsqQ0rbMlpSy4Q6rmHIq1qxQrkzCyhQnMD4cYmacBKvqAu9dDD0Saxk2 b7xmi3h0SCDGzz5aQqk5eshAJ5Vd47YL81MKmpooaNfx98oq4DptVtKZFy7nEEWP/tQ4 oveZX4RyiNbUG87xt897CEnzhmoWhYYxjgAt09UPPG4grA0BuCKpNg3Xqm/F890gNqhX iDno5BE5494l1RWo8TJ5pVi6dpw0zfBCW9J8FKbVd4tZlZXRe4QuDriqx/b5MOwPJyDx nAASOiI9Jpvkwb6bVyAYhlPjNXMF2onJbuvKRRAOOvVrWwKmUMeZmaB2l32KIkfxHRtd +BPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791058089; x=1791662889; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=p9Lp+i4TTMjuQOuR1c6AiYrXgg60g+iH8r02mxRBhhc=; b=nyGaaxifI2CGlGxDQU6NXkQx381k7ob2nAA2qStsIScWqZzKC9CQqJjFJrX3QZ4pPp br7qPBwsk+L1wg4XMQBNH7ujcj75Qaaqf6PaMFaLfL9VCjhMYZeVst5LatGMbE7Bf5rs KSr9+QztDZQlW/7nKimtNM8awLMAeZozHTxy4z0LECkl6mAC0E31eLSnfN1IpJsqLwEy hoSoGCAhdpMJENV+v5Rh40JuKkoADc0OTcdfIqmA5T9un3A63KXoQK2JJcS6dTwZGOWD DKZtBKI2kpN6knhLVAkC0TucomlGVs4bqypyravn19ut4DABlAlFUuDamj0Dq5gj71kq 2HjQ== X-Gm-Message-State: AFq9FYLNmO7KZII+eHNcpRKQszTqrsd+iZ+qkVUho7brSllzGDJgJBw8 +/zq/816cL7yp3loSZYWMdqAm7QkhXkyIzycUSgR1NB69lMxUEy5ldsL2CDBf0g8xzko4gostkU P6FGejNo= X-Gm-Gg: AYBFou0TYrIM44BgIrAH8bMmeD92S1UOUmVA7mt+6bGyWysYnNYu8CXIoKzRtr8eO9h hbSqiRhdm/kflsgEiW5ObMcV9NXM4RyGYotX6zGXP5TjpeyWQ/Nzp4nEZ6n0+FrfWD4jyCOYamB GH9kkv0LqQ+RNjePJWcBz0dNNkcui/gYKxIuiY3N1nRCb9g9gWEpshkh/OHvum8CUtegUVQcgYI SCbbfK6DC/rpp1mIxRdnjFM4Z93r0nROee+vXKpzrYz1qmyP63cSndui6KklttEguCQtO+99aLx Al3pIWoGSwSxc/lyY2KrviS7cTuC6rMgx74apiKZ4HmNRQWYcBtQsll8Gel2EYnbtL7FLPclztJ /fgoRKkP2U5zN3dcjVnmrDWUOe4zSFPM1GcL9mmEc72Ng0bfgwLZxf6KDu95srQpJSgUnsrQQrB A0lbGTpE5OS3hETcQxrzIs84zM7z6wDIzB5GDc+bSDOrkdTxPVN5UA3yZ97A0iRNH81+Wwv5EmK XP982XkcEGmMhAMozTlEcEKfHIJDUpydap+sgpk7xvE0In4fq62wEhAnzRrG0s+ X-Received: by 2002:a53:d04e:0:20b0:674:e07:5498 with SMTP id 956f58d0204a3-677bd376597mr1031101d50.48.1791058089291; Sat, 03 Oct 2026 13:08:09 -0700 (PDT) Received: from [192.168.2.129] ([2600:1700:220:59e0:e2e9:9d9a:5aeb:a046]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-677c16c243esm986048d50.0.2026.10.03.13.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2026 13:08:08 -0700 (PDT) From: Anirudh Srinivasan Date: Sat, 03 Oct 2026 15:07:57 -0500 Subject: [PATCH v2 3/5] bios_emulator: use driver-model functions for PCI config acceses MIME-Version: 1.0 Message-Id: <20261003-aspeed_vbios_fixes-v2-3-f8e593f024ab@oss.tenstorrent.com> References: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> In-Reply-To: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> To: u-boot@lists.u-boot-project.org Cc: Tom Rini , Simon Glass , Anirudh Srinivasan X-Mailer: b4 0.15.1 X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.u-boot-project.org To allow BIOSEMU to build without CONFIG_DM_PCI_COMPAT, update the PCI config space read/write methods in BE_accessReg to use the dm_pci_read_config8/16/32 and dm_pci_write_config8/16/32 methods. Reviewed-by: Simon Glass Signed-off-by: Anirudh Srinivasan --- drivers/bios_emulator/besys.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c index 23392d3c86e..e02c9fc636c 100644 --- a/drivers/bios_emulator/besys.c +++ b/drivers/bios_emulator/besys.c @@ -435,27 +435,27 @@ static u32 BE_accessReg(int regOffset, u32 value, int func) if ((function == _BE_env.vgaInfo.function) && (device == _BE_env.vgaInfo.device) && (bus == _BE_env.vgaInfo.bus)) { - pci_dev_t bdf = PCI_BDF(bus, device, function); + struct udevice *dev = _BE_env.vgaInfo.pcidev; switch (func) { case REG_READ_BYTE: - pci_read_config_byte(bdf, regOffset, &val8); + dm_pci_read_config8(dev, regOffset, &val8); return val8; case REG_READ_WORD: - pci_read_config_word(bdf, regOffset, &val16); + dm_pci_read_config16(dev, regOffset, &val16); return val16; case REG_READ_DWORD: - pci_read_config_dword(bdf, regOffset, &val32); + dm_pci_read_config32(dev, regOffset, &val32); return val32; case REG_WRITE_BYTE: - pci_write_config_byte(bdf, regOffset, value); + dm_pci_write_config8(dev, regOffset, value); return 0; case REG_WRITE_WORD: - pci_write_config_word(bdf, regOffset, value); + dm_pci_write_config16(dev, regOffset, value); return 0; case REG_WRITE_DWORD: - pci_write_config_dword(bdf, regOffset, value); + dm_pci_write_config32(dev, regOffset, value); return 0; } From patchwork Sat Oct 3 10:07:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anirudh Srinivasan X-Patchwork-Id: 2315691 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=t64zaPji; dkim=pass (2048-bit key; unprotected) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=KXkxCMqo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.u-boot-project.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hxxY205fFz1xyX for ; Sun, 04 Oct 2026 07:08:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9B57081450; Sat, 3 Oct 2026 20:08:20 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cMd7h4UijqZF; Sat, 3 Oct 2026 20:08:20 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp1.osuosl.org EF8748146D Authentication-Results: smtp1.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 ARC-Seal: i=2; d=osuosl.org; s=arc; a=rsa-sha256; cv=pass; t=1791058100; b=r+xU9NNKFpUdHbcKKaX5Ujwr7bvDdZ1F358QNmKsBRmTEEreZp4sEMASELtz2dYJ6GIZ dnFPxAg+4GesxES9SCHzG20DGQD69iGIaiTWlsNmOYobSEW1Q+oaPpao/bNuZ6X2Jm5ie cHsfod5vN9IsXgCeZc8ipQs97CJyPo2c3zZEQhvnEsHFNLbe3vVlf18epw4/afjLu486D UGeLjVeIrX8QZLsthVV9S4qx1qzni7ZJBog0Uj84ObUOg7ChePlUkf1tNx0z+e7RR8v/0 v3Dcm/1N1xKnjGLKCxMzEPxGRfGDkrG0XxnImPe4bj5f8Y6K/0bBM0cDFdv7BHDEKXw== ARC-Message-Signature: i=2; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058100; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:Received:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-BeenThere:X-Mailman-Version:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Errors-To; bh=vyo1L52PJqe1Mt92om7ZVTeRPOovQuhIsFyNyiICeJw=; b=nEPhRn+93PUhYJNZujglsz4zd1ls5NGC4LHEtJOsLWUALvwe+fXLJs+vOxiWoV+bm/17 CJ/sJd2t12VUFbwKSlUC/+PODAShXz40TAP309LaTUEIqK7YCI1vlE+qw7HFm5zWLBplL hrdPX1g8Impn7QlrArW9k6fBCwMy+jpp+y5ssv9yuBbelhDus0KxyXyaYqZKmVa6ulLTk irOjMc2cp1xOXLAHoiCZngd2mpjlgCcGxpwadPAvyoc5K7TZIesrxYbklEF7BX6hY1cW7 rL11u3OnZFSLmRdqkmcJHwTZRED7ptoY7fClVeKMf9b8p07SzHxYulYEk+EbiBpDzvw== ARC-Authentication-Results: i=2; smtp1.osuosl.org; dmarc=pass header.from=oss.tenstorrent.com; dkim=pass header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=KXkxCMqo; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1791058100; bh=vyo1L52PJqe1Mt92om7ZVTeRPOovQuhIsFyNyiICeJw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=t64zaPjig0NM9J6Jh6hWBzjTr6YwWVaj6Obfete8xa4RHJTcQGA+F/UuvzX2+w7HN TKDyJ87xs//cLHRu9ScFWzdWNWqb3Bkh3XrXkOiZbj60Ks0Rx5LJtzcEINnoR3kFAw pZtr64VxBq3IGAlSqV6FccDn6pcYLIPt1lOotGEIvwUhu99stnAYtbKq4yYowwuH4A lZqit6RriOwcI5twQlPudduKWVCh9rQCf6TabKOvviFR2R9vCyJrjwxooo4qt6tW2A sWdiqRUGeiPKYzv2FzxBsZpEiCA+2s5I2HBCKbgc+snUAiAMpMqIPDVsWKEmEzb7vA /cve74DgdoIeA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id EF8748146D; Sat, 3 Oct 2026 20:08:19 +0000 (UTC) X-Original-To: u-boot@lists.u-boot-project.org Delivered-To: u-boot@lists.u-boot-project.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id 112311A6 for ; Sat, 3 Oct 2026 20:08:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id EAD6C8101D for ; Sat, 3 Oct 2026 20:08:11 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id OlfW1my5ZK6A for ; Sat, 3 Oct 2026 20:08:11 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp1.osuosl.org 37F6580FA0 Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip="2607:f8b0:4864:41::d" ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1791058091; b=RvYVZeqZb3ho9ExLHuGi0AwDhGht3+Vbr297bvRRHjp2FwwlpQSqa2EU4hVVBs7KzKOV hRcPUHoFYMY6t8KAwSV9mod+ixT8Em7GG1RhsvNSlRWKzkFiq9v3llD6/9DEJYeppQjWo F+XDKkei1m4e6EGFjoeSuACZEwQPZ2d0ie187vhDPJDDAGMSNUtY7NS7A1tTZ2C74tvUu N42Ll407unJ+2opA0GHJxTm4Y03x8p5i6+PVkyLOponsXqNowuwx3PwoOff7dV1rsW8t0 UOxl+NetHH1mb1qb8nom7gxzcZFjTeXE0vtl4vkmz4W/cJ1T+jSqrnP+8DLyQOq2Vkg== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058091; h=Received-SPF:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:Date:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id: References:In-Reply-To:To:Cc:X-Mailer; bh=vyo1L52PJqe1Mt92om7ZVTeRPOovQuhIsFyNyiICeJw=; b=km1cTC04QihTCRX1mf+HT74WWjZ4gGGfhcFIc5aaxDq630jaWngVDI+OozHmly8W+LXY WE7tRMWTjwBTZyInEFgzJGCC6wcPCvZmI7yMZtkgFfZ58GOjrNS1OxjNt2W/T93+MAj2i usInsZjtnz9GLTCxoH8pxtkyvZSpraDTpYrUmm6dLe9cp168FsaLPVJ8SXyar/OQojJTo Pmf/lbdZOLxRkmUALuJe48grxvEwb00JpvG5KJJTorO3N5HPs2Z6F8uQdB3EWVXJ3HlCw BXUVv+XGL7+qYbgZh21w0Qrv4uqixPqEbbnU81nDoSNdr7L6Ulwb/dU3LkbM4cdkaPw== ARC-Authentication-Results: i=1; smtp1.osuosl.org; dmarc=pass header.from=oss.tenstorrent.com; dkim=pass header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=KXkxCMqo; arc=none smtp.remote-ip="2607:f8b0:4864:41::d" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:41::d; helo=mail-yx2-x0d.google.com; envelope-from=asrinivasan@tenstorrent.com; receiver= Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=reject dis=none) header.from=oss.tenstorrent.com Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=KXkxCMqo Received: from mail-yx2-x0d.google.com (mail-yx2-x0d.google.com [IPv6:2607:f8b0:4864:41::d]) by smtp1.osuosl.org (Postfix) with ESMTPS id 37F6580FA0 for ; Sat, 3 Oct 2026 20:08:10 +0000 (UTC) Received: by mail-yx2-x0d.google.com with SMTP id 956f58d0204a3-6756acdc3a8so421023d50.1 for ; Sat, 03 Oct 2026 13:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1791058090; x=1791662890; darn=lists.u-boot-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=vyo1L52PJqe1Mt92om7ZVTeRPOovQuhIsFyNyiICeJw=; b=KXkxCMqocAorqdKooTMJcCMc5uv3aqatFqOrpecGeulbeTNIgJFzYrRUGCmhivJ+5c nzYB+BjtRMDnwMpCJ33tnmPjKKSoPBw3UNH5ZUuHh10IGIMBqrGN3Xf+dPcfYB8DEtH9 OuM8ipSuMfJ5UWMCZD2Ge8G9Cq0nkLxCdlwFtb9Blwr9FrAbcCkyUXOiSFsDHkwF98Oq hsKm6Yq6giqC9emvh87b0h7rlomkm0ctK6zhpMn1WyEUcvhFJ2HTHRIp4JKrPvGX3FZw uZuvqu2ydp3VusdH1GK/JISxHFwEciKzuKwnDOokBQzCh7z3j6c2yIHr+iOHbWHrR3gt 9Giw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791058090; x=1791662890; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=vyo1L52PJqe1Mt92om7ZVTeRPOovQuhIsFyNyiICeJw=; b=1PrUb5/R3fwsWsvFAsEz/8l7dqnAVlplk1ZkZ7m+XNAqYgw2fD2w+0ebuf6Jgo+KN/ MLuD1yEwJ3XELZehgJDeiVWDpgAYWCSWO/PaGgJ1Vm9mxv41zJBtNYD5mPDRCqPwhGAM C2/RXu8rrwHAq91sqtkxKh1W20d9khn4AIT9D7VLcXe2DqZb8eRGpuprhWrVXTx0mRNk y//3q+0w5EMq+JpOlq8L29AuVnZAcHpiMG7LTApbDo6r6h0QzwsbEYLS1gZquRlnDBvG phJkPYKEWvclf3jB17yLvKdpgYivU3T/oiC1q69nP0xmlX1RXrKprs6ElUsjKSn9pdS9 kXXg== X-Gm-Message-State: AFq9FYJu7m3IKZriCLSg4j5Rss69m4xujo8k43veGG0qk197HpGC8vGE HsaPSijnSNE8KwB8a48D5/I2RN2nJSIYa21vZs1yrm7Ds5+WV+/bLWtZmYno7dgp3hG5UlARhu9 h/b2xk9k= X-Gm-Gg: AYBFou14zid/hC4c8U91L5lw7OeXIzRuqY+zygR+GSFhL+MVf3Fwl3R5Jf/mf/xiupy BflCYOZ74qLwRpku2aS0ahktMx5OgrMH7tPiBQQmFH5EVhNJbNO9BxjTfA19cEJmciV0ykrx1rq vQrcLvob+cLxkeeWDTw0e881KXiRkDQBNm7FAMkW4KPNIiDim0j1461fU2UXRkMIg+S2DAdbUjV 2mzZ/5sDpk3X7tw9l7khBzfXrvjT2ZG99gf9t3cMmqE2tRttGpHru1EXpJub5kUQupsJNZnGdJx kayYU/VULZXcb/gjC/DubI9c2jl7yDvwnIgIulK6rjdrChIMAFV5RuG64B4eK/eKXHulZVo8IL5 SA8e1+GidO+6ckayYYu9G4OAuegBHTc9qyhbzwTpJlBcQ0sMnammEuLftvljOC6ziJ+briFLglm mxIrVs5oBfgu+Wuj1s3Q9pd9X41ycPuAgp2NX3o76Oh8QIOQicDcuMv7kq1lxSh2O+h0AoGc7MF Yy+T0nmI3hImyH4fhQI6s0GpLNI+ZYx9x70drNSvJ7FQ3q1DfUGDw== X-Received: by 2002:a05:690e:11ca:b0:677:d023:49e5 with SMTP id 956f58d0204a3-677d0236184mr73838d50.162.1791058089865; Sat, 03 Oct 2026 13:08:09 -0700 (PDT) Received: from [192.168.2.129] ([2600:1700:220:59e0:e2e9:9d9a:5aeb:a046]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-677c16c243esm986048d50.0.2026.10.03.13.08.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2026 13:08:09 -0700 (PDT) From: Anirudh Srinivasan Date: Sat, 03 Oct 2026 15:07:58 -0500 Subject: [PATCH v2 4/5] bios_emulator: support 16-bit reads on VGA port MIME-Version: 1.0 Message-Id: <20261003-aspeed_vbios_fixes-v2-4-f8e593f024ab@oss.tenstorrent.com> References: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> In-Reply-To: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> To: u-boot@lists.u-boot-project.org Cc: Tom Rini , Simon Glass , Anirudh Srinivasan X-Mailer: b4 0.15.1 X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.u-boot-project.org BE_inw currently doesn't handle 16-bit reads on VGA ports and falls back to LOG_inpw, which doesn't do anything on non x86 architectures that don't support I/O ports. Implement this 16-bit read as two 8-bit reads (similar to how BE_outw implements 16-bit writes). The Aspeed AST2600's VBIOS has these 16-bit read instructions in it, so this is needed to emulate that. Signed-off-by: Anirudh Srinivasan Reviewed-by: Simon Glass --- drivers/bios_emulator/besys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c index e02c9fc636c..76a05e74f55 100644 --- a/drivers/bios_emulator/besys.c +++ b/drivers/bios_emulator/besys.c @@ -612,7 +612,9 @@ u16 X86API BE_inw(X86EMU_pioAddr port) u16 val = 0; #if !defined(CONFIG_X86EMU_RAW_IO) - if (IS_PCI_PORT(port)) + if (IS_VGA_PORT(port)) + val = BE_inb(port) | ((u16)BE_inb(port + 1) << 8); + else if (IS_PCI_PORT(port)) val = PCI_inp(port, REG_READ_WORD); else if (port < 0x100) { DB(printf("WARN: Maybe INVALID inw.%04X -> %04X\n", (u16) port, val);) From patchwork Sat Oct 3 10:07:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anirudh Srinivasan X-Patchwork-Id: 2315692 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=RDwmHOK8; dkim=pass (2048-bit key; unprotected) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=YRRP/HrO; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.u-boot-project.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hxxY36qZvz1xyX for ; Sun, 04 Oct 2026 07:08:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8F2E16064C; Sat, 3 Oct 2026 20:08:22 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Hbl5mitLmoCE; Sat, 3 Oct 2026 20:08:22 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp3.osuosl.org CC88E606B0 Authentication-Results: smtp3.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 ARC-Seal: i=2; d=osuosl.org; s=arc; a=rsa-sha256; cv=pass; t=1791058102; b=V4fxo3wMgmWZQA0SQWHbnOdegvKX74GKd+c2Kv9Mb5eVwjaKsIYXaNTjqM7hPwuXyVac 3VOTdj6mnEQJjJ/B7V5QaDR3KVsrp4l8RZ/S+0owl+RbJUkecbu6gW7rL2kM3VEHwktYR MfU9r9frUPCYXbb5ET4lgvcW3cOM/6AuWzX28bmZ7QIqcFYh95k/s+6L5/Y7BPjpTeiD0 dnJHAUa3PgCTTeGl/Xeks5+hBbK7oL8vVHoaj+cpRvqnnXMPOXwpfeiinqpWQum65aXS/ yQN529ErCGcvRTEuiGzjh1HGVxV1Fh0n60wijfsPYbqMapXo5PEVL0/xMM9ReF/XPrA== ARC-Message-Signature: i=2; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058102; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:Received:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-BeenThere:X-Mailman-Version:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Errors-To; bh=090g8TqcHP3mxdn6BrDK+Wd2gdWzPXij6WUqZtM2AZU=; b=attYyz3r+HN+RHahOFutzjrJlSsOG0zYvZnM9guQqpE+XCHmgIRQ5zm6QMfm7lAfcmGl dtLMq+wAxFNFFxwwooAqhB1V2P+TFYRQJA1kJwVzWhdCx7cEpc3BNa5pr28G8UtdhbfQW VRHrwojIQ4C7J3vJl+OQY7zqhLrk1zP3AdhGx8CQV/XOAybcXFMOhYMoxz7zIAMf3z+Qt 7UVIE+84kQ8oXdFlEVtMW/L5naLXmw/5uyfDAcLLEwHK+Q2bkLTVr1fkFKFjx7A0Us+IF TQiQPWZJ09o9LmHnbwPeU7rRdUDfbS2qgK4CCv2V2ixGcS9zwmRyYMkYI6/6a5adwFQ== ARC-Authentication-Results: i=2; smtp3.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1791058101; bh=090g8TqcHP3mxdn6BrDK+Wd2gdWzPXij6WUqZtM2AZU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RDwmHOK8VdgE92eQccWdsF9ridOzhaTTKUHas/f4duxMZPUslsImpzTfgneo0UuQW JZCIqx41pr8JeUsMz6LalTdZBwgSKzA1b0r9CAOFqc94+mSe0g29WkKq2dZgcLMNQH mu6YN5vlpmAxe2U3akxIAFKBMWkiXj/KuEZYdU9n/iVQ2/0vjNxNIq8drfAqV2ZQQ3 T2KFheCzVx6kPUztYIPbGNp0X5LjzLGZ5dxQaNnDgLzwrGqPxDfu2evaIw11vHdkxS vwctcYN0H7cWFJiwf2m0/ORedldKHrX7A6iLqXSgXruf+cfvhjOpa3rlny45w1woMv vLg10Ghf7pqrg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id CC88E606B0; Sat, 3 Oct 2026 20:08:21 +0000 (UTC) X-Original-To: u-boot@lists.u-boot-project.org Delivered-To: u-boot@lists.u-boot-project.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists1.osuosl.org (Postfix) with ESMTP id 21F41282 for ; Sat, 3 Oct 2026 20:08:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 07D4A4007E for ; Sat, 3 Oct 2026 20:08:13 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id KkFSg7Cb3hg2 for ; Sat, 3 Oct 2026 20:08:12 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp2.osuosl.org 0838B40064 Authentication-Results: smtp2.osuosl.org; arc=none smtp.remote-ip="2607:f8b0:4864:41::e" ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1791058092; b=NxdWzkYoGrX5wcARpZ3zsH5fy1XoerUhmCIaCDD5lXc7PW55FkutIT/PU/2rPL6l8BNx FBw0aAgdsAvxXWXUy+9gamWqCnQXWjzRvL2GlFm8PiRcjrikWSBKQPfH0r/ACgjo+MOGC OePOEzum7BDzfklv5uCwFusr0NFBpAeOlRvuoEfBnKMy6r1Q2sqG5lhtzjlvwNkPx6FtE Ce/VK752Q9SyHxe4XVyhmS88x4Q20un5EW1icsdhvLUFhTu9+qd8urFKrifTjmqWS0Y7h UUEQMfVWuds3E7cIE4c7a2Rx4nzojteTugL6NIYbVfUy3vDkQn7yHwZqMJkC00yvrZw== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1791058092; h=Received-SPF:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:Date:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id: References:In-Reply-To:To:Cc:X-Mailer; bh=090g8TqcHP3mxdn6BrDK+Wd2gdWzPXij6WUqZtM2AZU=; b=N2rwpd/Kb798sySPv1Us3GPqBTtJVPkCO65isdRYCDIP5BN0k0UtvhgV4fJjKIX2ipuS ZzEQaJeP6SK8Bk1nMm0BZb6kftK1PwJj0TvT39yG5QWqACdUt0XWP42/GBtYqD7gbf8dT mlegQF915VwU9lh2xGqAt9gezPfogA4KkZWAE0XlITDN+/W38atX9g+BYSpkGX7r9yVnl CXMdneQlwlGgtT1vWEkk53SOawpQiBX8qdT0qoyr3JaJbKqldPSYo6DsRdQGS7nZ1xpEX MTC43ib7tD5j8euvmvn47pNHS8RtVVxItFTqDYkb1KQrxhY4VNsAy6gul5IGnk373Rw== ARC-Authentication-Results: i=1; smtp2.osuosl.org; dmarc=pass header.from=oss.tenstorrent.com; dkim=pass header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b="YRRP/HrO"; arc=none smtp.remote-ip="2607:f8b0:4864:41::e" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:41::e; helo=mail-yx2-x0e.google.com; envelope-from=asrinivasan@tenstorrent.com; receiver= Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=reject dis=none) header.from=oss.tenstorrent.com Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=tenstorrent.com header.i=@tenstorrent.com header.a=rsa-sha256 header.s=google header.b=YRRP/HrO Received: from mail-yx2-x0e.google.com (mail-yx2-x0e.google.com [IPv6:2607:f8b0:4864:41::e]) by smtp2.osuosl.org (Postfix) with ESMTPS id 0838B40064 for ; Sat, 3 Oct 2026 20:08:11 +0000 (UTC) Received: by mail-yx2-x0e.google.com with SMTP id 956f58d0204a3-6729ca45e37so406707d50.2 for ; Sat, 03 Oct 2026 13:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1791058090; x=1791662890; darn=lists.u-boot-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=090g8TqcHP3mxdn6BrDK+Wd2gdWzPXij6WUqZtM2AZU=; b=YRRP/HrOTcjXs9VkrE3ZHXSiLx5dW5rGL+rRWQW+V1vZUUpNbGYCN1mz+2U+KE3DiP CPcXFMNiGFn8hBjXf0cheUusQBAJv8FxNXI5TLAogqZa8ftaVz8gkV8RlC7NKE9lyxXq ZaCAb84jHcg484Q/LoWmvb32iCNKg60RMURTGP7TGqqjxCp6EMj9WQDHCD+4kztX+yJM ry3hpGItRYadjTxtqITSedCsm7OFlm+ZPZ9xIAWqdQtnVyqddOVxbe53oAPAJrcIkHs/ hr306j6v1GI8A3fLKh5b6yOP5WIJlB8r5u6WflFsM5v9Un9wI7Iv3+U/7lxgJycswlcq nQcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791058090; x=1791662890; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=090g8TqcHP3mxdn6BrDK+Wd2gdWzPXij6WUqZtM2AZU=; b=qzOeQZwDkRForw8PnSV687w3SEzFPb+s8PmS+z1+bNZOIreqH6vGJsrOfL7uOQmgOp cPB5ZGVHzeN4JHItWCBBiCDnvO3EHZtY7e8bFKKRbWUlSvZ2zsAAk+rR34VOXZzJwhdZ 34g6GjGWqpB++46HBN2kBdK8QyFaTtw8JYMakz/qQk2Kv7THNXk3c3GkAdd216tIsjAY ehFpX1jJL5pdPPUqifiXXxWGNEN+15gYyuz0TIuT+QunvOPSkLj1IZHPkf+w99Irphdk Z1GcrSae/L88LUshkXLXjXNNmQZJmbi2N9BresfWoFhmTjpBSW4yP2ppaZyAihHA9cD8 +b5A== X-Gm-Message-State: AFq9FYKW/Q7+MxWNo6/Kwzb1q3W13j6zztXg0KUHHZNEyZM0PibGNtfQ RupR8B+rJC0+fXodXZs3l6ja00P5SbOgDk3likBVMuR4O/6KEnQTu5fx0zn0MQXZVKU= X-Gm-Gg: AYBFou04dIvnnUY7AfKLzea05s0C4JwM7dcfqIUERCok9FMd7XH49nVw7ty8nNE6NFX A56d6z4hP+tinTm64V3nARp9Y4dYAfaEoRvf37jqcMhwClHXPOvBgSzjyWfbueYO7h6R8LTqHxf YHOa9N59XPrXWIOHjxm5GmP8RsxSWJcCgx6i4jzcP6u7YmeIt2UzNK7kYaZYdTY/7tLWVxzhIYe ZIxl5bINtuUMVQMETC6NgdAjchJ7LVwz0B3GfUtkxItK95vMayLAuVvhejII6BsQmEOneMZ7HHd 15xBkyT9yPhjTplZMw5TveNqXhdimCBXN6W9Zy3cO9m8eyt2whUNnXKKgZZP9QUySL2n6q0Q1o7 Sw56I6YS/dt1lcCIhpbC9bpsZ7c5SY0O9cHnUWbdR3yjqYbsmf6ee4/vMYLFmDLrG7YaRp+ZnZn Mt1hxKCuFfAMLIGoYqPWcEx4H2LwHDbxIyoepffvlMHWcZ+hfcgQ7WeOLql0fOCpW69MeqZ970h xd8N+7DlWSSxykDwrMT1P42Smp33BG/B5j7FFVMOVczXPU3AEViCAbfSiQBEzBr X-Received: by 2002:a05:690e:1c08:b0:66f:c1bc:408f with SMTP id 956f58d0204a3-677ac0a7950mr2690708d50.82.1791058090451; Sat, 03 Oct 2026 13:08:10 -0700 (PDT) Received: from [192.168.2.129] ([2600:1700:220:59e0:e2e9:9d9a:5aeb:a046]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-677c16c243esm986048d50.0.2026.10.03.13.08.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2026 13:08:10 -0700 (PDT) From: Anirudh Srinivasan Date: Sat, 03 Oct 2026 15:07:59 -0500 Subject: [PATCH v2 5/5] bios_emulator: extend VGA I/O ports to include ports 0x3B4-0x3DA MIME-Version: 1.0 Message-Id: <20261003-aspeed_vbios_fixes-v2-5-f8e593f024ab@oss.tenstorrent.com> References: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> In-Reply-To: <20261003-aspeed_vbios_fixes-v2-0-f8e593f024ab@oss.tenstorrent.com> To: u-boot@lists.u-boot-project.org Cc: Tom Rini , Simon Glass , Anirudh Srinivasan X-Mailer: b4 0.15.1 X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.u-boot-project.org The IS_VGA_PORT macro currently doesn't cover the 0x3B4, 0x3B5 and 0x3BA I/O ports. Reads/writes to this currently fall through to LOG_inpb/outb which are unimplemented on non x86 architectures (which don't support I/O ports). Add these ports to the IS_VGA_PORT macro, and implement reads/writes to these ports. 0x3B4 and 0x3B5 are mirrors of 0x3D4 and 0x3D5 that are used in monochrome mode (bit 0 of 0x3C2 is not set). Implement these with the same logic and env state as 0x3D4/0x3D5, but with the bit check condition for 0x3C2 flipped. 0x3BA is a mirror of 0x3DA, so the implementation for this falls back to the same logic as 0x3DA. The extended range also covers the non-VGA ports 0x3B6-0x3B9 and 0x3BB-0x3BF (LPT1 on legacy PCs): reads return 0xff and writes are dropped instead of reaching the real inb/outb path, which is harmless from the VBIOS's perspective. The write side handles 0x3B4/0x3B5 but not 0x3BA, consistent with the existing lack of a 0x3DA write handler. The Aspeed AST2600's VBIOS uses these I/O ports, and these changes are needed for it's VBIOS to run. Signed-off-by: Anirudh Srinivasan --- drivers/bios_emulator/besys.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c index 76a05e74f55..c06ed34c0af 100644 --- a/drivers/bios_emulator/besys.c +++ b/drivers/bios_emulator/besys.c @@ -248,8 +248,8 @@ void X86API BE_wrl(u32 addr, u32 val) #define IS_TIMER_PORT(port) (0x40 <= port && port <= 0x43) #define IS_CMOS_PORT(port) (0x70 <= port && port <= 0x71) -/*#define IS_VGA_PORT(port) (_BE_env.emulateVGA && 0x3C0 <= port && port <= 0x3DA)*/ -#define IS_VGA_PORT(port) (0x3C0 <= port && port <= 0x3DA) +/*#define IS_VGA_PORT(port) (_BE_env.emulateVGA && 0x3B4 <= port && port <= 0x3DA)*/ +#define IS_VGA_PORT(port) (0x3B4 <= port && port <= 0x3DA) #define IS_PCI_PORT(port) (0xCF8 <= port && port <= 0xCFF) #define IS_SPKR_PORT(port) (port == 0x61) @@ -270,6 +270,18 @@ static u8 VGA_inpb (const int port) debug_io("vga_inb.%04X -> ", (u16) port); switch (port) { + /* + * 3B4 and 3B5 are mirrors of 3D4 and 3D5 that are used in + * monochrome mode (i.e., bit 0 of 3C2 is not set) + */ + case 0x3B4: + if (!(_BE_env.emu3C2 & 0x1)) + return _BE_env.emu3D4; + break; + case 0x3B5: + if (!(_BE_env.emu3C2 & 0x1) && (_BE_env.emu3D4 < CRT_C)) + return _BE_env.emu3D5[_BE_env.emu3D4]; + break; case 0x3C0: /* 3C0 has funky characteristics because it can act as either a data register or index register depending on the state @@ -321,6 +333,10 @@ static u8 VGA_inpb (const int port) if ((_BE_env.emu3C2 & 0x1) && (_BE_env.emu3D4 < CRT_C)) return _BE_env.emu3D5[_BE_env.emu3D4]; break; + /* + * 3BA is a mirror of 3DA + */ + case 0x3BA: case 0x3DA: _BE_env.flipFlop3C0 = 0; val = _BE_env.emu3DA; @@ -343,6 +359,18 @@ to use. static void VGA_outpb (int port, u8 val) { switch (port) { + /* + * 3B4 and 3B5 are mirrors of 3D4 and 3D5 that are used in + * monochrome mode (i.e., bit 0 of 3C2 is not set) + */ + case 0x3B4: + if (!(_BE_env.emu3C2 & 0x1)) + _BE_env.emu3D4 = val; + break; + case 0x3B5: + if (!(_BE_env.emu3C2 & 0x1) && (_BE_env.emu3D4 < CRT_C)) + _BE_env.emu3D5[_BE_env.emu3D4] = val; + break; case 0x3C0: /* 3C0 has funky characteristics because it can act as either a data register or index register depending on the state