diff --git a/src/boot_x86_fsp.c b/src/boot_x86_fsp.c index fdf9bbcf..b33b6956 100644 --- a/src/boot_x86_fsp.c +++ b/src/boot_x86_fsp.c @@ -502,7 +502,6 @@ static int self_extend_pcr(void) * This static function serves as the entry point for further execution after the * memory initialization is completed and the stack has been remapped. * - * \param ptr Pointer to a parameter structure. */ static void memory_ready_entry(void) { diff --git a/src/pci.c b/src/pci.c index fa56a7c5..985326d0 100644 --- a/src/pci.c +++ b/src/pci.c @@ -872,6 +872,13 @@ int pci_pre_enum(void) } #if defined(DEBUG_PCI) +/** + * @brief Dump PCI configuration space + * + * @param bus PCI bus number + * @param dev PCI device number + * @param fun PCI function number +*/ void pci_dump(uint8_t bus, uint8_t dev, uint8_t fun) { uint32_t reg[256/4]; @@ -895,6 +902,14 @@ void pci_dump(uint8_t bus, uint8_t dev, uint8_t fun) } } +/** + * @brief Dump PCI configuration space for all devices in the bus + * + * This function will dump the PCI configuration space for all devices in the + * bus, it will recursively dump buses behind bridges. + * + * @param bus PCI bus number +*/ static void pci_dump_bus(uint8_t bus) { uint16_t vendor_id, device_id, header_type; @@ -941,6 +956,9 @@ static void pci_dump_bus(uint8_t bus) } } +/** + * @brief Dump full PCI configuration space +*/ void pci_dump_config_space(void) { return pci_dump_bus(0); diff --git a/src/stage2_params.c b/src/stage2_params.c index 77ccc39b..c5c17748 100644 --- a/src/stage2_params.c +++ b/src/stage2_params.c @@ -67,6 +67,16 @@ struct idt_descriptor { uint32_t base; } __attribute__ ((packed)); +/** + * @brief Set the stage 2 parameter pointer during stage 1. + * + * @param p Pointer to the stage 2 parameter structure. + * @param holder Pointer to the stage 2 parameter holder structure. + * + * This function sets the stage 2 parameter pointer during stage 1. The pointer + * is stored just before a dummy IDTR table, that is defined inside the holder + * struct. +*/ void stage2_set_parameters(struct stage2_parameter *p, struct stage2_ptr_holder *holder) { struct idt_descriptor idt; @@ -79,6 +89,14 @@ void stage2_set_parameters(struct stage2_parameter *p, struct stage2_ptr_holder asm ("lidt %0\r\n" : : "m"(idt)); } +/** + * @brief Get the stage 2 parameter pointer during stage 1. + * + * This function gets the stage 2 parameter pointer during stage 1. The pointer + * is stored just before a dummy IDTR table, stored in the IDT register. + * + * @return Pointer to the stage 2 parameter structure. + */ struct stage2_parameter *stage2_get_parameters(void) { struct stage2_parameter **ptr;