From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6FFFF1A1E56 for ; Wed, 19 Oct 2016 11:17:37 -0700 (PDT) Received: by mail-it0-x230.google.com with SMTP id 139so112636725itm.1 for ; Wed, 19 Oct 2016 11:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vZTCkLPQFN98Ns7PFD2iPVp1DiqQRbXxkDXo0UfHV00=; b=0vynD1YZsKrvfk03pK8F9QRk8rLZffvehpnJFEhMbxfkzRF8BFn2SNd/lrtk1NzUZu MmjL7e8Gbd7s29stRC5Qgx30hcedKRwtUCRMj89l8lSVVvbOqB2ezHhKIe3Dg3ZwtHKR thrvyDahR1hzaN1PYsN6R76u9J2oaKy7ns+qRbqmgtoxpgnizPOayOmc1lrpyVT7FiUy oEOQuJcxttmkNrtgTq9382hHMW9mudbIKMuDxwaKUGX6UfHSgoFSQxr0S74Yp2SOn0lQ 8m8q+k1QJHUE4jNQsJxprlrJ+dPYRqDu5prozFc6UnhcCSQYNXmD+9g2q8N+rkxvD2pQ 471w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vZTCkLPQFN98Ns7PFD2iPVp1DiqQRbXxkDXo0UfHV00=; b=KK0dobYrOkUGD5ihS9gl9iUH0Sxb7gm1aPn4tygnVtnrh/2dLnXdjIXte/RPRnjk9O ZOeC+ZZ553GDrBd6GkxT+xZ+EQ830mdM6Mh9kaBt1a/a2kf215VDkquWTcTFrMWk+iru 2Uj4fOtCTozN+LbJ4/2ooXK6CjU94MGaOQIci3L9eDagg9j8Xedlifb8j54hGvDa60Tb Z+XXP6dZFF+17UWWSJX3B3VHKdSqWwyozgcimj3QR5F87E4fpe1SvlENHYBNz6p2IbcX TnOf67AGE8lLMtD56IWdQgpiKccQ1Nj8rX5bbxLdenldCkqX2O8/84jimjtqpTYa+9Wt lZcQ== X-Gm-Message-State: AA6/9RmeqUeYoyRMKG1cIN+6PYJss5NDO6k9PnfZLvr89lMQB9x8KKPJtMjwE/XO8nd3OWsPOdAB5F9PJ7QrHg== X-Received: by 10.36.20.9 with SMTP id 9mr8354339itg.24.1476901056784; Wed, 19 Oct 2016 11:17:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.68.18 with HTTP; Wed, 19 Oct 2016 11:17:36 -0700 (PDT) In-Reply-To: <3F7BA679-11EF-4067-92D7-CC58777CB6DC@apple.com> References: <4e344fbc-5d83-c963-2867-461d40832c8d@redhat.com> <3F7BA679-11EF-4067-92D7-CC58777CB6DC@apple.com> From: Saqib Khan Date: Wed, 19 Oct 2016 23:17:36 +0500 Message-ID: To: Andrew Fish Cc: Laszlo Ersek , edk2-devel@ml01.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: How to get BBS_BBS_DEVICE_PATH from BOOTXXXX variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 18:17:37 -0000 Content-Type: text/plain; charset=UTF-8 Hi, so i have parsed the structure as follow : *BootVariable = mGetVariable(Name, &gEfiGlobalVariableGuid, &BootVariableSize, NULL);LDAttr = BootVariable[0];FilePathListLength = (BootVariable+2);Ptr = (BootVariable+3); // for description * *for FilePathList[] Ptr+= StrSize((CHAR16 *)Ptr); CopyMem (Ptr, DevicePath, *FilePathListLength);* I am able to get LDAttr ,FilePathListLength and description but when i try to check DevicePath->Type it always return 0x01( Hardware Device Path) for each device . I have hard drive with legacy OS(BBS_DEVICE_PATH). So it should not always return 0x01 .What i am doing wrong in parsing ? Thanks On Tue, Oct 18, 2016 at 11:37 PM, Andrew Fish wrote: > > > On Oct 18, 2016, at 10:40 AM, Laszlo Ersek wrote: > > > > On 10/18/16 19:18, Saqib Khan wrote: > >> Hi, > >> I can not find structure of BOOTXXXX variable, Can any one help how to > >> extract device path from BOOTXXXX variable. > > > > In UEFI-related questions, the UEFI specification has a fair chance to > > provide useful information. > > > > Please refer to "3.1.3 Load Options" in the UEFI v2.6 spec, available > > for download from . > > > > Locating the matching structure definition in the edk2 tree is left as > > an exercise to the reader ;) > > > > Chapter 3 Boot Manager. > > The structure is EFI_LOAD_OPTION but some of the fields are variable > length so you have to do math to figure stuff out. > > Thanks, > > Andrew Fish > > > > Laszlo > > > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > > -- Regards Saqib Ahmed Khanzada