diff mbox series

[V1] bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support

Message ID 1674536682-18404-1-git-send-email-quic_schowdhu@quicinc.com
State Accepted
Commit 6c40624930c58529185a257380442547580ed837
Headers show
Series [V1] bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support | expand

Commit Message

Souradeep Chowdhury Jan. 24, 2023, 5:04 a.m. UTC
The Data Capture and Compare(DCC) is a debugging tool that uses the bootconfig
for configuring the register values during boot-time. Increase the max nodes
supported by bootconfig to cater to the requirements of the Data Capture and
Compare Driver.

Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
---
 include/linux/bootconfig.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.7.4

Comments

Masami Hiramatsu (Google) Jan. 24, 2023, 5:44 a.m. UTC | #1
On Tue, 24 Jan 2023 10:34:42 +0530
Souradeep Chowdhury <quic_schowdhu@quicinc.com> wrote:

> The Data Capture and Compare(DCC) is a debugging tool that uses the bootconfig
> for configuring the register values during boot-time. Increase the max nodes
> supported by bootconfig to cater to the requirements of the Data Capture and
> Compare Driver.

Thanks, this looks good to me :)

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

> 
> Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
> ---
>  include/linux/bootconfig.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h
> index 1611f9d..ca73940 100644
> --- a/include/linux/bootconfig.h
> +++ b/include/linux/bootconfig.h
> @@ -59,7 +59,7 @@ struct xbc_node {
>  /* Maximum size of boot config is 32KB - 1 */
>  #define XBC_DATA_MAX	(XBC_VALUE - 1)
> 
> -#define XBC_NODE_MAX	1024
> +#define XBC_NODE_MAX	8192
>  #define XBC_KEYLEN_MAX	256
>  #define XBC_DEPTH_MAX	16
> 
> --
> 2.7.4
>
Heinz Wiesinger March 12, 2023, 11:49 a.m. UTC | #2
Hi everyone,

It looks like this broke the bootconfig tests (tools/bootconfig/test-
bootconfig.sh), tested on 6.1.18:

Max node number check
test case 12 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)...
Apply ./temp-HCfT.bconf to ./initrd-NGHv
        Number of nodes: 1024
        Size: 8110 bytes
        Checksum: 599485
\t\t[OK]
test case 13 (./bootconfig -a ./temp-HCfT.bconf ./initrd-NGHv)...
Apply ./temp-HCfT.bconf to ./initrd-NGHv
        Number of nodes: 1025
        Size: 8118 bytes
        Checksum: 600212
\t\t[NG]

When I adjust the max node number for the tests to 8192, test case 13 passes, 
but test case 12 then fails:

Max node number check
test case 12 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
Error: Config data is too big.
\t\t[NG]
test case 13 (./bootconfig -a ./temp-qZHF.bconf ./initrd-0v99)...
Error: Config data is too big.
\t\t[OK]

Grs,
Heinz
diff mbox series

Patch

diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h
index 1611f9d..ca73940 100644
--- a/include/linux/bootconfig.h
+++ b/include/linux/bootconfig.h
@@ -59,7 +59,7 @@  struct xbc_node {
 /* Maximum size of boot config is 32KB - 1 */
 #define XBC_DATA_MAX	(XBC_VALUE - 1)

-#define XBC_NODE_MAX	1024
+#define XBC_NODE_MAX	8192
 #define XBC_KEYLEN_MAX	256
 #define XBC_DEPTH_MAX	16