hv: dmar_parse: remove dynamic memory allocation

This patch removes the dynamic memory allocation in dmar_parse.c.

v1 -> v2:
 - rename 'const_dmar.c' to 'dmar_info.c' and move it to
   'boot' directory
 - add CONFIG_DMAR_PARSE_ENABLED check for function declaration

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
Shiqing Gao
2019-05-09 13:11:10 +08:00
committed by ACRN System Integration
parent 5629ade9a0
commit 773889bb65
4 changed files with 19 additions and 38 deletions

View File

@@ -457,6 +457,9 @@ static inline uint16_t dma_frcd_up_sid(uint64_t up_sid)
return ((uint16_t)up_sid & 0xffffU);
}
#define MAX_DRHDS 4
#define MAX_DRHD_DEVSCOPES 4
#define DMAR_CONTEXT_TRANSLATION_TYPE_TRANSLATED 0x00U
#define DMAR_CONTEXT_TRANSLATION_TYPE_RESERVED 0x01U
#define DMAR_CONTEXT_TRANSLATION_TYPE_PASSED_THROUGH 0x02U
@@ -516,6 +519,10 @@ union dmar_ir_entry {
extern struct dmar_info *get_dmar_info(void);
#ifdef CONFIG_DMAR_PARSE_ENABLED
int32_t parse_dmar_table(struct dmar_info *plat_dmar_info);
#endif
/**
* @file vtd.h
*