<p>Philipp Deppenwiese has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22074">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">src/security: Move vboot2 to security kconfig section<br><br>This commit just moves the vboot sources into<br>the security directory and fixes kconfig/makefile paths.<br><br>Change-Id: Icd87f95640186f7a625242a3937e1dd13347eb60<br>Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org><br>---<br>M Makefile.inc<br>M src/Kconfig<br>M src/security/Kconfig<br>A src/security/Makefile.inc<br>R src/security/vboot/Kconfig<br>R src/security/vboot/Makefile.inc<br>R src/security/vboot/bootmode.c<br>R src/security/vboot/common.c<br>R src/security/vboot/misc.h<br>R src/security/vboot/secdata_mock.c<br>R src/security/vboot/secdata_tpm.c<br>R src/security/vboot/symbols.h<br>R src/security/vboot/vbnv.c<br>R src/security/vboot/vbnv.h<br>R src/security/vboot/vbnv_cmos.c<br>R src/security/vboot/vbnv_ec.c<br>R src/security/vboot/vbnv_flash.c<br>R src/security/vboot/vbnv_layout.h<br>R src/security/vboot/vboot_common.c<br>R src/security/vboot/vboot_common.h<br>R src/security/vboot/vboot_handoff.c<br>R src/security/vboot/vboot_loader.c<br>R src/security/vboot/vboot_logic.c<br>R src/security/vboot/verstage.c<br>24 files changed, 33 insertions(+), 30 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/22074/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/Makefile.inc b/Makefile.inc<br>index fefc8d1..0e5395d 100644<br>--- a/Makefile.inc<br>+++ b/Makefile.inc<br>@@ -91,7 +91,7 @@<br> subdirs-y += util/futility util/marvell util/blobtool<br> subdirs-y += $(wildcard src/arch/*)<br> subdirs-y += src/mainboard/$(MAINBOARDDIR)<br>-subdirs-y += src/vboot<br>+subdirs-y += src/security<br> subdirs-y += payloads payloads/external<br> <br> subdirs-y += site-local<br>diff --git a/src/Kconfig b/src/Kconfig<br>index 7d10e19..f57ace7 100644<br>--- a/src/Kconfig<br>+++ b/src/Kconfig<br>@@ -348,7 +348,6 @@<br> source "src/drivers/intel/fsp1_0/Kconfig"<br> <br> source "src/southbridge/intel/common/firmware/Kconfig"<br>-source "src/vboot/Kconfig"<br> source "src/vendorcode/*/Kconfig"<br> <br> source "src/arch/*/Kconfig"<br>diff --git a/src/security/Kconfig b/src/security/Kconfig<br>index 7ec2952..563e375 100644<br>--- a/src/security/Kconfig<br>+++ b/src/security/Kconfig<br>@@ -11,3 +11,9 @@<br> ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br> ## GNU General Public License for more details.<br> ##<br>+<br>+menu "Verified Boot (vboot)"<br>+<br>+source "src/security/vboot/Kconfig"<br>+<br>+endmenu # Verified Boot (vboot)<br>diff --git a/src/security/Makefile.inc b/src/security/Makefile.inc<br>new file mode 100644<br>index 0000000..d2e1e60<br>--- /dev/null<br>+++ b/src/security/Makefile.inc<br>@@ -0,0 +1 @@<br>+subdirs-y += vboot<br>diff --git a/src/vboot/Kconfig b/src/security/vboot/Kconfig<br>similarity index 98%<br>rename from src/vboot/Kconfig<br>rename to src/security/vboot/Kconfig<br>index d5b5de2..e63cf2b 100644<br>--- a/src/vboot/Kconfig<br>+++ b/src/security/vboot/Kconfig<br>@@ -12,8 +12,6 @@<br> ## GNU General Public License for more details.<br> ##<br> <br>-menu "Verified Boot (vboot)"<br>-<br> config VBOOT<br>       bool "Verify firmware with vboot."<br>  default n<br>@@ -331,4 +329,3 @@<br> <br> endmenu # Keys<br> endif # VBOOT<br>-endmenu # Verified Boot (vboot)<br>diff --git a/src/vboot/Makefile.inc b/src/security/vboot/Makefile.inc<br>similarity index 100%<br>rename from src/vboot/Makefile.inc<br>rename to src/security/vboot/Makefile.inc<br>diff --git a/src/vboot/bootmode.c b/src/security/vboot/bootmode.c<br>similarity index 97%<br>rename from src/vboot/bootmode.c<br>rename to src/security/vboot/bootmode.c<br>index 1207448..834bc48 100644<br>--- a/src/vboot/bootmode.c<br>+++ b/src/security/vboot/bootmode.c<br>@@ -20,9 +20,9 @@<br> #include <rules.h><br> #include <string.h><br> #include <vb2_api.h><br>-#include <vboot/misc.h><br>-#include <vboot/vbnv.h><br>-#include <vboot/vboot_common.h><br>+#include <security/vboot/misc.h><br>+#include <security/vboot/vbnv.h><br>+#include <security/vboot/vboot_common.h><br> <br> static int vb2_get_recovery_reason_shared_data(void)<br> {<br>diff --git a/src/vboot/common.c b/src/security/vboot/common.c<br>similarity index 97%<br>rename from src/vboot/common.c<br>rename to src/security/vboot/common.c<br>index 3e480ed..72228e4 100644<br>--- a/src/vboot/common.c<br>+++ b/src/security/vboot/common.c<br>@@ -20,9 +20,9 @@<br> #include <reset.h><br> #include <string.h><br> #include <vb2_api.h><br>-#include <vboot/misc.h><br>-#include <vboot/symbols.h><br>-#include <vboot/vboot_common.h><br>+#include <security/vboot/misc.h><br>+#include <security/vboot/symbols.h><br>+#include <security/vboot/vboot_common.h><br> <br> struct selected_region {<br>   uint32_t offset;<br>diff --git a/src/vboot/misc.h b/src/security/vboot/misc.h<br>similarity index 96%<br>rename from src/vboot/misc.h<br>rename to src/security/vboot/misc.h<br>index dc94720..b5e3fcf 100644<br>--- a/src/vboot/misc.h<br>+++ b/src/security/vboot/misc.h<br>@@ -16,7 +16,7 @@<br> #ifndef __VBOOT_MISC_H__<br> #define __VBOOT_MISC_H__<br> <br>-#include <vboot/vboot_common.h><br>+#include <security/vboot/vboot_common.h><br> <br> struct vb2_context;<br> struct vb2_shared_data;<br>diff --git a/src/vboot/secdata_mock.c b/src/security/vboot/secdata_mock.c<br>similarity index 100%<br>rename from src/vboot/secdata_mock.c<br>rename to src/security/vboot/secdata_mock.c<br>diff --git a/src/vboot/secdata_tpm.c b/src/security/vboot/secdata_tpm.c<br>similarity index 100%<br>rename from src/vboot/secdata_tpm.c<br>rename to src/security/vboot/secdata_tpm.c<br>diff --git a/src/vboot/symbols.h b/src/security/vboot/symbols.h<br>similarity index 100%<br>rename from src/vboot/symbols.h<br>rename to src/security/vboot/symbols.h<br>diff --git a/src/vboot/vbnv.c b/src/security/vboot/vbnv.c<br>similarity index 97%<br>rename from src/vboot/vbnv.c<br>rename to src/security/vboot/vbnv.c<br>index 79bdc8e..0fecacd 100644<br>--- a/src/vboot/vbnv.c<br>+++ b/src/security/vboot/vbnv.c<br>@@ -16,8 +16,8 @@<br> #include <arch/early_variables.h><br> #include <string.h><br> #include <types.h><br>-#include <vboot/vbnv.h><br>-#include <vboot/vbnv_layout.h><br>+#include <security/vboot/vbnv.h><br>+#include <security/vboot/vbnv_layout.h><br> <br> static int vbnv_initialized CAR_GLOBAL;<br> static uint8_t vbnv[VBOOT_VBNV_BLOCK_SIZE] CAR_GLOBAL;<br>diff --git a/src/vboot/vbnv.h b/src/security/vboot/vbnv.h<br>similarity index 100%<br>rename from src/vboot/vbnv.h<br>rename to src/security/vboot/vbnv.h<br>diff --git a/src/vboot/vbnv_cmos.c b/src/security/vboot/vbnv_cmos.c<br>similarity index 97%<br>rename from src/vboot/vbnv_cmos.c<br>rename to src/security/vboot/vbnv_cmos.c<br>index a311fdd..9c801d8 100644<br>--- a/src/vboot/vbnv_cmos.c<br>+++ b/src/security/vboot/vbnv_cmos.c<br>@@ -17,8 +17,8 @@<br> #include <console/console.h><br> #include <types.h><br> #include <pc80/mc146818rtc.h><br>-#include <vboot/vbnv.h><br>-#include <vboot/vbnv_layout.h><br>+#include <security/vboot/vbnv.h><br>+#include <security/vboot/vbnv_layout.h><br> <br> static void clear_vbnv_battery_cutoff_flag(uint8_t *vbnv_copy)<br> {<br>diff --git a/src/vboot/vbnv_ec.c b/src/security/vboot/vbnv_ec.c<br>similarity index 92%<br>rename from src/vboot/vbnv_ec.c<br>rename to src/security/vboot/vbnv_ec.c<br>index 99e2b82..d73423e 100644<br>--- a/src/vboot/vbnv_ec.c<br>+++ b/src/security/vboot/vbnv_ec.c<br>@@ -15,8 +15,8 @@<br> <br> #include <types.h><br> #include <ec/google/chromeec/ec.h><br>-#include <vboot/vbnv.h><br>-#include <vboot/vbnv_layout.h><br>+#include <security/vboot/vbnv.h><br>+#include <security/vboot/vbnv_layout.h><br> <br> void read_vbnv_ec(uint8_t *vbnv_copy)<br> {<br>diff --git a/src/vboot/vbnv_flash.c b/src/security/vboot/vbnv_flash.c<br>similarity index 97%<br>rename from src/vboot/vbnv_flash.c<br>rename to src/security/vboot/vbnv_flash.c<br>index dd128a9..07569fa 100644<br>--- a/src/vboot/vbnv_flash.c<br>+++ b/src/security/vboot/vbnv_flash.c<br>@@ -20,9 +20,9 @@<br> #include <string.h><br> #include <vb2_api.h><br> #include <vboot_nvstorage.h><br>-#include <vboot/vboot_common.h><br>-#include <vboot/vbnv.h><br>-#include <vboot/vbnv_layout.h><br>+#include <security/vboot/vboot_common.h><br>+#include <security/vboot/vbnv.h><br>+#include <security/vboot/vbnv_layout.h><br> <br> #define BLOB_SIZE VB2_NVDATA_SIZE<br> <br>diff --git a/src/vboot/vbnv_layout.h b/src/security/vboot/vbnv_layout.h<br>similarity index 100%<br>rename from src/vboot/vbnv_layout.h<br>rename to src/security/vboot/vbnv_layout.h<br>diff --git a/src/vboot/vboot_common.c b/src/security/vboot/vboot_common.c<br>similarity index 98%<br>rename from src/vboot/vboot_common.c<br>rename to src/security/vboot/vboot_common.c<br>index 515b368..3ef9070 100644<br>--- a/src/vboot/vboot_common.c<br>+++ b/src/security/vboot/vboot_common.c<br>@@ -23,7 +23,7 @@<br> #include <rules.h><br> #include <stddef.h><br> #include <string.h><br>-#include <vboot/vboot_common.h><br>+#include <security/vboot/vboot_common.h><br> <br> int vboot_named_region_device(const char *name, struct region_device *rdev)<br> {<br>diff --git a/src/vboot/vboot_common.h b/src/security/vboot/vboot_common.h<br>similarity index 100%<br>rename from src/vboot/vboot_common.h<br>rename to src/security/vboot/vboot_common.h<br>diff --git a/src/vboot/vboot_handoff.c b/src/security/vboot/vboot_handoff.c<br>similarity index 98%<br>rename from src/vboot/vboot_handoff.c<br>rename to src/security/vboot/vboot_handoff.c<br>index 974fe78..9fecc1a 100644<br>--- a/src/vboot/vboot_handoff.c<br>+++ b/src/security/vboot/vboot_handoff.c<br>@@ -34,8 +34,8 @@<br> #include <stdlib.h><br> #include <timestamp.h><br> #include <vboot_struct.h><br>-#include <vboot/vbnv.h><br>-#include <vboot/misc.h><br>+#include <security/vboot/vbnv.h><br>+#include <security/vboot/misc.h><br> <br> /**<br>  * Sets vboot_handoff based on the information in vb2_shared_data<br>diff --git a/src/vboot/vboot_loader.c b/src/security/vboot/vboot_loader.c<br>similarity index 97%<br>rename from src/vboot/vboot_loader.c<br>rename to src/security/vboot/vboot_loader.c<br>index 6a7e284..17ea0a9 100644<br>--- a/src/vboot/vboot_loader.c<br>+++ b/src/security/vboot/vboot_loader.c<br>@@ -21,9 +21,9 @@<br> #include <rmodule.h><br> #include <rules.h><br> #include <string.h><br>-#include <vboot/misc.h><br>-#include <vboot/symbols.h><br>-#include <vboot/vboot_common.h><br>+#include <security/vboot/misc.h><br>+#include <security/vboot/symbols.h><br>+#include <security/vboot/vboot_common.h><br> <br> /* Ensure vboot configuration is valid: */<br> _Static_assert(IS_ENABLED(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK) +<br>diff --git a/src/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c<br>similarity index 99%<br>rename from src/vboot/vboot_logic.c<br>rename to src/security/vboot/vboot_logic.c<br>index d06faa7..e6b97b9 100644<br>--- a/src/vboot/vboot_logic.c<br>+++ b/src/security/vboot/vboot_logic.c<br>@@ -23,8 +23,8 @@<br> #include <string.h><br> #include <timestamp.h><br> #include <vb2_api.h><br>-#include <vboot/misc.h><br>-#include <vboot/vbnv.h><br>+#include <security/vboot/misc.h><br>+#include <security/vboot/vbnv.h><br> <br> /* The max hash size to expect is for SHA512. */<br> #define VBOOT_MAX_HASH_SIZE VB2_SHA512_DIGEST_SIZE<br>diff --git a/src/vboot/verstage.c b/src/security/vboot/verstage.c<br>similarity index 95%<br>rename from src/vboot/verstage.c<br>rename to src/security/vboot/verstage.c<br>index aca4ab3..c244184 100644<br>--- a/src/vboot/verstage.c<br>+++ b/src/security/vboot/verstage.c<br>@@ -17,7 +17,7 @@<br> #include <arch/hlt.h><br> #include <console/console.h><br> #include <program_loading.h><br>-#include <vboot/vboot_common.h><br>+#include <security/vboot/vboot_common.h><br> <br> void __attribute__((weak)) verstage_mainboard_init(void)<br> {<br></pre><p>To view, visit <a href="https://review.coreboot.org/22074">change 22074</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22074"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Icd87f95640186f7a625242a3937e1dd13347eb60 </div>
<div style="display:none"> Gerrit-Change-Number: 22074 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki@gmail.com> </div>