6 #if ENV_X86 && CONFIG(SSE2)
20 asm volatile (
"sfence" :::
"memory");
30 asm volatile (
"" :::
"memory");
49 unsigned long *
addr,
unsigned long *
value)
54 j = (idx >> 4) & 0x0f;
57 *
value = 0x01010101 << (j & 7);
73 unsigned short int idx;
74 unsigned char failed, failures;
78 for (idx = 0; idx < 0x400; idx += 4) {
88 for (idx = 0; idx < 0x400; idx += 4) {
92 failed = (value2 !=
value);
94 if (failed && !verbose) {
99 if ((
addr & 0x0f) == 0)
106 if ((
addr & 0x0f) == 0xc)
152 unsigned short int idx;
153 unsigned char failed, failures;
155 for (idx = 0; idx < 0x400; idx += 4) {
164 for (idx = 0; idx < 0x400; idx += 4) {
168 failed = (value2 !=
value);
202 die(
"RAM INIT FAILURE!\n");
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
#define printk(level,...)
void __noreturn die(const char *fmt,...)
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
void ram_check(uintptr_t start)
static void phys_memory_barrier(void)
int ram_check_nodie(uintptr_t start)
static void test_pattern(unsigned short int idx, unsigned long *addr, unsigned long *value)
Rotate ones test pattern that access every bit on a 128bit wide memory bus.
static u32 read_phys(uintptr_t addr)
static void write_phys(uintptr_t addr, u32 value)
static int ram_bitset_nodie(uintptr_t start)
Simple write-read-verify memory test.
int ram_check_noprint_nodie(uintptr_t start)
void quick_ram_check_or_die(uintptr_t dst)