I am trying to unlock PAM (Programmable Attribute Map) on an Intel i5 (HM55 chipset), so I can change the Video BIOS a bit, but I cannot do this. Programmers Guide says:
This register controls the read, write, and shadow copy attributes of the BIOS range from C_0000h to C_7FFFh. Uncore allows you to program memory attributes on 13 segments of the old memory of various sizes in the address range from 768 KB to 1 MB. Seven Programmable Attribute Map (PAM) registers are used to support these functions. The cacheability of these areas is controlled using the MTRR register in the kernel.
Two bits are used to indicate memory attributes for each memory segment. These bits apply to host access to PAM areas. These attributes are: • RE - Read Enable. When RE = 1, host read access to the corresponding memory segment is claimed by Uncore and routed to main memory. Conversely, when RE = 0, host read calls are routed to DMI. • WE - Write Enable. When WE = 1, records on host records in the corresponding memory segment are approved by Uncore and directed to the main memory. Conversely, when WE = 0, host read requests are routed to DMI.
outl(0xcf8, 0x80000080); printf("Old pam1: %x pam2: %x\n",inb(0xcfd),inb(0xcfe)); outl(0xcf8, 0x80000080); outb(0xcfd, 0x33); outb(0xcfe, 0x33); printf("New pam1: %x pam2: %x\n",inb(0xcfd),inb(0xcfe));
I am testing this from real mode (DOS), so this should be allowed to be done. An example like this is shown in 915 solutions:
int unlock_bios_845g_865g() { // set permissions to read and write so I can write into shadowed VideoBIOS OUTL(0x80000090, 0xcf8); oldpam1 = inb(0xcfd); oldpam2 = inb(0xcfe); OUTL(0x80000090, 0xcf8); OUTB(0x33, 0xcfd); OUTB(0x33, 0xcfe); return 1; }
but for my processor / chipset on (second generation Intel® Core ™ mobile processor family and Celeron® mobile processor family):
B / D / F / Type: Address Offset: Reset Value: Access: Size: BIOS Optimum default value 0/0/0 / PCI 81h 00h RW 8 bit 0h
so I use 81h as an offset.
Please inform I.