From patchwork Tue Sep 15 03:10:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 517652 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 486731401AD for ; Tue, 15 Sep 2015 13:10:31 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=jms.id.au header.i=@jms.id.au header.b=UWyf4y3v; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 174A31A2C2B for ; Tue, 15 Sep 2015 13:10:31 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=jms.id.au header.i=@jms.id.au header.b=UWyf4y3v; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id AA8961A2C25 for ; Tue, 15 Sep 2015 13:10:18 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=jms.id.au header.i=@jms.id.au header.b=UWyf4y3v; dkim-atps=neutral Received: by pacex6 with SMTP id ex6so162316440pac.0 for ; Mon, 14 Sep 2015 20:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=from:to:subject:date:message-id; bh=ub1lZhVQZIE0g5xUXEPtO3sMJfvA91zOmTLbbU/dI0w=; b=UWyf4y3vWot7GjuZDXKyLnx/Wn0DRzHp0XtbiJLaGo1MTnPnEZt40HV3/hmvIBCSXD ImLsgN/kyNd9oXacFNXcnDr2nTF0YyRGynf3jxI72h6p78pnK20ddv80dPvcaPFLo9IE mffYqnv6XbdYMSJaqqyEpePgXlcc980l0xKNA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=ub1lZhVQZIE0g5xUXEPtO3sMJfvA91zOmTLbbU/dI0w=; b=XADSlz0/o9IHvIXuq7txV+cdTrLdNPgLU6QVTljF3P+rfx3NMjmjn/z0Bj/Ts8VT00 +2pZJVcZ+Z7h6t7WBC2JhWAqUNevBFINTsJc0go/U+BI0RVULP6CIsDqlWjRy1ctw0Wx RK2OkWV0E/iux9YParbJC6Z9+wB5NapDvza0KFynPLDPYTjbAwiW8uzyZyre22j7qDOW wfm8wvT2dgMf4Z++kWAmZd2Wyt/BKdnl4mfTygG23xUxi+umeToODycx3KmSrhdouR/D Owz5Kb3M0Sa4+b+5X6UOCB1+L74inJOAC7CrFp1gCvjE8B/IKOC5Xz3CZo5hwj4oIwUa rT4g== X-Gm-Message-State: ALoCoQkp5tYUA7gVoowTPrMnSjVeU0xuZBwsETiLsfs6MCctikoO/7XkMI0ci8MyDffz+Kx/B8fF X-Received: by 10.68.203.66 with SMTP id ko2mr41424487pbc.81.1442286616408; Mon, 14 Sep 2015 20:10:16 -0700 (PDT) Received: from icarus.jms.id.au (ip9.cor1.adl1.base64.com.au. [203.0.153.9]) by smtp.gmail.com with ESMTPSA id je5sm7646667pbd.79.2015.09.14.20.10.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 20:10:15 -0700 (PDT) Received: by icarus.jms.id.au (Postfix, from userid 1000) id 14F39100554; Tue, 15 Sep 2015 12:40:09 +0930 (ACST) From: Joel Stanley To: skiboot@lists.ozlabs.org Date: Tue, 15 Sep 2015 12:40:06 +0930 Message-Id: <1442286607-15755-1-git-send-email-joel@jms.id.au> X-Mailer: git-send-email 2.5.0 Subject: [Skiboot] [PATCH 1/2] Add opal_boot_complete to debug descriptor X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This tells us when we've entered the host. First use case is knowing if we can can rely on host communication working, such as receiving and acting on an opal_msg. Signed-off-by: Joel Stanley Reviewed-by: Vasant Hegde --- core/init.c | 3 +++ include/skiboot.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/init.c b/core/init.c index 7baca0d..d5c1779 100644 --- a/core/init.c +++ b/core/init.c @@ -60,6 +60,7 @@ struct debug_descriptor debug_descriptor = { .memcons_phys = (uint64_t)&memcons, .trace_mask = 0, /* All traces disabled by default */ .console_log_levels = (PR_DEBUG << 4) | PR_NOTICE, + .opal_boot_complete = false, }; static bool try_load_elf64_le(struct elf_hdr *header) @@ -454,6 +455,8 @@ void __noreturn load_and_boot_kernel(bool is_reboot) printf("INIT: Starting kernel at 0x%llx, fdt at %p (size 0x%x)\n", kernel_entry, fdt, fdt_totalsize(fdt)); + debug_descriptor.opal_boot_complete = true; + fdt_set_boot_cpuid_phys(fdt, this_cpu()->pir); if (kernel_32bit) start_kernel32(kernel_entry, fdt, mem_top); diff --git a/include/skiboot.h b/include/skiboot.h index 4b58597..c12fa67 100644 --- a/include/skiboot.h +++ b/include/skiboot.h @@ -65,7 +65,7 @@ struct debug_descriptor { u32 version; u8 console_log_levels; /* high 4 bits in memory, * low 4 bits driver (e.g. uart). */ - u8 reserved1; + bool opal_boot_complete : 1; /* True as we jump to host OS */ u16 reserved2; u32 reserved[2];