Skip to content

Feature/add support for boot mailbox #129

Merged
merged 7 commits into from
Jun 10, 2019

Conversation

AlexanderAmelkin
Copy link
Contributor

@AlexanderAmelkin AlexanderAmelkin commented Jun 4, 2019

This is an effort to add support for the Boot Initiator Mailbox system boot option.
Before this change the option could only be dumped as a whole in hex dump mode using bootparam get 7. With this change set it becomes possible to dump a single block using bootparam get 7 <id> as well as using bootmbox get block <id>. Also added are text dump function (bootmbox get text), and the function to set the mailbox value in both text and binary modes (bootmbox set [text] [block <id>]).

The function converts a set of command line arguments representing
byte values into a byte buffer and verifies each individual value
to be a valid data byte.

Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The function converts a host 32-bit integer into an IPMI
24-bit value (LSB first).

Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Some commands may return command-specific completion codes.
Now they are all reported as 'Unknown'.
Add helper functions to support such command-specific codes.
Command handlers will need to define their own valstr arrays
with completion code descriptions and then use specific_val2str()
instead of generic val2str() to convert the completion code into
a string.

Also reduce code duplication in helper.c

Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Get/set system boot option commands have some command-specific
completion codes that are now reported as "Unknown (0080)", etc.

Use the previously introduced specific_val2str() to convert those
specific error codes to human-readable strings.

Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
@AlexanderAmelkin
Copy link
Contributor Author

@vmauery, @pstrinkle, I'd like you to review this change set if you have time.

pstrinkle
pstrinkle previously approved these changes Jun 4, 2019
vmauery
vmauery previously approved these changes Jun 5, 2019
Add `chassis bootmbox` command to set and get Boot Initiator Mailbox
boot parameter (id 7) the easy way. The command allows for getting
and setting the data both in hex and text modes, as well as properly
decodes IANA Enterprise number for block 0. It can get/set the whole
mailbox at once or operate on separate data blocks.

This commit enhances the chassis_get_boot_param() function with extra
arguments to re-use its code in handling of the added command.

Documentation update will follow.

Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
@AlexanderAmelkin AlexanderAmelkin merged commit a45704e into master Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants