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

Intel FSP support #327

Merged
merged 22 commits into from
Jul 24, 2023
Merged

Intel FSP support #327

merged 22 commits into from
Jul 24, 2023

Conversation

rizlik
Copy link
Contributor

@rizlik rizlik commented Jul 19, 2023

Initial support for Intel Architecture using the Intel Firmware Support package.

@dgarske dgarske self-requested a review July 19, 2023 22:01
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.

Amazing work on this!

static void init_sata(void)
{
uint32_t version;
char rbuf[32];
Copy link
Contributor

Choose a reason for hiding this comment

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

Is rbuf used?

Copy link
Member

Choose a reason for hiding this comment

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

removed in b1c1ba4 - thank you

{
uint32_t sata_bar;
uint32_t version;
char rbuf[32];
Copy link
Contributor

Choose a reason for hiding this comment

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

Same rbuf used?

Copy link
Member

Choose a reason for hiding this comment

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

removed in b1c1ba4 - thank you

#define XTPM_WAIT() delay(1000);
#define DEBUG_WOLFTPM
#define WOLFTPM_ADV_IO
#define WOLFTPM_DEBUG_VERBOSE
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't recommend verbose on by default.

src/x86/hob.c Outdated
(uint32_t)(hob->u.resource_descriptor.resource_length >> 32),
(uint32_t)hob->u.resource_descriptor.resource_length
);
// Handle specific fields for this HOB type
Copy link
Contributor

Choose a reason for hiding this comment

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

Use C style /* */ comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the code was unused, it has been removed

@@ -1572,3 +1572,87 @@ Flash Allocation:
```

Detailed steps can be found at [Readme](../IDE/Renesas/e2studio/RA6M4/Readme.md).


## Intel x86_64 with Intel FSP support
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you include sample boot output?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

working on that: other parts of the documentation need to be updated

"or %2, %%eax\r\n"
"mov %%eax, %%cr0\r\n"
"mov %3, %%eax\r\n"
"ljmp %5,$_setcs\r\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

../src/x86/common.c: Assembler messages:
../src/x86/common.c:220: Error: can't handle non absolute segment in `ljmp'
make[1]: *** [Makefile:160: common.o] Error 1```

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.

Still getting:

	[CC-x86_64] common.o
gcc -D"__WOLFBOOT" -Werror -Wextra -DARCH_x86_64 -DFORCE_32BIT -DWOLFSSL_SP_DIV_WORD_HALF -DWOLFBOOT_FSP=1 -DWOLFBOOT_TGL=1 -fno-stack-protector -m32 -fno-PIC -fno-pie -mno-mmx -mno-sse -DDEBUG_UART -DUCODE0_ADDRESS=0xfffc4000 -DARCH_FLASH_OFFSET=0x0 -DWOLFBOOT_ORIGIN=0xffff0000 -DBOOTLOADER_PARTITION_SIZE=0x400000 -DWOLFBOOT_ARCH=x86_64 -DTARGET_kontron_vx3060_s2 -D"WOLFBOOT_SIGN_ECC256" -D"FILL_BYTE=0xFF" -O0 -D"DEBUG" -g -ggdb3 -D"WOLFBOOT_HASH_SHA256" -DIMAGE_HEADER_SIZE=256 -DWOLFBOOT_64BIT -DX86_UART_BASE=0xFE032000 -DX86_UART_REG_WIDTH=4 -DX86_UART_MMIO=1 -DPCH_HAS_PCR=1 -DPCI_USE_ECAM=1 -DPCH_PCR_BASE=0xFD000000 -DPCI_ECAM_BASE=0xC0000000 -DFSP_S_UPD_DATA_BASE=0xffe35000 -DWOLFBOOT_LOAD_BASE=0x2000000  -I".." -I"../include/" -I"../lib/wolfssl" -D"WOLFSSL_USER_SETTINGS" -D"WOLFTPM_USER_SETTINGS" -D"PLATFORM_kontron_vx3060_s2" -DBUILD_LOADER_STAGE1 -DWOLFBOOT_STAGE1_SIZE=0x1000 -DWOLFBOOT_STAGE1_LOAD_ADDR= -DWOLFBOOT_STAGE1_FLASH_ADDR= -DWOLFBOOT_STAGE1_BASE_ADDR= -c -o common.o ../src/x86/common.c
../src/x86/common.c: Assembler messages:
../src/x86/common.c:220: Error: can't handle non absolute segment in `ljmp'
make[1]: *** [Makefile:160: common.o] Error 1
davidgarske@P700-XEON:~/GitHub/wolfboot$ which gcc
/usr/bin/gcc
davidgarske@P700-XEON:~/GitHub/wolfboot$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@rizlik rizlik requested a review from dgarske July 24, 2023 12:47
@dgarske
Copy link
Contributor

dgarske commented Jul 24, 2023

@rizlik and @danielinux let me know when you are ready for merge. Shall I squash it?

@rizlik rizlik assigned rizlik and unassigned dgarske Jul 24, 2023
rizlik and others added 17 commits July 24, 2023 18:12
Signed-off-by: Marco Oliverio <marco@wolfssl.com>
It support basic enumeration (only bus 0), and reading/writing to config space
register.
supports querying the ports, detecting the disk and configuring FIS areas.

Signed-off-by: Marco Oliverio <marco@wolfssl.com>
support ATA commands to read, write and identify a SATA disk.

Signed-off-by: Marco Oliverio <marco@wolfssl.com>
support parsing the table and reading/writing to/from a partition.

Signed-off-by: Marco Oliverio <marco@wolfssl.com>
BIOS uses this table to communiate IRQ routing and CPUs number to the OS.
@rizlik
Copy link
Contributor Author

rizlik commented Jul 24, 2023

squashed and tested

@rizlik rizlik assigned dgarske and unassigned rizlik Jul 24, 2023
@dgarske dgarske merged commit 2e7a1ef into wolfSSL:master Jul 24, 2023
41 checks passed
@rizlik rizlik deleted the intel_fsp_support branch July 24, 2023 22:04
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