Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions pal/baremetal/base/include/pal_common_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -1116,22 +1116,24 @@ typedef struct {
void pal_hmat_create_info_table(HMAT_INFO_TABLE *HmatTable);

/* Platform Communication Channel (PCC) info table */
#ifndef GAS_STRUCT
#define GAS_STRUCT
/* Set 1B alignment to prevent padding before the address field */
#pragma pack(push, 1)
typedef struct {
uint8_t addr_space_id;
uint8_t reg_bit_width;
uint8_t reg_bit_offset;
uint8_t access_size;
uint64_t addr;
} GENERIC_ADDRESS_STRUCTURE;
#endif
#pragma pack(pop)

typedef struct {
uint64_t base_addr; /* base addr of shared mem-region */
uint32_t memory_length; /* length of shared mem-region */
GENERIC_ADDRESS_STRUCTURE doorbell_reg; /* doorbell register */
uint64_t doorbell_preserve; /* doorbell register preserve mask */
uint64_t doorbell_write; /* doorbell register set mask */
uint32_t nominal_latency_usec; /* expected command latency */
uint32_t min_req_turnaround_usec; /* minimum request turnaround time */
GENERIC_ADDRESS_STRUCTURE cmd_complete_chk_reg; /* command complete check register */
uint64_t cmd_complete_chk_mask; /* command complete check mask */
Expand Down Expand Up @@ -1179,8 +1181,8 @@ typedef struct {
typedef struct {
uint32_t msc_id; /* Identifier of the MSC */
uint32_t flags; /* Reserved, must be zero */
uint32_t val; /* value to be written to the register */
uint32_t offset; /* MPAM register offset to write */
uint32_t val; /* value to be written to the register */
} PCC_MPAM_MSC_WRITE_CMD_PARA;

typedef struct {
Expand All @@ -1204,6 +1206,8 @@ typedef struct {
#define MPAM_PCC_CMD_SUCCESS 0x0
#define MPAM_PCC_SAFE_RETURN 0x0
#define RETURN_FAILURE 0xFFFFFFFF
#define PCC_TY3_FLAGS_OFFSET 4
#define PCC_TY3_LENGTH_OFFSET 8
#define PCC_TY3_CMD_OFFSET 12
#define PCC_TY3_COMM_SPACE 16
#define PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC 0x03
Expand Down
3 changes: 3 additions & 0 deletions pal/baremetal/base/src/pal_mpam.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ pal_mpam_dump_table(MPAM_INFO_TABLE *MpamTable)
pal_print_msg(ACS_PRINT_INFO,
"\nMSC node Index :%d ",
i);
pal_print_msg(ACS_PRINT_INFO,
"\nInterface type :%lx ",
curr_entry->intrf_type);
pal_print_msg(ACS_PRINT_INFO,
"\nMSC base addr :%llx ",
curr_entry->msc_base_addr);
Expand Down
10 changes: 10 additions & 0 deletions pal/baremetal/base/src/pal_pcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ pal_pcc_dump_info_table(PCC_INFO_TABLE *PccInfoTable)
pal_print_msg(ACS_PRINT_INFO,
"\n Base address : 0x%lx",
ptr_pcc_ss_type_3->base_addr);
pal_print_msg(ACS_PRINT_INFO,
"\n Memory length : 0x%x",
ptr_pcc_ss_type_3->memory_length);
pal_print_msg(ACS_PRINT_INFO,
"\n Doorbell Register addr : 0x%lx",
ptr_pcc_ss_type_3->doorbell_reg.addr);
Expand All @@ -70,6 +73,9 @@ pal_pcc_dump_info_table(PCC_INFO_TABLE *PccInfoTable)
pal_print_msg(ACS_PRINT_INFO,
"\n Doorbell write Mask : 0x%lx",
ptr_pcc_ss_type_3->doorbell_write);
pal_print_msg(ACS_PRINT_INFO,
"\n Nominal latency (us) : 0x%x",
ptr_pcc_ss_type_3->nominal_latency_usec);
pal_print_msg(ACS_PRINT_INFO,
"\n Min req turnaround time (us) : 0x%x",
ptr_pcc_ss_type_3->min_req_turnaround_usec);
Expand Down Expand Up @@ -125,6 +131,8 @@ pal_pcc_create_info_table(PCC_INFO_TABLE *PccInfoTable)
if (curr_entry->subspace_type == PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC) {
curr_entry->type_spec_info.pcc_ss_type_3.base_addr
= platform_pcc_cfg.pcc_info[i].type_spec_info.pcc_ss_type_3.base_addr;
curr_entry->type_spec_info.pcc_ss_type_3.memory_length
= platform_pcc_cfg.pcc_info[i].type_spec_info.pcc_ss_type_3.memory_length;
curr_entry->type_spec_info.pcc_ss_type_3.cmd_complete_chk_mask
= platform_pcc_cfg.pcc_info[i].type_spec_info.pcc_ss_type_3.cmd_complete_chk_mask;
curr_entry->type_spec_info.pcc_ss_type_3.cmd_complete_chk_reg
Expand All @@ -141,6 +149,8 @@ pal_pcc_create_info_table(PCC_INFO_TABLE *PccInfoTable)
= platform_pcc_cfg.pcc_info[i].type_spec_info.pcc_ss_type_3.doorbell_reg;
curr_entry->type_spec_info.pcc_ss_type_3.doorbell_write
= platform_pcc_cfg.pcc_info[i].type_spec_info.pcc_ss_type_3.doorbell_write;
curr_entry->type_spec_info.pcc_ss_type_3.nominal_latency_usec
= platform_pcc_cfg.pcc_info[i].type_spec_info.pcc_ss_type_3.nominal_latency_usec;
curr_entry->type_spec_info.pcc_ss_type_3.min_req_turnaround_usec
= platform_pcc_cfg.pcc_info[i].type_spec_info.pcc_ss_type_3.min_req_turnaround_usec;
}
Expand Down
2 changes: 2 additions & 0 deletions pal/baremetal/target/RDN2/include/platform_override_fvp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1575,8 +1575,10 @@
#define PLATFORM_PCC_SUBSPACE0_INDEX 0x0
#define PLATFORM_PCC_SUBSPACE0_TYPE 0x3
#define PLATFORM_PCC_SUBSPACE0_BASE 0x0
#define PLATFORM_PCC_SUBSPACE0_MEMORY_LENGTH 0x20
#define PLATFORM_PCC_SUBSPACE0_DOORBELL_PRESERVE 0x0
#define PLATFORM_PCC_SUBSPACE0_DOORBELL_WRITE 0x0
#define PLATFORM_PCC_SUBSPACE0_NOMINAL_LATENCY 0x0
#define PLATFORM_PCC_SUBSPACE0_MIN_REQ_TURN_TIME 0x0
#define PLATFORM_PCC_SUBSPACE0_CMD_COMPLETE_CHK_MASK 0x0
#define PLATFORM_PCC_SUBSPACE0_CMD_UPDATE_PRESERVE 0x0
Expand Down
14 changes: 3 additions & 11 deletions pal/baremetal/target/RDN2/include/platform_override_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <stdio.h>
#include "acs_stdint.h"
#include "pal_common_support.h"
#include "platform_override_fvp.h"

#define MAX_CS_COMP_LENGTH 256
Expand Down Expand Up @@ -451,22 +452,13 @@ typedef struct {


/* Platform Communication Channel (PCC) info table */
#ifndef GAS_STRUCT
#define GAS_STRUCT
typedef struct {
uint8_t addr_space_id;
uint8_t reg_bit_width;
uint8_t reg_bit_offset;
uint8_t access_size;
uint64_t addr;
} GENERIC_ADDRESS_STRUCTURE;
#endif

typedef struct {
uint64_t base_addr; /* base addr of shared mem-region */
uint32_t memory_length; /* length of shared mem-region */
GENERIC_ADDRESS_STRUCTURE doorbell_reg; /* doorbell register */
uint64_t doorbell_preserve; /* doorbell register preserve mask */
uint64_t doorbell_write; /* doorbell register set mask */
uint32_t nominal_latency_usec; /* expected command latency */
uint32_t min_req_turnaround_usec; /* minimum request turnaround time */
GENERIC_ADDRESS_STRUCTURE cmd_complete_chk_reg; /* command complete check register */
uint64_t cmd_complete_chk_mask; /* command complete check mask */
Expand Down
4 changes: 4 additions & 0 deletions pal/baremetal/target/RDN2/src/platform_cfg_fvp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1676,12 +1676,16 @@ const PLATFORM_OVERRIDE_PCC_INFO_TABLE platform_pcc_cfg = {

.pcc_info[0].type_spec_info.pcc_ss_type_3.base_addr
= PLATFORM_PCC_SUBSPACE0_BASE,
.pcc_info[0].type_spec_info.pcc_ss_type_3.memory_length
= PLATFORM_PCC_SUBSPACE0_MEMORY_LENGTH,
.pcc_info[0].type_spec_info.pcc_ss_type_3.doorbell_reg
= PLATFORM_PCC_SUBSPACE0_DOORBELL_REG,
.pcc_info[0].type_spec_info.pcc_ss_type_3.doorbell_preserve
= PLATFORM_PCC_SUBSPACE0_DOORBELL_PRESERVE,
.pcc_info[0].type_spec_info.pcc_ss_type_3.doorbell_write
= PLATFORM_PCC_SUBSPACE0_DOORBELL_WRITE,
.pcc_info[0].type_spec_info.pcc_ss_type_3.nominal_latency_usec
= PLATFORM_PCC_SUBSPACE0_NOMINAL_LATENCY,
.pcc_info[0].type_spec_info.pcc_ss_type_3.min_req_turnaround_usec
= PLATFORM_PCC_SUBSPACE0_MIN_REQ_TURN_TIME,
.pcc_info[0].type_spec_info.pcc_ss_type_3.cmd_complete_chk_reg
Expand Down
2 changes: 2 additions & 0 deletions pal/baremetal/target/RDV3/include/platform_override_fvp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1424,8 +1424,10 @@
#define PLATFORM_PCC_SUBSPACE0_INDEX 0x0
#define PLATFORM_PCC_SUBSPACE0_TYPE 0x3
#define PLATFORM_PCC_SUBSPACE0_BASE 0x0
#define PLATFORM_PCC_SUBSPACE0_MEMORY_LENGTH 0x20
#define PLATFORM_PCC_SUBSPACE0_DOORBELL_PRESERVE 0x0
#define PLATFORM_PCC_SUBSPACE0_DOORBELL_WRITE 0x0
#define PLATFORM_PCC_SUBSPACE0_NOMINAL_LATENCY 0x0
#define PLATFORM_PCC_SUBSPACE0_MIN_REQ_TURN_TIME 0x0
#define PLATFORM_PCC_SUBSPACE0_CMD_COMPLETE_CHK_MASK 0x0
#define PLATFORM_PCC_SUBSPACE0_CMD_UPDATE_PRESERVE 0x0
Expand Down
14 changes: 3 additions & 11 deletions pal/baremetal/target/RDV3/include/platform_override_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <stdio.h>
#include "acs_stdint.h"
#include "pal_common_support.h"
#include "platform_override_fvp.h"

#define MAX_CS_COMP_LENGTH 256
Expand Down Expand Up @@ -451,22 +452,13 @@ typedef struct {


/* Platform Communication Channel (PCC) info table */
#ifndef GAS_STRUCT
#define GAS_STRUCT
typedef struct {
uint8_t addr_space_id;
uint8_t reg_bit_width;
uint8_t reg_bit_offset;
uint8_t access_size;
uint64_t addr;
} GENERIC_ADDRESS_STRUCTURE;
#endif

typedef struct {
uint64_t base_addr; /* base addr of shared mem-region */
uint32_t memory_length; /* length of shared mem-region */
GENERIC_ADDRESS_STRUCTURE doorbell_reg; /* doorbell register */
uint64_t doorbell_preserve; /* doorbell register preserve mask */
uint64_t doorbell_write; /* doorbell register set mask */
uint32_t nominal_latency_usec; /* expected command latency */
uint32_t min_req_turnaround_usec; /* minimum request turnaround time */
GENERIC_ADDRESS_STRUCTURE cmd_complete_chk_reg; /* command complete check register */
uint64_t cmd_complete_chk_mask; /* command complete check mask */
Expand Down
4 changes: 4 additions & 0 deletions pal/baremetal/target/RDV3/src/platform_cfg_fvp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1523,12 +1523,16 @@ const PLATFORM_OVERRIDE_PCC_INFO_TABLE platform_pcc_cfg = {

.pcc_info[0].type_spec_info.pcc_ss_type_3.base_addr
= PLATFORM_PCC_SUBSPACE0_BASE,
.pcc_info[0].type_spec_info.pcc_ss_type_3.memory_length
= PLATFORM_PCC_SUBSPACE0_MEMORY_LENGTH,
.pcc_info[0].type_spec_info.pcc_ss_type_3.doorbell_reg
= PLATFORM_PCC_SUBSPACE0_DOORBELL_REG,
.pcc_info[0].type_spec_info.pcc_ss_type_3.doorbell_preserve
= PLATFORM_PCC_SUBSPACE0_DOORBELL_PRESERVE,
.pcc_info[0].type_spec_info.pcc_ss_type_3.doorbell_write
= PLATFORM_PCC_SUBSPACE0_DOORBELL_WRITE,
.pcc_info[0].type_spec_info.pcc_ss_type_3.nominal_latency_usec
= PLATFORM_PCC_SUBSPACE0_NOMINAL_LATENCY,
.pcc_info[0].type_spec_info.pcc_ss_type_3.min_req_turnaround_usec
= PLATFORM_PCC_SUBSPACE0_MIN_REQ_TURN_TIME,
.pcc_info[0].type_spec_info.pcc_ss_type_3.cmd_complete_chk_reg
Expand Down
2 changes: 2 additions & 0 deletions pal/baremetal/target/RDV3CFG1/include/platform_override_fvp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1250,8 +1250,10 @@
#define PLATFORM_PCC_SUBSPACE0_INDEX 0x0
#define PLATFORM_PCC_SUBSPACE0_TYPE 0x3
#define PLATFORM_PCC_SUBSPACE0_BASE 0x0
#define PLATFORM_PCC_SUBSPACE0_MEMORY_LENGTH 0x20
#define PLATFORM_PCC_SUBSPACE0_DOORBELL_PRESERVE 0x0
#define PLATFORM_PCC_SUBSPACE0_DOORBELL_WRITE 0x0
#define PLATFORM_PCC_SUBSPACE0_NOMINAL_LATENCY 0x0
#define PLATFORM_PCC_SUBSPACE0_MIN_REQ_TURN_TIME 0x0
#define PLATFORM_PCC_SUBSPACE0_CMD_COMPLETE_CHK_MASK 0x0
#define PLATFORM_PCC_SUBSPACE0_CMD_UPDATE_PRESERVE 0x0
Expand Down
14 changes: 3 additions & 11 deletions pal/baremetal/target/RDV3CFG1/include/platform_override_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <stdio.h>
#include "acs_stdint.h"
#include "pal_common_support.h"
#include "platform_override_fvp.h"

#define MAX_CS_COMP_LENGTH 256
Expand Down Expand Up @@ -451,22 +452,13 @@ typedef struct {


/* Platform Communication Channel (PCC) info table */
#ifndef GAS_STRUCT
#define GAS_STRUCT
typedef struct {
uint8_t addr_space_id;
uint8_t reg_bit_width;
uint8_t reg_bit_offset;
uint8_t access_size;
uint64_t addr;
} GENERIC_ADDRESS_STRUCTURE;
#endif

typedef struct {
uint64_t base_addr; /* base addr of shared mem-region */
uint32_t memory_length; /* length of shared mem-region */
GENERIC_ADDRESS_STRUCTURE doorbell_reg; /* doorbell register */
uint64_t doorbell_preserve; /* doorbell register preserve mask */
uint64_t doorbell_write; /* doorbell register set mask */
uint32_t nominal_latency_usec; /* expected command latency */
uint32_t min_req_turnaround_usec; /* minimum request turnaround time */
GENERIC_ADDRESS_STRUCTURE cmd_complete_chk_reg; /* command complete check register */
uint64_t cmd_complete_chk_mask; /* command complete check mask */
Expand Down
4 changes: 4 additions & 0 deletions pal/baremetal/target/RDV3CFG1/src/platform_cfg_fvp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,12 +1336,16 @@ const PLATFORM_OVERRIDE_PCC_INFO_TABLE platform_pcc_cfg = {

.pcc_info[0].type_spec_info.pcc_ss_type_3.base_addr
= PLATFORM_PCC_SUBSPACE0_BASE,
.pcc_info[0].type_spec_info.pcc_ss_type_3.memory_length
= PLATFORM_PCC_SUBSPACE0_MEMORY_LENGTH,
.pcc_info[0].type_spec_info.pcc_ss_type_3.doorbell_reg
= PLATFORM_PCC_SUBSPACE0_DOORBELL_REG,
.pcc_info[0].type_spec_info.pcc_ss_type_3.doorbell_preserve
= PLATFORM_PCC_SUBSPACE0_DOORBELL_PRESERVE,
.pcc_info[0].type_spec_info.pcc_ss_type_3.doorbell_write
= PLATFORM_PCC_SUBSPACE0_DOORBELL_WRITE,
.pcc_info[0].type_spec_info.pcc_ss_type_3.nominal_latency_usec
= PLATFORM_PCC_SUBSPACE0_NOMINAL_LATENCY,
.pcc_info[0].type_spec_info.pcc_ss_type_3.min_req_turnaround_usec
= PLATFORM_PCC_SUBSPACE0_MIN_REQ_TURN_TIME,
.pcc_info[0].type_spec_info.pcc_ss_type_3.cmd_complete_chk_reg
Expand Down
6 changes: 5 additions & 1 deletion pal/uefi_acpi/include/pal_uefi.h
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,12 @@ UINT32 pal_mpam_parse_dsdt_info(MPAM_INFO_TABLE *MpamTable);
/* Platform Communication Channel (PCC) info table */
typedef struct {
UINT64 base_addr; /* base addr of shared mem-region */
UINT32 memory_length; /* length of shared mem-region */
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE
doorbell_reg; /* doorbell register */
UINT64 doorbell_preserve; /* doorbell register preserve mask */
UINT64 doorbell_write; /* doorbell register set mask */
UINT32 nominal_latency_usec; /* expected command latency */
UINT32 min_req_turnaround_usec; /* minimum request turnaround time */
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE
cmd_complete_chk_reg; /* command complete check register */
Expand Down Expand Up @@ -711,8 +713,8 @@ typedef struct {
typedef struct {
UINT32 msc_id; /* Identifier of the MSC */
UINT32 flags; /* Reserved, must be zero */
UINT32 val; /* value to be written to the register */
UINT32 offset; /* MPAM register offset to write */
UINT32 val; /* value to be written to the register */
} PCC_MPAM_MSC_WRITE_CMD_PARA;

typedef struct {
Expand All @@ -725,6 +727,8 @@ typedef struct {
#define MPAM_MSC_WRITE_CMD_ID 0x5
#define MPAM_PCC_CMD_SUCCESS 0x0
#define RETURN_FAILURE 0xFFFFFFFF
#define PCC_TY3_FLAGS_OFFSET 4
#define PCC_TY3_LENGTH_OFFSET 8
#define PCC_TY3_CMD_OFFSET 12
#define PCC_TY3_COMM_SPACE 16

Expand Down
Loading
Loading