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 C64CD941B52 for ; Thu, 23 Nov 2023 15:02:40 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=+fYAUBjqsSFvcmTGfjoevE7jrwuC3OXp3b0o3kxJbcQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1700751759; v=1; b=DW6+jI5TFMnOFE/ahVnKUWig6d6Cg7P8ihx/1ALnovvZ1mmyit/jvyCtFmK4cH3LIHyvp9sP ln0xlzRJRoyLY7ziYNDK2TFnPfFK/06HtgKeBzeKOglsWJMLmbNsmu4BSzmKTNvsk7xKG8VET5V hnTLmGHNyMaoM0cEhE0cbZ0A= X-Received: by 127.0.0.2 with SMTP id uLzoYY7687511xlFGjsThmVd; Thu, 23 Nov 2023 07:02:39 -0800 X-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.92691.1700751758554407946 for ; Thu, 23 Nov 2023 07:02:38 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-75-Ncke5Jo8MVi8ISWuaIRiig-1; Thu, 23 Nov 2023 10:02:36 -0500 X-MC-Unique: Ncke5Jo8MVi8ISWuaIRiig-1 X-Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 428FE83FC2B for ; Thu, 23 Nov 2023 15:02:36 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0ECEC1C060B0; Thu, 23 Nov 2023 15:02:36 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D321418007A1; Thu, 23 Nov 2023 16:02:34 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Oliver Steffen , =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=89rsek?= , Gerd Hoffmann Subject: [edk2-devel] [PATCH 1/7] OvmfPkg: add IndustryStandard/QemuUefiVars.h Date: Thu, 23 Nov 2023 16:02:28 +0100 Message-ID: <20231123150234.117835-2-kraxel@redhat.com> In-Reply-To: <20231123150234.117835-1-kraxel@redhat.com> References: <20231123150234.117835-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ih31YJlwzWOnDJzYNEuvH6Vpx7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=DW6+jI5T; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (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 Add header file for the qemu uefi variable service device. This defines the registers of the device, the location in io address space (x86) and the device tree name (arm). Signed-off-by: Gerd Hoffmann --- .../Include/IndustryStandard/QemuUefiVars.h | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 OvmfPkg/Include/IndustryStandard/QemuUefiVars.h diff --git a/OvmfPkg/Include/IndustryStandard/QemuUefiVars.h b/OvmfPkg/Include/IndustryStandard/QemuUefiVars.h new file mode 100644 index 000000000000..64ca5628ca58 --- /dev/null +++ b/OvmfPkg/Include/IndustryStandard/QemuUefiVars.h @@ -0,0 +1,41 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause-Patent + * + * uefi-vars device - API of the virtual device for guest/host communication. + * + * copied from qemu.git (include/hw/uefi/var-service-api.h) + */ + +#ifndef QEMU_UEFI_VAR_SERVICE_API_H +#define QEMU_UEFI_VAR_SERVICE_API_H + +/* isa: io range */ +#define UEFI_VARS_IO_BASE 0x520 + +/* sysbus: fdt node path */ +#define UEFI_VARS_FDT_NODE "qemu-uefi-vars" +#define UEFI_VARS_FDT_COMPAT "qemu,uefi-vars" + +/* registers */ +#define UEFI_VARS_REG_MAGIC 0x00 /* 16 bit */ +#define UEFI_VARS_REG_CMD_STS 0x02 /* 16 bit */ +#define UEFI_VARS_REG_BUFFER_SIZE 0x04 /* 32 bit */ +#define UEFI_VARS_REG_BUFFER_ADDR_LO 0x08 /* 32 bit */ +#define UEFI_VARS_REG_BUFFER_ADDR_HI 0x0c /* 32 bit */ +#define UEFI_VARS_REGS_SIZE 0x10 + +/* magic value */ +#define UEFI_VARS_MAGIC_VALUE 0xef1 + +/* command values */ +#define UEFI_VARS_CMD_RESET 0x01 +#define UEFI_VARS_CMD_MM 0x02 + +/* status values */ +#define UEFI_VARS_STS_SUCCESS 0x00 +#define UEFI_VARS_STS_BUSY 0x01 +#define UEFI_VARS_STS_ERR_UNKNOWN 0x10 +#define UEFI_VARS_STS_ERR_NOT_SUPPORTED 0x11 +#define UEFI_VARS_STS_ERR_BAD_BUFFER_SIZE 0x12 + +#endif /* QEMU_UEFI_VAR_SERVICE_API_H */ -- 2.42.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111677): https://edk2.groups.io/g/devel/message/111677 Mute This Topic: https://groups.io/mt/102767934/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-