Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2170008/?format=api
{ "id": 2170008, "url": "http://patchwork.ozlabs.org/api/patches/2170008/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20251128163535.2301653-6-raymondmaoca@gmail.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "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": "<20251128163535.2301653-6-raymondmaoca@gmail.com>", "list_archive_url": null, "date": "2025-11-28T16:35:22", "name": "[v5,5/6] smbios: add support for dynamic generation of Type 19 table", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "be45a0aaf2ad45408a4e63184b04cdebe76703bd", "submitter": { "id": 91989, "url": "http://patchwork.ozlabs.org/api/people/91989/?format=api", "name": "Raymond Mao", "email": "raymondmaoca@gmail.com" }, "delegate": { "id": 96103, "url": "http://patchwork.ozlabs.org/api/users/96103/?format=api", "username": "apalos", "first_name": "Ilias", "last_name": "Apalodimas", "email": "apalos@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20251128163535.2301653-6-raymondmaoca@gmail.com/mbox/", "series": [ { "id": 483864, "url": "http://patchwork.ozlabs.org/api/series/483864/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=483864", "date": "2025-11-28T16:35:17", "name": "Implement all missing SMBIOS types required by distro tooling", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/483864/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2170008/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2170008/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=PQ4w2F1e;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"PQ4w2F1e\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=raymondmaoca@gmail.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dHzTM5xchz1yDd\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 29 Nov 2025 03:36:39 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id E1BE883B6C;\n\tFri, 28 Nov 2025 17:36:25 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id B994383B81; Fri, 28 Nov 2025 17:36:24 +0100 (CET)", "from mail-qk1-x730.google.com (mail-qk1-x730.google.com\n [IPv6:2607:f8b0:4864:20::730])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 6D755838FA\n for <u-boot@lists.denx.de>; Fri, 28 Nov 2025 17:36:22 +0100 (CET)", "by mail-qk1-x730.google.com with SMTP id\n af79cd13be357-8b2da83f721so205863985a.1\n for <u-boot@lists.denx.de>; Fri, 28 Nov 2025 08:36:22 -0800 (PST)", "from ubuntu.localdomain ([216.58.22.99])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8b52a1b75a9sm331227985a.25.2025.11.28.08.36.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 28 Nov 2025 08:36:20 -0800 (PST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1764347781; x=1764952581; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=5FccaBGjMXKiCNFMO+6/Ec5Q2zXorHTG2DRhSzDtFbU=;\n b=PQ4w2F1eE/xdwBIBrip5NcrT0T8gXoj6akxDU8NcSeb2CRZdOELQ9ysoVdVhf7zCuD\n WW9cuH6MffbPaK/KjjdgqcMzg1pXXuAARXCx6VeIGWI64SCMJD/hP1TnH4T72SfolXl6\n pSYRhtyMVzh/GTlEI+Rwgg9OVxNZAg7ZfB511RTGWoCRY0n/QbqrgUUXtAVMTsCSz3Uk\n 0aGaFpqoj13URQw441rDB/u9A6IRgAhHp9ATCflFdls05/41UqRxJQsNZBayUVUTvMF1\n kDPcFH7/VWDGpdJgcJrbOG2EkhnwKto5SbKd7FXHxPHXsB9Aib3S6yIa5ttKTum5d9SS\n 5FBg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1764347781; x=1764952581;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=5FccaBGjMXKiCNFMO+6/Ec5Q2zXorHTG2DRhSzDtFbU=;\n b=GY/oTIgPoJr+nPTiaFV94PV3NL3+8gmBuZ7jqOF6e76WGnWsDn/4qJJ4VwyjF/36gW\n I7wUgE0IRoZTdQNOfInFrfFX87HtyEtWp/2Rdd2tY8AhDDRLZbP5+Xz8ov54uN1WkzUe\n MWpltliKL1/r+V7drVgTPvOS262QyClkSqf7r9DHOEI+zs7WMOOsq4l5fbZWHnfI+Cdo\n FRnwrpDJogv+YRvrLO8W+UhxZEPn3xmUEJCD1G3mO/T/0Lv9iqGGszfV0WGe1nT47P4d\n lair8c13PxLIc7OvtFol61jYcgAvWDgsidaNVDbj5c9ORw09ZTeB2LSVQdCSe4WnqOpl\n TlUQ==", "X-Gm-Message-State": "AOJu0Yx07IDbCIHHRMsA8Vz9sOGLNd8EyMbVG9OFmjNe0irJIPphb9S5\n mByZnWVhdv/uhKp8nK8dix9zWXWUGXAXhysuC6mZdgeAco5WscWpdtoDnl7B8ltU1II=", "X-Gm-Gg": "ASbGnctQAXkOpybM2zH4H8rfkohTnGTfovCOgkgBX1VdYUrzuSBdRj0Ritnp0ZTB+4H\n xeVsZftsB0DEf6mggzbTHvgZEXmIMWhoaXbAgvwlOKVShr4sJkF8y3YZ1yo8QZJuopFUqPL+iVj\n Y7iC3DkjnAxIFn1zs5M6QXa7LgkX4hCs9PEbD1FuTnPf4bzX+vRzV65JNth6sq6eok0jy2C92TM\n Pk+nJYE0rwfzSs8hrab7wdSi22UadfmiwanjiKkeu5gia9NMDpjFncwDSBQgvVFy1YYSik8uIdX\n XwxLdLS1mvYXzyHMQK9zTDDbGATFERiX9byJrTlo4lni1F5iLqzHqlj1YDDmx4R0HX7pE+fI/6q\n KnqnTkyKUrNI6RPH7XIHBJmlmn/xIPyG8mASf98uSIDuxxLQzFieQiKPOthnFC1veLhvGJ1BgSg\n nOna/EFQj2JnkdWVG2+FJs0FHlmbeGVUU=", "X-Google-Smtp-Source": "\n AGHT+IF+iGWbkS06CZZu2IDqV9t37j37zhRdxmR3LCyt3dM8NgUnKxsDKiqZFP6kzkE4wIIgXyRC1g==", "X-Received": "by 2002:a05:620a:318b:b0:8a9:eb31:1033 with SMTP id\n af79cd13be357-8b33bde837cmr4534235985a.30.1764347780970;\n Fri, 28 Nov 2025 08:36:20 -0800 (PST)", "From": "Raymond Mao <raymondmaoca@gmail.com>", "To": "u-boot@lists.denx.de", "Cc": "Raymond Mao <raymondmaoca@gmail.com>, Tom Rini <trini@konsulko.com>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Mark Kettenis <kettenis@openbsd.org>,\n Baocheng Su <baocheng.su@siemens.com>, Jan Kiszka <jan.kiszka@siemens.com>,\n Li Hua Qian <huaqian.li@siemens.com>,\n Samuel Holland <samuel.holland@sifive.com>, Peng Fan <peng.fan@nxp.com>", "Subject": "[PATCH v5 5/6] smbios: add support for dynamic generation of Type 19\n table", "Date": "Fri, 28 Nov 2025 08:35:22 -0800", "Message-Id": "<20251128163535.2301653-6-raymondmaoca@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20251128163535.2301653-1-raymondmaoca@gmail.com>", "References": "<20251128163535.2301653-1-raymondmaoca@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://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 <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "This commit implements SMBIOS Type 19 (Memory Array Mapped Address)\ngeneration with a hybrid approach supporting both:\n\n1. Explicit definition via Device Tree 'smbios' node:\n Child node under '/smbios/smbios/memory-array-mapped-address' will be\n used to populate as individual Type 19 structure directly.\n - Properties follow SMBIOS field names with lowercase letters and\n hyphen-separated words (e.g., 'starting-address', 'ending-address',\n 'partition-width', etc.).\n - This method supports precise platform-defined overrides and system\n descriptions.\n\n2. Fallback to automatic DT-based discovery:\n If child node under '/smbios/smbios/memory-array-mapped-address' does\n not exist, the implementation will:\n - Scan all top-level 'memory@' nodes to populate Type 19 structure with\n inferred size and location data.\n - Scan nodes named or marked as 'memory-controller' and parse\n associated 'dimm@' subnodes (if present) to extract DIMM sizes and\n map them accordingly.\n\nThis dual-mode support enables flexible firmware SMBIOS reporting while\naligning with spec-compliant naming and runtime-detected memory topology.\n\nType 19 support is under GENERATE_SMBIOS_TABLE_VERBOSE to avoid\nincreasing rom size for those platforms which only require basic SMBIOS\nsupport.\n\nSigned-off-by: Raymond Mao <raymondmaoca@gmail.com>\n---\nChanges in v4:\n- Initial patch.\nChanges in v5:\n- None.\n\n arch/arm/dts/smbios_generic.dtsi | 3 +\n cmd/smbios.c | 14 +++\n include/smbios.h | 11 +++\n include/smbios_def.h | 5 ++\n lib/smbios.c | 150 +++++++++++++++++++++++++++++++\n 5 files changed, 183 insertions(+)", "diff": "diff --git a/arch/arm/dts/smbios_generic.dtsi b/arch/arm/dts/smbios_generic.dtsi\nindex fd2df8d02e0..fe16037fc20 100644\n--- a/arch/arm/dts/smbios_generic.dtsi\n+++ b/arch/arm/dts/smbios_generic.dtsi\n@@ -86,6 +86,9 @@\n \n \t\t\tmemory-device {\n \t\t\t};\n+\n+\t\t\tmemory-array-mapped-address {\n+\t\t\t};\n \t\t};\n \t};\n };\ndiff --git a/cmd/smbios.c b/cmd/smbios.c\nindex 39c9c44a28e..671c14e05b5 100644\n--- a/cmd/smbios.c\n+++ b/cmd/smbios.c\n@@ -680,6 +680,17 @@ static void smbios_print_type17(struct smbios_type17 *table)\n \tprintf(\"\\tRCD Revision Number: 0x%04x\\n\", table->rcd_rev_num);\n }\n \n+static void smbios_print_type19(struct smbios_type19 *table)\n+{\n+\tprintf(\"Memory Array Mapped Address:\\n\");\n+\tprintf(\"\\tStarting Address: 0x%08x\\n\", table->start_addr);\n+\tprintf(\"\\tEnding Address: 0x%08x\\n\", table->end_addr);\n+\tprintf(\"\\tMemory Array Handle: 0x%04x\\n\", table->mem_array_hdl);\n+\tprintf(\"\\tPartition Width: 0x%04x\\n\", table->partition_wid);\n+\tprintf(\"\\tExtended Starting Address: 0x%016llx\\n\", table->ext_start_addr);\n+\tprintf(\"\\tExtended Ending Address: 0x%016llx\\n\", table->ext_end_addr);\n+}\n+\n static void smbios_print_type127(struct smbios_type127 *table)\n {\n \tprintf(\"End Of Table\\n\");\n@@ -768,6 +779,9 @@ static int do_smbios(struct cmd_tbl *cmdtp, int flag, int argc,\n \t\tcase SMBIOS_MEMORY_DEVICE:\n \t\t\tsmbios_print_type17((struct smbios_type17 *)pos);\n \t\t\tbreak;\n+\t\tcase SMBIOS_MEMORY_ARRAY_MAPPED_ADDRESS:\n+\t\t\tsmbios_print_type19((struct smbios_type19 *)pos);\n+\t\t\tbreak;\n \t\tcase SMBIOS_END_OF_TABLE:\n \t\t\tsmbios_print_type127((struct smbios_type127 *)pos);\n \t\t\tbreak;\ndiff --git a/include/smbios.h b/include/smbios.h\nindex 45131416253..a0e47d51852 100644\n--- a/include/smbios.h\n+++ b/include/smbios.h\n@@ -372,6 +372,17 @@ struct __packed smbios_type17 {\n \tchar eos[SMBIOS_STRUCT_EOS_BYTES];\n };\n \n+struct __packed smbios_type19 {\n+\tstruct smbios_header hdr;\n+\tu32 start_addr;\n+\tu32 end_addr;\n+\tu16 mem_array_hdl;\n+\tu8 partition_wid;\n+\tu64 ext_start_addr;\n+\tu64 ext_end_addr;\n+\tchar eos[SMBIOS_STRUCT_EOS_BYTES];\n+};\n+\n struct __packed smbios_type32 {\n \tu8 type;\n \tu8 length;\ndiff --git a/include/smbios_def.h b/include/smbios_def.h\nindex ce913f2f32a..ae50e1a808e 100644\n--- a/include/smbios_def.h\n+++ b/include/smbios_def.h\n@@ -436,4 +436,9 @@\n #define SMBIOS_MD_ERRINFO_NONE\t\t0xFFFE\n #define SMBIOS_MD_ERRINFO_NOERR\t\t0xFFFF\n \n+/* Memory Array Mapped Address */\n+\n+/* Partition Width */\n+#define SMBIOS_MAMA_PW_DEF\t1 /* not partitioned */\n+\n #endif /* _SMBIOS_DEF_H_ */\ndiff --git a/lib/smbios.c b/lib/smbios.c\nindex 8a3fa42cef5..fcecf9516c0 100644\n--- a/lib/smbios.c\n+++ b/lib/smbios.c\n@@ -1808,6 +1808,155 @@ static int smbios_write_type17(ulong *current, int *handle,\n \t\t\t\t smbios_write_type17_from_memctrl_node);\n }\n \n+static void smbios_pop_type19_general_si(struct smbios_ctx *ctx,\n+\t\t\t\t\t struct smbios_type19 *t)\n+{\n+\tt->partition_wid =\n+\t\tsmbios_get_val_si(ctx, \"partition-width \",\n+\t\t\t\t SYSID_NONE, SMBIOS_MAMA_PW_DEF);\n+}\n+\n+static void smbios_pop_type19_addr_si(struct smbios_ctx *ctx,\n+\t\t\t\t struct smbios_type19 *t)\n+{\n+\tt->start_addr = smbios_get_val_si(ctx, \"starting-address\", SYSID_NONE,\n+\t\t\t\t\t 0);\n+\tt->end_addr = smbios_get_val_si(ctx, \"ending-address\", SYSID_NONE, 0);\n+\tt->ext_start_addr = smbios_get_u64_si(ctx, \"extended-starting-address\",\n+\t\t\t\t\t SYSID_NONE, 0);\n+\tt->ext_end_addr = smbios_get_u64_si(ctx, \"extended-ending-address\",\n+\t\t\t\t\t SYSID_NONE, 0);\n+}\n+\n+static void\n+smbios_pop_type19_addr_from_memory_node(ofnode node, struct smbios_type19 *t)\n+{\n+\tconst fdt32_t *reg;\n+\tint len;\n+\tu64 sz;\n+\tu64 addr;\n+\n+\t/* Read property 'reg' from the node */\n+\treg = ofnode_read_prop(node, \"reg\", &len);\n+\tif (!reg || len < sizeof(fdt32_t) * 4 || len % sizeof(fdt32_t))\n+\t\treturn;\n+\n+\t/* Combine hi/lo for size and address (typically 64-bit) */\n+\tsz = ((u64)fdt32_to_cpu(reg[2]) << 32) | fdt32_to_cpu(reg[3]);\n+\taddr = ((u64)fdt32_to_cpu(reg[0]) << 32) | fdt32_to_cpu(reg[1]);\n+\n+\tt->ext_start_addr = cpu_to_le64(addr);\n+\tt->ext_end_addr = cpu_to_le64(addr + sz - 1);\n+\n+\t/* If address range fits in 32-bit, populate legacy fields */\n+\tif ((addr + sz - 1) <= 0xFFFFFFFFULL) {\n+\t\tt->start_addr = cpu_to_le32((u32)addr);\n+\t\tt->end_addr = cpu_to_le32((u32)(addr + sz - 1));\n+\t} else {\n+\t\tt->start_addr = cpu_to_le32(0xFFFFFFFF);\n+\t\tt->end_addr = cpu_to_le32(0xFFFFFFFF);\n+\t}\n+}\n+\n+static int\n+smbios_write_type19_from_memctrl_node(ulong *current, int handle,\n+\t\t\t\t struct smbios_ctx *ctx, int idx,\n+\t\t\t\t u64 base, u64 sz)\n+{\n+\tstruct smbios_type19 *t;\n+\tint len;\n+\tu8 *eos_addr;\n+\tvoid *hdl;\n+\tsize_t hdl_size;\n+\n+\tlen = sizeof(*t);\n+\tt = map_sysmem(*current, len);\n+\tmemset(t, 0, len);\n+\n+\tfill_smbios_header(t, SMBIOS_MEMORY_ARRAY_MAPPED_ADDRESS, len, handle);\n+\n+\t/* eos is at the end of the structure */\n+\teos_addr = (u8 *)t + len - sizeof(t->eos);\n+\tsmbios_set_eos(ctx, eos_addr);\n+\n+\t/* Read the memory array handles */\n+\tif (!sysinfo_get_data(ctx->dev, SYSID_SM_MEMARRAY_HANDLE, &hdl,\n+\t\t\t &hdl_size) &&\n+\t hdl_size == SYSINFO_MEM_HANDLE_MAX * sizeof(u16))\n+\t\tt->mem_array_hdl = *((u16 *)hdl + idx);\n+\n+\tt->ext_start_addr = cpu_to_le64(base);\n+\tt->ext_end_addr = cpu_to_le64(base + sz - 1);\n+\n+\tif ((base + sz - 1) <= 0xFFFFFFFFULL) {\n+\t\tt->start_addr = cpu_to_le32((u32)base);\n+\t\tt->end_addr = cpu_to_le32((u32)(base + sz - 1));\n+\t} else {\n+\t\tt->start_addr = cpu_to_le32(0xFFFFFFFF);\n+\t\tt->end_addr = cpu_to_le32(0xFFFFFFFF);\n+\t}\n+\n+\t/* Write other general fields */\n+\tsmbios_pop_type19_general_si(ctx, t);\n+\n+\tlen = t->hdr.length + smbios_string_table_len(ctx);\n+\t*current += len;\n+\tunmap_sysmem(t);\n+\n+\treturn len;\n+}\n+\n+static int smbios_write_type19_mem(ulong *current, int handle,\n+\t\t\t\t struct smbios_ctx *ctx, int idx,\n+\t\t\t\t int type)\n+{\n+\tstruct smbios_type19 *t;\n+\tint len;\n+\tu8 *eos_addr;\n+\tvoid *hdl;\n+\tsize_t hdl_size;\n+\n+\tlen = sizeof(*t);\n+\tt = map_sysmem(*current, len);\n+\tmemset(t, 0, len);\n+\n+\tfill_smbios_header(t, SMBIOS_MEMORY_ARRAY_MAPPED_ADDRESS, len, handle);\n+\n+\t/* eos is at the end of the structure */\n+\teos_addr = (u8 *)t + len - sizeof(t->eos);\n+\tsmbios_set_eos(ctx, eos_addr);\n+\n+\tif (type == SMBIOS_MEM_CUSTOM) {\n+\t\tsmbios_pop_type19_addr_si(ctx, t);\n+\t\tt->mem_array_hdl = smbios_get_val_si(ctx, \"memory-array-handle\",\n+\t\t\t\t\t\t SYSID_NONE, 0);\n+\t} else if (type == SMBIOS_MEM_FDT_MEM_NODE) {\n+\t\tsmbios_pop_type19_addr_from_memory_node(ctx->node, t);\n+\t\t/* Read the memory array handles */\n+\t\tif (!sysinfo_get_data(ctx->dev, SYSID_SM_MEMARRAY_HANDLE, &hdl,\n+\t\t\t\t &hdl_size) &&\n+\t\t hdl_size == SYSINFO_MEM_HANDLE_MAX * sizeof(u16))\n+\t\t\tt->mem_array_hdl = *((u16 *)hdl + idx);\n+\t}\n+\n+\t/* Write other general fields */\n+\tsmbios_pop_type19_general_si(ctx, t);\n+\n+\tlen = t->hdr.length + smbios_string_table_len(ctx);\n+\t*current += len;\n+\tunmap_sysmem(t);\n+\n+\treturn len;\n+}\n+\n+static int smbios_write_type19(ulong *current, int *handle,\n+\t\t\t struct smbios_ctx *ctx)\n+{\n+\treturn smbios_write_type1719(current, handle, ctx,\n+\t\t\t\t smbios_write_type19_mem,\n+\t\t\t\t smbios_write_type19_from_memctrl_node);\n+}\n+\n #endif /* #if IS_ENABLED(CONFIG_GENERATE_SMBIOS_TABLE_VERBOSE) */\n \n static int smbios_write_type32(ulong *current, int *handle,\n@@ -1858,6 +2007,7 @@ static struct smbios_write_method smbios_write_funcs[] = {\n \t{ smbios_write_type9, \"system-slot\"},\n \t{ smbios_write_type16, \"memory-array\"},\n \t{ smbios_write_type17, \"memory-device\"},\n+\t{ smbios_write_type19, \"memory-array-mapped-address\"},\n #endif\n \t{ smbios_write_type32, },\n \t{ smbios_write_type127 },\n", "prefixes": [ "v5", "5/6" ] }