acrn-hypervisor/hypervisor/include
Shiqing Gao cb0009f4d2 hv: cpu: fix 'Pointer arithmetic is not on array'
Use the array for lapic_id directly to avoid the unnecessary pointer
arithmetic.

With current implementation,
  lapic_id_base is always a byte array with CPU_PAGE_SIZE elements

What this patch does:
 - replace 'uint8_t *lapic_id_base' with 'uint8_t
   lapic_id_array[CPU_PAGE_SIZE]' to make the boundary explicit
 - add a range check to ensure that there is no overflow

 v2 -> v3:
 * update the array size of lapic_id_array per discussion with Fengwei

 v1 -> v2:
 * remove the unnecessary range check in parse_madt in cpu.c

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-13 13:08:05 +08:00
..
arch/x86 hv: cpu: fix 'Pointer arithmetic is not on array' 2018-07-13 13:08:05 +08:00
common hv:fix MISRA-C return value violation 2018-07-13 13:04:39 +08:00
debug hv:fix MISRA-C return value violation 2018-07-13 13:04:39 +08:00
lib HV: Fix missing brackets for MISRA C Violations 2018-07-13 09:09:12 +08:00
public HV: trusty: revise trusty_boot_param structure 2018-07-12 17:30:26 +08:00
hv_debug.h license: Replace license text with SPDX tag 2018-06-01 10:43:06 +08:00
hv_lib.h license: Replace license text with SPDX tag 2018-06-01 10:43:06 +08:00
hypervisor.h hv: refine the address used in sbl multiboot code 2018-06-22 16:12:24 +08:00