Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99724
b: refs/heads/master
c: 2944e16
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jun 3, 2008
1 parent 0093a63 commit 9964c89
Show file tree
Hide file tree
Showing 8 changed files with 446 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8c27ac9191ab9e6506ae5cbe70d87ac50f8e960
refs/heads/master: 2944e16b25e7fb8b5ee0dd9dc7197a0f9e523cfd
22 changes: 22 additions & 0 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,28 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
return gsi;
}

int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
u32 gsi, int triggering, int polarity)
{
struct mpc_config_intsrc intsrc;
int ioapic;

/* print the entry should happen on mptable identically */
intsrc.mpc_type = MP_INTSRC;
intsrc.mpc_irqtype = mp_INT;
intsrc.mpc_irqflag = (triggering == ACPI_EDGE_SENSITIVE ? 4 : 0x0c) |
(polarity == ACPI_ACTIVE_HIGH ? 1 : 3);
intsrc.mpc_srcbus = number;
intsrc.mpc_srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3);
ioapic = mp_find_ioapic(gsi);
intsrc.mpc_dstapic = mp_ioapic_routing[ioapic].apic_id;
intsrc.mpc_dstirq = gsi - mp_ioapic_routing[ioapic].gsi_base;

MP_intsrc_info(&intsrc);

return 0;
}

/*
* Parse IOAPIC related entries in MADT
* returns 0 on success, < 0 on error
Expand Down
25 changes: 25 additions & 0 deletions trunk/arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,3 +739,28 @@ u64 __init find_e820_area_size(u64 start, u64 *sizep, u64 align)
return -1UL;

}

/*
* pre allocated 4k and reserved it in e820
*/
u64 __init early_reserve_e820(u64 startt, u64 sizet, u64 align)
{
u64 size = 0;
u64 addr;
u64 start;

start = startt;
while (size < sizet)
start = find_e820_area_size(start, &size, align);

if (size < sizet)
return 0;

addr = round_down(start + size - sizet, align);
update_memory_range(addr, sizet, E820_RAM, E820_RESERVED);
printk(KERN_INFO "update e820 for early_reserve_e820\n");
update_e820();

return addr;
}

Loading

0 comments on commit 9964c89

Please sign in to comment.