Add backend_adjust_offset to avoid the windows overlap
In mihawk, the windows overlap will cause the cache coherence.
Hostboot writes the SPD data to BMC through a window and read it
back with another window. It causes the data missed and DIMM lost.
Hostboot log
23.80714|<<DBG-956|SPD::getMemType() - MemType: 0xff, Error: NoHUID: 0x30008.
BMC log: The overlaped windows
Window @ 0x756e0000 for size 0x00046000 maps flash offset 0x000e7000
Window @ 0x757e0000 for size 0x00048000 maps flash offset 0x000e5000
Tested: 1. In mihawk, it can fix the SPD cache coherence issue
2. Add unit test to verify VPNOR offset alignment
Change-Id: I92670ade4e2a91b5c49a0acabfc0456f90d49b93
Signed-off-by: Alvin Wang <alvinwang@msn.com>
[AJ: Remove some MSG_INFO() spam, fix whitespace issues]
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/vpnor/test/Makefile.am.include b/vpnor/test/Makefile.am.include
index 3e2edaa..71a1517 100644
--- a/vpnor/test/Makefile.am.include
+++ b/vpnor/test/Makefile.am.include
@@ -16,6 +16,14 @@
$(PHOSPHOR_LOGGING_LIBS) \
$(PHOSPHOR_DBUS_INTERFACES_LIBS)
+
+vpnor_test_create_aligned_window_SOURCES = \
+ $(TEST_MOCK_VPNOR_SRCS) \
+ $(TEST_MBOX_VPNOR_INTEG_SRCS) \
+ %reldir%/create_aligned_window.cpp
+vpnor_test_create_aligned_window_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
+vpnor_test_create_aligned_window_LDADD = $(VPNOR_LDADD)
+
vpnor_test_create_pnor_partition_table_SOURCES = \
$(TEST_MOCK_VPNOR_SRCS) \
$(TEST_MBOX_VPNOR_INTEG_SRCS) \
@@ -227,6 +235,7 @@
vpnor_test_force_readonly_toc_LDADD = $(VPNOR_LDADD)
check_PROGRAMS += \
+ %reldir%/create_aligned_window \
%reldir%/create_pnor_partition_table \
%reldir%/create_read_window_partition_exists \
%reldir%/write_prsv \
@@ -260,3 +269,5 @@
XFAIL_TESTS += \
%reldir%/write_toc
+
+