2 * GBL_RLS flag manipulator.
3 * NetWatch system management mode administration console
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.
12 #include <reg-82801b.h>
17 static uint16_t _get_PMBASE()
19 static long pmbase = -1;
22 pmbase = pci_read32(ICH2_LPC_BUS, ICH2_LPC_DEV, ICH2_LPC_FN, ICH2_LPC_PCI_PMBASE) & ICH2_PMBASE_MASK;
33 extern unsigned int poke(unsigned long addr, unsigned long * value);
35 int main(int argc, char **argv)
38 packet_t * packet = (packet_t *)memalign(4096, sizeof(packet_t));
40 packet->signature = 0x1BADD00D;
42 strcpy(packet->data, "hello, world!");
50 res = poke(_get_PMBASE() + 0x04, (void *)packet);
51 printf("returned %p\n", res);
55 for (i = 0; i < 96; i++)
56 printf("%s\n", packet->data + i * 41);