From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D418074003C for ; Wed, 31 Jan 2024 13:41:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Wg/UPg2YR/rBltw4XSwzAkFRGvxIwnUqOJtwNgmWRWY=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706708485; v=1; b=U4B8p0gX5OgtV+xatKLlga375Ru/N2jAR8GPxFkAcfM8tf0DbuIlXEP14JEBgZzW3hyzrZyM rUH6JGSFW6VhNnRqnuOZ4yo2TAO/GNG23itiU/DgtUuZ1zO2nPiAMGxIwvPL5QKnfDRZ7bhF47u s1xlJvBwPLQsp95TkNCMGN3I= X-Received: by 127.0.0.2 with SMTP id T236YY7687511xL4aZiNF3cp; Wed, 31 Jan 2024 05:41:25 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.14002.1706708484765534288 for ; Wed, 31 Jan 2024 05:41:24 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-636-TZCXa2puOCGTGMvg-6gAKQ-1; Wed, 31 Jan 2024 08:41:18 -0500 X-MC-Unique: TZCXa2puOCGTGMvg-6gAKQ-1 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7AC388350E1; Wed, 31 Jan 2024 13:41:17 +0000 (UTC) X-Received: from [10.39.192.35] (unknown [10.39.192.35]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B4D540C9444; Wed, 31 Jan 2024 13:41:14 +0000 (UTC) Message-ID: <3fe0fda8-d32e-679e-2f71-6cc35e7772b8@redhat.com> Date: Wed, 31 Jan 2024 14:41:13 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v8 14/37] UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg To: devel@edk2.groups.io, pedro.falcato@gmail.com, lichao@loongson.cn Cc: Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann , Baoqi Zhang , Dongyan Qian , Xianglai Li , Bibo Mao References: <20240126062715.3099433-1-lichao@loongson.cn> <20240126062919.3101691-1-lichao@loongson.cn> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 77Xnr9JSoUXUqN0d8TxY3lH7x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=U4B8p0gX; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Pedro, On 1/31/24 11:33, Pedro Falcato wrote: > On Fri, Jan 26, 2024 at 6:29 AM Chao Li wrote: >> >> Add a new library named CpuMmuLib and add a LoongArch64 instance with in >> the library. >> It provides two-stage MMU libraryinstances, PEI and DXE. >> >> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 >> [...] >> diff --git a/UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CommonMmuLib.c b/UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CommonMmuLib.c >> new file mode 100644 >> index 0000000000..2e852c3371 >> --- /dev/null >> +++ b/UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CommonMmuLib.c >> @@ -0,0 +1,988 @@ >> +/** @file >> + >> + CPU Memory Map Unit Handler Library common functions. >> + >> + Copyright (c) 2024 Loongson Technology Corporation Limited. All rights reserved.
>> + >> + SPDX-License-Identifier: BSD-2-Clause-Patent >> + >> + @par Glossary: >> + - Pgd or Pgd or PGD - Page Global Directory >> + - Pud or Pud or PUD - Page Upper Directory >> + - Pmd or Pmd or PMD - Page Middle Directory >> + - Pte or pte or PTE - Page Table Entry >> + - Val or VAL or val - Value >> + - Dir - Directory >> +**/ > > You took essentially Linux code [...] and EDK2-ify'd it. Congrats, > this is cursed. are you saying this patch is effectively a port of GPL'd Linux code (potentially *old* code, but still), with the GPL simply replaced with BSD-2-Clause-Patent? That sounds... shocking. If such a patch were merged into edk2, it would violate both the GPL (the GPL cannot just be "relaxed") and the edk2 rules (edk2 does not want GPL code). The only exception would be if Loongson Technology Corporation Limited were the Copyright holder of the Linux code, and this patch were a relicensing. But then that too would have to be documented, IMO. Thank you for watching out for this (and for recognizing the source code patterns). Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114900): https://edk2.groups.io/g/devel/message/114900 Mute This Topic: https://groups.io/mt/103971653/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-