x86_64: calculate CMOS memory values from mem map
x86_64: calculate CMOS memory values from mem map

The existing mem_below_4g/mem_above_4g calculations did not match the
actual layout used when populating guest memory.  Rather than
duplicating the logic in setup_io_bus to calculate the values reported
in CMOS, just reuse the arch_memory_regions function and count the bytes
in the regions below and above the 4G boundary.

BUG=b:168740534
BUG=b:168628037
TEST=Verify u-boot reports 4 GiB with crosvm --mem=4096

Change-Id: I32a70f19848595eaefd2e31c9f31a260d6ce4453
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2422129
Reviewed-by: Dylan Reid <c791bfe44996c1eed9c7149a0c5f12a86d58eb85@chromium.org>
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Commit-Queue: Daniel Verkamp <72bc170b46ec491f7bdd4359a1c0bfed274de40c@chromium.org>

google/crosvm,google/crosvm,google/crosvm,google/crosvm