Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add x86 Intel FSP minimal and experimental support #274

Closed
wants to merge 5 commits into from

Conversation

rizlik
Copy link
Contributor

@rizlik rizlik commented Jan 18, 2023

  • tested only on qemu

  • boot from the reset vector and then uses FSP binaries to initialize the memory and the silicon

  • qemu fsp can be obtained from the edk2 project see examples: add new qemu x86 FSP examples wolfBoot-examples#8 for an example of how to test the PR

  • there is also some unrelated bug fixing/improvements

Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Haven't been able to test yet. Just a couple of minor cleanups so far.

docs/Targets.md Outdated
@@ -1384,3 +1384,36 @@ make test-sim-internal-flash-with-update
# it should print 2
./wolfboot.elf success get_version
```
## Intel X86 and X86_64 bare metal with Intel FSP support (experimental)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add two newlines above and add link to item on top of document.

#include <stdint.h>

#ifdef __WOLFBOOT
void hal_init(void)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All functions in this HAL are stubs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. In the future, we may implement flash/pci-e/watchdog here

#ifndef FSP_H
#define FSP_H

struct fsp_info_header {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a packed struct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. added it, thanks.


#define SERIAL_PORT 0x3f8

int uart_init();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might consider reusing some of the DEBUG_UART stuff. See include/printf.h. It already declares these functions and maps them to wolfBoot_printf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactored serial.c in hal/x86_uart.c to better match wolfboot uart hal

@@ -0,0 +1,38 @@
#include <stdint.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure the standard wolfBoot header is added to all new files.

#include "qemu_fsp.h"

const
FSPT_UPD TempRamInitParams = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 4 space indentation.

@rizlik rizlik removed their assignment Jan 19, 2023
@rizlik rizlik requested a review from dgarske January 19, 2023 09:30
danielinux
danielinux previously approved these changes Jan 23, 2023
Copy link
Member

@danielinux danielinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested via wolfSSL/wolfBoot-examples#8 - works as expected.

@danielinux
Copy link
Member

Development moved to another WIP branch

@danielinux danielinux closed this Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants