Current WIP code.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#include "86box.h"
|
||||
#include "device.h"
|
||||
#include "mem.h"
|
||||
#include "machine/machine.h"
|
||||
#include "machine.h"
|
||||
#include "timer.h"
|
||||
#include "nvr.h"
|
||||
#include "plat.h"
|
||||
@@ -90,6 +90,11 @@ flash_read(uint32_t addr, void *p)
|
||||
addr &= biosmask;
|
||||
|
||||
switch (dev->command) {
|
||||
case 0x00:
|
||||
case 0x93:
|
||||
ret = 0xff;
|
||||
break;
|
||||
|
||||
case CMD_READ_ARRAY:
|
||||
default:
|
||||
ret = dev->array[addr];
|
||||
@@ -129,6 +134,11 @@ flash_readw(uint32_t addr, void *p)
|
||||
ret = *q;
|
||||
|
||||
if (dev->flags & FLAG_WORD) switch (dev->command) {
|
||||
case 0x00:
|
||||
case 0x93:
|
||||
ret = 0xffff;
|
||||
break;
|
||||
|
||||
case CMD_READ_ARRAY:
|
||||
default:
|
||||
break;
|
||||
@@ -314,6 +324,16 @@ intel_flash_add_mappings(flash_t *dev)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
intel_flash_reset(void *priv)
|
||||
{
|
||||
flash_t *dev = (flash_t *) priv;
|
||||
|
||||
dev->command = CMD_READ_ARRAY;
|
||||
dev->status = 0;
|
||||
}
|
||||
|
||||
|
||||
static void *
|
||||
intel_flash_init(const device_t *info)
|
||||
{
|
||||
@@ -461,11 +481,11 @@ intel_flash_close(void *p)
|
||||
const device_t intel_flash_bxt_ami_device =
|
||||
{
|
||||
"Intel 28F001BXT/28F002BXT Flash BIOS",
|
||||
0,
|
||||
DEVICE_PCI,
|
||||
FLAG_INV_A16,
|
||||
intel_flash_init,
|
||||
intel_flash_close,
|
||||
NULL,
|
||||
intel_flash_reset,
|
||||
NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
@@ -474,11 +494,11 @@ const device_t intel_flash_bxt_ami_device =
|
||||
const device_t intel_flash_bxtw_ami_device =
|
||||
{
|
||||
"Intel 28F100BXT/28F200BXT Flash BIOS",
|
||||
0,
|
||||
DEVICE_PCI,
|
||||
FLAG_INV_A16 | FLAG_WORD,
|
||||
intel_flash_init,
|
||||
intel_flash_close,
|
||||
NULL,
|
||||
intel_flash_reset,
|
||||
NULL, NULL, NULL, NULL
|
||||
};
|
||||
#endif
|
||||
@@ -487,10 +507,10 @@ const device_t intel_flash_bxtw_ami_device =
|
||||
const device_t intel_flash_bxt_device =
|
||||
{
|
||||
"Intel 28F001BXT/28F002BXT Flash BIOS",
|
||||
0, 0,
|
||||
DEVICE_PCI, 0,
|
||||
intel_flash_init,
|
||||
intel_flash_close,
|
||||
NULL,
|
||||
intel_flash_reset,
|
||||
NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
@@ -498,9 +518,9 @@ const device_t intel_flash_bxt_device =
|
||||
const device_t intel_flash_bxb_device =
|
||||
{
|
||||
"Intel 28F001BXB/28F002BXB Flash BIOS",
|
||||
0, FLAG_BXB,
|
||||
DEVICE_PCI, FLAG_BXB,
|
||||
intel_flash_init,
|
||||
intel_flash_close,
|
||||
NULL,
|
||||
intel_flash_reset,
|
||||
NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user