Implement flashing from scratch rom

This commit is contained in:
Jeremy Soller
2019-11-20 15:08:17 -07:00
parent 68ed5913dd
commit 97db2bd339
8 changed files with 120 additions and 46 deletions

View File

@@ -1,5 +1,6 @@
#include <board/acpi.h>
#include <board/pmc.h>
#include <board/scratch.h>
#include <common/debug.h>
void pmc_init(void) {
@@ -48,6 +49,12 @@ void pmc_event(struct Pmc * pmc) {
// TODO: queue is always empty
pmc_write(pmc, 0, PMC_TIMEOUT);
break;
case 0xDC:
DEBUG(" scratch rom\n");
pmc_write(pmc, 0x33, PMC_TIMEOUT);
scratch_trampoline();
break;
}
} else {
DEBUG("pmc data: %02X\n", data);