# HG changeset patch
# User Michal Camacho Romero <[email protected]>
# Date 1767798891 -3600
# Wed Jan 07 16:14:51 2026 +0100
# Node ID f26f17cb735a0c2e814728b852e701778c800406
# Parent d512777179769bd322ea73adc560b9e85d63c893
Fix force_pmrs option verification procedure
TBOOT hasn't proceed earlier force_pmrs option, due to invalid comparision
condition,
given in the get_tboot_force_pmrs function, which parses "force_pmrs" option
from
the TBOOT cmdline.
diff -r d51277717976 -r f26f17cb735a tboot/common/cmdline.c
--- a/tboot/common/cmdline.c Thu Nov 20 09:52:29 2025 +0100
+++ b/tboot/common/cmdline.c Wed Jan 07 16:14:51 2026 +0100
@@ -547,7 +547,7 @@
const char *force_pmrs = get_option_val(g_tboot_cmdline_options,
g_tboot_param_values,
"force_pmrs");
- if (force_pmrs != NULL && tb_strcmp(force_pmrs, "true"))
+ if (force_pmrs != NULL && (tb_strcmp(force_pmrs, "true") == 0))
{
return true;
}
diff -r d51277717976 -r f26f17cb735a tboot/txt/txt.c
--- a/tboot/txt/txt.c Thu Nov 20 09:52:29 2025 +0100
+++ b/tboot/txt/txt.c Wed Jan 07 16:14:51 2026 +0100
@@ -117,22 +117,6 @@
/* count of APs in WAIT-FOR-SIPI */
atomic_t ap_wfs_count;
-static void disable_tpr_support(const acm_hdr_t *hdr)
-{
- // Disable TPR support in the SINIT ACM capabilities
- acm_info_table_t *info_table = get_acmod_info_table(hdr);
- if ( info_table == NULL || info_table->version < 3 ) {
- printk(TBOOT_ERR"TPR support disabling process has failed\n");
- }
-
- info_table->capabilities.tpr_support = 0;
- printk(TBOOT_INFO"TPR support has been disabled properly in SINIT ACM\n");
-
- // Disable TPR support bit in the MLE capabilities
- g_mle_hdr.capabilities.tpr_support = 0;
-
- printk(TBOOT_INFO"MLE capabilities: 0x%X\n", g_mle_hdr.capabilities._raw);
-}
static void print_file_info(void)
{
@@ -843,23 +827,14 @@
bool is_tpr_supported(bool force_pmrs)
{
- //Reads SINIT ACM capabilities field and returns tpr_support bit
- //Needs g_sinit to be set.
- txt_caps_t sinit_caps;
-
- sinit_caps._raw = 0;
-
// Disable TPR support, if "force_pmrs" cmdline option was set
- if (force_pmrs && g_sinit != NULL)
+ if (force_pmrs)
{
- disable_tpr_support(g_sinit);
+ g_mle_hdr.capabilities.tpr_support = 0;
+ printk(TBOOT_INFO"TPR Support disabled in the MLE capabilities.\n");
}
- if (g_sinit != NULL) {
- sinit_caps = get_sinit_capabilities(g_sinit);
- }
-
- return sinit_caps.tpr_support;
+ return g_mle_hdr.capabilities.tpr_support;
}
tb_error_t txt_launch_environment(loader_ctx *lctx)
_______________________________________________
tboot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tboot-devel