-
Notifications
You must be signed in to change notification settings - Fork 9
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
ARC Feedback Updates in Message protocol, Transport, Base, CPPC #84
ARC Feedback Updates in Message protocol, Transport, Base, CPPC #84
Conversation
Couple of recent comments are still pending from ARC to be taken care of. Which I am working on and will raise separate PR for that |
src/srvgrp-base.adoc
Outdated
@@ -62,6 +62,15 @@ The following table lists the services in the BASE service group: | |||
| 0x08 | |||
| BASE_SET_MSI | |||
| NORMAL_REQUEST | |||
|
|||
| 0x09 | |||
| BASE_GET_MSI |
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.
Missing BASE_SET_MSI
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.
on line 62-64
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.
the subject and description of commit is misleading as it does not give full information, I will update it before merging in the end
src/srvgrp-base.adoc
Outdated
|
||
|
||
[#srvgrp_base_config_msi] | ||
==== Service: BASE_CONFIG_MSI (SERVICE_ID: 0x0A) |
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.
s/BASE_CONFIG_MSI/BASE_SET_MSI_TARGET/
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.
Sure
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.
Should we then rename BASE_SET_MSI to BASE_SET_MSI_STATE?. Otherwise with above rename it gets confusing IMO
src/transport.adoc
Outdated
if `\((tail + 1) % (M - 2)) == head`. | ||
|
||
NOTE: The queues and queue state are shared between application processors, and | ||
due to mechanisms such as kexec and others that can spawn another OS from the |
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.
Use "OS / Firmware" instead of just "OS" because in the future some M-mode firmware may also implement kexec() style feature.
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.
Sure
src/transport.adoc
Outdated
@@ -275,7 +275,10 @@ enqueue the message. | |||
In an implementation, a queue is empty if the `head` == `tail` and a queue is full | |||
if `\((tail + 1) % (M - 2)) == head`. | |||
|
|||
NOTE: | |||
NOTE: The queues and queue state are shared between application processors, and |
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.
state -> states
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.
sure
0b100 - 0b111: Reserved for future use. | ||
|
||
---- | ||
FLAGS[3]: Doorbell interrupt request. |
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.
Some field names use full capital letters but some are not.
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.
From the start we gave names to some of the fields which were capitalized, some we didn't. I think lets make all non capitalized.
src/message-protocol.adoc
Outdated
selectively disable it so that the platform microcontroller in that case does | ||
not trigger a doorbell. | ||
If the doorbell interrupts are supported and enabled, the sender of the RPMI | ||
normal request message can set the `flags[3]: Doorbell interrupt request` bit to |
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.
should use FLAGS[3] , so that same with the field name above.
Apply the same for the rest of description below.
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.
Agree
src/srvgrp-cppc.adoc
Outdated
|
||
| 8 | ||
| DB_SETMASK_LOW | ||
| uint32 | ||
| Lower 32-bit of doorbell set mask. | ||
| Lower 32-bit of doorbell set mask for Performance Request fast-channel. + | ||
Only the lower bits of this field equal to the doorbell register width must be used |
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.
this sentence a bit confusing.
Do you mean "Only the bits within this field corresponding to the doorbell register width should be used as the bitmask."?
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.
The register width can be lower than the width of this field and in that case the bitmask is always equal to the register width from the LSB side.
I will try to format this line here and other place
src/srvgrp-base.adoc
Outdated
If the MSI support is available, the application processor can enable the | ||
MSI using this service. If the MSI is not supported, the appropriate error code | ||
is returned. After the MSI is enabled, the configurations such as MSI address and | ||
MSI data can be configured using another service `BASE_CONFIG_MSI`. The platform |
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.
Should call BASE_CONFIG_MSI , then only SET_MSI enable/disable?
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.
I dont understand your question
src/srvgrp-base.adoc
Outdated
|
||
The application processor can also use this service to disable the MSI. Once | ||
disabled, if the application processor enables the MSI again then it must call | ||
`BASE_CONFIG_MSI` again to configure the MSI address and MSI data. |
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.
disable MSI will void the MSI address and data?
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.
if that's the case, then can include set MSI address and data parameters to SET_MSI service.
Then don't need to have CONFIG_MSI service.
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.
That another possible way agree, but there had been discussion on the ARC feedback issue to have separate enable/disable service along with configuration service.
With this approach the MSI configuration does not have a case of getting passed as invalid values
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.
disable MSI will void the MSI address and data?
What happens with the MSI configuration is not necessary, Spec mandates that Configuration must be done again. What PuC does to address and data is not necessary
src/srvgrp-base.adoc
Outdated
| 1 | ||
| STATE | ||
| uint32 | ||
| MSI state |
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.
Having second thoughts to convert this into a bitfield. This will enable multiple combination of states to be returned. Otherwise currently we need to define a unique integer value for every combination of state. For example "Enable only" and "Enable and Configured".
I will go ahead and do that. Please comment it there are objections
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 like below -
STATE[31:2] : Reserved
STATE[1]: 1: if MSI Target Configured/Valid, 0 otherwise
STATE[0]: 1: if MSI Enabled, 0 MSI Disabled
Add new section meant for software implementaiton of shared memory queues which will cover the queue discovery and also the ARC feedback to to define the queue initialization details, queue enpty and full condition for implemenations as normative text Signed-off-by: Rahul Pathak <[email protected]>
…ke mechanisms ARC feedback was to highlight the possibility that some message may be delivered to the OS which are not intended for that OS can be ignored Signed-off-by: Rahul Pathak <[email protected]>
…quest Feedback from ARC suggested to change the name of flags[3] bit to Doorbell interrupt requested. Also, elaborate when the flags[3] bit is applicable and other behaviours Signed-off-by: Rahul Pathak <[email protected]>
As per ARC feedback the TOKEN described as sequence number is not right and its simply a integer number given to a RPMI message. Also describe in non-normative text that how TOKEN is used for different RPMI message types Signed-off-by: Rahul Pathak <[email protected]>
CPPC service group already supports the service to get the offsets of the fastchannels for each application processor and the requirement for groupping the fastchannels together is not necessary Signed-off-by: Rahul Pathak <[email protected]>
As per ARC feedback, explain about the fastchannel doorbell fields. Signed-off-by: Rahul Pathak <[email protected]>
7303c48
to
a5af049
Compare
src/transport.adoc
Outdated
@@ -77,6 +77,9 @@ If the P2A doorbell is a MSI then the application processors must configure | |||
the MSI on the platform microcontroller side using the RPMI service defined by | |||
the `BASE` service group. | |||
|
|||
The doorbell register must support write operation or a read-modify-write sequence |
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.
This is required for the A2P doorbell not P2A doorbell.
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.
I have updated the text for A2P now
565c8f8
to
5738b7b
Compare
src/srvgrp-base.adoc
Outdated
|
||
If the MSI support is available, the application processor can enable the | ||
MSI using this service. If the MSI is not supported, the appropriate error code | ||
is returned. After the MSI is enabled, the configurations such as MSI target |
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.
First time, the MSI target address is configured before enabling the MSI so this statement looks confusing.
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.
I can add the text something like - The application processor can enable and configure the MSI in any order but both must be done to allow platform microcontroller to trigger the MSI doorbell
What do you think?
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.
I have relaxed the requirement where enable and configure can be done in any order but both must be done.
29ebe74
to
0b92002
Compare
src/srvgrp-base.adoc
Outdated
is done by another defined service `BASE_SET_MSI_TARGET`. | ||
|
||
The application processor can also use this service to disable the MSI. Once | ||
disabled, if the application processor enables the MSI again then it must call |
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.
Application process can set MSI target any number of times it want. There is no correlation with MSI enabling/disabling.
Just drop this second sentence "Once disabled, ..."
src/srvgrp-base.adoc
Outdated
platform microcontroller can use as a doorbell to the application processor. The | ||
application processor may first discover the MSI support via the | ||
`BASE_GET_ATTRIBUTES` service. The application processor can enable the MSI | ||
using `BASE_SET_MSI_STATE` and configure the target in any order but it must |
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.
As mentioned above, there is STATE required for MSI Target configuration.
! [31:2] | ||
! _Reserved_ and must be `0`. | ||
|
||
! [1] |
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.
Ok, if we dont need to maintain any invalid MSI target configuration anytime then current is not needed. I will update
0b92002
to
e5db4fe
Compare
@avpatel Update the text as per the comments. |
src/srvgrp-base.adoc
Outdated
[#srvgrp_base_get_msi_state] | ||
==== Service: BASE_GET_MSI_STATE (SERVICE_ID: 0x09) | ||
This service is used to get the state of the MSI, whether the MSI is | ||
enabled/disabled or if the MSI is currently pending as the platform microcontroller |
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.
s/is currently pending as the platform/is currently pending and the platform/
only one minor comment in src/srvgrp-base.adoc |
As per ARC feedback the BASE service group must also have provision to disable the MSI. To support that and also for clarity, add separate services to set the MSI state which enable/disables the MSI, service to get the current MSI state and a service to configure the MSI target. Signed-off-by: Rahul Pathak <[email protected]>
Signed-off-by: Rahul Pathak <[email protected]>
Signed-off-by: Rahul Pathak <[email protected]>
Signed-off-by: Rahul Pathak <[email protected]>
e5db4fe
to
ddcfae7
Compare
#79
@avpatel @lftan