mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-25 15:02:13 +00:00
hv: use uint32_t replace "unsigned int"
Since it's typedef in "include/lib/types.h" Tracked-On: #861 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
parent
8bafde9942
commit
473d871397
@ -124,7 +124,7 @@ again:
|
|||||||
*/
|
*/
|
||||||
for (i = 0, j = 0; i < map_size / desc_size; i++) {
|
for (i = 0, j = 0; i < map_size / desc_size; i++) {
|
||||||
EFI_MEMORY_DESCRIPTOR *d;
|
EFI_MEMORY_DESCRIPTOR *d;
|
||||||
unsigned int e820_type = 0;
|
uint32_t e820_type = 0;
|
||||||
|
|
||||||
d = (EFI_MEMORY_DESCRIPTOR *)((unsigned long)map_buf + (i * desc_size));
|
d = (EFI_MEMORY_DESCRIPTOR *)((unsigned long)map_buf + (i * desc_size));
|
||||||
switch(d->Type) {
|
switch(d->Type) {
|
||||||
|
@ -82,7 +82,7 @@ void do_logmsg(uint32_t severity, const char *fmt, ...)
|
|||||||
|
|
||||||
/* Check if flags specify to output to memory */
|
/* Check if flags specify to output to memory */
|
||||||
if (do_mem_log) {
|
if (do_mem_log) {
|
||||||
unsigned int i, msg_len;
|
uint32_t i, msg_len;
|
||||||
struct shared_buf *sbuf = (struct shared_buf *)per_cpu(sbuf, pcpu_id)[ACRN_HVLOG];
|
struct shared_buf *sbuf = (struct shared_buf *)per_cpu(sbuf, pcpu_id)[ACRN_HVLOG];
|
||||||
|
|
||||||
/* If sbuf is not ready, we just drop the massage */
|
/* If sbuf is not ready, we just drop the massage */
|
||||||
|
@ -560,7 +560,7 @@ static void profiling_handle_msrops(void)
|
|||||||
/*
|
/*
|
||||||
* Interrupt handler for performance monitoring interrupts
|
* Interrupt handler for performance monitoring interrupts
|
||||||
*/
|
*/
|
||||||
static void profiling_pmi_handler(unsigned int irq, __unused void *data)
|
static void profiling_pmi_handler(uint32_t irq, __unused void *data)
|
||||||
{
|
{
|
||||||
uint64_t perf_ovf_status;
|
uint64_t perf_ovf_status;
|
||||||
uint32_t lvt_perf_ctr;
|
uint32_t lvt_perf_ctr;
|
||||||
|
@ -80,7 +80,7 @@ build_atomic_dec(atomic_dec32, "l", uint32_t)
|
|||||||
build_atomic_dec(atomic_dec64, "q", uint64_t)
|
build_atomic_dec(atomic_dec64, "q", uint64_t)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* #define atomic_set32(P, V) (*(unsigned int *)(P) |= (V))
|
* #define atomic_set32(P, V) (*(uint32_t *)(P) |= (V))
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* uint32_t* p A pointer to memory area that stores source
|
* uint32_t* p A pointer to memory area that stores source
|
||||||
|
@ -22,8 +22,8 @@ struct mem_pool {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* APIs exposing memory allocation/deallocation abstractions */
|
/* APIs exposing memory allocation/deallocation abstractions */
|
||||||
void *malloc(unsigned int num_bytes);
|
void *malloc(uint32_t num_bytes);
|
||||||
void *calloc(unsigned int num_elements, unsigned int element_size);
|
void *calloc(uint32_t num_elements, uint32_t element_size);
|
||||||
void free(const void *ptr);
|
void free(const void *ptr);
|
||||||
|
|
||||||
#endif /* MEM_MGT_H */
|
#endif /* MEM_MGT_H */
|
||||||
|
@ -738,7 +738,7 @@ Bugfix
|
|||||||
Security
|
Security
|
||||||
* Add checks to prevent signature forgeries for very large messages while
|
* Add checks to prevent signature forgeries for very large messages while
|
||||||
using RSA through the PK module in 64-bit systems. The issue was caused by
|
using RSA through the PK module in 64-bit systems. The issue was caused by
|
||||||
some data loss when casting a size_t to an unsigned int value in the
|
some data loss when casting a size_t to an uint32_t value in the
|
||||||
functions rsa_verify_wrap(), rsa_sign_wrap(), rsa_alt_sign_wrap() and
|
functions rsa_verify_wrap(), rsa_sign_wrap(), rsa_alt_sign_wrap() and
|
||||||
mbedtls_pk_sign(). Found by Jean-Philippe Aumasson.
|
mbedtls_pk_sign(). Found by Jean-Philippe Aumasson.
|
||||||
* Fixed potential livelock during the parsing of a CRL in PEM format in
|
* Fixed potential livelock during the parsing of a CRL in PEM format in
|
||||||
@ -1266,7 +1266,7 @@ Semi-API changes (technically public, morally private)
|
|||||||
* Changed pk_info_t into an opaque structure.
|
* Changed pk_info_t into an opaque structure.
|
||||||
* Changed cipher_base_t into an opaque structure.
|
* Changed cipher_base_t into an opaque structure.
|
||||||
* Removed sig_oid2 and rename sig_oid1 to sig_oid in x509_crt and x509_crl.
|
* Removed sig_oid2 and rename sig_oid1 to sig_oid in x509_crt and x509_crl.
|
||||||
* x509_crt.key_usage changed from uint8_t to unsigned int.
|
* x509_crt.key_usage changed from uint8_t to uint32_t.
|
||||||
* Removed r and s from ecdsa_context
|
* Removed r and s from ecdsa_context
|
||||||
* Removed mode from des_context and des3_context
|
* Removed mode from des_context and des3_context
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ int mbedtls_internal_sha256_process( mbedtls_sha256_context *ctx,
|
|||||||
{
|
{
|
||||||
uint32_t temp1, temp2, W[64];
|
uint32_t temp1, temp2, W[64];
|
||||||
uint32_t A[8];
|
uint32_t A[8];
|
||||||
unsigned int i;
|
uint32_t i;
|
||||||
|
|
||||||
for( i = 0; i < 8; i++ )
|
for( i = 0; i < 8; i++ )
|
||||||
A[i] = ctx->state[i];
|
A[i] = ctx->state[i];
|
||||||
|
@ -31,7 +31,7 @@ static struct mem_pool Memory_Pool = {
|
|||||||
.contiguity_bitmap = Malloc_Heap_Contiguity_Bitmap
|
.contiguity_bitmap = Malloc_Heap_Contiguity_Bitmap
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *allocate_mem(struct mem_pool *pool, unsigned int num_bytes)
|
static void *allocate_mem(struct mem_pool *pool, uint32_t num_bytes)
|
||||||
{
|
{
|
||||||
|
|
||||||
void *memory = NULL;
|
void *memory = NULL;
|
||||||
@ -213,7 +213,7 @@ static void deallocate_mem(struct mem_pool *pool, const void *ptr)
|
|||||||
* The return address will be PAGE_SIZE aligned if 'num_bytes' is greater
|
* The return address will be PAGE_SIZE aligned if 'num_bytes' is greater
|
||||||
* than PAGE_SIZE.
|
* than PAGE_SIZE.
|
||||||
*/
|
*/
|
||||||
void *malloc(unsigned int num_bytes)
|
void *malloc(uint32_t num_bytes)
|
||||||
{
|
{
|
||||||
void *memory = NULL;
|
void *memory = NULL;
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ void *malloc(unsigned int num_bytes)
|
|||||||
return memory;
|
return memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *calloc(unsigned int num_elements, unsigned int element_size)
|
void *calloc(uint32_t num_elements, uint32_t element_size)
|
||||||
{
|
{
|
||||||
void *memory = malloc(num_elements * element_size);
|
void *memory = malloc(num_elements * element_size);
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ void *memset(void *base, uint8_t v, size_t n)
|
|||||||
asm volatile("cld ; rep ; stosq ; movl %3,%%ecx ; rep ; stosb"
|
asm volatile("cld ; rep ; stosq ; movl %3,%%ecx ; rep ; stosb"
|
||||||
: "+c"(n_q), "+D"(dest_p)
|
: "+c"(n_q), "+D"(dest_p)
|
||||||
: "a" (v * 0x0101010101010101U),
|
: "a" (v * 0x0101010101010101U),
|
||||||
"r"((unsigned int)count & 7U));
|
"r"((uint32_t)count & 7U));
|
||||||
ret = (void *)dest_p;
|
ret = (void *)dest_p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user