Skip to content
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

Open
wants to merge 1 commit into
base: talos_2_support_payload
Choose a base branch
from
Open

Conversation

IgorBagnucki
Copy link

Signed-off-by: Igor Bagnucki igor.bagnucki@3mdeb.com

Signed-off-by: Igor Bagnucki <igor.bagnucki@3mdeb.com>
Comment on lines +42 to +49
{
EP00_CHIPLET_ID,
EP01_CHIPLET_ID,
EP02_CHIPLET_ID,
EP03_CHIPLET_ID,
EP04_CHIPLET_ID,
EP05_CHIPLET_ID
};
Copy link
Member

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)
Copy link
Member

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.

Comment on lines +22 to +23
if((ocb_pib & OCB_PIB_OCBCSR0_OCB_STREAM_MODE)
&& (ocb_pib & OCB_PIB_OCBCSR0_OCB_STREAM_TYPE))
Copy link
Member

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.

Comment on lines +26 to +27
if (stream_push_control & OCB_OCI_OCBSHCS0_PUSH_ENABLE)
for(uint8_t l_counter = 0; l_counter < 4; l_counter++)
Copy link
Member

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)
Copy link
Member

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.

Comment on lines +91 to +93
// 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.
Copy link
Member

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)
Copy link
Member

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(
Copy link
Member

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));

Comment on lines +10 to +11
#define OCC_BRANCH_INSTR (0x4B00000200000000)
#define BRANCH_ADDR_MASK (0x00FFFFFC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define OCC_BRANCH_INSTR (0x4B00000200000000)
#define BRANCH_ADDR_MASK (0x00FFFFFC)
#define OCC_BRANCH_INSTR (0x4800000200000000)
#define BRANCH_ADDR_MASK (0x03FFFFFC)

https://wiki.raptorcs.com/w/images/9/9b/405_um.pdf page 199

@macpijan macpijan changed the title OCC operations [on hold] OCC operations Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants