-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[on hold] OCC operations #89
base: talos_2_support_payload
Are you sure you want to change the base?
Conversation
Signed-off-by: Igor Bagnucki <igor.bagnucki@3mdeb.com>
{ | ||
EP00_CHIPLET_ID, | ||
EP01_CHIPLET_ID, | ||
EP02_CHIPLET_ID, | ||
EP03_CHIPLET_ID, | ||
EP04_CHIPLET_ID, | ||
EP05_CHIPLET_ID | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something wrong with indentation here.
|
||
#define EX_PPM_SPWKUP_OCC (0x200F010C) | ||
|
||
#define NUMBER_OF_EX_CHIPLETS (6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does it come from? AFAIK there are 12 EXs, 2 per EQ, even though they are probably waken in pairs.
if((ocb_pib & OCB_PIB_OCBCSR0_OCB_STREAM_MODE) | ||
&& (ocb_pib & OCB_PIB_OCBCSR0_OCB_STREAM_TYPE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is at the same indentation level or GitHub just displays it that way, but the second line should begin under next character after first bracket.
if (stream_push_control & OCB_OCI_OCBSHCS0_PUSH_ENABLE) | ||
for(uint8_t l_counter = 0; l_counter < 4; l_counter++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation.
I haven't play with push/pull mode, but shouldn't this write data for every read?
void writeOCCSRAM( | ||
const uint32_t address, | ||
uint64_t * buffer, | ||
size_t data_length) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a low verbosity print if this isn't a multiply of 8, here and for read.
// will be 0x4bf5b57200000000. The last two bits of the first byte of | ||
// the branch instruction must be '2' according to the OCC instruction | ||
// set manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment copied from Hostboot? That 2
at the end indicates that this is absolute branch instruction, instead of relative, it may be worth mentioning here.
#define PU_OCB_PIB_OCBAR2 (0x0006D050) | ||
#define PU_OCB_PIB_OCBAR3 (0x0006D070) | ||
|
||
#define EX_PPM_SPWKUP_OCC (0x200F010C) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you use TP.TPCHIP.NET.PCBSLECxx.PPMC.PPM_COMMON_REGS.PPM_SPWKUP_OCC
(0x20...), but EX_CHIPLETS
suggests it should be TP.TPCHIP.NET.PCBSLEPxx.PPMQ.PPM_COMMON_REGS.PPM_SPWKUP_OCC
(0x10...). This would be fixed by *_for_chiplet()
, but someone may search for wrong register in the documentation and/or SCOM dumps.
chiplet_index < NUMBER_OF_EX_CHIPLETS; | ||
++chiplet_index) | ||
{ | ||
write_scom_for_chiplet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scom_and_for_chiplet(EX_CHIPLETS[chiplet_index], EX_PPM_SPWKUP_OCC, ~PPC_BIT(0));
#define OCC_BRANCH_INSTR (0x4B00000200000000) | ||
#define BRANCH_ADDR_MASK (0x00FFFFFC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define OCC_BRANCH_INSTR (0x4B00000200000000) | |
#define BRANCH_ADDR_MASK (0x00FFFFFC) | |
#define OCC_BRANCH_INSTR (0x4800000200000000) | |
#define BRANCH_ADDR_MASK (0x03FFFFFC) |
Signed-off-by: Igor Bagnucki igor.bagnucki@3mdeb.com