
From: Simon Glass <sjg@chromium.org> The address chosen for testing this feature is 1MB which is part of the sandbox RAM. When devices access this, e.g. with map_sysmem(), the memory is mapped to a PCI device. Any changes then apply to that device and are not written to memory. Reads also come from the device. It is not safe to use RAM space in this way. A symptom that something is wrong is the log message: map_physmem: Warning: partial map at 100000, wanted 4, got 2000 Move the memory out of the way and document it. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 21ebbafde8d ("test: dm: Add a test for PCI Enhanced Allocation") --- arch/sandbox/include/asm/test.h | 8 ++++---- doc/arch/sandbox/sandbox.rst | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index 0e8d19ce232..4df39fac1da 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -38,10 +38,10 @@ struct unit_test_state; #define SANDBOX_CLK_RATE 32768 /* Macros used to test PCI EA capability structure */ -#define PCI_CAP_EA_BASE_LO0 0x00100000 -#define PCI_CAP_EA_BASE_LO1 0x00110000 -#define PCI_CAP_EA_BASE_LO2 0x00120000 -#define PCI_CAP_EA_BASE_LO4 0x00140000 +#define PCI_CAP_EA_BASE_LO0 0x20100000 +#define PCI_CAP_EA_BASE_LO1 0x20110000 +#define PCI_CAP_EA_BASE_LO2 0x20120000 +#define PCI_CAP_EA_BASE_LO4 0x20140000 #define PCI_CAP_EA_BASE_HI2 0x00020000ULL #define PCI_CAP_EA_BASE_HI4 0x00040000ULL #define PCI_CAP_EA_SIZE_LO 0x0000ffff diff --git a/doc/arch/sandbox/sandbox.rst b/doc/arch/sandbox/sandbox.rst index 3bde6bdbafc..89255cb14dd 100644 --- a/doc/arch/sandbox/sandbox.rst +++ b/doc/arch/sandbox/sandbox.rst @@ -785,6 +785,7 @@ Addr Config Usage 200000 CONFIG_TRACE_EARLY_ADDR Early trace buffer (if enabled). Also used 400000 CONFIG_TEXT_BASE Load buffer for U-Boot (sandbox_spl only) 10000000 PCI address space (see test.dts) +20000000 PCI EA space (see PCI_CAP_EA_BASE_LO0) ff000000 Memory-mapping tags start here ======== ======================== =============================== -- 2.43.0