From patchwork Mon Feb 2 22:48:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 44177 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 071FA202A5 for ; Mon, 2 Feb 2015 22:49:13 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id h11sf23050733wiw.1 for ; Mon, 02 Feb 2015 14:49:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent :cc:precedence:reply-to:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=Qhmwaao9uZMhH2fYSRGCjoMS8dA5BWJFblA3giiKY8E=; b=Hx0GcBTXL6hQ1Yk9DxkJuU0P+UwNLxaACl89kbAtYDZV0yrYpEpcs3zz6Q0OXByyFl H318YE56RYUS2My+r8vWyCyiPXFGY7+Sb57kBK5lpFEMjqUlllu40Z1MoP26LsvooSfT AMxTQZY+7gj1pUQUhgE/hzXXVlLqBAmMxVj+ah0yIRRLy38ZxInVikuG7u5TJkE98VMT uBE68ziQDfrYHsymKS2s1X7jRRiUXzZKOb3RVPXvvTSqiJvYogWzxNz5j4CyETH+yA5S mHFeq6K+7AVHAxkhbeL/U2byhuL/Ng7cNkWcLjHTn3vqKADDbRHkAc2BSLCuZL74eXdH OMiw== X-Gm-Message-State: ALoCoQmL5XvoRtBNjnbBEHfChAPELxIb+V5X8F20TWR0v6nDdPD/s/7yf503z6rmYBQhTqAS3EXX X-Received: by 10.180.37.107 with SMTP id x11mr1538452wij.5.1422917352337; Mon, 02 Feb 2015 14:49:12 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.97 with SMTP id z1ls685545laz.35.gmail; Mon, 02 Feb 2015 14:49:12 -0800 (PST) X-Received: by 10.112.132.67 with SMTP id os3mr21556618lbb.90.1422917352015; Mon, 02 Feb 2015 14:49:12 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id xp1si16354245lbb.14.2015.02.02.14.49.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 14:49:11 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id s18so46140362lam.5 for ; Mon, 02 Feb 2015 14:49:11 -0800 (PST) X-Received: by 10.112.164.101 with SMTP id yp5mr21409611lbb.82.1422917351569; Mon, 02 Feb 2015 14:49:11 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1584195lbj; Mon, 2 Feb 2015 14:49:10 -0800 (PST) X-Received: by 10.140.22.234 with SMTP id 97mr43700711qgn.21.1422917350017; Mon, 02 Feb 2015 14:49:10 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 44si26907699qgg.9.2015.02.02.14.49.09 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 14:49:10 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:57008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIPnp-0007fP-9D for patch@linaro.org; Mon, 02 Feb 2015 17:49:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIPnl-0007fI-2F for grub-devel@gnu.org; Mon, 02 Feb 2015 17:49:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIPng-0000Su-1L for grub-devel@gnu.org; Mon, 02 Feb 2015 17:49:04 -0500 Received: from mail-wg0-f48.google.com ([74.125.82.48]:64378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIPnf-0000So-RN for grub-devel@gnu.org; Mon, 02 Feb 2015 17:48:59 -0500 Received: by mail-wg0-f48.google.com with SMTP id x12so41436675wgg.7 for ; Mon, 02 Feb 2015 14:48:59 -0800 (PST) X-Received: by 10.194.59.13 with SMTP id v13mr6413225wjq.62.1422917339131; Mon, 02 Feb 2015 14:48:59 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by mx.google.com with ESMTPSA id bb2sm29834752wjc.43.2015.02.02.14.48.57 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 14:48:58 -0800 (PST) Date: Mon, 2 Feb 2015 22:48:55 +0000 From: Leif Lindholm To: The development of GNU GRUB Subject: Re: [PATCH] Add a module for retrieving SMBIOS information Message-ID: <20150202224855.GT4278@bivouac.eciton.net> References: <87r3u92hln.fsf@gmail.com> <20150202200657.GS4278@bivouac.eciton.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.48 Cc: Andrei Borzenkov , Rajat Jain , Stu Grossman , Sanjay Jain , Raghuraman Thirumalairajan X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: grub-devel-bounces+patch=linaro.org@gnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 On Mon, Feb 02, 2015 at 05:01:32PM -0500, David Michael wrote: > >> There was some interest on help-grub about supporting SMBIOS access > >> upstream. I've updated the module I wrote a while ago to work with > >> current GRUB and added documentation. Is this acceptable to be applied? > >> Are there any comments or suggestions for improvement? > > > > Any particular reason for making it x86-only? > > Since the code correctly does _not_ scan memory for the tables on any > > EFI system, this should work without modification on arm/arm64 too. > > It's marked as x86-only mostly because that's all I've tried, and I > didn't want to accidentally break builds for other configurations. I > don't have any ARM hardware for testing the module. Maybe an emulator > would suffice; I'll have to look into it. > > Are you able to try the module with an ARM system? I'd be happy to > update the patch with your suggested changes if it works. I have a software model with some dummy tables, and with one modification (below - one I think will be necessary for amd64 too), the command seems to be functional. I'm hoping we'll get around to implementing SMBIOS support for arm64 QEMU shortly, so that these things will be easier for others to test. Or if you'd be interested, I could show you how to test it on the ARM Foundation Model. / Leif grub_uint16_t structure = 0; diff --git a/grub-core/commands/i386/smbios.c b/grub-core/commands/i386/smbios.c index 25f20fe..40dae88 100644 --- a/grub-core/commands/i386/smbios.c +++ b/grub-core/commands/i386/smbios.c @@ -164,7 +164,7 @@ grub_smbios_match_entry (const struct grub_smbios_eps *ep, const grub_uint16_t match, const grub_uint8_t print) { - grub_uint32_t table_address = ep->intermediate.table_address; + grub_addr_t table_address = ep->intermediate.table_address; grub_uint16_t table_length = ep->intermediate.table_length; grub_uint16_t structures = ep->intermediate.structures;