mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
ESP: fix spurious guest interrupts during boot
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@665 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -101,6 +101,9 @@ do_command(esp_private_t *esp, sd_private_t *sd, int cmdlen, int replylen)
|
||||
esp->ll->regs[ESP_CMD] = ESP_CMD_SELA | ESP_CMD_DMA;
|
||||
// Wait for DMA to complete. Can this fail?
|
||||
while ((esp->espdma.regs->cond_reg & DMA_HNDL_INTR) == 0) /* no-op */;
|
||||
// Clear interrupts to avoid guests seeing spurious interrupts
|
||||
(void)esp->ll->regs[ESP_INTRPT];
|
||||
|
||||
// Check status
|
||||
status = esp->ll->regs[ESP_STATUS];
|
||||
|
||||
@@ -124,6 +127,10 @@ do_command(esp_private_t *esp, sd_private_t *sd, int cmdlen, int replylen)
|
||||
esp->ll->regs[ESP_CMD] = ESP_CMD_TI | ESP_CMD_DMA;
|
||||
// Wait for DMA to complete
|
||||
while ((esp->espdma.regs->cond_reg & DMA_HNDL_INTR) == 0) /* no-op */;
|
||||
|
||||
// Clear interrupts to avoid guests seeing spurious interrupts
|
||||
(void)esp->ll->regs[ESP_INTRPT];
|
||||
|
||||
// Check status
|
||||
status = esp->ll->regs[ESP_STATUS];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user