From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web10.22607.1688371722606753792 for ; Mon, 03 Jul 2023 01:08:42 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=hZazN6zA; spf=pass (domain: ventanamicro.com, ip: 209.85.215.177, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-55b22f82ac8so2383960a12.1 for ; Mon, 03 Jul 2023 01:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1688371721; x=1690963721; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+WIR3aDM+v5uPlXcTJo4GVLppN6SNawlWQKywtekQwo=; b=hZazN6zA9/y9OUaIJHWWt9eFejaoOpo9914/+GEl2vjo7JLULKkauHinHBW4ZFUB0U t2WUr5CRlJa7/M9ssHXzwFcUddVTfTsONPcYvQllOUPGu5YSG5wwfXCPDrmKwYgpqsQt SwOQf4HZu+FHKBF9SeFZ5/W7k8Mj4fSc/kMuZSPfu8Glt+alZMvJ4m6t3tmqjHY1+zXR tNI7tC7M6mfew1ZBHGI+kGlkMAywJ/oM0FAfPlnAmJMMx48HvYnlTJTn1tKzz8Xfw7Tb vfk9cYLZ8UstNJp7PqQqMaIIZpBOGViwDutfabK/D2djCQgfVh5KzWtfvxzaxYBgWDO4 J2FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688371721; x=1690963721; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+WIR3aDM+v5uPlXcTJo4GVLppN6SNawlWQKywtekQwo=; b=I9RzePFSsDepg0GW5L2LVLsi1GJOiG7YMbDxeCuPhxkXPsZFupZToK2o69en+0Lv/s kgQj/Fr61mZSY6wQIpSWr8EPdICzWY1SaBEKfoEsbE0mJ25qsCiuyL0YPdvzCP8dqEbh wvx5x4qaNGQm+PMvBI2EU6O3WC+o7Cvt3I6GPa3oldx18Pg26IjzLetsMibfgZJYqOea vSlBwdZM1z1ncCYwUW/BDKYrXnePGS9/K29mANzNnPRu3we/Mmckoefu4S1T3oTWf0nP A1prj9rakh8O/10jmJe518DDSaw94TkXRqtPkPpEn14iOBT9EGg77lD5g1yQfbdH9ukc f38A== X-Gm-Message-State: ABy/qLY33xedV7/1O4OtDw3IahitsVGnYlXmWXerzgwhfM1tB/PaXw4v TaL8HIIQ98NwHk+AccP/E2p/e2wBIcQXbyN+5hg= X-Google-Smtp-Source: APBJJlF0Pfn+K2J6UoJhPtbmkyhbbtqI5MET5TAOhkgXxQo4AtRwRjpFxDxEIgHEY3G+oknCrNzbCw== X-Received: by 2002:a17:90a:8d0d:b0:263:114c:52fc with SMTP id c13-20020a17090a8d0d00b00263114c52fcmr14541484pjo.12.1688371721674; Mon, 03 Jul 2023 01:08:41 -0700 (PDT) Return-Path: Received: from sunil-laptop.. ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id s18-20020a17090a881200b0024e05b7ba8bsm14863253pjn.25.2023.07.03.01.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 01:08:41 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Andrei Warkentin Subject: [PATCH 1/4] OvmfPkg/RiscVVirt: use 'auto' alignment and FIXED for XIP modules Date: Mon, 3 Jul 2023 13:38:28 +0530 Message-Id: <20230703080831.51075-2-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230703080831.51075-1-sunilvl@ventanamicro.com> References: <20230703080831.51075-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use auto alignment and FIXED FFS attribute for XIP modules similar to [1]. Without this change, the CLANGDWARF toolchain will fail to build with below error. GenFfs: ERROR 1000: Unknown option SectionAlign option must be specified with section file. [1] - https://github.com/tianocore/edk2/commit/7669f7349829f0e4755552ba0d6e600492fd8170 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc Gerd Hoffmann Cc: Andrei Warkentin Signed-off-by: Sunil V L --- OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 34 +++++++++-------------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf index 21e4ba67379f..b5aebfae078c 100644 --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf @@ -240,30 +240,15 @@ [FV.FVMAIN_COMPACT] } [Rule.Common.SEC] - FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED { - PE32 PE32 Align=4K $(INF_OUTPUT)/$(MODULE_NAME).efi + FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED FIXED { + PE32 PE32 Align = Auto $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING ="$(MODULE_NAME)" Optional VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } -[Rule.Common.PEI_CORE] - FILE PEI_CORE = $(NAMED_GUID) { - PE32 PE32 Align=4K $(INF_OUTPUT)/$(MODULE_NAME).efi - UI STRING ="$(MODULE_NAME)" Optional - VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) - } - -[Rule.Common.PEIM] - FILE PEIM = $(NAMED_GUID) { - PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex - PE32 PE32 Align=4K $(INF_OUTPUT)/$(MODULE_NAME).efi - UI STRING="$(MODULE_NAME)" Optional - VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) - } - [Rule.Common.DXE_CORE] FILE DXE_CORE = $(NAMED_GUID) { - PE32 PE32 Align=4K $(INF_OUTPUT)/$(MODULE_NAME).efi + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } @@ -271,7 +256,7 @@ [Rule.Common.DXE_CORE] [Rule.Common.DXE_DRIVER] FILE DRIVER = $(NAMED_GUID) { DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex - PE32 PE32 Align=4K $(INF_OUTPUT)/$(MODULE_NAME).efi + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } @@ -279,7 +264,7 @@ [Rule.Common.DXE_DRIVER] [Rule.Common.DXE_RUNTIME_DRIVER] FILE DRIVER = $(NAMED_GUID) { DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex - PE32 PE32 Align = 4K $(INF_OUTPUT)/$(MODULE_NAME).efi + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } @@ -287,7 +272,7 @@ [Rule.Common.DXE_RUNTIME_DRIVER] [Rule.Common.UEFI_DRIVER] FILE DRIVER = $(NAMED_GUID) { DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex - PE32 PE32 Align=4K $(INF_OUTPUT)/$(MODULE_NAME).efi + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } @@ -295,21 +280,21 @@ [Rule.Common.UEFI_DRIVER] [Rule.Common.UEFI_DRIVER.BINARY] FILE DRIVER = $(NAMED_GUID) { DXE_DEPEX DXE_DEPEX Optional |.depex - PE32 PE32 Align=4K |.efi + PE32 PE32 |.efi UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } [Rule.Common.UEFI_APPLICATION] FILE APPLICATION = $(NAMED_GUID) { - PE32 PE32 Align=4K $(INF_OUTPUT)/$(MODULE_NAME).efi + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } [Rule.Common.UEFI_APPLICATION.BINARY] FILE APPLICATION = $(NAMED_GUID) { - PE32 PE32 Align=4K |.efi + PE32 PE32 |.efi UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } @@ -318,4 +303,5 @@ [Rule.Common.USER_DEFINED.ACPITABLE] FILE FREEFORM = $(NAMED_GUID) { RAW ACPI |.acpi RAW ASL |.aml + UI STRING="$(MODULE_NAME)" Optional } -- 2.34.1