From owner-freebsd-hackers@freebsd.org Tue Oct 27 18:31:07 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B22CBA1F9F8 for ; Tue, 27 Oct 2015 18:31:07 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 288C8118A for ; Tue, 27 Oct 2015 18:31:06 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id f64bc910 for ; Tue, 27 Oct 2015 19:24:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h= mime-version:content-type:content-transfer-encoding:date:from:to :subject:message-id; s=mail; bh=Q2pdb/ZRMfaudiNhHH2Uk/J0m0k=; b= WritF0zTztcqH/2dXd+1cqmnt2aSP7flLBCAz5U7uh8mjlfTjfyYjOwGIOkU4pRm JeL/Y7fP01G3YqVw4TyOled4YcT38p616a1uFySwy13PKPn6ZEZML75NG/XVXFBu QE8JLycFymBQDa0LEMPH9agXCiYRQtUIS7D0m+KW9cA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h= mime-version:content-type:content-transfer-encoding:date:from:to :subject:message-id; q=dns; s=mail; b=pCobrJEQLLsaYWIARzfmcojA/Q GK+FckruEt8q6MHujoZxwwyhaQ8F4Avt2gKG189DGdUqKbI1c2fzeALFdRKgKHmO zzeV3hrEme4fyq8Z3eu4nmTL9vOn1/5j8WxmtF3rdNtqmIJ/43qbiOBM0aKscvWV oMLQHNExiie6ebUw8= Received: from webmail.megadrive.org (www1.blih.net [212.83.177.180]) by mail.blih.net (OpenSMTPD) with ESMTP id d481102e for ; Tue, 27 Oct 2015 19:24:23 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 27 Oct 2015 19:24:23 +0100 From: Emmanuel Vadot To: freebsd-hackers Subject: EFI Variables Organization: Bidouilliste Message-ID: <6ce779725aab266bc85e92f0ee2186b6@megadrive.org> X-Sender: manu@bidouilliste.com User-Agent: Roundcube Webmail/1.1.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 18:31:07 -0000 Hello all, I'm currently hacking around the loader.efi I've added the possibility to change background/foreground colors (not very useful I know). I've also added the list and get command to the not working "nvram" command. CUrrently the variables are printed in the form "${var}-${guid}" (Result of a nvram list command : https://pbs.twimg.com/media/CSVxdzMW0AEEVo4.jpg) The "get" subcommand print the content of the variable (passed without the guid) as if it is a unicode string even if a variable can contain any data possible. For the "set" subcommand I think that the best way to handle it is : "nvram set myvar data" -> This will set the variable myvar to data with the freebsd guid (if there is any) and "nvram set myvar guid data" -> This will force the guid to I'll look tomorrow how to access efivars once the kernel is booted so we can set some from some userland tool (especially the boot related one). Is any of you guys uses efivars for something not boot-releated ? I'm interested in any usage of efi variables. You can see my change on my github branch : https://github.com/evadot/freebsd/tree/loader_efi Cheers, -- Emmanuel Vadot