From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mx.groups.io with SMTP id smtpd.web11.3112.1689090229174876659 for ; Tue, 11 Jul 2023 08:43:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=GeMYancp; spf=pass (domain: ventanamicro.com, ip: 209.85.214.176, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1b9d80e33fbso15192095ad.0 for ; Tue, 11 Jul 2023 08:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689090228; x=1691682228; 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=YFI9reMI3rOhrKurjY0n4ymtRuzxw4+B4L/fN8YbikM=; b=GeMYancp+1x6zv14SKhyA2xra49wecaSVLc6n5hZyy+6frMnOdDoWAlq6PLgDvc0Ba 7QV2fUN7Rk2dSBMjy0A/CYZZQi/frumau1Cd7Tc71nLGXu9AT/q6kbghfRqgKEX0yZmM XbNbFky/ZEFiE7V68cAaE5yHhda5Gc6eGrQNSkzogei1FznlenUB8iOAWoO1L8yMFV6j 7umUd0A3bKlsTX2qqs3SbR532XJyFfxW/CbAn6t/WuBrx+4A+SjEdyrfoiLc7aH00cDX XzZiRsgFh0Jtng4CW0SXCgD14dg7aIk2MQtiemJnAkipHkTvGCwdmNJ2+QZSO1ekdFrH h9Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689090228; x=1691682228; 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=YFI9reMI3rOhrKurjY0n4ymtRuzxw4+B4L/fN8YbikM=; b=gbRh7NtUnVMj3zGpA4i9jPltDhtdkOnnrQYizTZR0jAv/GIuGK8B3iQGA41yPwKG8d BMMNUuw3J2gxIiOBwCgr4cZJ5C5m0TFy85frwJQ/izdc5kkxuyhU4JgO+6u8RGg764+D EfldggIfqYK5cW2xsqJl1sPGAvIbfsWmupeDzBz4xdL2y+Ctuw6TafliyC90HHQ0oQx/ uZzl1Y497KkWTUzUlVeL22wwUaBVoH5bDcQJ9rUd9rp8ss8XjxREQxa9+sz84UgplArc JFE/9ji/ZOLNueqZMxGh7EDQ06Pi4jqEAM6CfByrQE4GfNkp6XiGpntv9Ufv23novCBn qAPg== X-Gm-Message-State: ABy/qLafDoaovzL6O3sI9/JETWLKCiSnzJ2zLIhbhvWpBsFQaPz+BI2b sWl7fZ5dMp+vV60k7Wo/OVHCJcd4RNSPVVo65v8= X-Google-Smtp-Source: APBJJlGNxcIPEuaVhPXHhxdRm2rD6jKuVXUSvozofEs+XgGOvIIwtf4r5XWal75THP/UTOeC9gn7zw== X-Received: by 2002:a17:903:455:b0:1b8:95a2:d87e with SMTP id iw21-20020a170903045500b001b895a2d87emr11768639plb.2.1689090228529; Tue, 11 Jul 2023 08:43:48 -0700 (PDT) Return-Path: Received: from sunil-laptop.. ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id k9-20020a170902694900b001b9f75c8c4dsm923084plt.52.2023.07.11.08.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 08:43:48 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Andrei Warkentin , Ard Biesheuvel Subject: [PATCH v2 1/4] OvmfPkg/RiscVVirt: use 'auto' alignment and FIXED for XIP modules Date: Tue, 11 Jul 2023 21:13:32 +0530 Message-Id: <20230711154335.586343-2-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230711154335.586343-1-sunilvl@ventanamicro.com> References: <20230711154335.586343-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 Acked-by: Ard Biesheuvel --- 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