Skip to content

Commit 3ca6861

Browse files
Sahil-Malpekarprashymh
authored andcommitted
fix(baremetal): make MAX_IRQ_CNT platform-overridable
- MAX_IRQ_CNT depends on the platform and should be modified by partners according to the platform.  - Therefore, added in the platform override file. Signed-off-by: Sahil Shakil Malpekar <Sahil.ShakilMalpekar@arm.com> Change-Id: I2bf2d4f909b2cad2816bed5943028ad777060bde
1 parent 5acee74 commit 3ca6861

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

pal/baremetal/base/include/pal_common_support.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** @file
2-
* Copyright (c) 2020-2025, Arm Limited or its affiliates. All rights reserved.
2+
* Copyright (c) 2020-2026, Arm Limited or its affiliates. All rights reserved.
33
* SPDX-License-Identifier : Apache-2.0
44
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,6 +22,7 @@
2222
#include <stdint.h>
2323
#include <string.h>
2424
#include <stdlib.h>
25+
#include "platform_override_fvp.h"
2526

2627
typedef uintptr_t addr_t;
2728
typedef char char8_t;
@@ -395,7 +396,7 @@ typedef struct {
395396
**/
396397

397398
#define LEGACY_PCI_IRQ_CNT 4 // Legacy PCI IRQ A, B, C. and D
398-
#define MAX_IRQ_CNT 0xFFFF // This value is arbitrary and may have to be adjusted
399+
#define MAX_IRQ_CNT PLATFORM_BM_OVERRIDE_MAX_IRQ_CNT
399400

400401
typedef struct {
401402
uint32_t irq_list[MAX_IRQ_CNT];

pal/baremetal/target/RDV3/include/platform_override_fvp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@
291291
#define PLATFORM_BM_OVERRIDE_PCIE_MAX_BUS 0x9 /* Max bus walked by bare-metal tests */
292292
#define PLATFORM_BM_OVERRIDE_PCIE_MAX_DEV 32 /* Max device per bus checked */
293293
#define PLATFORM_BM_OVERRIDE_PCIE_MAX_FUNC 8 /* Max function per device checked */
294+
295+
// This value is arbitrary and may have to be adjusted
294296
#define PLATFORM_BM_OVERRIDE_MAX_IRQ_CNT 0xFFFF /* Max IRQs any device may raise */
295297

296298
#define PLATFORM_OVERRIDE_TIMEOUT 0 /* Override default wakeup timeout */

pal/baremetal/target/RDV3CFG1/include/platform_override_fvp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@
240240
#define PLATFORM_BM_OVERRIDE_PCIE_MAX_BUS 0x9 /* Max bus walked by bare-metal tests */
241241
#define PLATFORM_BM_OVERRIDE_PCIE_MAX_DEV 32 /* Max device per bus checked */
242242
#define PLATFORM_BM_OVERRIDE_PCIE_MAX_FUNC 8 /* Max function per device checked */
243+
244+
// This value is arbitrary and may have to be adjusted
243245
#define PLATFORM_BM_OVERRIDE_MAX_IRQ_CNT 0xFFFF /* Max IRQs any device may raise */
244246

245247
#define PLATFORM_OVERRIDE_TIMEOUT 0 /* Override default wakeup timeout */

0 commit comments

Comments
 (0)