forked from Imagelibrary/rtems
amd64efi: Add amd64efi doxygen group
This commit is contained in:
committed by
Gedare Bloom
parent
5d90fc945b
commit
e233b5c16a
@@ -1,5 +1,13 @@
|
|||||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief EFI clock implementation
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 Karel Gardas
|
* Copyright (C) 2023 Karel Gardas
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief EFI console implementation
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 Karel Gardas
|
* Copyright (C) 2023 Karel Gardas
|
||||||
*
|
*
|
||||||
@@ -111,7 +119,7 @@ efi_console_initialize( void )
|
|||||||
BOOLEAN use_auto = false;
|
BOOLEAN use_auto = false;
|
||||||
int text_mode = -1;
|
int text_mode = -1;
|
||||||
int graphic_mode = -1;
|
int graphic_mode = -1;
|
||||||
|
|
||||||
if (is_efi_console_initialized)
|
if (is_efi_console_initialized)
|
||||||
return;
|
return;
|
||||||
if (ST == NULL)
|
if (ST == NULL)
|
||||||
@@ -190,7 +198,7 @@ efi_console_initialize( void )
|
|||||||
}
|
}
|
||||||
if (get_boot_arg_int_value(boot_args(), "graphic_mode", &graphic_mode) == 0) {
|
if (get_boot_arg_int_value(boot_args(), "graphic_mode", &graphic_mode) == 0) {
|
||||||
use_graphic = true;
|
use_graphic = true;
|
||||||
}
|
}
|
||||||
if (use_text)
|
if (use_text)
|
||||||
efi_init_text_output(text_mode);
|
efi_init_text_output(text_mode);
|
||||||
if (use_graphic) {
|
if (use_graphic) {
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief EFI GOP implementation
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 Karel Gardas
|
* Copyright (C) 2023 Karel Gardas
|
||||||
*
|
*
|
||||||
@@ -99,7 +107,7 @@ frame_buffer_initialize
|
|||||||
printf("EFI/GOP: error: can't lock device mutex.\n" );
|
printf("EFI/GOP: error: can't lock device mutex.\n" );
|
||||||
return RTEMS_UNSATISFIED;
|
return RTEMS_UNSATISFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,7 +216,7 @@ efi_init_graphic_output(int hint)
|
|||||||
}
|
}
|
||||||
if (init_gop(gop, hint) < 0) {
|
if (init_gop(gop, hint) < 0) {
|
||||||
return RTEMS_UNSATISFIED;
|
return RTEMS_UNSATISFIED;
|
||||||
}
|
}
|
||||||
init_fb_from_gop(gop, &gopfb_var, &gopfb_fix);
|
init_fb_from_gop(gop, &gopfb_var, &gopfb_fix);
|
||||||
/* init RPi based character output */
|
/* init RPi based character output */
|
||||||
rpi_video_init();
|
rpi_video_init();
|
||||||
@@ -222,9 +230,9 @@ init_gop(EFI_GRAPHICS_OUTPUT *gop, int hint)
|
|||||||
EFI_STATUS status;
|
EFI_STATUS status;
|
||||||
if (gop == NULL)
|
if (gop == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
int imax = gop->Mode->MaxMode - 1;
|
int imax = gop->Mode->MaxMode - 1;
|
||||||
|
|
||||||
if (hint != -1) {
|
if (hint != -1) {
|
||||||
/* hint got from command-line does have highest priority */
|
/* hint got from command-line does have highest priority */
|
||||||
status = gop->SetMode(gop, hint);
|
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)
|
if (gop == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
imax = gop->Mode->MaxMode;
|
imax = gop->Mode->MaxMode;
|
||||||
|
|
||||||
printf("RTEMS: graphic output: current mode: %d, max mode: %d.\n", gop->Mode->Mode, (imax - 1));
|
printf("RTEMS: graphic output: current mode: %d, max mode: %d.\n", gop->Mode->Mode, (imax - 1));
|
||||||
|
|
||||||
for (i = 0; i < imax; i++) {
|
for (i = 0; i < imax; i++) {
|
||||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info = NULL;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info = NULL;
|
||||||
UINTN SizeOfInfo = 0;
|
UINTN SizeOfInfo = 0;
|
||||||
|
|
||||||
status = gop->QueryMode(gop, i, &SizeOfInfo, &Info);
|
status = gop->QueryMode(gop, i, &SizeOfInfo, &Info);
|
||||||
if (EFI_ERROR(status) && status == EFI_NOT_STARTED) {
|
if (EFI_ERROR(status) && status == EFI_NOT_STARTED) {
|
||||||
gop->SetMode(gop, gop->Mode->Mode);
|
gop->SetMode(gop, gop->Mode->Mode);
|
||||||
status = gop->QueryMode(gop, i, &SizeOfInfo, &Info);
|
status = gop->QueryMode(gop, i, &SizeOfInfo, &Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EFI_ERROR(status)) {
|
if (EFI_ERROR(status)) {
|
||||||
printf("ERROR: Bad response from QueryMode: %ld\n", status);
|
printf("ERROR: Bad response from QueryMode: %ld\n", status);
|
||||||
continue;
|
continue;
|
||||||
@@ -325,10 +333,10 @@ find_gop()
|
|||||||
UINTN HandleCount = 0;
|
UINTN HandleCount = 0;
|
||||||
EFI_STATUS status = EFI_SUCCESS;
|
EFI_STATUS status = EFI_SUCCESS;
|
||||||
EFI_GRAPHICS_OUTPUT *gop = NULL;
|
EFI_GRAPHICS_OUTPUT *gop = NULL;
|
||||||
|
|
||||||
EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
|
EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
|
||||||
|
|
||||||
status = BS->HandleProtocol(ST->ConsoleOutHandle,
|
status = BS->HandleProtocol(ST->ConsoleOutHandle,
|
||||||
&gop_guid,
|
&gop_guid,
|
||||||
(VOID **)&gop);
|
(VOID **)&gop);
|
||||||
if (!EFI_ERROR (status) && gop != NULL) {
|
if (!EFI_ERROR (status) && gop != NULL) {
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief EFI Simple Text Output implementation
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 Karel Gardas
|
* 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);
|
printf("%d. mode: error: can't obtain column x row values.\n", i);
|
||||||
else {
|
else {
|
||||||
printf("%d. mode: %ld * %ld\n", i, columns, rows);
|
printf("%d. mode: %ld * %ld\n", i, columns, rows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
*
|
*
|
||||||
* @ingroup raspberrypi
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
*
|
*
|
||||||
* @brief graphic text console font file
|
* @brief graphic text console font file
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
*
|
*
|
||||||
* @ingroup amd64
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
*
|
*
|
||||||
* @brief displaying characters on the console
|
* @brief displaying characters on the console
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
*
|
*
|
||||||
* @ingroup RTEMSBSPsX8664AMD64
|
* @ingroup RTEMSBSPsX8664AMD64
|
||||||
*
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
* @brief Global BSP definitions.
|
* @brief Global BSP definitions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -49,8 +51,14 @@
|
|||||||
* @defgroup RTEMSBSPsX8664AMD64 AMD64
|
* @defgroup RTEMSBSPsX8664AMD64 AMD64
|
||||||
*
|
*
|
||||||
* @brief AMD64 Board Support Package.
|
* @brief AMD64 Board Support Package.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup RTEMSBSPsX8664
|
||||||
*
|
*
|
||||||
* @{
|
* @defgroup RTEMSBSPsX8664AMD64EFI AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief AMD64EFI Board Support Package.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bspopts.h>
|
#include <bspopts.h>
|
||||||
@@ -66,6 +74,4 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief EFI GOP header file
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 Karel Gardas
|
* Copyright (C) 2023 Karel Gardas
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief EFI Simple Text Output header file
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 Karel Gardas
|
* Copyright (C) 2023 Karel Gardas
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -25,6 +25,14 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief Multiboot2 support routines
|
||||||
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
process_multiboot2_info(void);
|
process_multiboot2_info(void);
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
*
|
*
|
||||||
* @ingroup RTEMSBSPsX8664AMD64
|
* @ingroup RTEMSBSPsX8664AMD64
|
||||||
*
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
* @brief BSP start-up code
|
* @brief BSP start-up code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief EFI memory
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 Karel Gardas
|
* Copyright (C) 2023 Karel Gardas
|
||||||
*
|
*
|
||||||
@@ -91,7 +99,7 @@ allocate_biggest_block( void )
|
|||||||
printf("EFI: Can't read memory map\n");
|
printf("EFI: Can't read memory map\n");
|
||||||
free(map);
|
free(map);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ndesc = sz / dsz;
|
ndesc = sz / dsz;
|
||||||
#ifdef BSP_EFI_MMAP_PRINTOUT
|
#ifdef BSP_EFI_MMAP_PRINTOUT
|
||||||
if (first_run)
|
if (first_run)
|
||||||
@@ -167,7 +175,7 @@ efi_memory_type(EFI_MEMORY_TYPE type)
|
|||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case EfiReservedMemoryType:
|
case EfiReservedMemoryType:
|
||||||
return "Reserved";
|
return "Reserved";
|
||||||
case EfiLoaderCode:
|
case EfiLoaderCode:
|
||||||
return "LoaderCode";
|
return "LoaderCode";
|
||||||
case EfiLoaderData:
|
case EfiLoaderData:
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup RTEMSBSPsX8664AMD64EFI
|
||||||
|
*
|
||||||
|
* @brief Multiboot2 support routines
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2023 Karel Gardas
|
* Copyright (C) 2023 Karel Gardas
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user