X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/36ce375d87e8dd0fdee14de4fbc35c1aef56d7e9..172a5ba7dad6e9c7e38e4e5aa2607de3728f0ebf:/ich2/smram-ich2.c diff --git a/ich2/smram-ich2.c b/ich2/smram-ich2.c index d274c85..edf8ad5 100644 --- a/ich2/smram-ich2.c +++ b/ich2/smram-ich2.c @@ -127,3 +127,25 @@ int smram_aseg_set_state (int open) { return 0; } + +int smram_tseg_set_state (int open) { + unsigned char smramc; + + if (smram_locked()) + return -1; + + smramc = pci_read8(0, 0, 0, SMRAMC); + + switch (open) + { + case SMRAM_TSEG_OPEN: + smramc = (smramc & 0x8F) | 0x00; + break; + default: + return -1; + } + + pci_write8(0, 0, 0, SMRAMC, smramc); + + return 0; +}