x86: fsp: Tidy up comment style a little

The comments in the FSP code use a different style from the rest of the
x86 code. I am not sure it this is intentional.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: fix 2 comment style issues]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass 2019-08-25 10:10:59 -06:00 committed by Bin Meng
parent 86875f050b
commit 12cf65a4d1
4 changed files with 54 additions and 44 deletions

View File

@ -20,98 +20,98 @@
#define UPD_TERMINATOR 0x55AA #define UPD_TERMINATOR 0x55AA
/** /**
* Find FSP header offset in FSP image * fsp_find_header() - Find FSP header offset in FSP image
* *
* @retval: the offset of FSP header. If signature is invalid, returns 0. * @return the offset of FSP header. If signature is invalid, returns 0.
*/ */
struct fsp_header *fsp_find_header(void); struct fsp_header *fsp_find_header(void);
/** /**
* FSP notification wrapper function * fsp_notify() - FSP notification wrapper function
* *
* @fsp_hdr: Pointer to FSP information header * @fsp_hdr: Pointer to FSP information header
* @phase: FSP initialization phase defined in enum fsp_phase * @phase: FSP initialization phase defined in enum fsp_phase
* *
* @retval: compatible status code with EFI_STATUS defined in PI spec * @return compatible status code with EFI_STATUS defined in PI spec
*/ */
u32 fsp_notify(struct fsp_header *fsp_hdr, u32 phase); u32 fsp_notify(struct fsp_header *fsp_hdr, u32 phase);
/** /**
* This function retrieves the top of usable low memory. * fsp_get_usable_lowmem_top() - retrieves the top of usable low memory
* *
* @hob_list: A HOB list pointer. * @hob_list: A HOB list pointer.
* *
* @retval: Usable low memory top. * @return Usable low memory top.
*/ */
u32 fsp_get_usable_lowmem_top(const void *hob_list); u32 fsp_get_usable_lowmem_top(const void *hob_list);
/** /**
* This function retrieves the top of usable high memory. * fsp_get_usable_highmem_top() - retrieves the top of usable high memory
* *
* @hob_list: A HOB list pointer. * @hob_list: A HOB list pointer.
* *
* @retval: Usable high memory top. * @return Usable high memory top.
*/ */
u64 fsp_get_usable_highmem_top(const void *hob_list); u64 fsp_get_usable_highmem_top(const void *hob_list);
/** /**
* This function retrieves a special reserved memory region. * fsp_get_reserved_mem_from_guid() - retrieves a special reserved memory region
* *
* @hob_list: A HOB list pointer. * @hob_list: A HOB list pointer.
* @len: A pointer to the GUID HOB data buffer length. * @len: A pointer to the GUID HOB data buffer length.
* If the GUID HOB is located, the length will be updated. * If the GUID HOB is located, the length will be updated.
* @guid: A pointer to the owner guild. * @guid: A pointer to the owner guild.
* *
* @retval: Reserved region start address. * @return Reserved region start address.
* 0 if this region does not exist. * 0 if this region does not exist.
*/ */
u64 fsp_get_reserved_mem_from_guid(const void *hob_list, u64 fsp_get_reserved_mem_from_guid(const void *hob_list,
u64 *len, const efi_guid_t *guid); u64 *len, const efi_guid_t *guid);
/** /**
* This function retrieves the FSP reserved normal memory. * fsp_get_fsp_reserved_mem() - retrieves the FSP reserved normal memory
* *
* @hob_list: A HOB list pointer. * @hob_list: A HOB list pointer.
* @len: A pointer to the FSP reserved memory length buffer. * @len: A pointer to the FSP reserved memory length buffer.
* If the GUID HOB is located, the length will be updated. * If the GUID HOB is located, the length will be updated.
* @retval: FSP reserved memory base * @return FSP reserved memory base
* 0 if this region does not exist. * 0 if this region does not exist.
*/ */
u32 fsp_get_fsp_reserved_mem(const void *hob_list, u32 *len); u32 fsp_get_fsp_reserved_mem(const void *hob_list, u32 *len);
/** /**
* This function retrieves the TSEG reserved normal memory. * fsp_get_tseg_reserved_mem() - retrieves the TSEG reserved normal memory
* *
* @hob_list: A HOB list pointer. * @hob_list: A HOB list pointer.
* @len: A pointer to the TSEG reserved memory length buffer. * @len: A pointer to the TSEG reserved memory length buffer.
* If the GUID HOB is located, the length will be updated. * If the GUID HOB is located, the length will be updated.
* *
* @retval NULL: Failed to find the TSEG reserved memory. * @return NULL: Failed to find the TSEG reserved memory.
* @retval others: TSEG reserved memory base. * @return others: TSEG reserved memory base.
*/ */
u32 fsp_get_tseg_reserved_mem(const void *hob_list, u32 *len); u32 fsp_get_tseg_reserved_mem(const void *hob_list, u32 *len);
/** /**
* This function retrieves FSP Non-volatile Storage HOB buffer and size. * fsp_get_nvs_data() - retrieves FSP Non-volatile Storage HOB buffer and size
* *
* @hob_list: A HOB list pointer. * @hob_list: A HOB list pointer.
* @len: A pointer to the NVS data buffer length. * @len: A pointer to the NVS data buffer length.
* If the HOB is located, the length will be updated. * If the HOB is located, the length will be updated.
* *
* @retval NULL: Failed to find the NVS HOB. * @return NULL: Failed to find the NVS HOB.
* @retval others: FSP NVS data buffer pointer. * @return others: FSP NVS data buffer pointer.
*/ */
void *fsp_get_nvs_data(const void *hob_list, u32 *len); void *fsp_get_nvs_data(const void *hob_list, u32 *len);
/** /**
* This function retrieves graphics information. * fsp_get_graphics_info() - retrieves graphics information.
* *
* @hob_list: A HOB list pointer. * @hob_list: A HOB list pointer.
* @len: A pointer to the graphics info HOB length. * @len: A pointer to the graphics info HOB length.
* If the HOB is located, the length will be updated. * If the HOB is located, the length will be updated.
* *
* @retval NULL: Failed to find the graphics info HOB. * @return NULL: Failed to find the graphics info HOB.
* @retval others: A pointer to struct hob_graphics_info. * @return others: A pointer to struct hob_graphics_info.
*/ */
void *fsp_get_graphics_info(const void *hob_list, u32 *len); void *fsp_get_graphics_info(const void *hob_list, u32 *len);

