Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/aspeed-master' into aspeed-master
Browse files Browse the repository at this point in the history
Signed-off-by: Jamin Lin <[email protected]>
  • Loading branch information
jamin-aspeed committed Dec 29, 2022
2 parents f095430 + 915459a commit 4102536
Show file tree
Hide file tree
Showing 68 changed files with 2,217 additions and 300 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@ typedef enum {
MB_UFM_WRITE_FIFO = 0x0D,
/* Egress byte for Read FIFO */
MB_UFM_READ_FIFO = 0x0E,
#ifdef ENABLE_PFR_MCTP
/* MCTP packet data storage */
MB_MCTP_PACKET_WRITE_RXFIFO = 0x0F,
#else
/* Status of BMC, write from BMC allowed only until BMC signals boot complete, write from BMC
* re-allowed on BMC reset
*/
MB_BMC_CHECKPOINT = 0x0F,
#endif
/* Status of ACM, write from CPU allowed only until ACM signals end of execution, write from CPU
* re-allowed on CPU reset
*/
Expand Down Expand Up @@ -80,6 +85,13 @@ typedef enum {
MB_BMC_PFM_RECOVERY_MINOR_VER = 0x1F,
/* Hash value of CPLD RoT HW + FW; read-only for CPU/BMC */
MB_CPLD_HASH = 0x20,
#ifdef ENABLE_PFR_MCTP
/* Status of BMC, write from BMC allowed only until BMC signals boot complete, write from BMC
* re-allowed on BMC reset
*/
MB_BMC_CHECKPOINT = 0x60,
#endif

} MB_REGFILE_OFFSET_ENUM;

typedef enum {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,22 @@ incdir = include_directories(
'include'
)

# Generate the aspeed-pfr-tool executable
# Get the options and enable the respective features
## create a MAP of "options : feature_flag"
feature_map = {
'mctp' : '-DENABLE_PFR_MCTP',
}

# Get the options status and build a project summary to show which flags are
# being enabled during the configuration time.
foreach option_key, option_value : feature_map
if (get_option(option_key).enabled())
summary(option_key, option_value, section : 'Enabled Features')
add_project_arguments(option_value, language:'c')
endif
endforeach

# Generate the aspeed-pfr-tool executable
executable(
'aspeed-pfr-tool',
[
Expand All @@ -32,7 +46,6 @@ executable(
install: true
)

# PFR Info
# Gather the Configuration data
conf_data = configuration_data()

Expand Down Expand Up @@ -60,3 +73,4 @@ configure_file(input : 'aspeed-pfr-tool.conf.in',
configuration: conf_data,
install_dir: '/usr/share/pfrconfig',
install : true)

Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ option(
description: 'PCH Recovery Region Offset'
)

option(
'mctp',
type: 'feature',
value: 'enabled',
description: 'Enable the PFR MCTP'
)

Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ static const char *g_last_panic_reason[256] = {
"BMC WDT expired",
"Intel ME WDT expired",
"ACM WDT expired",
"",
"",
"IBB WDT expired",
"OBB WDT expired",
"ACM/IBB/OBB sigled authentication failure",
"Attestation failure",
// 0Bh - 0Fh Reserved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ PACKAGES = " \
SUMMARY:${PN}-apps = "AspeedTech PFR App package"
RDEPENDS:${PN}-apps = " \
aspeed-pfr-tool \
spdm-emu \
"

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SRC_URI = " git://github.com/AspeedTech-BMC/cerberus.git;protocol=https;branch=$
"

PV = "1.0+git${SRCPV}"
SRCREV = "ce159bc451ab06ad9fe4ed760a7ef1f54510c995"
SRCREV = "b6f68179e6aa15ce02ccfaff7dd8b9759867a940"
BRANCH = "aspeed-master"

S = "${WORKDIR}/git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,21 @@
"name": "image-stg",
"index": 7,
"offset": "0x8000000",
"size": "0x52e0000",
"size": "0x5300000",
"prot_mask": 3,
"pfm": 1,
"hash": 0,
"compress": 0
},
{
"name": "afm-rcv",
"index": 8,
"offset": "0xd300000",
"size": "0x20000",
"prot_mask": 0,
"pfm": 1,
"hash": 0,
"compress": 0
}
],
"i2c-rules": [{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

SRC_URI:append = " \
file://mctp_config.json \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"smbus": {
"role": "busowner",
"default-eid":8,
"eid-pool":[9,10,11,12,13,14,15,16,17,18,19,20],
"bus":"/dev/i2c-4",
"PhysicalMediumID":"Smbus3OrI2c400khzCompatible",
"ARPMasterSupport": false,
"BMCSlaveAddress":32,
"ReqToRespTimeMs":100,
"ReqRetryCount":5
}
}

Loading

0 comments on commit 4102536

Please sign in to comment.