diff --git a/bsps/x86_64/amd64/clock/eficlock.c b/bsps/x86_64/amd64/clock/eficlock.c index a841f909c1..2566dea463 100644 --- a/bsps/x86_64/amd64/clock/eficlock.c +++ b/bsps/x86_64/amd64/clock/eficlock.c @@ -1,5 +1,13 @@ /* SPDX-License-Identifier: BSD-2-Clause */ +/** + * @file + * + * @ingroup RTEMSBSPsX8664AMD64EFI + * + * @brief EFI clock implementation + */ + /* * Copyright (C) 2023 Karel Gardas * diff --git a/bsps/x86_64/amd64/console/eficonsole.c b/bsps/x86_64/amd64/console/eficonsole.c index 58bd2b660b..3f444da420 100644 --- a/bsps/x86_64/amd64/console/eficonsole.c +++ b/bsps/x86_64/amd64/console/eficonsole.c @@ -1,5 +1,13 @@ /* SPDX-License-Identifier: BSD-2-Clause */ +/** + * @file + * + * @ingroup RTEMSBSPsX8664AMD64EFI + * + * @brief EFI console implementation + */ + /* * Copyright (C) 2023 Karel Gardas * @@ -111,7 +119,7 @@ efi_console_initialize( void ) BOOLEAN use_auto = false; int text_mode = -1; int graphic_mode = -1; - + if (is_efi_console_initialized) return; if (ST == NULL) @@ -190,7 +198,7 @@ efi_console_initialize( void ) } if (get_boot_arg_int_value(boot_args(), "graphic_mode", &graphic_mode) == 0) { use_graphic = true; - } + } if (use_text) efi_init_text_output(text_mode); if (use_graphic) { diff --git a/bsps/x86_64/amd64/console/efigop.c b/bsps/x86_64/amd64/console/efigop.c index 1369b08962..0ea4ab3914 100644 --- a/bsps/x86_64/amd64/console/efigop.c +++ b/bsps/x86_64/amd64/console/efigop.c @@ -1,5 +1,13 @@ /* SPDX-License-Identifier: BSD-2-Clause */ +/** + * @file + * + * @ingroup RTEMSBSPsX8664AMD64EFI + * + * @brief EFI GOP implementation + */ + /* * Copyright (C) 2023 Karel Gardas * @@ -99,7 +107,7 @@ frame_buffer_initialize printf("EFI/GOP: error: can't lock device mutex.\n" ); return RTEMS_UNSATISFIED; } - + return RTEMS_SUCCESSFUL; } @@ -208,7 +216,7 @@ efi_init_graphic_output(int hint) } if (init_gop(gop, hint) < 0) { return RTEMS_UNSATISFIED; - } + } init_fb_from_gop(gop, &gopfb_var, &gopfb_fix); /* init RPi based character output */ rpi_video_init(); @@ -222,9 +230,9 @@ init_gop(EFI_GRAPHICS_OUTPUT *gop, int hint) EFI_STATUS status; if (gop == NULL) return -1; - + int imax = gop->Mode->MaxMode - 1; - + if (hint != -1) { /* hint got from command-line does have highest priority */ status = gop->SetMode(gop, hint); @@ -267,19 +275,19 @@ init_fb_from_gop(EFI_GRAPHICS_OUTPUT *gop, struct fb_var_screeninfo* fbvar, stru if (gop == NULL) return -1; imax = gop->Mode->MaxMode; - + printf("RTEMS: graphic output: current mode: %d, max mode: %d.\n", gop->Mode->Mode, (imax - 1)); - + for (i = 0; i < imax; i++) { EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info = NULL; UINTN SizeOfInfo = 0; - + status = gop->QueryMode(gop, i, &SizeOfInfo, &Info); if (EFI_ERROR(status) && status == EFI_NOT_STARTED) { gop->SetMode(gop, gop->Mode->Mode); status = gop->QueryMode(gop, i, &SizeOfInfo, &Info); } - + if (EFI_ERROR(status)) { printf("ERROR: Bad response from QueryMode: %ld\n", status); continue; @@ -325,10 +333,10 @@ find_gop() UINTN HandleCount = 0; EFI_STATUS status = EFI_SUCCESS; EFI_GRAPHICS_OUTPUT *gop = NULL; - + EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; - status = BS->HandleProtocol(ST->ConsoleOutHandle, + status = BS->HandleProtocol(ST->ConsoleOutHandle, &gop_guid, (VOID **)&gop); if (!EFI_ERROR (status) && gop != NULL) { diff --git a/bsps/x86_64/amd64/console/efistop.c b/bsps/x86_64/amd64/console/efistop.c index 41eabb541f..5c3aca2698 100644 --- a/bsps/x86_64/amd64/console/efistop.c +++ b/bsps/x86_64/amd64/console/efistop.c @@ -1,5 +1,13 @@ /* SPDX-License-Identifier: BSD-2-Clause */ +/** + * @file + * + * @ingroup RTEMSBSPsX8664AMD64EFI + * + * @brief EFI Simple Text Output implementation + */ + /* * Copyright (C) 2023 Karel Gardas * @@ -100,7 +108,7 @@ print_stop_info(SIMPLE_TEXT_OUTPUT_INTERFACE* stop) printf("%d. mode: error: can't obtain column x row values.\n", i); else { printf("%d. mode: %ld * %ld\n", i, columns, rows); - } + } } } diff --git a/bsps/x86_64/amd64/console/font_data.h b/bsps/x86_64/amd64/console/font_data.h index 852310cbf9..89fd020522 100644 --- a/bsps/x86_64/amd64/console/font_data.h +++ b/bsps/x86_64/amd64/console/font_data.h @@ -1,7 +1,7 @@ /** * @file * - * @ingroup raspberrypi + * @ingroup RTEMSBSPsX8664AMD64EFI * * @brief graphic text console font file * diff --git a/bsps/x86_64/amd64/console/outch.c b/bsps/x86_64/amd64/console/outch.c index 3627cc57d8..8920a28688 100644 --- a/bsps/x86_64/amd64/console/outch.c +++ b/bsps/x86_64/amd64/console/outch.c @@ -1,7 +1,7 @@ /** * @file * - * @ingroup amd64 + * @ingroup RTEMSBSPsX8664AMD64EFI * * @brief displaying characters on the console * diff --git a/bsps/x86_64/amd64/include/bsp.h b/bsps/x86_64/amd64/include/bsp.h index 25d9a857c1..5c0d526b49 100644 --- a/bsps/x86_64/amd64/include/bsp.h +++ b/bsps/x86_64/amd64/include/bsp.h @@ -3,6 +3,8 @@ * * @ingroup RTEMSBSPsX8664AMD64 * + * @ingroup RTEMSBSPsX8664AMD64EFI + * * @brief Global BSP definitions. */ @@ -49,8 +51,14 @@ * @defgroup RTEMSBSPsX8664AMD64 AMD64 * * @brief AMD64 Board Support Package. + */ + +/** + * @ingroup RTEMSBSPsX8664 * - * @{ + * @defgroup RTEMSBSPsX8664AMD64EFI AMD64EFI + * + * @brief AMD64EFI Board Support Package. */ #include @@ -66,6 +74,4 @@ extern "C" { } #endif -/** @} */ - #endif diff --git a/bsps/x86_64/amd64/include/efigop.h b/bsps/x86_64/amd64/include/efigop.h index 0b20cce466..e420e068b7 100644 --- a/bsps/x86_64/amd64/include/efigop.h +++ b/bsps/x86_64/amd64/include/efigop.h @@ -1,5 +1,13 @@ /* SPDX-License-Identifier: BSD-2-Clause */ +/** + * @file + * + * @ingroup RTEMSBSPsX8664AMD64EFI + * + * @brief EFI GOP header file + */ + /* * Copyright (C) 2023 Karel Gardas * diff --git a/bsps/x86_64/amd64/include/efistop.h b/bsps/x86_64/amd64/include/efistop.h index da6203c158..da98c3db63 100644 --- a/bsps/x86_64/amd64/include/efistop.h +++ b/bsps/x86_64/amd64/include/efistop.h @@ -1,5 +1,13 @@ /* SPDX-License-Identifier: BSD-2-Clause */ +/** + * @file + * + * @ingroup RTEMSBSPsX8664AMD64EFI + * + * @brief EFI Simple Text Output header file + */ + /* * Copyright (C) 2023 Karel Gardas * diff --git a/bsps/x86_64/amd64/include/multiboot2impl.h b/bsps/x86_64/amd64/include/multiboot2impl.h index cda9337ae4..0d6336acce 100644 --- a/bsps/x86_64/amd64/include/multiboot2impl.h +++ b/bsps/x86_64/amd64/include/multiboot2impl.h @@ -25,6 +25,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ +/** + * @file + * + * @ingroup RTEMSBSPsX8664AMD64EFI + * + * @brief Multiboot2 support routines + */ + void process_multiboot2_info(void); diff --git a/bsps/x86_64/amd64/start/bspstart.c b/bsps/x86_64/amd64/start/bspstart.c index c1012a66c3..40c0c96e22 100644 --- a/bsps/x86_64/amd64/start/bspstart.c +++ b/bsps/x86_64/amd64/start/bspstart.c @@ -3,6 +3,8 @@ * * @ingroup RTEMSBSPsX8664AMD64 * + * @ingroup RTEMSBSPsX8664AMD64EFI + * * @brief BSP start-up code */ diff --git a/bsps/x86_64/amd64/start/efimem.c b/bsps/x86_64/amd64/start/efimem.c index a6ec076a63..2c11142ebd 100644 --- a/bsps/x86_64/amd64/start/efimem.c +++ b/bsps/x86_64/amd64/start/efimem.c @@ -1,5 +1,13 @@ /* SPDX-License-Identifier: BSD-2-Clause */ +/** + * @file + * + * @ingroup RTEMSBSPsX8664AMD64EFI + * + * @brief EFI memory + */ + /* * Copyright (C) 2023 Karel Gardas * @@ -91,7 +99,7 @@ allocate_biggest_block( void ) printf("EFI: Can't read memory map\n"); free(map); return 0; - } + } ndesc = sz / dsz; #ifdef BSP_EFI_MMAP_PRINTOUT if (first_run) @@ -167,7 +175,7 @@ efi_memory_type(EFI_MEMORY_TYPE type) { switch (type) { case EfiReservedMemoryType: - return "Reserved"; + return "Reserved"; case EfiLoaderCode: return "LoaderCode"; case EfiLoaderData: diff --git a/bsps/x86_64/amd64/start/multiboot2.c b/bsps/x86_64/amd64/start/multiboot2.c index 4dce74834c..1c9fe6c74f 100644 --- a/bsps/x86_64/amd64/start/multiboot2.c +++ b/bsps/x86_64/amd64/start/multiboot2.c @@ -1,5 +1,13 @@ /* SPDX-License-Identifier: BSD-2-Clause */ +/** + * @file + * + * @ingroup RTEMSBSPsX8664AMD64EFI + * + * @brief Multiboot2 support routines + */ + /* * Copyright (C) 2023 Karel Gardas *