View File

@ -11,14 +11,14 @@
#include "fsp_ffs.h" #include "fsp_ffs.h"
/** /**
* FSP Continuation assembly helper routine * fsp_asm_continuation() - FSP Continuation assembly helper routine
* *
* This routine jumps to the C version of FSP continuation function * This routine jumps to the C version of FSP continuation function
*/ */
void fsp_asm_continuation(void); void fsp_asm_continuation(void);
/** /**
* FSP initialization complete * fsp_init_done() - FSP initialization complete
* *
* This is the function that indicates FSP initialization is complete and jumps * This is the function that indicates FSP initialization is complete and jumps
* back to the bootloader with HOB list pointer as the parameter. * back to the bootloader with HOB list pointer as the parameter.
@ -28,17 +28,17 @@ void fsp_asm_continuation(void);
void fsp_init_done(void *hob_list); void fsp_init_done(void *hob_list);
/** /**
* FSP Continuation function * fsp_continue() - FSP Continuation function
* *
* @status: Always 0 * @status: Always 0
* @hob_list: HOB list pointer * @hob_list: HOB list pointer
* *
* @retval: Never returns * @return Never returns
*/ */
void fsp_continue(u32 status, void *hob_list); void fsp_continue(u32 status, void *hob_list);
/** /**
* FSP initialization wrapper function. * fsp_init() - FSP initialization wrapper function
* *
* @stack_top: bootloader stack top address * @stack_top: bootloader stack top address
* @boot_mode: boot mode defined in fsp_bootmode.h * @boot_mode: boot mode defined in fsp_bootmode.h
@ -47,24 +47,34 @@ void fsp_continue(u32 status, void *hob_list);
void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf); void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf);
/** /**
* This function retrieves Bootloader temporary stack buffer and size. * fsp_notify() - FSP notification wrapper function
*
* @fsp_hdr: Pointer to FSP information header
* @phase: FSP initialization phase defined in enum fsp_phase
*
* @return compatible status code with EFI_STATUS defined in PI spec
*/
u32 fsp_notify(struct fsp_header *fsp_hdr, u32 phase);
/**
* fsp_get_bootloader_tmp_mem() - retrieves temporary stack buffer and size
* *
* @hob_list: A HOB list pointer. * @hob_list: A HOB list pointer.
* @len: A pointer to the bootloader temporary stack length. * @len: A pointer to the bootloader temporary stack length.
* If the HOB is located, the length will be updated. * If the HOB is located, the length will be updated.
* *
* @retval NULL: Failed to find the bootloader temporary stack HOB. * @return NULL: Failed to find the bootloader temporary stack HOB.
* @retval others: Bootloader temporary stackbuffer pointer. * @return others: Bootloader temporary stackbuffer pointer.
*/ */
void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len); void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
/** /**
* This function overrides the default configurations of FSP. * fsp_update_configs() - overrides the default configurations of FSP
* *
* @config: A pointer to the FSP configuration data structure * @config: A pointer to the FSP configuration data structure
* @rt_buf: A pointer to the FSP runtime buffer data structure * @rt_buf: A pointer to the FSP runtime buffer data structure
* *
* @return: None * @return None
*/ */
void fsp_update_configs(struct fsp_config_data *config, void fsp_update_configs(struct fsp_config_data *config,
struct fspinit_rtbuf *rt_buf); struct fspinit_rtbuf *rt_buf);

