summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2009-02-12 21:15:34 +0000
committerMyles Watson <mylesgw@gmail.com>2009-02-12 21:15:34 +0000
commit9d6d811dd1f98495d96920baec466b4ad58b529a (patch)
tree000b30e5015f2fa382a00a9e18948ac95b97e354
parent52e3eecb8a39b6dd04c01be3b1572823840a9856 (diff)
downloadcoreboot-9d6d811dd1f98495d96920baec466b4ad58b529a.tar.gz
coreboot-9d6d811dd1f98495d96920baec466b4ad58b529a.tar.bz2
coreboot-9d6d811dd1f98495d96920baec466b4ad58b529a.zip
This patch converts __FUNCTION__ to __func__, since __func__ is standard.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: svn://coreboot.org/repository/coreboot-v3@1131 f3766cd6-281f-0410-b1cd-43a5c92072e9
-rw-r--r--arch/x86/mtrr.c2
-rw-r--r--arch/x86/pirq_routing.c8
-rw-r--r--device/device.c14
-rw-r--r--device/device_util.c2
-rw-r--r--device/pci_device.c2
-rw-r--r--lib/elfboot.c2
-rw-r--r--northbridge/amd/geodelx/geodelx.c8
-rw-r--r--northbridge/amd/geodelx/geodelxinit.c20
-rw-r--r--northbridge/via/cn700/apic.c4
-rw-r--r--southbridge/amd/cs5536/cs5536.c10
-rw-r--r--southbridge/amd/cs5536/irq_tables.c2
-rw-r--r--util/lar/lib.c8
-rw-r--r--util/lar/stream.c2
-rw-r--r--util/x86emu/yabel/debug.c2
-rw-r--r--util/x86emu/yabel/device.c8
-rw-r--r--util/x86emu/yabel/interrupt.c48
-rw-r--r--util/x86emu/yabel/io.c60
-rw-r--r--util/x86emu/yabel/mem.c72
-rw-r--r--util/x86emu/yabel/pmm.c52
-rw-r--r--util/x86emu/yabel/vbe.c46
20 files changed, 186 insertions, 186 deletions
diff --git a/arch/x86/mtrr.c b/arch/x86/mtrr.c
index 0e8bf08c7664..161e77c1389c 100644
--- a/arch/x86/mtrr.c
+++ b/arch/x86/mtrr.c
@@ -411,7 +411,7 @@ void x86_setup_var_mtrrs(unsigned address_bits)
}
printk(BIOS_SPEW, "call enable_var_mtrr()\n");
enable_var_mtrr();
- printk(BIOS_SPEW, "Leave %s\n", __FUNCTION__);
+ printk(BIOS_SPEW, "Leave %s\n", __func__);
post_code(0x6A);
}
diff --git a/arch/x86/pirq_routing.c b/arch/x86/pirq_routing.c
index c60dc548f7c1..8bfcd75644de 100644
--- a/arch/x86/pirq_routing.c
+++ b/arch/x86/pirq_routing.c
@@ -40,7 +40,7 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
sum += addr[i];
printk(BIOS_DEBUG, "%s() - irq_routing_table located at: 0x%p\n",
- __FUNCTION__, addr);
+ __func__, addr);
sum = rt->checksum - sum;
@@ -48,7 +48,7 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
if (sum != rt->checksum) {
printk(BIOS_WARNING, "%s:%6d:%s() - "
"checksum is: 0x%02x but should be: 0x%02x\n",
- __FILE__, __LINE__, __FUNCTION__, rt->checksum, sum);
+ __FILE__, __LINE__, __func__, rt->checksum, sum);
rt->checksum = sum;
}
@@ -56,7 +56,7 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
rt->size % 16 ) {
printk(BIOS_WARNING, "%s:%6d:%s() - "
"Interrupt Routing Table not valid\n",
- __FILE__, __LINE__, __FUNCTION__);
+ __FILE__, __LINE__, __func__);
return;
}
@@ -67,7 +67,7 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
if (sum) {
printk(BIOS_WARNING, "%s:%6d:%s() - "
"checksum error in irq routing table\n",
- __FILE__, __LINE__, __FUNCTION__);
+ __FILE__, __LINE__, __func__);
}
printk(BIOS_INFO, "done.\n");
diff --git a/device/device.c b/device/device.c
index 41b548674e42..cbbf8eaa4a24 100644
--- a/device/device.c
+++ b/device/device.c
@@ -72,7 +72,7 @@ static struct device *new_device(void)
{
devcnt++;
- printk(BIOS_SPEW, "%s: devcnt %d\n", __FUNCTION__, devcnt);
+ printk(BIOS_SPEW, "%s: devcnt %d\n", __func__, devcnt);
/* Should we really die here? */
if (devcnt >= MAX_DEVICES) {
die("Too many devices. Increase MAX_DEVICES\n");
@@ -946,13 +946,13 @@ void dev_phase5(struct device *dev)
}
if (!dev->ops) {
printk(BIOS_WARNING, "%s: %s(%s) missing ops\n",
- __FUNCTION__, dev->dtsname, dev_path(dev));
+ __func__, dev->dtsname, dev_path(dev));
return;
}
if (!dev->ops->phase5_enable_resources) {
printk(BIOS_WARNING,
"%s: %s(%s) ops are missing phase5_enable_resources\n",
- __FUNCTION__, dev->dtsname, dev_path(dev));
+ __func__, dev->dtsname, dev_path(dev));
return;
}
@@ -1055,19 +1055,19 @@ unsigned int dev_phase3_scan(struct device *busdevice, unsigned int max)
if (!busdevice || !busdevice->enabled ||
!busdevice->ops || !busdevice->ops->phase3_scan) {
printk(BIOS_INFO, "%s: busdevice %s: enabled %d ops %s\n",
- __FUNCTION__, busdevice ? busdevice->dtsname : "NULL",
+ __func__, busdevice ? busdevice->dtsname : "NULL",
busdevice ? busdevice->enabled : 0,
busdevice ? (busdevice->ops?
"NOT NULL" : "NULL") : "N/A");
printk(BIOS_INFO, "%s: can not scan from here, returning %d\n",
- __FUNCTION__, max);
+ __func__, max);
return max;
}
do_phase3 = 1;
while (do_phase3) {
int link;
- printk(BIOS_INFO, "%s: scanning %s(%s)\n", __FUNCTION__,
+ printk(BIOS_INFO, "%s: scanning %s(%s)\n", __func__,
busdevice->dtsname, dev_path(busdevice));
#warning do we call phase3_enable here.
new_max = busdevice->ops->phase3_scan(busdevice, max);
@@ -1084,7 +1084,7 @@ unsigned int dev_phase3_scan(struct device *busdevice, unsigned int max)
}
}
post_code(POST_STAGE2_PHASE3_SCAN_EXIT);
- printk(BIOS_INFO, "%s: returning %d\n", __FUNCTION__, max);
+ printk(BIOS_INFO, "%s: returning %d\n", __func__, max);
return new_max;
}
diff --git a/device/device_util.c b/device/device_util.c
index dc7137dbd4ed..d5cc5fe118b7 100644
--- a/device/device_util.c
+++ b/device/device_util.c
@@ -125,7 +125,7 @@ struct device *dev_find_slot_on_smbus(unsigned int bus, unsigned int addr)
*/
struct device *dev_find_device(struct device_id *devid, struct device *from)
{
- printk(BIOS_SPEW, "%s: find %s\n", __FUNCTION__, dev_id_string(devid));
+ printk(BIOS_SPEW, "%s: find %s\n", __func__, dev_id_string(devid));
if (!from)
from = all_devices;
diff --git a/device/pci_device.c b/device/pci_device.c
index 044ee20b23f3..01f8972912ba 100644
--- a/device/pci_device.c
+++ b/device/pci_device.c
@@ -940,7 +940,7 @@ static struct device *pci_get_dev(struct device **list, unsigned int devfn)
if ((*list)->path.type != DEVICE_PATH_PCI) {
printk(BIOS_NOTICE,
"%s: child %s(%s) not a pci device: it's type %d\n",
- __FUNCTION__, (*list)->dtsname, dev_path(*list),
+ __func__, (*list)->dtsname, dev_path(*list),
(*list)->path.type);
continue;
}
diff --git a/lib/elfboot.c b/lib/elfboot.c
index a2bd7e0798c9..41264b71dbc4 100644
--- a/lib/elfboot.c
+++ b/lib/elfboot.c
@@ -86,7 +86,7 @@ static int load_elf_segments(struct lb_memory *mem,unsigned char *header, int he
ehdr = (Elf_ehdr *)header;
phdr = (Elf_phdr *)(&header[ehdr->e_phoff]);
- printk(BIOS_DEBUG, "%s: header %p #headers %d\n", __FUNCTION__, header, headers);
+ printk(BIOS_DEBUG, "%s: header %p #headers %d\n", __func__, header, headers);
int i;
int size;
for(i = 0; i < headers; i++) {
diff --git a/northbridge/amd/geodelx/geodelx.c b/northbridge/amd/geodelx/geodelx.c
index c546be2888d1..7c0cff67af2b 100644
--- a/northbridge/amd/geodelx/geodelx.c
+++ b/northbridge/amd/geodelx/geodelx.c
@@ -81,7 +81,7 @@ u64 get_systop(struct northbridge_amd_geodelx_pci_config *nb_dm)
*/
static void geodelx_northbridge_init(struct device *dev)
{
- printk(BIOS_SPEW, ">> Entering northbridge.c: %s\n", __FUNCTION__);
+ printk(BIOS_SPEW, ">> Entering northbridge.c: %s\n", __func__);
enable_shadow(dev);
}
@@ -201,7 +201,7 @@ static void geodelx_pci_domain_phase2(struct device *dev)
{
void do_vsmbios(void);
- printk(BIOS_SPEW, ">> Entering northbridge.c: %s\n", __FUNCTION__);
+ printk(BIOS_SPEW, ">> Entering northbridge.c: %s\n", __func__);
/* northbridge_init_early(); */
chipsetinit();
@@ -237,8 +237,8 @@ static void geodelx_mc_phase2(struct device *dev)
*/
static void cpu_bus_init(struct device *dev)
{
- printk(BIOS_SPEW, ">> Entering northbridge.c: %s\n", __FUNCTION__);
- printk(BIOS_SPEW, ">> Exiting northbridge.c: %s\n", __FUNCTION__);
+ printk(BIOS_SPEW, ">> Entering northbridge.c: %s\n", __func__);
+ printk(BIOS_SPEW, ">> Exiting northbridge.c: %s\n", __func__);
}
static void cpu_bus_noop(struct device *dev)
diff --git a/northbridge/amd/geodelx/geodelxinit.c b/northbridge/amd/geodelx/geodelxinit.c
index e875d9fbd4cb..938f6beb7451 100644
--- a/northbridge/amd/geodelx/geodelxinit.c
+++ b/northbridge/amd/geodelx/geodelxinit.c
@@ -66,7 +66,7 @@ static void writeglmsr(const struct gliutable *gl)
msr.hi = gl->hi;
wrmsr(gl->desc_name, msr);
printk(BIOS_SPEW, "%s: MSR 0x%08lx, val 0x%08x:0x%08x\n",
- __FUNCTION__, gl->desc_name, msr.hi, msr.lo);
+ __func__, gl->desc_name, msr.hi, msr.lo);
}
/**
@@ -143,7 +143,7 @@ static void sysmem_init(const struct gliutable *gl)
*/
sizembytes = sizeram();
printk(BIOS_DEBUG, "%s: enable for %dMBytes\n",
- __FUNCTION__, sizembytes);
+ __func__, sizembytes);
sizebytes = sizembytes << 20;
sizebytes -= ((SMM_SIZE * 1024) + 1);
@@ -160,7 +160,7 @@ static void sysmem_init(const struct gliutable *gl)
msr.lo = sizebytes;
wrmsr(gl->desc_name, msr);
- printk(BIOS_DEBUG, "%s: MSR 0x%08lx, val 0x%08x:0x%08x\n", __FUNCTION__,
+ printk(BIOS_DEBUG, "%s: MSR 0x%08lx, val 0x%08x:0x%08x\n", __func__,
gl->desc_name, msr.hi, msr.lo);
}
@@ -177,12 +177,12 @@ static void SMMGL0Init(const struct gliutable *gl)
sizebytes -= (SMM_SIZE * 1024);
- printk(BIOS_DEBUG, "%s: %d bytes\n", __FUNCTION__, sizebytes);
+ printk(BIOS_DEBUG, "%s: %d bytes\n", __func__, sizebytes);
/* Calculate the "two's complement" offset. */
offset = sizebytes - SMM_OFFSET;
offset = (offset >> 12) & 0x000fffff;
- printk(BIOS_DEBUG, "%s: offset is 0x%08x\n", __FUNCTION__, SMM_OFFSET);
+ printk(BIOS_DEBUG, "%s: offset is 0x%08x\n", __func__, SMM_OFFSET);
msr.hi = offset << 8 | gl->hi;
msr.hi |= SMM_OFFSET >> 24;
@@ -191,7 +191,7 @@ static void SMMGL0Init(const struct gliutable *gl)
msr.lo |= ((~(SMM_SIZE * 1024) + 1) >> 12) & 0xfffff;
wrmsr(gl->desc_name, msr);
- printk(BIOS_DEBUG, "%s: MSR 0x%08lx, val 0x%08x:0x%08x\n", __FUNCTION__,
+ printk(BIOS_DEBUG, "%s: MSR 0x%08lx, val 0x%08x:0x%08x\n", __func__,
gl->desc_name, msr.hi, msr.lo);
}
@@ -204,7 +204,7 @@ static void SMMGL1Init(const struct gliutable *gl)
{
struct msr msr;
- printk(BIOS_DEBUG, "%s:\n", __FUNCTION__);
+ printk(BIOS_DEBUG, "%s:\n", __func__);
msr.hi = gl->hi;
/* I don't think this is needed. */
@@ -214,7 +214,7 @@ static void SMMGL1Init(const struct gliutable *gl)
msr.lo |= ((~(SMM_SIZE * 1024) + 1) >> 12) & 0xfffff;
wrmsr(gl->desc_name, msr);
- printk(BIOS_DEBUG, "%s: MSR 0x%08lx, val 0x%08x:0x%08x\n", __FUNCTION__,
+ printk(BIOS_DEBUG, "%s: MSR 0x%08lx, val 0x%08x:0x%08x\n", __func__,
gl->desc_name, msr.hi, msr.lo);
}
@@ -742,7 +742,7 @@ void northbridge_init_early(void)
{
int i;
- printk(BIOS_DEBUG, "Enter %s\n", __FUNCTION__);
+ printk(BIOS_DEBUG, "Enter %s\n", __func__);
for (i = 0; gliutables[i]; i++)
GLIUInit(gliutables[i]);
@@ -760,7 +760,7 @@ void northbridge_init_early(void)
__asm__ __volatile__("FINIT\n"); /* TODO: Create finit() function? */
- printk(BIOS_DEBUG, "Exit %s\n", __FUNCTION__);
+ printk(BIOS_DEBUG, "Exit %s\n", __func__);
}
void geode_pre_payload(void)
diff --git a/northbridge/via/cn700/apic.c b/northbridge/via/cn700/apic.c
index 2ebfaf2b9fba..7fe72d84699e 100644
--- a/northbridge/via/cn700/apic.c
+++ b/northbridge/via/cn700/apic.c
@@ -29,8 +29,8 @@
static void cpu_bus_init(struct device *dev)
{
#warning "cpu_bus_init() empty, what should it do?"
- printk(BIOS_SPEW, ">> Entering northbridge.c: %s\n", __FUNCTION__);
- printk(BIOS_SPEW, ">> Exiting northbridge.c: %s\n", __FUNCTION__);
+ printk(BIOS_SPEW, ">> Entering northbridge.c: %s\n", __func__);
+ printk(BIOS_SPEW, ">> Exiting northbridge.c: %s\n", __func__);
}
static void cpu_bus_noop(struct device *dev)
diff --git a/southbridge/amd/cs5536/cs5536.c b/southbridge/amd/cs5536/cs5536.c
index 5437937f8a83..5e4af9d1d41d 100644
--- a/southbridge/amd/cs5536/cs5536.c
+++ b/southbridge/amd/cs5536/cs5536.c
@@ -561,7 +561,7 @@ void chipsetinit(void)
PCI_DEVICE_ID_AMD_CS5536_ISA, 0);
if (!dev) {
printk(BIOS_ERR, "%s: Could not find the south bridge!\n",
- __FUNCTION__);
+ __func__);
return;
}
sb = (struct southbridge_amd_cs5536_dts_config *)dev->device_configuration;
@@ -663,7 +663,7 @@ static void southbridge_init(struct device *dev)
* unsigned short gpiobase = MDD_GPIO;
*/
- printk(BIOS_ERR, "cs5536: %s\n", __FUNCTION__);
+ printk(BIOS_ERR, "cs5536: %s\n", __func__);
setup_i8259();
lpc_init(sb);
@@ -689,7 +689,7 @@ static void southbridge_init(struct device *dev)
cs5536_setup_power_button(sb);
- printk(BIOS_SPEW, "cs5536: %s() Exit\n", __FUNCTION__);
+ printk(BIOS_SPEW, "cs5536: %s() Exit\n", __func__);
}
/**
@@ -719,10 +719,10 @@ static void cs5536_read_resources(struct device *dev)
*/
static void cs5536_pci_dev_enable_resources(struct device *dev)
{
- printk(BIOS_SPEW, "cs5536: %s()\n", __FUNCTION__);
+ printk(BIOS_SPEW, "cs5536: %s()\n", __func__);
pci_dev_enable_resources(dev);
enable_childrens_resources(dev);
- printk(BIOS_SPEW, "cs5536: %s() Exit\n", __FUNCTION__);
+ printk(BIOS_SPEW, "cs5536: %s() Exit\n", __func__);
}
struct device_operations cs5536_ops = {
diff --git a/southbridge/amd/cs5536/irq_tables.c b/southbridge/amd/cs5536/irq_tables.c
index cb9af1325180..3e127c26e74a 100644
--- a/southbridge/amd/cs5536/irq_tables.c
+++ b/southbridge/amd/cs5536/irq_tables.c
@@ -43,7 +43,7 @@ unsigned long write_pirq_routing_table(unsigned long addr)
/* Set up chipset IRQ steering. */
pciAddr = 0x80000000 | (CHIPSET_DEV_NUM << 11) | 0x5C;
chipset_irq_map = (PIRQD << 12 | PIRQC << 8 | PIRQB << 4 | PIRQA);
- printk(BIOS_DEBUG, "%s(%08X, %04X)\n", __FUNCTION__, pciAddr,
+ printk(BIOS_DEBUG, "%s(%08X, %04X)\n", __func__, pciAddr,
chipset_irq_map);
outl(pciAddr & ~3, 0xCF8);
outl(chipset_irq_map, 0xCFC);
diff --git a/util/lar/lib.c b/util/lar/lib.c
index 228375309945..7bc22d49d947 100644
--- a/util/lar/lib.c
+++ b/util/lar/lib.c
@@ -86,7 +86,7 @@ void do_no_uncompress(char *dst, int dst_len, char *src, int src_len)
else
{
fprintf(stderr, "%s: src_len(%d)!=dst_len(%d)\n",
- __FUNCTION__, src_len, dst_len);
+ __func__, src_len, dst_len);
exit(1);
}
}
@@ -208,7 +208,7 @@ static int handle_directory(const char *name, const char *pathname,
if (len > MAX_PATHLEN) {
fprintf(stderr,
"%s: %s+%s exceeds MAX_PATHLEN.\n",
- __FUNCTION__, name,
+ __func__, name,
namelist[n]->d_name);
return -1;
}
@@ -227,7 +227,7 @@ static int handle_directory(const char *name, const char *pathname,
if (len > MAX_PATHLEN) {
fprintf(stderr,
"%s: %s+%s exceeds MAX_PATHLEN.\n",
- __FUNCTION__, pathname,
+ __func__, pathname,
namelist[n]->d_name);
return -1;
}
@@ -264,7 +264,7 @@ int add_files(const char *filename, const char * pathname,
char *c;
if (verbose())
- printf("%s: %s:%s\n", __FUNCTION__, filename, pathname);
+ printf("%s: %s:%s\n", __func__, filename, pathname);
if (stat(filename, &filestat) == -1) {
fprintf(stderr, "Error getting file attributes of %s\n", filename);
diff --git a/util/lar/stream.c b/util/lar/stream.c
index 06df55c3d144..24edd2f76cd3 100644
--- a/util/lar/stream.c
+++ b/util/lar/stream.c
@@ -126,7 +126,7 @@ int output_elf_segments(struct lar *lar, char *name, char *filebuf,
shdr = (Elf32_Shdr *)&(header[ehdr->e_shoff]);
if (verbose())
- fprintf(stderr, "%s: header %p #headers %d\n", __FUNCTION__, ehdr, headers);
+ fprintf(stderr, "%s: header %p #headers %d\n", __func__, ehdr, headers);
entry = ehdr->e_entry;
/* bss segments are special. They are in the section headers,
diff --git a/util/x86emu/yabel/debug.c b/util/x86emu/yabel/debug.c
index 3dff857f8a25..5d7085febeb8 100644
--- a/util/x86emu/yabel/debug.c
+++ b/util/x86emu/yabel/debug.c
@@ -19,7 +19,7 @@ u32 debug_flags = 0;
void
dump(u8 * addr, u32 len)
{
- printf("\n%s(%p, %x):\n", __FUNCTION__, addr, len);
+ printf("\n%s(%p, %x):\n", __func__, addr, len);
while (len) {
unsigned int tmpCnt = len;
unsigned char x;
diff --git a/util/x86emu/yabel/device.c b/util/x86emu/yabel/device.c
index 21ac7d638c51..602a4dec8792 100644
--- a/util/x86emu/yabel/device.c
+++ b/util/x86emu/yabel/device.c
@@ -73,7 +73,7 @@ biosemu_dev_get_addr_info(void)
taa_index++;
/* legacy ranges if its a VGA card... */
if ((bios_device.dev->class & 0xFF0000) == 0x030000) {
- DEBUG_PRINTF("%s: VGA device found, adding legacy resources... \n", __FUNCTION__);
+ DEBUG_PRINTF("%s: VGA device found, adding legacy resources... \n", __func__);
/* I/O 0x3B0-0x3BB */
translate_address_array[taa_index].info = IORESOURCE_FIXED | IORESOURCE_IO;
translate_address_array[taa_index].bus = bus;
@@ -237,7 +237,7 @@ biosemu_dev_find_vmem_addr(void)
bios_device.vmem_size = ta.size;
DEBUG_PRINTF
("%s: Found prefetchable Virtual Legacy Memory BAR: %llx, size: %llx\n",
- __FUNCTION__, bios_device.vmem_addr,
+ __func__, bios_device.vmem_addr,
bios_device.vmem_size);
} else if (tai_np != -1) {
ta = translate_address_array[tai_np];
@@ -245,7 +245,7 @@ biosemu_dev_find_vmem_addr(void)
bios_device.vmem_size = ta.size;
DEBUG_PRINTF
("%s: Found non-prefetchable Virtual Legacy Memory BAR: %llx, size: %llx",
- __FUNCTION__, bios_device.vmem_addr,
+ __func__, bios_device.vmem_addr,
bios_device.vmem_size);
}
// disable vmem
@@ -388,7 +388,7 @@ biosemu_dev_init(struct device * device)
{
u8 rval = 0;
//init bios_device struct
- DEBUG_PRINTF("%s(%s)\n", __FUNCTION__, device->dtsname);
+ DEBUG_PRINTF("%s(%s)\n", __func__, device->dtsname);
memset(&bios_device, 0, sizeof(bios_device));
#ifndef CONFIG_PCI_OPTION_ROM_RUN_YABEL
diff --git a/util/x86emu/yabel/interrupt.c b/util/x86emu/yabel/interrupt.c
index 4573150c8506..c6e8fccb63b3 100644
--- a/util/x86emu/yabel/interrupt.c
+++ b/util/x86emu/yabel/interrupt.c
@@ -31,7 +31,7 @@ void
setupInt(int intNum)
{
DEBUG_PRINTF_INTR("%s(%x): executing interrupt handler @%08x\n",
- __FUNCTION__, intNum, my_rdl(intNum * 4));
+ __func__, intNum, my_rdl(intNum * 4));
// push current R_FLG... will be popped by IRET
push_word((u16) M.x86.R_FLG);
CLEAR_FLAG(F_IF);
@@ -51,7 +51,7 @@ handleInt10(void)
{
// the data for INT10 is stored in BDA (0000:0400h) offset 49h-66h
// function number in AH
- //DEBUG_PRINTF_CS_IP("%s:\n", __FUNCTION__);
+ //DEBUG_PRINTF_CS_IP("%s:\n", __func__);
//x86emu_dump_xregs();
//if ((M.x86.R_IP == 0x32c2) && (M.x86.R_SI == 0x1ce2)){
//X86EMU_trace_on();
@@ -156,7 +156,7 @@ handleInt10(void)
break;
default:
printf("%s(): unknown function (%x) for int10 handler.\n",
- __FUNCTION__, M.x86.R_AH);
+ __func__, M.x86.R_AH);
DEBUG_PRINTF_INTR("AX=%04x BX=%04x CX=%04x DX=%04x\n",
M.x86.R_AX, M.x86.R_BX, M.x86.R_CX,
M.x86.R_DX);
@@ -220,7 +220,7 @@ translate_keycode(u64 * keycode)
break;
default:
printf("%s(): unknown multibyte keycode: %llx\n",
- __FUNCTION__, *keycode);
+ __func__, *keycode);
break;
}
}
@@ -244,7 +244,7 @@ handleInt16(void)
s8 c;
// function number in AH
DEBUG_PRINTF_INTR("%s(): Keyboard Interrupt: function: %x.\n",
- __FUNCTION__, M.x86.R_AH);
+ __func__, M.x86.R_AH);
DEBUG_PRINTF_INTR("AX=%04x BX=%04x CX=%04x DX=%04x\n", M.x86.R_AX,
M.x86.R_BX, M.x86.R_CX, M.x86.R_DX);
switch (M.x86.R_AH) {
@@ -305,7 +305,7 @@ handleInt16(void)
break;
default:
printf("%s(): unknown function (%x) for int16 handler.\n",
- __FUNCTION__, M.x86.R_AH);
+ __func__, M.x86.R_AH);
DEBUG_PRINTF_INTR("AX=%04x BX=%04x CX=%04x DX=%04x\n",
M.x86.R_AX, M.x86.R_BX, M.x86.R_CX,
M.x86.R_DX);
@@ -337,7 +337,7 @@ handleInt1a(void)
// device index in SI (i.e. if multiple devices with same vendor/device id
// are connected). We currently only support device index 0
DEBUG_PRINTF_INTR("%s(): function: %x: PCI Find Device\n",
- __FUNCTION__, M.x86.R_AX);
+ __func__, M.x86.R_AX);
if ((M.x86.R_CX == bios_device.pci_device_id)
&& (M.x86.R_DX == bios_device.pci_vendor_id)
// device index must be 0
@@ -348,11 +348,11 @@ handleInt1a(void)
M.x86.R_BL = bios_device.devfn;
DEBUG_PRINTF_INTR
("%s(): function %x: PCI Find Device --> 0x%04x\n",
- __FUNCTION__, M.x86.R_AX, M.x86.R_BX);
+ __func__, M.x86.R_AX, M.x86.R_BX);
} else {
DEBUG_PRINTF_INTR
("%s(): function %x: invalid device/vendor/device index! (%04x/%04x/%02x expected: %04x/%04x/0) \n",
- __FUNCTION__, M.x86.R_AX, M.x86.R_CX, M.x86.R_DX,
+ __func__, M.x86.R_AX, M.x86.R_CX, M.x86.R_DX,
M.x86.R_SI, bios_device.pci_device_id,
bios_device.pci_vendor_id);
SET_FLAG(F_CF);
@@ -370,7 +370,7 @@ handleInt1a(void)
// fail accesses to any device but ours...
printf
("%s(): Config read access invalid! bus: %x (%x), devfn: %x (%x), offs: %x\n",
- __FUNCTION__, bus, bios_device.bus, devfn,
+ __func__, bus, bios_device.bus, devfn,
bios_device.devfn, offs);
SET_FLAG(F_CF);
M.x86.R_AH = 0x87; //return code: bad pci register
@@ -390,7 +390,7 @@ handleInt1a(void)
#endif
DEBUG_PRINTF_INTR
("%s(): function %x: PCI Config Read @%02x --> 0x%02x\n",
- __FUNCTION__, M.x86.R_AX, offs,
+ __func__, M.x86.R_AX, offs,
M.x86.R_CL);
break;
case 0xb109:
@@ -405,7 +405,7 @@ handleInt1a(void)
#endif
DEBUG_PRINTF_INTR
("%s(): function %x: PCI Config Read @%02x --> 0x%04x\n",
- __FUNCTION__, M.x86.R_AX, offs,
+ __func__, M.x86.R_AX, offs,
M.x86.R_CX);
break;
case 0xb10a:
@@ -420,7 +420,7 @@ handleInt1a(void)
#endif
DEBUG_PRINTF_INTR
("%s(): function %x: PCI Config Read @%02x --> 0x%08x\n",
- __FUNCTION__, M.x86.R_AX, offs,
+ __func__, M.x86.R_AX, offs,
M.x86.R_ECX);
break;
}
@@ -439,7 +439,7 @@ handleInt1a(void)
// fail accesses to any device but ours...
printf
("%s(): Config read access invalid! bus: %x (%x), devfn: %x (%x), offs: %x\n",
- __FUNCTION__, bus, bios_device.bus, devfn,
+ __func__, bus, bios_device.bus, devfn,
bios_device.devfn, offs);
SET_FLAG(F_CF);
M.x86.R_AH = 0x87; //return code: bad pci register
@@ -456,7 +456,7 @@ handleInt1a(void)
#endif
DEBUG_PRINTF_INTR
("%s(): function %x: PCI Config Write @%02x <-- 0x%02x\n",
- __FUNCTION__, M.x86.R_AX, offs,
+ __func__, M.x86.R_AX, offs,
M.x86.R_CL);
break;
case 0xb10c:
@@ -468,7 +468,7 @@ handleInt1a(void)
#endif
DEBUG_PRINTF_INTR
("%s(): function %x: PCI Config Write @%02x <-- 0x%04x\n",
- __FUNCTION__, M.x86.R_AX, offs,
+ __func__, M.x86.R_AX, offs,
M.x86.R_CX);
break;
case 0xb10d:
@@ -480,7 +480,7 @@ handleInt1a(void)
#endif
DEBUG_PRINTF_INTR
("%s(): function %x: PCI Config Write @%02x <-- 0x%08x\n",
- __FUNCTION__, M.x86.R_AX, offs,
+ __func__, M.x86.R_AX, offs,
M.x86.R_ECX);
break;
}
@@ -490,7 +490,7 @@ handleInt1a(void)
break;
default:
printf("%s(): unknown function (%x) for int1a handler.\n",
- __FUNCTION__, M.x86.R_AX);
+ __func__, M.x86.R_AX);
DEBUG_PRINTF_INTR("AX=%04x BX=%04x CX=%04x DX=%04x\n",
M.x86.R_AX, M.x86.R_BX, M.x86.R_CX,
M.x86.R_DX);
@@ -507,7 +507,7 @@ handleInterrupt(int intNum)
#ifndef DEBUG_PRINT_INT10
// this printf makes output by int 10 unreadable...
// so we only enable it, if int10 print is disabled
- DEBUG_PRINTF_INTR("%s(%x)\n", __FUNCTION__, intNum);
+ DEBUG_PRINTF_INTR("%s(%x)\n", __func__, intNum);
#endif
switch (intNum) {
case 0x10: //BIOS video interrupt
@@ -521,7 +521,7 @@ handleInterrupt(int intNum)
// ignore interrupt...
DEBUG_PRINTF_INTR
("%s(%x): invalid interrupt Vector (%08x) found, interrupt ignored...\n",
- __FUNCTION__, intNum, my_rdl(intNum * 4));
+ __func__, intNum, my_rdl(intNum * 4));
DEBUG_PRINTF_INTR("AX=%04x BX=%04x CX=%04x DX=%04x\n",
M.x86.R_AX, M.x86.R_BX, M.x86.R_CX,
M.x86.R_DX);
@@ -597,9 +597,9 @@ runInt10(void)
}
setupInt(0x10);
DEBUG_PRINTF_INTR("%s(): starting execution of INT10...\n",
- __FUNCTION__);
+ __func__);
X86EMU_exec();
- DEBUG_PRINTF_INTR("%s(): execution finished\n", __FUNCTION__);
+ DEBUG_PRINTF_INTR("%s(): execution finished\n", __func__);
}
// prepare and execute Interrupt 13 (Disk Interrupt)
@@ -636,7 +636,7 @@ runInt13(void)
setupInt(0x13);
DEBUG_PRINTF_INTR("%s(): starting execution of INT13...\n",
- __FUNCTION__);
+ __func__);
X86EMU_exec();
- DEBUG_PRINTF_INTR("%s(): execution finished\n", __FUNCTION__);
+ DEBUG_PRINTF_INTR("%s(): execution finished\n", __func__);
}
diff --git a/util/x86emu/yabel/io.c b/util/x86emu/yabel/io.c
index bb655130ccae..fa77b8ae4a52 100644
--- a/util/x86emu/yabel/io.c
+++ b/util/x86emu/yabel/io.c
@@ -89,11 +89,11 @@ my_inb(X86EMU_pioAddr addr)
u8 translated = biosemu_dev_translate_address(&translated_addr);
if (translated != 0) {
//translation successfull, access Device I/O (BAR or Legacy...)
- DEBUG_PRINTF_IO("%s(%x): access to Device I/O\n", __FUNCTION__,
+ DEBUG_PRINTF_IO("%s(%x): access to Device I/O\n", __func__,
addr);
- //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __func__, addr, translated_addr);
rval = read_io((void *)translated_addr, 1);
- DEBUG_PRINTF_IO("%s(%04x) Device I/O --> %02x\n", __FUNCTION__,
+ DEBUG_PRINTF_IO("%s(%04x) Device I/O --> %02x\n", __func__,
addr, rval);
return rval;
} else {
@@ -101,7 +101,7 @@ my_inb(X86EMU_pioAddr addr)
case 0x61:
//8254 KB Controller / Timer Port
rval = handle_port_61h();
- //DEBUG_PRINTF_IO("%s(%04x) KB / Timer Port B --> %02x\n", __FUNCTION__, addr, rval);
+ //DEBUG_PRINTF_IO("%s(%04x) KB / Timer Port B --> %02x\n", __func__, addr, rval);
return rval;
break;
case 0xCFC:
@@ -121,10 +121,10 @@ my_inb(X86EMU_pioAddr addr)
default:
DEBUG_PRINTF_IO
("%s(%04x) reading from bios_device.io_buffer\n",
- __FUNCTION__, addr);
+ __func__, addr);
rval = *((u8 *) (bios_device.io_buffer + addr));
DEBUG_PRINTF_IO("%s(%04x) I/O Buffer --> %02x\n",
- __FUNCTION__, addr, rval);
+ __func__, addr, rval);
return rval;
break;
}
@@ -138,9 +138,9 @@ my_inw(X86EMU_pioAddr addr)
u8 translated = biosemu_dev_translate_address(&translated_addr);
if (translated != 0) {
//translation successfull, access Device I/O (BAR or Legacy...)
- DEBUG_PRINTF_IO("%s(%x): access to Device I/O\n", __FUNCTION__,
+ DEBUG_PRINTF_IO("%s(%x): access to Device I/O\n", __func__,
addr);
- //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __func__, addr, translated_addr);
u16 rval;
if ((translated_addr & (u64) 0x1) == 0) {
// 16 bit aligned access...
@@ -152,7 +152,7 @@ my_inw(X86EMU_pioAddr addr)
rval = (read_io((void *)translated_addr, 1) << 8)
| (read_io((void *)(translated_addr + 1), 1));
}
- DEBUG_PRINTF_IO("%s(%04x) Device I/O --> %04x\n", __FUNCTION__,
+ DEBUG_PRINTF_IO("%s(%04x) Device I/O --> %04x\n", __func__,
addr, rval);
return rval;
} else {
@@ -165,11 +165,11 @@ my_inw(X86EMU_pioAddr addr)
default:
DEBUG_PRINTF_IO
("%s(%04x) reading from bios_device.io_buffer\n",
- __FUNCTION__, addr);
+ __func__, addr);
u16 rval =
in16le((void *) bios_device.io_buffer + addr);
DEBUG_PRINTF_IO("%s(%04x) I/O Buffer --> %04x\n",
- __FUNCTION__, addr, rval);
+ __func__, addr, rval);
return rval;
break;
}
@@ -183,9 +183,9 @@ my_inl(X86EMU_pioAddr addr)
u8 translated = biosemu_dev_translate_address(&translated_addr);
if (translated != 0) {
//translation successfull, access Device I/O (BAR or Legacy...)
- DEBUG_PRINTF_IO("%s(%x): access to Device I/O\n", __FUNCTION__,
+ DEBUG_PRINTF_IO("%s(%x): access to Device I/O\n", __func__,
addr);
- //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __func__, addr, translated_addr);
u32 rval;
if ((translated_addr & (u64) 0x3) == 0) {
// 32 bit aligned access...
@@ -199,7 +199,7 @@ my_inl(X86EMU_pioAddr addr)
| (read_io((void *)(translated_addr + 2), 1) << 8)
| (read_io((void *)(translated_addr + 3), 1));
}
- DEBUG_PRINTF_IO("%s(%04x) Device I/O --> %08x\n", __FUNCTION__,
+ DEBUG_PRINTF_IO("%s(%04x) Device I/O --> %08x\n", __func__,
addr, rval);
return rval;
} else {
@@ -211,11 +211,11 @@ my_inl(X86EMU_pioAddr addr)
default:
DEBUG_PRINTF_IO
("%s(%04x) reading from bios_device.io_buffer\n",
- __FUNCTION__, addr);
+ __func__, addr);
u32 rval =
in32le((void *) bios_device.io_buffer + addr);
DEBUG_PRINTF_IO("%s(%04x) I/O Buffer --> %08x\n",
- __FUNCTION__, addr, rval);
+ __func__, addr, rval);
return rval;
break;
}
@@ -230,10 +230,10 @@ my_outb(X86EMU_pioAddr addr, u8 val)
if (translated != 0) {
//translation successfull, access Device I/O (BAR or Legacy...)
DEBUG_PRINTF_IO("%s(%x, %x): access to Device I/O\n",
- __FUNCTION__, addr, val);
- //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ __func__, addr, val);
+ //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __func__, addr, translated_addr);
write_io((void *) translated_addr, val, 1);
- DEBUG_PRINTF_IO("%s(%04x) Device I/O <-- %02x\n", __FUNCTION__,
+ DEBUG_PRINTF_IO("%s(%04x) Device I/O <-- %02x\n", __func__,
addr, val);
} else {
switch (addr) {
@@ -247,7 +247,7 @@ my_outb(X86EMU_pioAddr addr, u8 val)
default:
DEBUG_PRINTF_IO
("%s(%04x,%02x) writing to bios_device.io_buffer\n",
- __FUNCTION__, addr, val);
+ __func__, addr, val);
*((u8 *) (bios_device.io_buffer + addr)) = val;
break;
}
@@ -262,8 +262,8 @@ my_outw(X86EMU_pioAddr addr, u16 val)
if (translated != 0) {
//translation successfull, access Device I/O (BAR or Legacy...)
DEBUG_PRINTF_IO("%s(%x, %x): access to Device I/O\n",
- __FUNCTION__, addr, val);
- //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ __func__, addr, val);
+ //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __func__, addr, translated_addr);
if ((translated_addr & (u64) 0x1) == 0) {
// little-endian conversion
u16 tempval = in16le((void *) &val);
@@ -276,7 +276,7 @@ my_outw(X86EMU_pioAddr addr, u16 val)
write_io(((void *) translated_addr),
(u8) (val & 0x00FF), 1);
}
- DEBUG_PRINTF_IO("%s(%04x) Device I/O <-- %04x\n", __FUNCTION__,
+ DEBUG_PRINTF_IO("%s(%04x) Device I/O <-- %04x\n", __func__,
addr, val);
} else {
switch (addr) {
@@ -288,7 +288,7 @@ my_outw(X86EMU_pioAddr addr, u16 val)
default:
DEBUG_PRINTF_IO
("%s(%04x,%04x) writing to bios_device.io_buffer\n",
- __FUNCTION__, addr, val);
+ __func__, addr, val);
out16le((void *) bios_device.io_buffer + addr, val);
break;
}
@@ -303,8 +303,8 @@ my_outl(X86EMU_pioAddr addr, u32 val)
if (translated != 0) {
//translation successfull, access Device I/O (BAR or Legacy...)
DEBUG_PRINTF_IO("%s(%x, %x): access to Device I/O\n",
- __FUNCTION__, addr, val);
- //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ __func__, addr, val);
+ //DEBUG_PRINTF_IO("%s(%04x): translated_addr: %llx\n", __func__, addr, translated_addr);
if ((translated_addr & (u64) 0x3) == 0) {
// little-endian conversion
u32 tempval = in32le((void *) &val);
@@ -321,7 +321,7 @@ my_outl(X86EMU_pioAddr addr, u32 val)
write_io(((void *) translated_addr),
(u8) (val & 0x000000FF), 1);
}
- DEBUG_PRINTF_IO("%s(%04x) Device I/O <-- %08x\n", __FUNCTION__,
+ DEBUG_PRINTF_IO("%s(%04x) Device I/O <-- %08x\n", __func__,
addr, val);
} else {
switch (addr) {
@@ -332,7 +332,7 @@ my_outl(X86EMU_pioAddr addr, u32 val)
default:
DEBUG_PRINTF_IO
("%s(%04x,%08x) writing to bios_device.io_buffer\n",
- __FUNCTION__, addr, val);
+ __func__, addr, val);
out32le((void *) bios_device.io_buffer + addr, val);
break;
}
@@ -384,7 +384,7 @@ pci_cfg_read(X86EMU_pioAddr addr, u8 size)
#endif
DEBUG_PRINTF_IO
("%s(%04x) PCI Config Read @%02x, size: %d --> 0x%08x\n",
- __FUNCTION__, addr, offs, size, rval);
+ __func__, addr, offs, size, rval);
}
}
}
@@ -433,7 +433,7 @@ pci_cfg_write(X86EMU_pioAddr addr, u32 val, u8 size)
#endif
DEBUG_PRINTF_IO
("%s(%04x) PCI Config Write @%02x, size: %d <-- 0x%08x\n",
- __FUNCTION__, addr, offs, size, val);
+ __func__, addr, offs, size, val);
}
}
}
diff --git a/util/x86emu/yabel/mem.c b/util/x86emu/yabel/mem.c
index 4b73e2af84dc..0f653e968d0c 100644
--- a/util/x86emu/yabel/mem.c
+++ b/util/x86emu/yabel/mem.c
@@ -44,26 +44,26 @@ u32 my_rdl(u32);
/* check Interrupt Vector Access (0000:0000h - 0000:0400h) */ \
if (_addr < 0x400) { \
DEBUG_PRINTF_CS_IP("%s: read from Interrupt Vector %x --> %x\n", \
- __FUNCTION__, _addr / 4, _rval); \
+ __func__, _addr / 4, _rval); \
} \
/* access to BIOS Data Area (0000:0400h - 0000:0500h)*/ \
else if ((_addr >= 0x400) && (addr < 0x500)) { \
DEBUG_PRINTF_CS_IP("%s: read from BIOS Data Area: addr: %x --> %x\n", \
- __FUNCTION__, _addr, _rval); \
+ __func__, _addr, _rval); \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
} \
/* access to first 64k of memory... */ \
else if (_addr < 0x10000) { \
DEBUG_PRINTF_CS_IP("%s: read from segment 0000h: addr: %x --> %x\n", \
- __FUNCTION__, _addr, _rval); \
+ __func__, _addr, _rval); \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
} \
/* read from PMM_CONV_SEGMENT */ \
else if ((_addr <= ((PMM_CONV_SEGMENT << 4) | 0xffff)) && (_addr >= (PMM_CONV_SEGMENT << 4))) { \
DEBUG_PRINTF_CS_IP("%s: read from PMM Segment %04xh: addr: %x --> %x\n", \
- __FUNCTION__, PMM_CONV_SEGMENT, _addr, _rval); \
+ __func__, PMM_CONV_SEGMENT, _addr, _rval); \
/* HALT_SYS(); */ \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
@@ -71,7 +71,7 @@ u32 my_rdl(u32);
/* read from PNP_DATA_SEGMENT */ \
else if ((_addr <= ((PNP_DATA_SEGMENT << 4) | 0xffff)) && (_addr >= (PNP_DATA_SEGMENT << 4))) { \
DEBUG_PRINTF_CS_IP("%s: read from PnP Data Segment %04xh: addr: %x --> %x\n", \
- __FUNCTION__, PNP_DATA_SEGMENT, _addr, _rval); \
+ __func__, PNP_DATA_SEGMENT, _addr, _rval); \
/* HALT_SYS(); */ \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
@@ -79,12 +79,12 @@ u32 my_rdl(u32);
/* read from EBDA Segment */ \
else if ((_addr <= ((ebda_segment << 4) | (ebda_size - 1))) && (_addr >= (ebda_segment << 4))) { \
DEBUG_PRINTF_CS_IP("%s: read from Extended BIOS Data Area %04xh, size: %04x: addr: %x --> %x\n", \
- __FUNCTION__, ebda_segment, ebda_size, _addr, _rval); \
+ __func__, ebda_segment, ebda_size, _addr, _rval); \
} \
/* read from BIOS_DATA_SEGMENT */ \
else if ((_addr <= ((BIOS_DATA_SEGMENT << 4) | 0xffff)) && (_addr >= (BIOS_DATA_SEGMENT << 4))) { \
DEBUG_PRINTF_CS_IP("%s: read from BIOS Data Segment %04xh: addr: %x --> %x\n", \
- __FUNCTION__, BIOS_DATA_SEGMENT, _addr, _rval); \
+ __func__, BIOS_DATA_SEGMENT, _addr, _rval); \
/* for PMM debugging */ \
/*if (_addr == BIOS_DATA_SEGMENT << 4) { \
X86EMU_trace_on(); \
@@ -107,52 +107,52 @@ u32 my_rdl(u32);
/* check Interrupt Vector Access (0000:0000h - 0000:0400h) */ \
if (_addr < 0x400) { \
DEBUG_PRINTF_CS_IP("%s: write to Interrupt Vector %x <-- %x\n", \
- __FUNCTION__, _addr / 4, _val); \
+ __func__, _addr / 4, _val); \
} \
/* access to BIOS Data Area (0000:0400h - 0000:0500h)*/ \
else if ((_addr >= 0x400) && (addr < 0x500)) { \
DEBUG_PRINTF_CS_IP("%s: write to BIOS Data Area: addr: %x <-- %x\n", \
- __FUNCTION__, _addr, _val); \
+ __func__, _addr, _val); \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
} \
/* access to first 64k of memory...*/ \
else if (_addr < 0x10000) { \
DEBUG_PRINTF_CS_IP("%s: write to segment 0000h: addr: %x <-- %x\n", \
- __FUNCTION__, _addr, _val); \
+ __func__, _addr, _val); \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
} \
/* write to PMM_CONV_SEGMENT... */ \
else if ((_addr <= ((PMM_CONV_SEGMENT << 4) | 0xffff)) && (_addr >= (PMM_CONV_SEGMENT << 4))) { \
DEBUG_PRINTF_CS_IP("%s: write to PMM Segment %04xh: addr: %x <-- %x\n", \
- __FUNCTION__, PMM_CONV_SEGMENT, _addr, _val); \
+ __func__, PMM_CONV_SEGMENT, _addr, _val); \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
} \
/* write to PNP_DATA_SEGMENT... */ \
else if ((_addr <= ((PNP_DATA_SEGMENT << 4) | 0xffff)) && (_addr >= (PNP_DATA_SEGMENT << 4))) { \
DEBUG_PRINTF_CS_IP("%s: write to PnP Data Segment %04xh: addr: %x <-- %x\n", \
- __FUNCTION__, PNP_DATA_SEGMENT, _addr, _val); \
+ __func__, PNP_DATA_SEGMENT, _addr, _val); \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
} \
/* write to EBDA Segment... */ \
else if ((_addr <= ((ebda_segment << 4) | (ebda_size - 1))) && (_addr >= (ebda_segment << 4))) { \
DEBUG_PRINTF_CS_IP("%s: write to Extended BIOS Data Area %04xh, size: %04x: addr: %x <-- %x\n", \
- __FUNCTION__, ebda_segment, ebda_size, _addr, _val); \
+ __func__, ebda_segment, ebda_size, _addr, _val); \
} \
/* write to BIOS_DATA_SEGMENT... */ \
else if ((_addr <= ((BIOS_DATA_SEGMENT << 4) | 0xffff)) && (_addr >= (BIOS_DATA_SEGMENT << 4))) { \
DEBUG_PRINTF_CS_IP("%s: write to BIOS Data Segment %04xh: addr: %x <-- %x\n", \
- __FUNCTION__, BIOS_DATA_SEGMENT, _addr, _val); \
+ __func__, BIOS_DATA_SEGMENT, _addr, _val); \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
} \
/* write to current CS segment... */ \
else if ((_addr < ((M.x86.R_CS << 4) | 0xffff)) && (_addr > (M.x86.R_CS << 4))) { \
DEBUG_PRINTF_CS_IP("%s: write to CS segment %04xh: addr: %x <-- %x\n", \
- __FUNCTION__, M.x86.R_CS, _addr, _val); \
+ __func__, M.x86.R_CS, _addr, _val); \
/* dump registers */ \
/* x86emu_dump_xregs(); */ \
} \
@@ -178,17 +178,17 @@ my_rdb(u32 addr)
if (translated != 0) {
//translation successfull, access VGA Memory (BAR or Legacy...)
DEBUG_PRINTF_MEM("%s(%08x): access to VGA Memory\n",
- __FUNCTION__, addr);
- //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ __func__, addr);
+ //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __func__, addr, translated_addr);
set_ci();
rval = *((u8 *) translated_addr);
clr_ci();
- DEBUG_PRINTF_MEM("%s(%08x) VGA --> %02x\n", __FUNCTION__, addr,
+ DEBUG_PRINTF_MEM("%s(%08x) VGA --> %02x\n", __func__, addr,
rval);
return rval;
} else if (addr > M.mem_size) {
DEBUG_PRINTF("%s(%08x): Memory Access out of range!\n",
- __FUNCTION__, addr);
+ __func__, addr);
//disassemble_forward(M.x86.saved_cs, M.x86.saved_ip, 1);
HALT_SYS();
} else {
@@ -210,8 +210,8 @@ my_rdw(u32 addr)
if (translated != 0) {
//translation successfull, access VGA Memory (BAR or Legacy...)
DEBUG_PRINTF_MEM("%s(%08x): access to VGA Memory\n",
- __FUNCTION__, addr);
- //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ __func__, addr);
+ //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __func__, addr, translated_addr);
// check for legacy memory, because of the remapping to BARs, the reads must
// be byte reads...
if ((addr >= 0xa0000) && (addr < 0xc0000)) {
@@ -234,12 +234,12 @@ my_rdw(u32 addr)
clr_ci();
}
}
- DEBUG_PRINTF_MEM("%s(%08x) VGA --> %04x\n", __FUNCTION__, addr,
+ DEBUG_PRINTF_MEM("%s(%08x) VGA --> %04x\n", __func__, addr,
rval);
return rval;
} else if (addr > M.mem_size) {
DEBUG_PRINTF("%s(%08x): Memory Access out of range!\n",
- __FUNCTION__, addr);
+ __func__, addr);
//disassemble_forward(M.x86.saved_cs, M.x86.saved_ip, 1);
HALT_SYS();
} else {
@@ -261,8 +261,8 @@ my_rdl(u32 addr)
if (translated != 0) {
//translation successfull, access VGA Memory (BAR or Legacy...)
DEBUG_PRINTF_MEM("%s(%x): access to VGA Memory\n",
- __FUNCTION__, addr);
- //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ __func__, addr);
+ //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __func__, addr, translated_addr);
// check for legacy memory, because of the remapping to BARs, the reads must
// be byte reads...
if ((addr >= 0xa0000) && (addr < 0xc0000)) {
@@ -289,13 +289,13 @@ my_rdl(u32 addr)
clr_ci();
}
}
- DEBUG_PRINTF_MEM("%s(%08x) VGA --> %08x\n", __FUNCTION__, addr,
+ DEBUG_PRINTF_MEM("%s(%08x) VGA --> %08x\n", __func__, addr,
rval);
//HALT_SYS();
return rval;
} else if (addr > M.mem_size) {
DEBUG_PRINTF("%s(%08x): Memory Access out of range!\n",
- __FUNCTION__, addr);
+ __func__, addr);
//disassemble_forward(M.x86.saved_cs, M.x86.saved_ip, 1);
HALT_SYS();
} else {
@@ -323,14 +323,14 @@ my_wrb(u32 addr, u8 val)
if (translated != 0) {
//translation successfull, access VGA Memory (BAR or Legacy...)
DEBUG_PRINTF_MEM("%s(%x, %x): access to VGA Memory\n",
- __FUNCTION__, addr, val);
- //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ __func__, addr, val);
+ //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __func__, addr, translated_addr);
set_ci();
*((u8 *) translated_addr) = val;
clr_ci();
} else if (addr > M.mem_size) {
DEBUG_PRINTF("%s(%08x): Memory Access out of range!\n",
- __FUNCTION__, addr);
+ __func__, addr);
//disassemble_forward(M.x86.saved_cs, M.x86.saved_ip, 1);
HALT_SYS();
} else {
@@ -348,8 +348,8 @@ my_wrw(u32 addr, u16 val)
if (translated != 0) {
//translation successfull, access VGA Memory (BAR or Legacy...)
DEBUG_PRINTF_MEM("%s(%x, %x): access to VGA Memory\n",
- __FUNCTION__, addr, val);
- //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ __func__, addr, val);
+ //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __func__, addr, translated_addr);
// check for legacy memory, because of the remapping to BARs, the reads must
// be byte reads...
if ((addr >= 0xa0000) && (addr < 0xc0000)) {
@@ -376,7 +376,7 @@ my_wrw(u32 addr, u16 val)
}
} else if (addr > M.mem_size) {
DEBUG_PRINTF("%s(%08x): Memory Access out of range!\n",
- __FUNCTION__, addr);
+ __func__, addr);
//disassemble_forward(M.x86.saved_cs, M.x86.saved_ip, 1);
HALT_SYS();
} else {
@@ -393,8 +393,8 @@ my_wrl(u32 addr, u32 val)
if (translated != 0) {
//translation successfull, access VGA Memory (BAR or Legacy...)
DEBUG_PRINTF_MEM("%s(%x, %x): access to VGA Memory\n",
- __FUNCTION__, addr, val);
- //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __FUNCTION__, addr, translated_addr);
+ __func__, addr, val);
+ //DEBUG_PRINTF_MEM("%s(%08x): translated_addr: %llx\n", __func__, addr, translated_addr);
// check for legacy memory, because of the remapping to BARs, the reads must
// be byte reads...
if ((addr >= 0xa0000) && (addr < 0xc0000)) {
@@ -427,7 +427,7 @@ my_wrl(u32 addr, u32 val)
}
} else if (addr > M.mem_size) {
DEBUG_PRINTF("%s(%08x): Memory Access out of range!\n",
- __FUNCTION__, addr);
+ __func__, addr);
//disassemble_forward(M.x86.saved_cs, M.x86.saved_ip, 1);
HALT_SYS();
} else {
diff --git a/util/x86emu/yabel/pmm.c b/util/x86emu/yabel/pmm.c
index d909931fa0c0..13b8e1a4dd4c 100644
--- a/util/x86emu/yabel/pmm.c
+++ b/util/x86emu/yabel/pmm.c
@@ -109,13 +109,13 @@ void pmm_handleInt()
flags = pop_word();
DEBUG_PRINTF_PMM
("%s: pmmAllocate: Length: %x, Handle: %x, Flags: %x\n",
- __FUNCTION__, length, handle, flags);
+ __func__, length, handle, flags);
if ((flags & 0x1) != 0) {
/* request to allocate in conventional memory */
if (curr_pmm_allocation_index >= MAX_PMM_AREAS) {
printf
("%s: pmmAllocate: Maximum Number of allocatable areas reached (%d), cannot allocate more memory!\n",
- __FUNCTION__, MAX_PMM_AREAS);
+ __func__, MAX_PMM_AREAS);
rval = 0;
goto exit;
}
@@ -133,7 +133,7 @@ void pmm_handleInt()
[curr_pmm_allocation_index - 1].length;
}
DEBUG_PRINTF_PMM("%s: next_offset: 0x%x\n",
- __FUNCTION__, next_offset);
+ __func__, next_offset);
if (length == 0) {
/* largest possible block size requested, we have on segment
* to allocate, so largest possible is segment size (0xFFFF)
@@ -158,7 +158,7 @@ void pmm_handleInt()
if (align < 0x10) {
align = 0x10;
}
- DEBUG_PRINTF_PMM("%s: align: 0x%x\n", __FUNCTION__,
+ DEBUG_PRINTF_PMM("%s: align: 0x%x\n", __func__,
align);
if ((next_offset & (align - 1)) != 0) {
/* not yet aligned... align! */
@@ -169,7 +169,7 @@ void pmm_handleInt()
rval = 0;
printf
("%s: pmmAllocate: Not enough memory available for allocation!\n",
- __FUNCTION__);
+ __func__);
goto exit;
}
curr_pmm_allocation_index++;
@@ -181,25 +181,25 @@ void pmm_handleInt()
rval = ((u32) (PMM_CONV_SEGMENT << 16)) | next_offset;
DEBUG_PRINTF_PMM
("%s: pmmAllocate: allocated memory at %x\n",
- __FUNCTION__, rval);
+ __func__, rval);
} else {
rval = 0;
printf
("%s: pmmAllocate: allocation in extended memory not supported!\n",
- __FUNCTION__);
+ __func__);
}
goto exit;
case 1:
/* function pmmFind */
handle = pop_long(); /* the handle to lookup */
- DEBUG_PRINTF_PMM("%s: pmmFind: Handle: %x\n", __FUNCTION__,
+ DEBUG_PRINTF_PMM("%s: pmmFind: Handle: %x\n", __func__,
handle);
i = 0;
for (i = 0; i < curr_pmm_allocation_index; i++) {
if (pmm_allocation_array[i].handle == handle) {
DEBUG_PRINTF_PMM
("%s: pmmFind: found allocated memory at %x\n",
- __FUNCTION__, rval);
+ __func__, rval);
/* return the 32bit "physical" address, i.e. combination of segment and offset */
rval =
((u32) (PMM_CONV_SEGMENT << 16)) |
@@ -209,7 +209,7 @@ void pmm_handleInt()
if (rval == 0) {
DEBUG_PRINTF_PMM
("%s: pmmFind: handle (%x) not found!\n",
- __FUNCTION__, handle);
+ __func__, handle);
}
goto exit;
case 2:
@@ -220,7 +220,7 @@ void pmm_handleInt()
*/
buffer = buffer ^ ((u32) PMM_CONV_SEGMENT << 16);
DEBUG_PRINTF_PMM("%s: pmmDeallocate: PMM segment offset: %x\n",
- __FUNCTION__, buffer);
+ __func__, buffer);
i = 0;
/* rval = 0 means we deallocated the buffer, so set it to 1 in case we dont find it and
* thus cannot deallocate
@@ -234,7 +234,7 @@ void pmm_handleInt()
rval = 0;
DEBUG_PRINTF_PMM
("%s: pmmDeallocate: found allocated memory at index: %d\n",
- __FUNCTION__, i);
+ __func__, i);
/* copy the remaining elements in pmm_allocation_array one position up */
j = i;
for (; j < curr_pmm_allocation_index; j++) {
@@ -256,13 +256,13 @@ void pmm_handleInt()
if (rval != 0) {
DEBUG_PRINTF_PMM
("%s: pmmDeallocate: offset (%x) not found, cannot deallocate!\n",
- __FUNCTION__, buffer);
+ __func__, buffer);
}
goto exit;
default:
/* invalid/unimplemented function */
printf("%s: invalid PMM function (0x%04x) called!\n",
- __FUNCTION__, function);
+ __func__, function);
/* PMM spec says if function is invalid, return 0xFFFFFFFF */
rval = 0xFFFFFFFF;
goto exit;
@@ -274,7 +274,7 @@ void pmm_handleInt()
M.x86.R_AX = (u16) (rval & 0xFFFF);
CHECK_DBG(DEBUG_PMM) {
DEBUG_PRINTF_PMM("%s: dump of pmm_allocation_array:\n",
- __FUNCTION__);
+ __func__);
for (i = 0; i < MAX_PMM_AREAS; i++) {
DEBUG_PRINTF_PMM
("%d:\n\thandle: %x\n\toffset: %x\n\tlength: %x\n",
@@ -304,7 +304,7 @@ void pmm_test(void)
push_long(0); /* This is the return address for the ABI, unused in this implementation */
pmm_handleInt();
addr = ((u32) M.x86.R_DX << 16) | M.x86.R_AX;
- DEBUG_PRINTF_PMM("%s: allocated memory at: %04x:%04x\n", __FUNCTION__,
+ DEBUG_PRINTF_PMM("%s: allocated memory at: %04x:%04x\n", __func__,
M.x86.R_DX, M.x86.R_AX);
function = 1; /* pmmFind */
push_long(handle);
@@ -312,7 +312,7 @@ void pmm_test(void)
push_long(0); /* This is the return address for the ABI, unused in this implementation */
pmm_handleInt();
DEBUG_PRINTF_PMM("%s: found memory at: %04x:%04x (expected: %08x)\n",
- __FUNCTION__, M.x86.R_DX, M.x86.R_AX, addr);
+ __func__, M.x86.R_DX, M.x86.R_AX, addr);
function = 2; /* pmmDeallocate */
push_long(addr);
push_word(function);
@@ -320,7 +320,7 @@ void pmm_test(void)
pmm_handleInt();
DEBUG_PRINTF_PMM
("%s: freed memory rval: %04x:%04x (expected: 0000:0000)\n",
- __FUNCTION__, M.x86.R_DX, M.x86.R_AX);
+ __func__, M.x86.R_DX, M.x86.R_AX);
/*-------------------- Test aligned allocation/deallocation ----------------------------- */
function = 0; /* pmmAllocate */
handle = 0xdeadbeef;
@@ -334,7 +334,7 @@ void pmm_test(void)
push_long(0); /* This is the return address for the ABI, unused in this implementation */
pmm_handleInt();
addr = ((u32) M.x86.R_DX << 16) | M.x86.R_AX;
- DEBUG_PRINTF_PMM("%s: allocated memory at: %04x:%04x\n", __FUNCTION__,
+ DEBUG_PRINTF_PMM("%s: allocated memory at: %04x:%04x\n", __func__,
M.x86.R_DX, M.x86.R_AX);
function = 0; /* pmmAllocate */
handle = 0xf00d4b0b;
@@ -349,7 +349,7 @@ void pmm_test(void)
pmm_handleInt();
/* the address should be aligned to 0x800, so probably it is at offset 0x1800... */
addr = ((u32) M.x86.R_DX << 16) | M.x86.R_AX;
- DEBUG_PRINTF_PMM("%s: allocated memory at: %04x:%04x\n", __FUNCTION__,
+ DEBUG_PRINTF_PMM("%s: allocated memory at: %04x:%04x\n", __func__,
M.x86.R_DX, M.x86.R_AX);
function = 1; /* pmmFind */
push_long(handle);
@@ -364,7 +364,7 @@ void pmm_test(void)
pmm_handleInt();
DEBUG_PRINTF_PMM
("%s: freed memory rval: %04x:%04x (expected: 0000:0000)\n",
- __FUNCTION__, M.x86.R_DX, M.x86.R_AX);
+ __func__, M.x86.R_DX, M.x86.R_AX);
handle = 0xdeadbeef;
function = 1; /* pmmFind */
push_long(handle);
@@ -379,7 +379,7 @@ void pmm_test(void)
pmm_handleInt();
DEBUG_PRINTF_PMM
("%s: freed memory rval: %04x:%04x (expected: 0000:0000)\n",
- __FUNCTION__, M.x86.R_DX, M.x86.R_AX);
+ __func__, M.x86.R_DX, M.x86.R_AX);
/*-------------------- Test out of memory allocation ----------------------------- */
function = 0; /* pmmAllocate */
handle = 0xdeadbeef;
@@ -394,7 +394,7 @@ void pmm_test(void)
pmm_handleInt();
length = ((u32) M.x86.R_DX << 16) | M.x86.R_AX;
length /= 16; /* length in paragraphs */
- DEBUG_PRINTF_PMM("%s: largest possible length: %08x\n", __FUNCTION__,
+ DEBUG_PRINTF_PMM("%s: largest possible length: %08x\n", __func__,
length);
function = 0; /* pmmAllocate */
flags = 0x1; /* conventional memory, aligned */
@@ -406,7 +406,7 @@ void pmm_test(void)
push_long(0); /* This is the return address for the ABI, unused in this implementation */
pmm_handleInt();
addr = ((u32) M.x86.R_DX << 16) | M.x86.R_AX;
- DEBUG_PRINTF_PMM("%s: allocated memory at: %04x:%04x\n", __FUNCTION__,
+ DEBUG_PRINTF_PMM("%s: allocated memory at: %04x:%04x\n", __func__,
M.x86.R_DX, M.x86.R_AX);
function = 0; /* pmmAllocate */
length = 1;
@@ -423,7 +423,7 @@ void pmm_test(void)
addr = ((u32) M.x86.R_DX << 16) | M.x86.R_AX;
DEBUG_PRINTF_PMM
("%s: allocated memory at: %04x:%04x expected: 0000:0000\n",
- __FUNCTION__, M.x86.R_DX, M.x86.R_AX);
+ __func__, M.x86.R_DX, M.x86.R_AX);
handle = 0xdeadbeef;
function = 1; /* pmmFind */
push_long(handle);
@@ -438,5 +438,5 @@ void pmm_test(void)
pmm_handleInt();
DEBUG_PRINTF_PMM
("%s: freed memory rval: %04x:%04x (expected: 0000:0000)\n",
- __FUNCTION__, M.x86.R_DX, M.x86.R_AX);
+ __func__, M.x86.R_DX, M.x86.R_AX);
}
diff --git a/util/x86emu/yabel/vbe.c b/util/x86emu/yabel/vbe.c
index cd0ba95c7ab7..13612dea1937 100644
--- a/util/x86emu/yabel/vbe.c
+++ b/util/x86emu/yabel/vbe.c
@@ -129,14 +129,14 @@ vbe_info(vbe_info_t * info)
if (M.x86.R_AL != 0x4f) {
DEBUG_PRINTF_VBE("%s: VBE Info Function NOT supported! AL=%x\n",
- __FUNCTION__, M.x86.R_AL);
+ __func__, M.x86.R_AL);
return -1;
}
if (M.x86.R_AH != 0x0) {
DEBUG_PRINTF_VBE
("%s: VBE Info Function Return Code NOT OK! AH=%x\n",
- __FUNCTION__, M.x86.R_AH);
+ __func__, M.x86.R_AH);
return M.x86.R_AH;
}
//printf("VBE Info Dump:");
@@ -200,14 +200,14 @@ vbe_get_mode_info(vbe_mode_info_t * mode_info)
if (M.x86.R_AL != 0x4f) {
DEBUG_PRINTF_VBE
("%s: VBE Return Mode Info Function NOT supported! AL=%x\n",
- __FUNCTION__, M.x86.R_AL);
+ __func__, M.x86.R_AL);
return -1;
}
if (M.x86.R_AH != 0x0) {
DEBUG_PRINTF_VBE
("%s: VBE Return Mode Info (mode: %04x) Function Return Code NOT OK! AH=%02x\n",
- __FUNCTION__, mode_info->video_mode, M.x86.R_AH);
+ __func__, mode_info->video_mode, M.x86.R_AH);
return M.x86.R_AH;
}
//pointer to mode_info_block is in ES:DI
@@ -260,7 +260,7 @@ vbe_set_mode(vbe_mode_info_t * mode_info)
M.x86.R_BX |= 0x4000; // set bit 14 to request linear framebuffer mode
M.x86.R_BX &= 0x7FFF; // clear bit 15 to request clearing of framebuffer
- DEBUG_PRINTF_VBE("%s: setting mode: 0x%04x\n", __FUNCTION__,
+ DEBUG_PRINTF_VBE("%s: setting mode: 0x%04x\n", __func__,
M.x86.R_BX);
// enable trace
@@ -273,14 +273,14 @@ vbe_set_mode(vbe_mode_info_t * mode_info)
if (M.x86.R_AL != 0x4f) {
DEBUG_PRINTF_VBE
("%s: VBE Set Mode Function NOT supported! AL=%x\n",
- __FUNCTION__, M.x86.R_AL);
+ __func__, M.x86.R_AL);
return -1;
}
if (M.x86.R_AH != 0x0) {
DEBUG_PRINTF_VBE
("%s: mode: %x VBE Set Mode Function Return Code NOT OK! AH=%x\n",
- __FUNCTION__, mode_info->video_mode, M.x86.R_AH);
+ __func__, mode_info->video_mode, M.x86.R_AH);
return M.x86.R_AH;
}
return 0;
@@ -296,7 +296,7 @@ vbe_set_palette_format(u8 format)
M.x86.R_BL = 0x00; // set format
M.x86.R_BH = format;
- DEBUG_PRINTF_VBE("%s: setting palette format: %d\n", __FUNCTION__,
+ DEBUG_PRINTF_VBE("%s: setting palette format: %d\n", __func__,
format);
// enable trace
@@ -309,14 +309,14 @@ vbe_set_palette_format(u8 format)
if (M.x86.R_AL != 0x4f) {
DEBUG_PRINTF_VBE
("%s: VBE Set Palette Format Function NOT supported! AL=%x\n",
- __FUNCTION__, M.x86.R_AL);
+ __func__, M.x86.R_AL);
return -1;
}
if (M.x86.R_AH != 0x0) {
DEBUG_PRINTF_VBE
("%s: VBE Set Palette Format Function Return Code NOT OK! AH=%x\n",
- __FUNCTION__, M.x86.R_AH);
+ __func__, M.x86.R_AH);
return M.x86.R_AH;
}
return 0;
@@ -339,7 +339,7 @@ vbe_set_color(u16 color_number, u32 color_value)
// store color value at ES:DI
out32le(biosmem + (M.x86.R_ES << 4) + M.x86.R_DI, color_value);
- DEBUG_PRINTF_VBE("%s: setting color #%x: 0x%04x\n", __FUNCTION__,
+ DEBUG_PRINTF_VBE("%s: setting color #%x: 0x%04x\n", __func__,
color_number, color_value);
// enable trace
@@ -352,14 +352,14 @@ vbe_set_color(u16 color_number, u32 color_value)
if (M.x86.R_AL != 0x4f) {
DEBUG_PRINTF_VBE
("%s: VBE Set Palette Function NOT supported! AL=%x\n",
- __FUNCTION__, M.x86.R_AL);
+ __func__, M.x86.R_AL);
return -1;
}
if (M.x86.R_AH != 0x0) {
DEBUG_PRINTF_VBE
("%s: VBE Set Palette Function Return Code NOT OK! AH=%x\n",
- __FUNCTION__, M.x86.R_AH);
+ __func__, M.x86.R_AH);
return M.x86.R_AH;
}
return 0;
@@ -388,20 +388,20 @@ vbe_get_color(u16 color_number, u32 * color_value)
if (M.x86.R_AL != 0x4f) {
DEBUG_PRINTF_VBE
("%s: VBE Set Palette Function NOT supported! AL=%x\n",
- __FUNCTION__, M.x86.R_AL);
+ __func__, M.x86.R_AL);
return -1;
}
if (M.x86.R_AH != 0x0) {
DEBUG_PRINTF_VBE
("%s: VBE Set Palette Function Return Code NOT OK! AH=%x\n",
- __FUNCTION__, M.x86.R_AH);
+ __func__, M.x86.R_AH);
return M.x86.R_AH;
}
// read color value from ES:DI
*color_value = in32le(biosmem + (M.x86.R_ES << 4) + M.x86.R_DI);
- DEBUG_PRINTF_VBE("%s: getting color #%x --> 0x%04x\n", __FUNCTION__,
+ DEBUG_PRINTF_VBE("%s: getting color #%x --> 0x%04x\n", __func__,
color_number, *color_value);
return 0;
@@ -429,14 +429,14 @@ vbe_get_ddc_info(vbe_ddc_info_t * ddc_info)
if (M.x86.R_AL != 0x4f) {
DEBUG_PRINTF_VBE
("%s: VBE Get DDC Info Function NOT supported! AL=%x\n",
- __FUNCTION__, M.x86.R_AL);
+ __func__, M.x86.R_AL);
return -1;
}
if (M.x86.R_AH != 0x0) {
DEBUG_PRINTF_VBE
("%s: port: %x VBE Get DDC Info Function Return Code NOT OK! AH=%x\n",
- __FUNCTION__, ddc_info->port_number, M.x86.R_AH);
+ __func__, ddc_info->port_number, M.x86.R_AH);
return M.x86.R_AH;
}
// BH = approx. time in seconds to transfer one EDID block
@@ -464,14 +464,14 @@ vbe_get_ddc_info(vbe_ddc_info_t * ddc_info)
if (M.x86.R_AL != 0x4f) {
DEBUG_PRINTF_VBE
("%s: VBE Read EDID Function NOT supported! AL=%x\n",
- __FUNCTION__, M.x86.R_AL);
+ __func__, M.x86.R_AL);
return -1;
}
if (M.x86.R_AH != 0x0) {
DEBUG_PRINTF_VBE
("%s: port: %x VBE Read EDID Function Return Code NOT OK! AH=%x\n",
- __FUNCTION__, ddc_info->port_number, M.x86.R_AH);
+ __func__, ddc_info->port_number, M.x86.R_AH);
return M.x86.R_AH;
}
@@ -565,13 +565,13 @@ vbe_get_info(u8 argc, char ** argv)
if (strncmp((char *) input.signature, "DDC", 4) != 0) {
printf
("%s: Invalid input signature! expected: %s, is: %s\n",
- __FUNCTION__, "DDC", input.signature);
+ __func__, "DDC", input.signature);
return -1;
}
if (input.size_reserved != sizeof(screen_info_t)) {
printf
("%s: Size of return struct is wrong, required: %d, available: %d\n",
- __FUNCTION__, (int) sizeof(screen_info_t),
+ __func__, (int) sizeof(screen_info_t),
input.size_reserved);
return -1;
}
@@ -765,7 +765,7 @@ vbe_get_info(u8 argc, char ** argv)
output->framebuffer_address =
best_mode_info.framebuffer_address;
} else {
- printf("%s: No suitable video mode found!\n", __FUNCTION__);
+ printf("%s: No suitable video mode found!\n", __func__);
//unset display_type...
output->display_type = 0;
}