{"id":801891,"url":"http://patchwork.ozlabs.org/api/1.2/patches/801891/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1502862122-14771-4-git-send-email-bmeng.cn@gmail.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1502862122-14771-4-git-send-email-bmeng.cn@gmail.com>","list_archive_url":null,"date":"2017-08-16T05:41:52","name":"[U-Boot,03/13] x86: fsp: Add FSP_GRAPHICS_INFO_HOB","commit_ref":"4ff333b7dd0f0d541225f87ebb2523beb7eefcad","pull_url":null,"state":"accepted","archived":false,"hash":"6f99c05b55fc41465f49be4809d1834c2bf67219","submitter":{"id":64981,"url":"http://patchwork.ozlabs.org/api/1.2/people/64981/?format=json","name":"Bin Meng","email":"bmeng.cn@gmail.com"},"delegate":{"id":56520,"url":"http://patchwork.ozlabs.org/api/1.2/users/56520/?format=json","username":"bmeng","first_name":"Bin","last_name":"Meng","email":"bmeng.cn@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1502862122-14771-4-git-send-email-bmeng.cn@gmail.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/801891/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/801891/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"SIpUGCrK\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xXJ8x1qDpz9sPr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 15:40:33 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid E7E99C21DA0; Wed, 16 Aug 2017 05:38:18 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 0E167C21E0F;\n\tWed, 16 Aug 2017 05:37:58 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid E8DB5C21DF4; Wed, 16 Aug 2017 05:37:48 +0000 (UTC)","from mail-it0-f68.google.com (mail-it0-f68.google.com\n\t[209.85.214.68])\n\tby lists.denx.de (Postfix) with ESMTPS id 31F42C21DCE\n\tfor <u-boot@lists.denx.de>; Wed, 16 Aug 2017 05:37:44 +0000 (UTC)","by mail-it0-f68.google.com with SMTP id m34so1879553iti.0\n\tfor <u-boot@lists.denx.de>; Tue, 15 Aug 2017 22:37:44 -0700 (PDT)","from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com.\n\t[147.11.156.139])\n\tby smtp.gmail.com with ESMTPSA id g13sm30442ioi.0.2017.08.15.22.37.41\n\t(version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 15 Aug 2017 22:37:42 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:subject:date:message-id:in-reply-to:references;\n\tbh=opWZIBzeNfv7MGKCQEoxCmnv/YJwOpnXCp90S9lGCNg=;\n\tb=SIpUGCrKFhCfTMUhMmoJPhDEs9W0pLrZRpdDEzhdIX2Lx0HzRidzbihaoOlVUDLx2j\n\tcPIf4dW5/Ws8HuxQ1xWe8EhsSIFwPD7i2VpvyYZVN8FxO80EffWRtdMTRlGuXCqEk5Sc\n\tVYMWXWove2udmZMCOudt0I533z+Pe6L0tvpApUUxuZ2i1MT3cd6z4o9B28D0uC+P0H9l\n\tP8rA92PTOvK9Au3Cn9QgsLJ9dI5CjNBpfgBlrEG33PH3ln+eiukHcLAqsBcFOd0ubshI\n\tSp9eDvhwXnFQeaBt33i406X50R0RsLX/BHIeHs8bKR65trd1RlyMJDkJtP/D6WMCuS/c\n\tb6mQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=opWZIBzeNfv7MGKCQEoxCmnv/YJwOpnXCp90S9lGCNg=;\n\tb=S3wfDRn26CD3FS2tQpBGzv0JlUDgORhdArCuAS0bbKQvsigc+6JQjRK4yqbhShN4wc\n\t8Q1+q7U7OW01V3OwtTqYetRy+vKw17CiEprS44o9Z8uVxh6Rsrf+wVn1v9J7gqrbm0KD\n\t64SA7wPs95EI1xB86bLDWaABKrsp/OLWbXwpBJl6wB8Qelhg2C9VMycqa23rGD2i/gLw\n\tgBqsAQFetcNqfyRMYxRbK1NTimZ1la1pIkQdQQj3pz/SXXeA45UUo6OqBsr63oDqwdcq\n\tFiSTPY/7O6zE1S/6jbtMSldVdLM6/zbAM1jKzqnY7vdwV0UMyq/5ftK6yrm4b3eypsyD\n\tyUrw==","X-Gm-Message-State":"AHYfb5gipybjx4JOhXPPklbi/Mst8y5o+rs8+wQCest8pzQ/bJXj//9r\n\toyYgrws6YaBGaw==","X-Received":"by 10.36.134.5 with SMTP id u5mr974905itd.73.1502861863121;\n\tTue, 15 Aug 2017 22:37:43 -0700 (PDT)","From":"Bin Meng <bmeng.cn@gmail.com>","To":"Simon Glass <sjg@chromium.org>,\n\tU-Boot Mailing List <u-boot@lists.denx.de>","Date":"Tue, 15 Aug 2017 22:41:52 -0700","Message-Id":"<1502862122-14771-4-git-send-email-bmeng.cn@gmail.com>","X-Mailer":"git-send-email 1.7.9.5","In-Reply-To":"<1502862122-14771-1-git-send-email-bmeng.cn@gmail.com>","References":"<1502862122-14771-1-git-send-email-bmeng.cn@gmail.com>","Subject":"[U-Boot] [PATCH 03/13] x86: fsp: Add FSP_GRAPHICS_INFO_HOB","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"This adds a new HOB type for graphics information introduced in FSP\nspec 1.1. When graphics capability is included in FSP and enabled,\nFSP produces an FSP_GRAPHICS_INFO_HOB as described in the EFI PI\nspecification which provides information about the graphics mode and\nframebuffer.\n\nSigned-off-by: Bin Meng <bmeng.cn@gmail.com>\n---\n\n arch/x86/include/asm/fsp/fsp_hob.h     | 26 ++++++++++++++++++++++++++\n arch/x86/include/asm/fsp/fsp_support.h | 12 ++++++++++++\n arch/x86/lib/fsp/fsp_support.c         |  7 +++++++\n 3 files changed, 45 insertions(+)","diff":"diff --git a/arch/x86/include/asm/fsp/fsp_hob.h b/arch/x86/include/asm/fsp/fsp_hob.h\nindex 8ce665e..244f86e 100644\n--- a/arch/x86/include/asm/fsp/fsp_hob.h\n+++ b/arch/x86/include/asm/fsp/fsp_hob.h\n@@ -127,6 +127,26 @@ struct hob_guid {\n \t/* GUID specific data goes here */\n };\n \n+enum pixel_format {\n+\tpixel_rgbx_8bpc,\t/* RGB 8 bit per color */\n+\tpixel_bgrx_8bpc,\t/* BGR 8 bit per color */\n+\tpixel_bitmask,\n+};\n+\n+struct __packed hob_graphics_info {\n+\tphys_addr_t fb_base;\t/* framebuffer base address */\n+\tu32 fb_size;\t\t/* framebuffer size */\n+\tu32 version;\n+\tu32 width;\n+\tu32 height;\n+\tenum pixel_format pixel_format;\n+\tu32 red_mask;\n+\tu32 green_mask;\n+\tu32 blue_mask;\n+\tu32 reserved_mask;\n+\tu32 pixels_per_scanline;\n+};\n+\n /**\n  * get_next_hob() - return a pointer to the next HOB in the HOB list\n  *\n@@ -250,4 +270,10 @@ static inline u16 get_guid_hob_data_size(const struct hob_header *hdr)\n \t{ 0xb3, 0x16, 0x36, 0x35, 0x36, 0x67, 0xad, 0x44 } \\\n \t}\n \n+#define FSP_GRAPHICS_INFO_HOB_GUID \\\n+\t{ \\\n+\t0x39f62cce, 0x6825, 0x4669, \\\n+\t{ 0xbb, 0x56, 0x54, 0x1a, 0xba, 0x75, 0x3a, 0x07 } \\\n+\t}\n+\n #endif\ndiff --git a/arch/x86/include/asm/fsp/fsp_support.h b/arch/x86/include/asm/fsp/fsp_support.h\nindex 61d811f..97a50b0 100644\n--- a/arch/x86/include/asm/fsp/fsp_support.h\n+++ b/arch/x86/include/asm/fsp/fsp_support.h\n@@ -191,6 +191,18 @@ void *fsp_get_nvs_data(const void *hob_list, u32 *len);\n void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);\n \n /**\n+ * This function retrieves graphics information.\n+ *\n+ * @hob_list:      A HOB list pointer.\n+ * @len:           A pointer to the graphics info HOB length.\n+ *                 If the HOB is located, the length will be updated.\n+ *\n+ * @retval NULL:   Failed to find the graphics info HOB.\n+ * @retval others: A pointer to struct hob_graphics_info.\n+ */\n+void *fsp_get_graphics_info(const void *hob_list, u32 *len);\n+\n+/**\n  * This function overrides the default configurations of FSP.\n  *\n  * @config:  A pointer to the FSP configuration data structure\ndiff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c\nindex ab8340c..e0c49be 100644\n--- a/arch/x86/lib/fsp/fsp_support.c\n+++ b/arch/x86/lib/fsp/fsp_support.c\n@@ -425,3 +425,10 @@ void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len)\n \n \treturn fsp_get_guid_hob_data(hob_list, len, (struct efi_guid *)&guid);\n }\n+\n+void *fsp_get_graphics_info(const void *hob_list, u32 *len)\n+{\n+\tconst struct efi_guid guid = FSP_GRAPHICS_INFO_HOB_GUID;\n+\n+\treturn fsp_get_guid_hob_data(hob_list, len, (struct efi_guid *)&guid);\n+}\n","prefixes":["U-Boot","03/13"]}