Received: by 2002:a19:c144:0:0:0:0:0 with SMTP id r65csp1382070lff; Tue, 10 Aug 2021 07:33:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyssex0ZNh8djcvdSudDXinkuUHhHE5lKDHjbjpGRJCr5it3BXuGxnc0qp9N7kr576qcvuj X-Received: by 2002:a05:620a:c0c:: with SMTP id l12mr28587359qki.318.1628606034415; Tue, 10 Aug 2021 07:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628606034; cv=none; d=google.com; s=arc-20160816; b=P9Noy245gcRRPXR7j7jFox8w+yC+6dLNAzgv/OmXezJhsuqhcdHlNG5wBVcrmxKIeo 8ZHevgGOSr0t67l6NwP2o4bo1XWBdG78CreNSFUpHyPqU/Nev+xn2HMEfvI10RW3UhN3 8BLObJmscnLpRL/paPo/59kdgTTh36LksGn1MmKhxcobaERJM2C7jNqQfHmuG+WtCbq3 aE7+IgbpP60ZsxPWdZk6wBZPMrS9pXaT75YHAvSJ42AmkL311t+jdbvpa/YlccH++GY5 smbsYMPMWIiel+QRKCNQvjywm7O6TH5XWdr/V5vQIrk8IjBfdaFKbGRBHE3y9dJ/wUbo Xx0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=ozv5IuBXeN9fI37tZJ80jNX1pPdk/rvqOi5Y1U+6zNc=; b=KY3qT64p3oSXjMJJl7hqIiOiFzOYR0BReSmN4mc4tbphSDFRgP2fx9k9NAlU5BATWg IJO9OxiRNUb8x8QZ9QdJiO3I91ZAw1GydvSPneO7Tonojb97j0vIt/WxhJS7H3WcpYZp 7IP2S22Q5wLpHvGLEMkZPWDjIuxXkCI0lKRJMBnudcbhQ8zvK3ksthT32Di6RaEFiqIE i3Q7w9hbQPuQL1z1bQ+kab3HgfAjNkB/G75fo365FbhNyPqR7LG52U5erw6FCeHiD2Ig hZYv+ZIvO94gItlgxUGtxnJDmqU8myOXRf1Bdsmmdi/RbHsN7nV6klZHXn4zhP98Hqbo aO8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="KR0/D9uC"; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f13si13770762qti.247.2021.08.10.07.33.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Aug 2021 07:33:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b="KR0/D9uC"; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:43470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDSpF-0003nI-Rj for alex.bennee@linaro.org; Tue, 10 Aug 2021 10:33:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDSp3-0003mK-Ky for qemu-arm@nongnu.org; Tue, 10 Aug 2021 10:33:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDSp0-00027a-4R for qemu-arm@nongnu.org; Tue, 10 Aug 2021 10:33:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628606016; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ozv5IuBXeN9fI37tZJ80jNX1pPdk/rvqOi5Y1U+6zNc=; b=KR0/D9uCA8W5DjZM3lFlQdnpjWcBxR5GDUYWeBosy0DyplTe5vbzCzR3TpiMtPf8XDg69S fIfX11F/QSBNcoT+Wzlu6lRwl+/W5bO6qTWei3UkF16KXWmNwMhkx1hKsMoOcnXC59fP7t 8UB4pEKys4vBQfsyuJ32EhwZIgtTl7M= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-204-47U3orWHPoCFxFT7zJNlOQ-1; Tue, 10 Aug 2021 10:33:34 -0400 X-MC-Unique: 47U3orWHPoCFxFT7zJNlOQ-1 Received: by mail-wm1-f71.google.com with SMTP id i6-20020a05600c3546b029025b0d825fd2so1066236wmq.4 for ; Tue, 10 Aug 2021 07:33:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=ozv5IuBXeN9fI37tZJ80jNX1pPdk/rvqOi5Y1U+6zNc=; b=cXMenIxA9RefL7g7S6Kmo6XkG0BByB3Ovwrwnyq/2OyTG+CZORtZNJDQOipp+TKyp7 smuiTcthARy8O7DKkeQJ4Uswinza7mwZ7Rjf6W+Go8dNr1LmaUsoqxrLBumMmg58LLKh j6VYHgbYd8FvHXISSKtswnCBwe9c7uNA/mhblSAbFb1UXaXO8hz288eP65p6CE4YVf9S DQF7cjl+1HPb3x3VZr/Vukt5DTQ6BhHYKeoRZKvKLLyllA10FBKcVqGiBHPdBT7gUne5 jFtruG+CAVkjk5DVL5DymckKKDE5rrrQLKhu2jFRvuNF68Jb6njQxUNmgvOudXwbKWlB wSRA== X-Gm-Message-State: AOAM532LDeFQsQs1pQ3lPM5/rk5CUprHst4/jMW5/daHaUp+ScBaHIQZ 7XY8pCN8PNV/A32Y1rrkK7Tn/jwRGUv1brxDHA+4GqaDm71fKwjVk+EXdkN1U1IKNKT2/ojj3JH 33HqzHsCVVtrb X-Received: by 2002:a1c:7907:: with SMTP id l7mr5094454wme.87.1628606012850; Tue, 10 Aug 2021 07:33:32 -0700 (PDT) X-Received: by 2002:a1c:7907:: with SMTP id l7mr5094411wme.87.1628606012534; Tue, 10 Aug 2021 07:33:32 -0700 (PDT) Received: from ?IPv6:2a01:e0a:59e:9d80:527b:9dff:feef:3874? ([2a01:e0a:59e:9d80:527b:9dff:feef:3874]) by smtp.gmail.com with ESMTPSA id p14sm3034796wmi.42.2021.08.10.07.33.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Aug 2021 07:33:32 -0700 (PDT) Subject: Re: [PATCH for-6.2] hw/arm/virt_acpi_build: Generate DBG2 table To: Ard Biesheuvel , Samer El-Haj-Mahmoud References: <20210810083057.99651-1-eric.auger@redhat.com> <4dae638d-6f96-c036-2a6b-5ef179012029@redhat.com> From: Eric Auger Message-ID: <1b031fe5-60f3-4727-052b-b103fed20910@redhat.com> Date: Tue, 10 Aug 2021 16:33:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eric.auger@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=170.10.133.124; envelope-from=eric.auger@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) DKIMWL_WL_HIGH=-0.704, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: eric.auger@redhat.com Cc: Peter Maydell , Andrew Jones , "gshan@redhat.com" , "Michael S. Tsirkin" , "jcm@redhat.com" , "qemu-devel@nongnu.org" , Shannon Zhao , qemu-arm , Igor Mammedov , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Al Stone , "eric.auger.pro@gmail.com" Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: 1MHdhu3nChYN Hi Samer, Ard, On 8/10/21 3:54 PM, Ard Biesheuvel wrote: > On Tue, 10 Aug 2021 at 15:11, Samer El-Haj-Mahmoud > wrote: >> >> >>> -----Original Message----- >>> From: Eric Auger >>> Sent: Tuesday, August 10, 2021 6:25 AM >>> To: Ard Biesheuvel >>> Cc: eric.auger.pro@gmail.com; Michael S. Tsirkin ; Igor >>> Mammedov ; Philippe Mathieu-Daudé >>> ; Peter Maydell ; Shannon >>> Zhao ; qemu-arm ; >>> qemu-devel@nongnu.org; Andrew Jones ; >>> gshan@redhat.com; Samer El-Haj-Mahmoud >> Mahmoud@arm.com>; Al Stone ; jcm@redhat.com >>> Subject: Re: [PATCH for-6.2] hw/arm/virt_acpi_build: Generate DBG2 table >>> >>> Hello Ard, >>> On 8/10/21 11:36 AM, Ard Biesheuvel wrote: >>>> On Tue, 10 Aug 2021 at 10:31, Eric Auger wrote: >>>>> ARM SBBR specification mandates DBG2 table (Debug Port Table 2). >>>>> this latter allows to describe one or more debug ports. >>>>> >>>>> Generate an DBG2 table featuring a single debug port, the PL011. >>>>> >>>>> The DBG2 specification can be found at: >>>>> https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi- >>> debug-port-table?redirectedfrom=MSDN >>>> Have the legal issues around this table been resolved in the mean >>>> time? >>> I don't know exactly what they are. Adding Al and Jon in the loop they >>> have more information about this. >>> How did you resolve the issue for EDK2 >>> (DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c)? >>>> Also, any clue why this table is mandatory to begin with? The >>>> SBBR has been very trigger happy lately with making things mandatory >>>> that aren't truly required from a functional perspective. >>> It seems there are kernel FW test suites that check all mandated tables >>> are available and they currently fail for ARM virt. >>> Indeed from a function pov, I don't know much about its usage on ARM. >>> >>> Maybe the SBBR spec should not flag the DBG2 as mandatory and test >>> suites shall be updated. I think this should be clarified at ARM then, >>> all the more so if there are legal issues as its spec is owned by Microsoft? >>> >> DBG2 has been required in SBBR since SBBR ver 1.0 (published 2016, with the 0.9 draft since 2014) >> https://developer.arm.com/documentation/den0044/b/?lang=en >> >> SBBR requires DBG2 because Windows requires it on all systems: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-system-description-tables#debug-port-table-2-dbg2 , and Windows is one of the key OSes targeted by SBBR. >> >> The DBG2 (and SPCR) spec license issue has been resolved since August 2015. Microsoft updated both specs with identical license language, giving patent rights for implementations under the Microsoft Community Promise, and the Open OWF 1.0. This Foundation. OK thank you for confirming all the previously known DBG2 legal issues were resolved. >> >> DBG2: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table >> SPCR: https://docs.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table >> > Thanks Samer, for stating this on record here - and apologies for > suggesting that this was another frivolous addition to a recent SBBR > revision. > > As for the difference between the two: SPCR describes the serial > console, which is an actual interactive console used for maintenance, > which exists in addition to the full blown Windows GUI, which is > always the primary interface. https://bugzilla.redhat.com/show_bug.cgi?id=1661288#c56 seems to contradict the above statement. Do I understand correctly that if the SPCR is exposed and if "console=ttyAMA0 console=tty0" is not set in the kernel params, the serial becomes the primary console instead of the tty0 (hence your choice of developping console preference DXE in tianocore)? Anyway I will respin this patch and use the build_append_int_noprefix() API. Thanks Eric > > DBG2 is used as a debug port, which is used for the kernel debugger, > if I am not mistaken. So SPCR and DBG2 are complementary, and it does > make sense to have both. >