Chameleon

Chameleon Commit Details

Date:2012-10-03 12:40:54 (11 years 6 months ago)
Author:armel cadet-petit
Commit:2069
Parents: 2068
Message:updated acpicodec, fixed some compilations bugs
Changes:
M/trunk/i386/Cconfig
M/trunk/i386/modules/AcpiCodec/acpi_codec.c
M/trunk/Make.rules
M/trunk/i386/config/Makefile

File differences

trunk/i386/config/Makefile
1515
1616
1717
18
19
20
18
19
20
2121
2222
2323
......
3434
3535
3636
37
37
3838
39
39
4040
4141
4242
DIR = util
include ${SRCROOT}/Make.rules
OBJS = cconfig.o32 cconfig.o64 zconf.tab.o32 zconf.tab.o64 \
yesno.o32 yesno.o64 textbox.o32 textbox.o64 menubox.o32 \
menubox.o64 checklist.o32 checklist.o64 inputbox.o32 inputbox.o64
OBJS = cconfig.o32_nodep cconfig.o64_nodep zconf.tab.o32_nodep zconf.tab.o64_nodep \
yesno.o32_nodep yesno.o64_nodep textbox.o32_nodep textbox.o64_nodep menubox.o32_nodep \
menubox.o64_nodep checklist.o32_nodep checklist.o64_nodep inputbox.o32_nodep inputbox.o64_nodep
OBJS := $(addprefix $(OBJROOT)/, $(OBJS))
$(SYMPROG): $(OBJS)
@echo "\t[LD32] $(@F)_32"
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $(SYMROOT)/$(@F)_32 $(OBJROOT)/*.o32
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $(SYMROOT)/$(@F)_32 $(OBJROOT)/*.o32_nodep
@echo "\t[LD64] $(@F)_64"
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $(SYMROOT)/$(@F)_64 $(OBJROOT)/*.o64
@$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $(SYMROOT)/$(@F)_64 $(OBJROOT)/*.o64_nodep
@echo "\t[LIPO] $(@F)"
@lipo -create -arch i386 $(SYMROOT)/$(@F)_32 -arch x86_64 $(SYMROOT)/$(@F)_64 -output $(SYMROOT)/$(@F)
@$(RM) $(SYMROOT)/$(@F)_32 $(SYMROOT)/$(@F)_64
trunk/i386/Cconfig
88
99
1010
11
12
13
14
15
16
17
18
19
1120
1221
1322
---help---
Specify the level to compile chameleon with.
config USE_GCC
bool "Use GCC"
default y
help
Say Y here if you want to compile the project with gcc (if available).
Set this to N, can be usefull to debug the project with the clang-static-analizer,
or simply to use the default compiler.
When in doubt, say "Y".
source "i386/md/Cconfig"
source "i386/util/Cconfig"
trunk/i386/modules/AcpiCodec/acpi_codec.c
50885088
50895089
50905090
5091
5091
5092
5093
5094
5095
5096
5097
50925098
5099
5100
5101
5102
5103
5104
5105
50935106
50945107
5095
5096
5108
5109
5110
50975111
50985112
5099
5100
5101
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
51025127
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5128
5129
5130
5131
5132
51305133
51315134
51325135
}
}
if ((rsdp_mod != (void *)0ul) && (rsdp_mod->Length >= ACPI_RSDP_REV0_SIZE) )
if (rsdp_mod == (void *)0ul)
{
printf("Error: rsdp_mod == null \n");
return EFI_ABORTED;
}
if (!(rsdp_mod->Length >= ACPI_RSDP_REV0_SIZE))
{
printf("Error: rsdp_mod size is incorrect \n");
return EFI_ABORTED;
}
do {
if ((rsdp_mod->Revision == 0) || (gen_xsdt == true))
{
process_rsdt(rsdp_mod, gen_xsdt, new_table_list);
goto out;
if (process_rsdt(rsdp_mod, gen_xsdt, new_table_list))
break;
printf("Error : ACPI RSD PTR Revision 1 is incorrect, \n");
}
}
else
{
if ((GetChecksum(rsdp_mod, sizeof(ACPI_TABLE_RSDP)) == 0) &&
(Revision == 2) &&
(rsdplength == sizeof(ACPI_TABLE_RSDP)))
{
if (process_xsdt(rsdp_mod, new_table_list))
break;
printf("Error : ACPI RSD PTR Revision 2 is incorrect \n");
}
Revision = 0; // fallback to Revision 0
if (process_rsdt(rsdp_mod, false, new_table_list))
break;
printf("Error: Incorect ACPI RSD PTR or not found \n");
return EFI_UNSUPPORTED;
}
if ((GetChecksum(rsdp_mod, sizeof(ACPI_TABLE_RSDP)) == 0) &&
(Revision == 2) &&
(rsdplength == sizeof(ACPI_TABLE_RSDP)))
{
process_xsdt(rsdp_mod, new_table_list);
}
else
{
printf("Warning : ACPI RSD PTR Revision 2 is incorrect, \n");
printf(" trying to fallback to Revision 1\n");
if ((rsdp_mod != (void *)0ul) && (rsdp_mod->Length >= ACPI_RSDP_REV0_SIZE) )
{
process_rsdt(rsdp_mod, false, new_table_list);
}
else
{
printf("Error: Incorect ACPI RSD PTR or not found \n");
return EFI_UNSUPPORTED;
}
}
out:
return EFI_ABORTED;
} while (0);
// Correct the checksum of RSDP
DBG("RSDP: Original checksum %d\n", rsdp_mod->Checksum);
trunk/Make.rules
1010
1111
1212
13
1314
1415
16
1517
1618
1719
endif
AS = as
LD = ld
ifeq ($(USE_GCC),y)
CC = gcc
CPP = g++
endif
PAX = /bin/pax
NASM = $(shell which nasm) -p $(SRCROOT)/autoconf.inc

Archive Download the corresponding diff file

Revision: 2069