View File

@ -135,7 +135,7 @@ struct hob_guid {
* *
* @hdr: A pointer to a HOB. * @hdr: A pointer to a HOB.
* *
* @return: A pointer to the next HOB in the HOB list. * @return A pointer to the next HOB in the HOB list.
*/ */
static inline const struct hob_header *get_next_hob(const struct hob_header static inline const struct hob_header *get_next_hob(const struct hob_header
*hdr) *hdr)
@ -152,8 +152,8 @@ static inline const struct hob_header *get_next_hob(const struct hob_header
* *
* @hdr: A pointer to a HOB. * @hdr: A pointer to a HOB.
* *
* @retval true: The HOB specified by hdr is the last HOB in the HOB list. * @return true: The HOB specified by hdr is the last HOB in the HOB list.
* @retval false: The HOB specified by hdr is not the last HOB in the HOB list. * @return false: The HOB specified by hdr is not the last HOB in the HOB list.
*/ */
static inline bool end_of_hob(const struct hob_header *hdr) static inline bool end_of_hob(const struct hob_header *hdr)
{ {
@ -169,7 +169,7 @@ static inline bool end_of_hob(const struct hob_header *hdr)
* *
* @hdr: A pointer to a HOB. * @hdr: A pointer to a HOB.
* *
* @return: A pointer to the data buffer in a HOB. * @return A pointer to the data buffer in a HOB.
*/ */
static inline void *get_guid_hob_data(const struct hob_header *hdr) static inline void *get_guid_hob_data(const struct hob_header *hdr)
{ {
@ -185,7 +185,7 @@ static inline void *get_guid_hob_data(const struct hob_header *hdr)
* *
* @hdr: A pointer to a HOB. * @hdr: A pointer to a HOB.
* *
* @return: The size of the data buffer. * @return The size of the data buffer.
*/ */
static inline u16 get_guid_hob_data_size(const struct hob_header *hdr) static inline u16 get_guid_hob_data_size(const struct hob_header *hdr)
{ {
@ -198,7 +198,7 @@ static inline u16 get_guid_hob_data_size(const struct hob_header *hdr)
* @type: HOB type to search * @type: HOB type to search
* @hob_list: A pointer to the HOB list * @hob_list: A pointer to the HOB list
* *
* @retval: A HOB object with matching type; Otherwise NULL. * @return A HOB object with matching type; Otherwise NULL.
*/ */
const struct hob_header *hob_get_next_hob(uint type, const void *hob_list); const struct hob_header *hob_get_next_hob(uint type, const void *hob_list);
@ -208,7 +208,7 @@ const struct hob_header *hob_get_next_hob(uint type, const void *hob_list);
* @guid: GUID to search * @guid: GUID to search
* @hob_list: A pointer to the HOB list * @hob_list: A pointer to the HOB list
* *
* @retval: A HOB object with matching GUID; Otherwise NULL. * @return A HOB object with matching GUID; Otherwise NULL.
*/ */
const struct hob_header *hob_get_next_guid_hob(const efi_guid_t *guid, const struct hob_header *hob_get_next_guid_hob(const efi_guid_t *guid,
const void *hob_list); const void *hob_list);
@ -221,8 +221,8 @@ const struct hob_header *hob_get_next_guid_hob(const efi_guid_t *guid,
* If the GUID HOB is located, the length will be updated. * If the GUID HOB is located, the length will be updated.
* @guid A pointer to HOB GUID. * @guid A pointer to HOB GUID.
* *
* @retval NULL: Failed to find the GUID HOB. * @return NULL: Failed to find the GUID HOB.
* @retval others: GUID HOB data buffer pointer. * @return others: GUID HOB data buffer pointer.
*/ */
void *hob_get_guid_hob_data(const void *hob_list, u32 *len, void *hob_get_guid_hob_data(const void *hob_list, u32 *len,
const efi_guid_t *guid); const efi_guid_t *guid);

View File

@ -13,7 +13,7 @@
* @type: HOB type to search * @type: HOB type to search
* @hob_list: A pointer to the HOB list * @hob_list: A pointer to the HOB list
* *
* @retval: A HOB object with matching type; Otherwise NULL. * @return A HOB object with matching type; Otherwise NULL.
*/ */
const struct hob_header *hob_get_next_hob(uint type, const void *hob_list) const struct hob_header *hob_get_next_hob(uint type, const void *hob_list)
{ {
@ -38,7 +38,7 @@ const struct hob_header *hob_get_next_hob(uint type, const void *hob_list)
* @guid: GUID to search * @guid: GUID to search
* @hob_list: A pointer to the HOB list * @hob_list: A pointer to the HOB list
* *
* @retval: A HOB object with matching GUID; Otherwise NULL. * @return A HOB object with matching GUID; Otherwise NULL.
*/ */
const struct hob_header *hob_get_next_guid_hob(const efi_guid_t *guid, const struct hob_header *hob_get_next_guid_hob(const efi_guid_t *guid,
const void *hob_list) const void *hob_list)
@ -65,8 +65,8 @@ const struct hob_header *hob_get_next_guid_hob(const efi_guid_t *guid,
* If the GUID HOB is located, the length will be updated. * If the GUID HOB is located, the length will be updated.
* @guid A pointer to HOB GUID. * @guid A pointer to HOB GUID.
* *
* @retval NULL: Failed to find the GUID HOB. * @return NULL: Failed to find the GUID HOB.
* @retval others: GUID HOB data buffer pointer. * @return others: GUID HOB data buffer pointer.
*/ */
void *hob_get_guid_hob_data(const void *hob_list, u32 *len, void *hob_get_guid_hob_data(const void *hob_list, u32 *len,
const efi_guid_t *guid) const efi_guid_t *guid)