Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into usb-bochs
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed May 26, 2024
2 parents 79385a7 + e61c620 commit 7078e90
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/chipset/ali1543.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ ali1533_write(int func, int addr, uint8_t val, void *priv)
case 0x74: /* USB IRQ Routing - we cheat and use MIRQ4 */
dev->pci_conf[addr] = val & 0xdf;
/* TODO: MIRQ level/edge control - if bit 4 = 1, it's level */
pci_set_mirq_level(PCI_MIRQ4, !(val & 0x10));
pci_set_mirq_routing(PCI_MIRQ4, ali1533_irq_routing[val & 0x0f]);
break;

Expand Down
8 changes: 4 additions & 4 deletions src/cpu/x86_ops_mov_ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ opMOV_r_CRx_a32(uint32_t fetchdat)
static int
opMOV_r_DRx_a16(uint32_t fetchdat)
{
if (((CPL > 0) || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
if ((CPL > 0) && (cr0 & 1)) {
x86gpf(NULL, 0);
return 1;
}
Expand Down Expand Up @@ -126,7 +126,7 @@ opMOV_r_DRx_a16(uint32_t fetchdat)
static int
opMOV_r_DRx_a32(uint32_t fetchdat)
{
if (((CPL > 0) || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
if ((CPL > 0) && (cr0 & 1)) {
x86gpf(NULL, 0);
return 1;
}
Expand Down Expand Up @@ -286,7 +286,7 @@ opMOV_CRx_r_a32(uint32_t fetchdat)
static int
opMOV_DRx_r_a16(uint32_t fetchdat)
{
if (((CPL > 0) || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
if ((CPL > 0) && (cr0 & 1)) {
x86gpf(NULL, 0);
return 1;
}
Expand Down Expand Up @@ -334,7 +334,7 @@ opMOV_DRx_r_a16(uint32_t fetchdat)
static int
opMOV_DRx_r_a32(uint32_t fetchdat)
{
if (((CPL > 0) || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
if ((CPL > 0) && (cr0 & 1)) {
x86gpf(NULL, 0);
return 1;
}
Expand Down
8 changes: 4 additions & 4 deletions src/cpu/x86_ops_mov_ctrl_2386.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ opMOV_r_CRx_a32(uint32_t fetchdat)
static int
opMOV_r_DRx_a16(uint32_t fetchdat)
{
if (((CPL > 0) || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
if ((CPL > 0) && (cr0 & 1)) {
x86gpf(NULL, 0);
return 1;
}
Expand Down Expand Up @@ -124,7 +124,7 @@ opMOV_r_DRx_a16(uint32_t fetchdat)
static int
opMOV_r_DRx_a32(uint32_t fetchdat)
{
if (((CPL > 0) || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
if ((CPL > 0) && (cr0 & 1)) {
x86gpf(NULL, 0);
return 1;
}
Expand Down Expand Up @@ -282,7 +282,7 @@ opMOV_CRx_r_a32(uint32_t fetchdat)
static int
opMOV_DRx_r_a16(uint32_t fetchdat)
{
if (((CPL > 0) || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
if ((CPL > 0) && (cr0 & 1)) {
x86gpf(NULL, 0);
return 1;
}
Expand Down Expand Up @@ -325,7 +325,7 @@ opMOV_DRx_r_a16(uint32_t fetchdat)
static int
opMOV_DRx_r_a32(uint32_t fetchdat)
{
if (((CPL > 0) || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
if ((CPL > 0) && (cr0 & 1)) {
x86gpf(NULL, 0);
return 1;
}
Expand Down

0 comments on commit 7078e90

Please sign in to comment.