forked from wolfSSL/wolfBoot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request wolfSSL#330 from danielinux/stage1_verify
x86 Stage1: add verification of components
- Loading branch information
Showing
18 changed files
with
363 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
ARCH=x86_64 | ||
TARGET=x86_fsp_qemu | ||
WOLFBOOT_SMALL_STACK=1 | ||
SIGN?=ECC256 | ||
HASH?=SHA256 | ||
DEBUG=1 | ||
SPMATH=1 | ||
FORCE_32BIT=1 | ||
ENCRYPTION=0 | ||
WOLFBOOT_FIXED_PARTITIONS=1 | ||
WOLFBOOT_PARTITION_SIZE=0x8000000 | ||
WOLFTPM=0 | ||
|
||
# TPM Keystore options | ||
#WOLFBOOT_TPM_KEYSTORE?=1 | ||
#WOLFBOOT_TPM_KEYSTORE_NV_INDEX?=0x01800200 | ||
#WOLFBOOT_TPM_POLICY_NV_INDEX?=0x01800201 | ||
|
||
# 4gb - 8mb | ||
WOLFBOOT_PARTITION_BOOT_ADDRESS=0xff800000 | ||
WOLFBOOT_PARTITION_SWAP_ADDRESS=0x0 | ||
WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x0 | ||
WOLFBOOT_LOAD_BASE=0x2000000 | ||
WOLFBOOT_LOAD_ADDRESS=0x1000000 | ||
|
||
# required for keytools | ||
WOLFBOOT_SECTOR_SIZE?=0x1000 | ||
WOLFBOOT_DATA_ADDRESS=0x1000000 | ||
|
||
FSP_M_BASE=0xffe30000 | ||
FSP_S_BASE=0xffed6000 | ||
FSP_T_BASE=0xfffe0000 | ||
FSP_S_LOAD_BASE=0x0FED5F00 | ||
WOLFBOOT_ORIGIN=0xfffa0000 | ||
LINUX_PAYLOAD=1 | ||
|
||
BOOTLOADER_PARTITION_SIZE=0xa0000 | ||
BIOS_REGION_SIZE=0x800000 | ||
MACHINE_OBJ=src/x86/qemu_fsp.o | ||
FSP_T_BIN=./src/x86/fsp_t.bin | ||
FSP_M_BIN=./src/x86/fsp_m.bin | ||
FSP_S_BIN=./src/x86/fsp_s.bin | ||
STAGE1_AUTH=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* kontron_vx3060_s2_loader.c | ||
* | ||
* Copyright (C) 2023 wolfSSL Inc. | ||
* | ||
* This file is part of wolfBoot. | ||
* | ||
* wolfBoot is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* wolfBoot is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA | ||
*/ | ||
|
||
#include <wolfboot/wolfboot.h> | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include <uart_drv.h> | ||
|
||
#ifdef __WOLFBOOT | ||
#include <printf.h> | ||
|
||
extern uint8_t* _stage2_params[]; | ||
|
||
static void panic(void); | ||
|
||
void hal_init(void) | ||
{ | ||
} | ||
|
||
void hal_prepare_boot(void) | ||
{ | ||
} | ||
#endif | ||
|
||
int hal_flash_write(uint32_t address, const uint8_t *data, int len) | ||
{ | ||
return 0; | ||
} | ||
|
||
void hal_flash_unlock(void) | ||
{ | ||
} | ||
|
||
void hal_flash_lock(void) | ||
{ | ||
} | ||
|
||
int hal_flash_erase(uint32_t address, int len) | ||
{ | ||
return 0; | ||
} | ||
|
||
int wolfBoot_fallback_is_possible(void) | ||
{ | ||
return 0; | ||
|
||
} | ||
|
||
int wolfBoot_dualboot_candidate(void) | ||
{ | ||
return PART_BOOT; | ||
} | ||
|
||
void* hal_get_primary_address(void) | ||
{ | ||
return (void*)0; | ||
} | ||
|
||
void* hal_get_update_address(void) | ||
{ | ||
return (void*)0; | ||
} | ||
|
||
void *hal_get_dts_address(void) | ||
{ | ||
return 0; | ||
} | ||
|
||
void *hal_get_dts_update_address(void) | ||
{ | ||
return 0; | ||
} | ||
|
||
static void panic(void) | ||
{ | ||
while(1) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,4 @@ void x86_fsp_tgl_init_sata(void) | |
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.