From patchwork Mon Jun 16 20:17:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julius Werner X-Patchwork-Id: 360235 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 949891400CF for ; Tue, 17 Jun 2014 06:18:04 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755919AbaFPUSD (ORCPT ); Mon, 16 Jun 2014 16:18:03 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:38092 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755721AbaFPUSB (ORCPT ); Mon, 16 Jun 2014 16:18:01 -0400 Received: by mail-pd0-f181.google.com with SMTP id v10so3888161pde.40 for ; Mon, 16 Jun 2014 13:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5QvsCwNj5g0JUtoCVl9T7pTa8oZju2ufJDyiT8GRLJ0=; b=SABSyyjmzH4OIXzCbCpNHn4aSvz+papLUbSiSUwT633Ra8epWZHBKEL2zjsDqZFAns 8A7iOUW3zRDXhqdOV3iY1O+YV+OEGeHOkU8q5qJotgpCzEX5cUebfN2yMV8vzdvd7eyE a95ddiNJlM6XqzJygI8vVyN7C+N77hNR8B9PI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5QvsCwNj5g0JUtoCVl9T7pTa8oZju2ufJDyiT8GRLJ0=; b=fTfn6mhQ6KmIQwdLgXnlj7Xnxk+Bwlv12pROMvOFHSBc1VkP/Am45ylhkRusu9Maz9 niwjmLC7hQwQ3UfHfclkqsDLUvJPnd9UYEFKzKf+n5ClctCFSc7zKH3aQCeTNH61tut+ OudY3XTlkVBBPqFfrd6Otp6b4gfcdIJFj2Y7MajxHBFd1pIZWQJ4RTyQ0Wt+8efJdduq BJaMOG3tVZb12JKMiItJw9W8gMnnzeQj5cP3/9xAIYwsdHV4YiyO/1xqEz1KMloCn6Ej uz0a8E/bFWiPwphtG+8XElwPQbKIP7bVqSNKS7z0JqQ9/K9tcl1fNtxrmzZV2phXd0HD V9Ag== X-Gm-Message-State: ALoCoQlgq4IdG/vLcLVnG0iQtlLjbumfM3fPpbVmzCg9QrvH3rpYZqpCkpjl9onh6KJgDHNaapcD X-Received: by 10.67.24.102 with SMTP id ih6mr3950469pad.99.1402949881084; Mon, 16 Jun 2014 13:18:01 -0700 (PDT) Received: from jwerner-linux.mtv.corp.google.com (jwerner-linux.mtv.corp.google.com [172.22.72.75]) by mx.google.com with ESMTPSA id se3sm20280771pbb.80.2014.06.16.13.17.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Jun 2014 13:18:00 -0700 (PDT) From: Julius Werner To: Olof Johansson Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Stephen Warren , Doug Anderson , Stefan Reinauer , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Julius Werner Subject: [PATCH v2] firmware: Add device tree binding for coreboot Date: Mon, 16 Jun 2014 13:17:34 -0700 Message-Id: <1402949854-30380-1-git-send-email-jwerner@chromium.org> X-Mailer: git-send-email 2.0.0.526.g5318336 In-Reply-To: References: <1402689965-19397-1-git-send-email-jwerner@chromium.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds documentation describing a device tree binding for the coreboot firmware. It is meant to be dynamically added during boot and contains address definitions for the coreboot table (a list of variable-sized descriptors providing information about various compile- and run-time generated firmware parameters) and the CBMEM area (the structure containing most run-time resident memory regions set up by coreboot). These definitions allow kernel drivers to easily access data contained in and pointed to by these regions (such as coreboot's in-memory log). (An example implementation can be seen at http://crosreview.com/203371, which will be submitted at a later point.) Change-Id: I97609d461d306f85851e5efc26c675ca1e2d7e9d Signed-off-by: Julius Werner --- .../devicetree/bindings/firmware/coreboot.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/firmware/coreboot.txt diff --git a/Documentation/devicetree/bindings/firmware/coreboot.txt b/Documentation/devicetree/bindings/firmware/coreboot.txt new file mode 100644 index 0000000..5055f0e --- /dev/null +++ b/Documentation/devicetree/bindings/firmware/coreboot.txt @@ -0,0 +1,32 @@ +COREBOOT firmware information + +The device tree node to communicate the location of coreboot's memory-resident +bookkeeping structures to the kernel. Since coreboot itself cannot boot a +device-tree-based kernel (yet), this node needs to be inserted by a +second-stage bootloader (a coreboot "payload"). + +Required properties: + - compatible: Should be "coreboot" + - reg: Address and length of the following two memory regions, in order: + 1.) The coreboot table. This is a list of variable-sized descriptors + that contain various compile- and run-time generated firmware + parameters. It is identified by the magic string "LBIO" in its first + four bytes. See coreboot's src/include/boot/coreboot_tables.h for + details. + 2.) The CBMEM area. This is a downward-growing memory region used by + coreboot to dynamically allocate data structures that remain resident. + It may or may not include the coreboot table as one of its members. It + is identified by a root node descriptor with the magic number + 0xc0389479 that resides in the topmost 8 bytes of the area. See + coreboot's src/lib/dynamic_cbmem.c for details. + +Example: + firmware { + ranges; + + coreboot { + compatible = "coreboot"; + reg = <0xfdfea000 0x264>, + <0xfdfea000 0x16000>; + } + };