mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-03 05:56:57 +00:00
Add a standard string api strncat_s() to replace merge_cmdline() to make code more readable. Another change is that the multiboot cmdline will be appended to the end of configured SOS bootargs instead of the beginning, this would enable a feature that some kernel cmdline paramter items could be overriden by multiboot cmdline since the later one would win if same parameters configured in kernel cmdline. Tracked-On: #4885 Signed-off-by: Victor Sun <victor.sun@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
39 lines
879 B
C
39 lines
879 B
C
/*
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef SEED_H_
|
|
#define SEED_H_
|
|
|
|
#define BOOTLOADER_SEED_MAX_ENTRIES 10U
|
|
#define BUP_MKHI_BOOTLOADER_SEED_LEN 64U
|
|
#define MAX_SEED_ARG_SIZE 1024U
|
|
|
|
/* Structure of seed info */
|
|
struct seed_info {
|
|
uint8_t cse_svn;
|
|
uint8_t bios_svn;
|
|
uint8_t padding[2];
|
|
uint8_t seed[BUP_MKHI_BOOTLOADER_SEED_LEN];
|
|
};
|
|
|
|
/* Structure of physical seed */
|
|
struct physical_seed {
|
|
struct seed_info seed_list[BOOTLOADER_SEED_MAX_ENTRIES];
|
|
uint32_t num_seeds;
|
|
uint32_t pad;
|
|
};
|
|
|
|
void init_seed(void);
|
|
|
|
void append_seed_arg(char *cmd_dst, bool vm_is_sos);
|
|
|
|
bool derive_virtual_seed(struct seed_info *seed_list, uint32_t *num_seeds,
|
|
const uint8_t *salt, size_t salt_len, const uint8_t *info, size_t info_len);
|
|
|
|
bool derive_attkb_enc_key(uint8_t *out_key);
|
|
|
|
#endif /* SEED_H_ */
|