From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400c:c08::230; helo=mail-ua0-x230.google.com; envelope-from=lemanhtoantb@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-ua0-x230.google.com (mail-ua0-x230.google.com [IPv6:2607:f8b0:400c:c08::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 10575210C6456 for ; Tue, 3 Jul 2018 18:22:07 -0700 (PDT) Received: by mail-ua0-x230.google.com with SMTP id n4-v6so2438382uad.6 for ; Tue, 03 Jul 2018 18:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7o7gkHzjcAMPuzB7C2suF9gACZj1VurfFagCBaWFIMM=; b=AAiVsPn5ez8oWnLLOCNW7mSf1PJSPJd49uyoHdv1ugDC7XXGpxv50OBNZQb72TIyTc uZNnGaYcnZ0T6VnfPd5VnF1mFd+G2zBvozKfgxAZ8QPcuvD+Mvle18Tkc2PHqt2gbE41 1QL1GwpDjcsOwfZ1Pj9mC+z4U22ahZkMUo2QCB7hoIu+LkOwmfNB8DhmUPpaUfqlKVwl 55Bc8kqXaFd38kKQyI/eroZdUGaIosLqyqqp3ujZdbyI/zTSqL9U1C8xQObum3EdCS2I s17IfzMEj78uK9Qpz3yhGhzL5/WjmvW+VwvTMCtL4yNDGbFZfeqD7mMW4UzcPZXkvv2N sq/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7o7gkHzjcAMPuzB7C2suF9gACZj1VurfFagCBaWFIMM=; b=VAAu5DvzBr2IGmIxsGYgWIIumecMHFg8YwlWwezKayxkUejWoZtIrQ57Jf0bMMLPB0 zXVygKGO8orie4L/uiiqLNKFB5XoJeZ98sMlKHMT/+tDyaZjlqS1nl+yGThyhQ+PSjld bKfSgYTa9bSje0/Sk1KnnNTRYxXXAyRmB26kA+vx1GiKCdUY1vpfEU7PnsT6zNwU0q7T LR09eh2OyYZAZiVLvDoE13ZI8/8vRpxVYR5QKrh5de3AXiQ1UsTf7jx28PS+7XpGxfPv 2E2AclQZ4u0WXvq1EFz+PvBshw6PK9KzvXxRRl9FTSJMXmk8qpJ4AdObMjdb9OaG+8fb UNvA== X-Gm-Message-State: APt69E1VhH5k/rjIsj+KbizuVaqK1IiKnzQNH4DyGLcZc1jVdTfsNQl+ owWQLGkLBWCKAc94hZsm1M+w/ncNoqLYTSdiybE= X-Google-Smtp-Source: AAOMgpeIh70iBVtFPyIH7M74vD23V9ECQKFebAn4BuHRk7vLMaGLbCN6Mvd0VnWADC4ff4nm2rCu9xW/OMsEyeZ/7wQ= X-Received: by 2002:ab0:5323:: with SMTP id x32-v6mr19524139uax.139.1530667326737; Tue, 03 Jul 2018 18:22:06 -0700 (PDT) MIME-Version: 1.0 References: <43294E30-F00E-4608-B117-429A25B93371@apple.com> In-Reply-To: <43294E30-F00E-4608-B117-429A25B93371@apple.com> From: Toan Le manh Date: Wed, 4 Jul 2018 08:21:56 +0700 Message-ID: To: afish@apple.com Cc: edk2-devel@lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.26 Subject: Re: gRT->SetVariable ACCESS DENIED error X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2018 01:22:08 -0000 Content-Type: text/plain; charset="UTF-8" Hi Andrew, I'm trying to set some variables to NVRAM at the beginning of BDS phase. For example, this function returned EFI_ACCESS_DENIED Status = gRT->SetVariable ( L"HwErrRecSupport", &gEfiGlobalVariableGuid, EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE, sizeof (UINT16), &HardwareErrorRecordLevel ); Thanks & BRs, Toan On Wed, Jul 4, 2018 at 12:12 AM Andrew Fish wrote: > Toan, > > What arguments did you pass to gRT->SetVariable()? > > What implementation did you test on? > > In general there are "wiggle words" in the UEFI Spec that make it legal to > return other error codes. Back in the day when NOR FLASH was expensive and > EFI was size constrained we did not want to have to filter every return > value from a lower level to convert it to a spec required return code. > > Thanks, > > Andrew Fish > > > On Jul 3, 2018, at 2:10 AM, Toan Le manh wrote: > > > > Dear all, > > > > I'm facing the Status EFI_ACCESS_DENIED when using gRT->SetVariable() > > method. > > There is no description of this returned status for SetVariable() in > UEFI > > spec. > > Have you ever faced this type of error? Could you please give me any idea > > on how this happen? > > Sorry for any inconvenience, I'm newbie in EDK2. > > > > Thanks & Best Regards, > > Toan > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > >