3 unsigned long memsz[] = {
24 unsigned char smramc, drp, drp2;
28 smramc = pci_read8(0, 0, 0, SMRAMC);
29 drp = pci_read8(0, 0, 0, DRP);
30 drp2 = pci_read8(0, 0, 0, DRP2);
32 tom += memsz[drp & 0xF];
33 tom += memsz[drp >> 4];
34 tom += memsz[drp2 & 0xF];
36 printf("Top of DRAM: %08x\n", tom);
38 printf("SMRAMC: %02x\n", smramc);
39 if (smramc & SMRAMC_LOCK)
41 printf("SMRAM is locked, cannot load anything :-(\n");
45 usmm = (smramc >> 4) & 0x3;
46 lsmm = (smramc >> 2) & 0x3;
51 printf("TSEG and HSEG both off\n");
54 printf("TSEG off, HSEG %s\n", lsmm ? "off" : "on");
57 printf("TSEG 512KB (%08x - %08x), HSEG %s\n", tom - 512 * 1024, tom - 1, lsmm ? "off" : "on");
60 printf("TSEG 1MB (%08x - %08x), HSEG %s\n", tom - 1 * 1024 * 1024, tom - 1, lsmm ? "off" : "on");
67 printf("ABSEG disabled\n");
70 printf("ABSEG enabled as system RAM\n");
73 printf("ABSEG enabled for SMM code only\n");
76 printf("ABSEG enabled for both SMM code and data\n");