|
From: Hal F. <hal...@gm...> - 2008-04-27 03:34:06
|
Hi Jon - I have been working on something similar as a personal experiment. I have successfully launched a measured environment from a Linux device driver. It took a lot of trial and error to make it work. On my machine, an HP dc7800, the LT.ERRORCODE register is not readable after a TXT failure (the machine hangs and has to be power cycled) so that made it somewhat more difficult. Some advice I can suggest. I changed the BIOS to use only one CPU, and then booted the single-CPU version of Linux. I don't know if downing the CPUs from within Linux would accomplish the same thing, I haven't tried that yet. (I am still working on returning from the measured state back into Linux, which almost/sometimes works.) You might consider doing this to remove one of the variables. To make sure I recognized when I finally succeeded, I had my MLE start with a jump to itself, an infinite loop. This was distinguishable from the usual halt state because the display stayed on, and made sure that I didn't have a successful launch which then failed due to something in the MLE. As far as making it work, in the end it came down to careful study of the TXT manual and attempting to verify that I had everything set up correctly, especially the MTRRs and the page tables. I have a smaller memory so my sinit is at 3e500000, size 5f00. Here is how my MTRRs are set up: MTRRCAP: 0xd08 MTRR_DEF_TYPE: 0x400 Variable MTRR Base 0: 0x3e500006, Mask: 0xfffffc800 Variable MTRR Base 1: 0x3e504006, Mask: 0xfffffe800 Remaining variable MTRRs are 0 My MLE on this run was at 0x20e00000 physical address. I put the MLE page table at the beginning of this area: PDPTE[0] = 0x20e01001 PDE[0] = 09x20e02003 PTE[0] = 0x20e03003 PTE[1] = 0x20e04003 PTE[2] = 0x20e05003 I loaded the MLE code at 0x20e03000 and put the MLE header at the beginning. MLEPageTableBase was 0x20e00000. PMRLowBase is the MLE address rounded down to a 2MB boundary; PMRLowSize is 2 MB. MLEHeaderBase is 0 (the "virtual" address of the MLE header using the MLE page tables). Hopefully some of this might give you some ideas of things to try - Hal Finney |