]> Joshua Wise's Git repositories - netwatch.git/blob - ich7/smm-open-ich7.c
Add some headers.
[netwatch.git] / ich7 / smm-open-ich7.c
1 /* smm-open-ich7.c
2  * SMRAM open utility for Intel 82865 northbridge
3  * NetWatch system management mode administration console
4  *
5  * Copyright (c) 2008 Jacob Potter and Joshua Wise.  All rights reserved.
6  * This program is free software; you can redistribute and/or modify it under
7  * the terms found in the file LICENSE in the root of this source tree. 
8  *
9  */
10
11 #include "reg-82865.h"
12
13 void main()
14 {
15         unsigned char smramc, esmramc;
16         unsigned int toud;
17         
18         smramc = pci_read8(0, 0, 0, SMRAMC);
19         esmramc = pci_read8(0, 0, 0, ESMRAMC);
20         
21         toud = (pci_read16(0, 0, 0, 0xC4) >> 3) << 19;
22         printf("Usable DRAM: %d bytes\n", toud);
23         
24         printf("SMRAMC: %02x\n", smramc);
25         printf("ESMRAMC: %02x\n", smramc);
26         if (smramc & SMRAMC_LOCK)
27         {
28                 printf("SMRAM is locked, cannot load anything :-(\n");
29                 return;
30         }
31 }
This page took 0.023758 seconds and 4 git commands to generate.